Hi Frederic,

On 26.06.2012 15:33, frederic.wo...@continental-corporation.com wrote:
>> frederic.wo...@continental-corporation.com wrote:
>>> What is the best way currently with connman (as part of Genivi) to
>>> achieve service preference by application ?
>>
>> Could you start with clarifying Genivi use cases to us? Without them we
>> really can't do much.
> 
> Main use case is to offer different connection profiles for different 
> applications or even several connection profiles for a single application, 
> but more focussed on the used telecom plan.

I wouldn't call this profiles at all. These are just different
connectivity needs from an application, settings or configuration so to
speek. Profiles sounds more like a master switch, which offers a
complete different behavior.

> For instance, OEM may deliver its product with two kinds of apps:
> a) with some connected apps (as connected nav) that are intended to use a 
> modem (either internal or external on USB) also delivered by the OEM with 
> a pre-paid SIM.
> 
> b) with some others connected apps (as browser) that shall be used with 
> user phone (via BT, Wifi or USB) using of course the user SIM.
> 
> Use case a) shall create a connection profile making use of OEM NAD (only 
> or preferably depending on possible configuration flexibility)

The Session API allows you to express this, as long all device types are
different types of hardware, since the AllowedBearers offers you only
that. In the following example both application create an session with
this settings:

NavApp: AllowedBearers = [ "cellular" ]
Browser: AllowedBearers = [ "bluetooth", "wifi", "ethernet" ]

I hope I got the technology mapping correct to your description.
"cellular" maps to oFono. oFono will handle all 'real' hardware modem
connections. "bluetooth" maps to DUN and PAN, "wifi" is clear and
"ethernet" to USB ethernet gadget subsystem.

> Use case b) shall also create another connection profile make use of user 
> phone (also only or preferably depending on possible configuration 
> flexibility)
> 
> Even a single application may need two different connection profile 
> depending for instance on the amount of data to download (for instance 
> weather data that may use 3G link vs map data update that may be 
> restricted to Wifi), on QoS (live radar that needs medium latency vs map 
> data again)

I do not argue against having two Sessions per application, but I don't
think the updating example is a strong argument for two sessions.

There should be an updating service (the application might trigger that
one) like all Linux distribution have some central package manager with
online update features (yum, apt-get, zippy, emerge, ...). Or is your
argument, depending on the link an application will fetch more or less
data? If that is the case you still don't have to create two sessions. A
single session with AllowedBearers = [ "wifi", "cellular" ] tells
ConnMan to go for "wifi" if possible or fallback to "cellular". The
application will be notified when the session is online and it will also
get the type of the networking device. So it can decided what to do on
this information.

> My first idea was to create 2 to 4 sessions to map on connection profile 
> to pre-rank services.
> Then apps may have used these sessions profiles.

The main problem with multiple session is actually, you end up very fast
in the situation where you want to have some ordering between sessions.
We had in the past discussion on this with no real answer. The main
objection against introducing some dependency between sessions is that
we add a lot of complexity. All use case so far could be made work with
the current API.

> However I discovered that session was only able to manager bearers and not 
> services so that I was not able to distinguish between user phone and OEM 
> NAD.

Yep, I think we need to add the AllowedServices to the Session API. The
use case for this is, that a user wants only to connect to his home wifi
network and not generally to all available wifi networks when he is not
at home. Then ConnMan should select a cellular network.

AllowedBearers = [ "cellular" ]
AllowedServices = [ "MyHomeWifiNetwork" ]

cheers,
daniel
_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to