Hi all

thanks for the reply. We made the test with the 1.23 (using the same policy, 
group and psw files) and the situation is not far from the previous one.
For licensing issue, we cannot move to the 1.29 version of ConnMan because of 
Glib, we have to stay with the 1.23.

The differences are:
 [precondition for the testing: ETH connected and online]
After a "session connect” from the wifisession shell, the WiFi connection is 
not automatically triggered and Service API (connect) has to be used to have 
WiFi ready.
The WiFi in not put in Online but in Ready state (as the WiFi is preferred to 
ETH we were expecting WiFi=online, ETH=ready).
Now in the wifisession shell I’m able to reach internet but with ETH interface 
(in my previous post, WiFi was Online, and in the ethsession shell I was not 
able to go to Internet).
Other difference is now the AllowedBearers is not showing anymore [ * ] but:
from wifisession shell:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
connmanctl> session connect
Session /sessions/_1_114/net/connman/connmanctl3944 created
Session      Update               = {
State = online
Name = Wired
IPv4 = [ Method=dhcp, Address=192.168.1.100, Netmask=255.255.255.0, 
Gateway=192.168.1.1 ]
IPv6 = [  ]
Interface = eth0
Bearer = ethernet
ConnectionType = any
AllowedBearers = [ ethernet, wifi, bluetooth, cellular, gadget ]
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

No changes in the output of all other commands (sudo iptables -t mangle -L, 
sudo iptables -t filter -L, route -n, ip rule show)

With respect to the suggestion from Daniel, please correct me if I’m I wrong 
but I’ve the feeling that this PATCH is showing functionalities already there 
(file based in session_policy_local.c) in D-Bus. Up to now we are interested to 
static configuration (file based).

Have you got any suggestion?

Cheers
Gianfranco

> On 02 Jul 2015, at 09:20, Patrik Flykt <patrik.fl...@linux.intel.com> wrote:
> 
> 
>       Hi,
> 
> On Thu, 2015-07-02 at 08:37 +0200, Daniel Wagner wrote:
>> There is a way to still solve your problem. You need to write
>> your own session plugin. Within this plugin you can decided 
>> which Services needs to be online and which Session is assigned
>> to that Service. 
> 
> Yes. Session API is the way to go, and the assumption is that it
> actually should work to some extent. The example policy
> plugins/session_policy_local.c is file-based, if more flexibility is
> needed see the link Daniel sent on how to do it via D-Bus IPC.
> 
>>> connmand –version 1.21
> 
> It seems that a bunch of Daniel's Session related patches are in 1.23.
> Might be that later problems were solved in 1.23? And a really big bunch
> of changes went into 1.22, so please upgrade and try again.
> 
> As the API has been stable throughout all of 1.x you should upgrade to
> latest. There has been a lot of issues fixed that affect stability and
> proper working of the APIs as well.
> 
>>> [General]
>>> PreferredTechnologies=wifi,ethernet
> 
> This affects only ConnMan service autoconnect order, the intention is
> that Session mode enables needed technologies as new Session users come
> along. So this is strictly only needed should some non-session
> applications need this particular ordering.
> 
>>> SingleConnectedTechnology=false
> 
> This is by default false so it need not be specified.
> 
>>> SessionMode=true
> 
> This setting does nothing since version 1.19 and should be omitted.
> 
>>> /etc/passwd
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> wifisession:x:120:132:wifisession:/home:/bin/bash
>>> ethsession:x:121:133:ethsession:/home:/bin/bash
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
>>> Policy files (in /var/lib/connman/session_policy_local)
>>> 
>>> wifisession.policy
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> [policy_wifisession]
>>> uid = wifisession
>>> AllowedBearers = wifi
>>> RoamingPolicy = forbidden
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> 
>>> ethsession.policy
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> [policy_ethsession]
>>> uid = ethsession
>>> AllowedBearers = ethernet
>>> RoamingPolicy = forbidden
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> 
>>> Opened two terminals, connected with the newly created users on each one.
>> 
>> This looks all good.
> 
> Yes.
> 
> I'm not sure RoamingPolicy is implemented, that might confuse things
> (proaby not).
> 
>>> Terminal 1: wifisession user output 
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> wifisession@ $ connmanctl
>>> connmanctl> services
>>> *AO Wired ethernet_68b599eda216_cable
>>> *A HTC Portable Hotspot 61B3 
>>> wifi_0024d76e6c38_48544320506f727461626c6520486f7473706f742036314233_managed_psk
>>> connmanctl> agent on
>>> Agent registered
>>> connmanctl> session connect
>> 
>> This will trigger the autoconnect algorithm to do the magic. Note
>> it is likely to ignore the session configuration completely. I can't
>> remember the details without looking at the code.
> 
> If it'd work correctly, at this point wifi should be enabled due to
> wifisession policy stating AllowedBearers = wifi. Upgrade to latest and
> try again?
> 
> HTH,
> 
>       Patrik
> 
> 

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to