Re: cli or gui client
On Fri, Dec 21, 2012 at 1:13 PM, Patrik Flykt wrote: > > Hi, > > On Fri, 2012-12-21 at 10:08 +0100, Carsten Mattner wrote: >> On Fri, Dec 21, 2012 at 8:54 AM, Patrik Flykt >> wrote: >> > On Fri, 2012-12-21 at 09:28 +0200, Patrik Flykt wrote: >> >> After connecting to the network once, ConnMan will enable autoconnect >> >> for it. >> > >> > Actually, reading the code suggests to me that autoconnect is enabled by >> > default for ethernet, wifi and cellular services. In order to function, >> > those services need to have their settings saved ("favorite" is set to >> > true). Now, with a WiFi network being provisioned, the settings are >> > known/saved, so the service should be autoconnected by ConnMan. >> >> Does that mean a .config file is used for provisioning and not used >> after that? > > Yes. > >> Does connman use the .config file as a basis for creating >> the /var/lib/connman/wifi___managed_psk directory >> and the binary files within? > > Yes. > >> Can I change the .config file and >> let connman refresh those generated files? > > Yes. A simple file mtime check, right? OK, so I did the following. $ connmanctl enable wifi $ connmanctl scan $ connmanctl services List of all services: (null) { wifi__hidden_managed_psk } $ connmanctl connect wifi__hidden_managed_psk Connection failed; error: 'Not registered' I don't know but I suspect I would have seen the (null) network even without my /var/lib/connman/wifi_foo.config file. How can I debug what's going on? ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
Hi, On Fri, 2012-12-21 at 10:08 +0100, Carsten Mattner wrote: > On Fri, Dec 21, 2012 at 8:54 AM, Patrik Flykt > wrote: > > On Fri, 2012-12-21 at 09:28 +0200, Patrik Flykt wrote: > >> After connecting to the network once, ConnMan will enable autoconnect > >> for it. > > > > Actually, reading the code suggests to me that autoconnect is enabled by > > default for ethernet, wifi and cellular services. In order to function, > > those services need to have their settings saved ("favorite" is set to > > true). Now, with a WiFi network being provisioned, the settings are > > known/saved, so the service should be autoconnected by ConnMan. > > Does that mean a .config file is used for provisioning and not used > after that? Yes. > Does connman use the .config file as a basis for creating > the /var/lib/connman/wifi___managed_psk directory > and the binary files within? Yes. > Can I change the .config file and > let connman refresh those generated files? Yes. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Fri, Dec 21, 2012 at 8:54 AM, Patrik Flykt wrote: > On Fri, 2012-12-21 at 09:28 +0200, Patrik Flykt wrote: >> After connecting to the network once, ConnMan will enable autoconnect >> for it. > > Actually, reading the code suggests to me that autoconnect is enabled by > default for ethernet, wifi and cellular services. In order to function, > those services need to have their settings saved ("favorite" is set to > true). Now, with a WiFi network being provisioned, the settings are > known/saved, so the service should be autoconnected by ConnMan. Does that mean a .config file is used for provisioning and not used after that? Does connman use the .config file as a basis for creating the /var/lib/connman/wifi___managed_psk directory and the binary files within? Can I change the .config file and let connman refresh those generated files? I might be able to give it a try later today so I'd like to have a better understanding before I dive into the wrong rabbit hole looking for an explanation if it doesn't work. Thanks for prompt feedback Patrik. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Fri, 2012-12-21 at 09:28 +0200, Patrik Flykt wrote: > After connecting to the network once, ConnMan will enable autoconnect > for it. Actually, reading the code suggests to me that autoconnect is enabled by default for ethernet, wifi and cellular services. In order to function, those services need to have their settings saved ("favorite" is set to true). Now, with a WiFi network being provisioned, the settings are known/saved, so the service should be autoconnected by ConnMan. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
Hi, On Thu, 2012-12-20 at 12:35 +0100, Carsten Mattner wrote: > > Are you saying the file /var/lib/connman/wifi_foo.config > > should definitely show in 'services' as > > wifi___managed_psk? > > And it will never be listed as wifi_foo in the services list? 'service_foo' is an provisioning identifier, the wifi___managed_psk is the service to use. If you set 'Hidden=true' in the .config file, ConnMan will make an active scan for the network. From 'connmanctl services --properties wifi__' output it can be verified that the network is the correct one. After connecting to the network once, ConnMan will enable autoconnect for it. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Thu, Dec 20, 2012 at 12:34 PM, Carsten Mattner wrote: > On Thu, Dec 20, 2012 at 11:41 AM, Patrik Flykt > wrote: >> >> Hi, >> >> On Wed, 2012-12-19 at 14:28 +0100, Carsten Mattner wrote: >>> [service_foo] >>> Type = wifi >>> Hidden = true >>> AutoConnect = true >>> Name = >>> Passphrase = >>> >>> > Then connect to said wifi network with 'connmanctl connect >>> '. >>> >>> This won't work and fails with a missing file error when I >>> run 'connmanctl connect wifi_foo'. >>> >>> 'connmanctl services' lists the wifi scan results. >> >> True. The network created by section service_foo is identified as >> wifi___managed_psk. The section name is >> just a unique name for provisioning purposes. >> >> It has a '*' in the leftmost column in the connmanctl services list. > > I will try again later but to be sure I didn't misunderstand you. > Are you saying the file /var/lib/connman/wifi_foo.config > should definitely show in 'services' as > wifi___managed_psk? And it will never be listed as wifi_foo in the services list? > If that's the name I always have to reference on each > 'connmanctl connect' it sounds easier to use the > test script which allows you to connect with 'connect SSID PSK' :). > At least from a 'I need to type this in' perspective, but all > of that can be automated with a little scripting as long as > the strings returned by 'services' can be fed back to > 'connect SERVICE' ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Thu, Dec 20, 2012 at 11:41 AM, Patrik Flykt wrote: > > Hi, > > On Wed, 2012-12-19 at 14:28 +0100, Carsten Mattner wrote: >> [service_foo] >> Type = wifi >> Hidden = true >> AutoConnect = true >> Name = >> Passphrase = >> >> > Then connect to said wifi network with 'connmanctl connect >> '. >> >> This won't work and fails with a missing file error when I >> run 'connmanctl connect wifi_foo'. >> >> 'connmanctl services' lists the wifi scan results. > > True. The network created by section service_foo is identified as > wifi___managed_psk. The section name is > just a unique name for provisioning purposes. > > It has a '*' in the leftmost column in the connmanctl services list. I will try again later but to be sure I didn't misunderstand you. Are you saying the file /var/lib/connman/wifi_foo.config should definitely show in 'services' as wifi___managed_psk? If that's the name I always have to reference on each 'connmanctl connect' it sounds easier to use the test script which allows you to connect with 'connect SSID PSK' :). At least from a 'I need to type this in' perspective, but all of that can be automated with a little scripting as long as the strings returned by 'services' can be fed back to 'connect SERVICE' ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
Hi, On Wed, 2012-12-19 at 14:28 +0100, Carsten Mattner wrote: > [service_foo] > Type = wifi > Hidden = true > AutoConnect = true > Name = > Passphrase = > > > Then connect to said wifi network with 'connmanctl connect > '. > > This won't work and fails with a missing file error when I > run 'connmanctl connect wifi_foo'. > > 'connmanctl services' lists the wifi scan results. True. The network created by section service_foo is identified as wifi___managed_psk. The section name is just a unique name for provisioning purposes. It has a '*' in the leftmost column in the connmanctl services list. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Mon, Dec 17, 2012 at 9:12 AM, Patrik Flykt wrote: > > Hi, > > On Sun, 2012-12-16 at 19:09 +0100, Carsten Mattner wrote: >> Scan failed; error: 'No carrier' > > First enable wifi with 'connmanctl enable wifi'. This makes ConnMan do a > WiFi scan automatically. At later times you may want to do 'connmanctl > scan wifi' to get a fresh list of services. > >> I can't see anything wifi related under services and therefore >> have no idea what argument to use for 'connect '. > > WiFi services are the ones starting with prefix wifi_ in the output of > 'connmanctl services', pick the correct one from there. The ones with a > '*' in the leftmost column are the ones configured. > >> I never had to explicitly configure the various EAP modes >> but have just copied it and have TLS, TTLS, PEAP sections >> in the config file. How can I see what's used. Check logs >> after successful connection attempt? > > Just copying TLS, TTLS, etc. sections won't do, as the WiFi network > settings with the correct EAP type and its settings need to be defined. > I doubt all of the different EAP settings are applicable to a single > WiFi network. > > For a normal WiFi network protected by a password you should specify the > 'Passphrase=' option in the .config file. I was suspecting that and reduced the config to: $ cat /var/lib/connman/wifi_foo.config [global] Name = Wifi Foo Description = Wifi Foo [service_foo] Type = wifi Hidden = true AutoConnect = true Name = Passphrase = > Then connect to said wifi network with 'connmanctl connect '. This won't work and fails with a missing file error when I run 'connmanctl connect wifi_foo'. 'connmanctl services' lists the wifi scan results. >> Where am I supposed to put the AutoConnect value? > > It's a per-service setting enabled by default after the first successful > connect. If it needs changing, 'connmanctl config > --autoconnect=y' should do the trick. > > There already exists a GNOME3 ConnMan extension on extensions.gnome.org > if you happen to use that desktop environment. You can connect, supply > passphrases and do WPS setup, disconnect and enable/disable technologies > like WiFi from that extension. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
Hi, On Sun, 2012-12-16 at 19:09 +0100, Carsten Mattner wrote: > Scan failed; error: 'No carrier' First enable wifi with 'connmanctl enable wifi'. This makes ConnMan do a WiFi scan automatically. At later times you may want to do 'connmanctl scan wifi' to get a fresh list of services. > I can't see anything wifi related under services and therefore > have no idea what argument to use for 'connect '. WiFi services are the ones starting with prefix wifi_ in the output of 'connmanctl services', pick the correct one from there. The ones with a '*' in the leftmost column are the ones configured. > I never had to explicitly configure the various EAP modes > but have just copied it and have TLS, TTLS, PEAP sections > in the config file. How can I see what's used. Check logs > after successful connection attempt? Just copying TLS, TTLS, etc. sections won't do, as the WiFi network settings with the correct EAP type and its settings need to be defined. I doubt all of the different EAP settings are applicable to a single WiFi network. For a normal WiFi network protected by a password you should specify the 'Passphrase=' option in the .config file. Then connect to said wifi network with 'connmanctl connect '. > Where am I supposed to put the AutoConnect value? It's a per-service setting enabled by default after the first successful connect. If it needs changing, 'connmanctl config --autoconnect=y' should do the trick. There already exists a GNOME3 ConnMan extension on extensions.gnome.org if you happen to use that desktop environment. You can connect, supply passphrases and do WPS setup, disconnect and enable/disable technologies like WiFi from that extension. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Thu, Dec 13, 2012 at 11:41 AM, Patrik Flykt wrote: > > Hi, > > On Thu, 2012-12-13 at 11:16 +0100, Carsten Mattner wrote: >> Sounds useful, but how does that work with a hidden SSID? > > In the .config file, add an entry saying 'Hidden = true'. This will make > ConnMan do an active scan for the specified SSID. This and more is in > doc/config-format.txt. I can connect to connmand via dbus now and have created a prototype wifi.config file, but I can't seem to use wifi at all. $ connmanctl > scan wifi wifi { /net/connman/technology/wifi } exists Scan failed; error: 'No carrier' I can't see anything wifi related under services and therefore have no idea what argument to use for 'connect '. I never had to explicitly configure the various EAP modes but have just copied it and have TLS, TTLS, PEAP sections in the config file. How can I see what's used. Check logs after successful connection attempt? Where am I supposed to put the AutoConnect value? Global or each of the service sections? Back to networkmanager for today so that I can use the laptop tonight. With a little bit of luck and some hints from you guys I'll be able to use connman tomorrow :). ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Thu, Dec 13, 2012 at 12:14 AM, Patrik Flykt wrote: > On Wed, 2012-12-12 at 10:43 -0800, Kok, Auke-jan H wrote: >> connman creates a folder for each network under /var/lib/connman. >> >> You should be able to pre-define a network in there and use connmanctl >> to connect to a service. This way you can set WPA/WEP passwords >> without any client. However, the format of these files isn't >> documented AFAIK. > > No. You should not touch/create any directories in /var/lib/connman. The > only thing one is allowed to add/remove in /var/lib/connman are the wifi > provisioning files ending with '.config' and documented in > doc/config-format.txt. ConnMan will pick up the provisioned wifi network > from the .config files and use those settings when a matching SSID is > found. After that connmanctl can be used to connect/disconnect the > service normally. ahhh, thanks for the pointer - I never saw this file before. Auke ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
Hi, On Thu, 2012-12-13 at 11:16 +0100, Carsten Mattner wrote: > Sounds useful, but how does that work with a hidden SSID? In the .config file, add an entry saying 'Hidden = true'. This will make ConnMan do an active scan for the specified SSID. This and more is in doc/config-format.txt. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Thu, Dec 13, 2012 at 9:14 AM, Patrik Flykt wrote: > On Wed, 2012-12-12 at 10:43 -0800, Kok, Auke-jan H wrote: >> connman creates a folder for each network under /var/lib/connman. >> >> You should be able to pre-define a network in there and use connmanctl >> to connect to a service. This way you can set WPA/WEP passwords >> without any client. However, the format of these files isn't >> documented AFAIK. > > No. You should not touch/create any directories in /var/lib/connman. The > only thing one is allowed to add/remove in /var/lib/connman are the wifi > provisioning files ending with '.config' and documented in > doc/config-format.txt. ConnMan will pick up the provisioned wifi network > from the .config files and use those settings when a matching SSID is > found. After that connmanctl can be used to connect/disconnect the > service normally. Sounds useful, but how does that work with a hidden SSID? Would it try to match the configured profiles and see if the AP responds to that SSID. I don't know too much about the protocol but always wondered how that woks. If I configure a connection and set the SSID which is not advertized does connman or networmanager have to blindly try or is there a well defined method to see if the SSID matches an AP? Guys thanks for all the hints and I don't want to repeat myself or sound helpless but any idea how I can debug the dbus connection problem so that I can finally try out the suggested connection methods? btw, thanks for the quick responses. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Wed, 2012-12-12 at 10:43 -0800, Kok, Auke-jan H wrote: > connman creates a folder for each network under /var/lib/connman. > > You should be able to pre-define a network in there and use connmanctl > to connect to a service. This way you can set WPA/WEP passwords > without any client. However, the format of these files isn't > documented AFAIK. No. You should not touch/create any directories in /var/lib/connman. The only thing one is allowed to add/remove in /var/lib/connman are the wifi provisioning files ending with '.config' and documented in doc/config-format.txt. ConnMan will pick up the provisioned wifi network from the .config files and use those settings when a matching SSID is found. After that connmanctl can be used to connect/disconnect the service normally. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Tue, Dec 11, 2012 at 9:41 AM, Carsten Mattner wrote: > On Tue, Dec 11, 2012 at 2:21 AM, Zheng, Jeff wrote: >>> > How would I connect to wireless ap with SSID ap1 and PSK psk1? >>> > connmanctl connect wifi >>> >>> connmanctl does not yet support Agent functionality, so you can't use it to >>> provide passwords for WPA/WEP connected networks. You can connect to any >>> wifi network with it, but authentication will fail. >>> >> >> Yes. It's bug https://bugs.meego.com/show_bug.cgi?id=25885. >> >> You can use connman test python script instead: >> 1. In one console, run "simple-agent Name= Passphrase=" >> 2. In another console, run "test-connman connect " > > Thanks for the bug link. > > How can I debug what's preventing the test script to work at all? > It's a default installation of connman on archlinx with the dbus > policy I had linked to. Once I have that figured out I can try the > various clients. > > Is there really no well defined place to store connection profiles > one can refer to with connmanctl? connman creates a folder for each network under /var/lib/connman. You should be able to pre-define a network in there and use connmanctl to connect to a service. This way you can set WPA/WEP passwords without any client. However, the format of these files isn't documented AFAIK. Auke ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Tue, Dec 11, 2012 at 2:21 AM, Zheng, Jeff wrote: >> > How would I connect to wireless ap with SSID ap1 and PSK psk1? >> > connmanctl connect wifi >> >> connmanctl does not yet support Agent functionality, so you can't use it to >> provide passwords for WPA/WEP connected networks. You can connect to any >> wifi network with it, but authentication will fail. >> > > Yes. It's bug https://bugs.meego.com/show_bug.cgi?id=25885. > > You can use connman test python script instead: > 1. In one console, run "simple-agent Name= Passphrase=" > 2. In another console, run "test-connman connect " Thanks for the bug link. How can I debug what's preventing the test script to work at all? It's a default installation of connman on archlinx with the dbus policy I had linked to. Once I have that figured out I can try the various clients. Is there really no well defined place to store connection profiles one can refer to with connmanctl? ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
RE: cli or gui client
> > How would I connect to wireless ap with SSID ap1 and PSK psk1? > > connmanctl connect wifi > > connmanctl does not yet support Agent functionality, so you can't use it to > provide passwords for WPA/WEP connected networks. You can connect to any > wifi network with it, but authentication will fail. > Yes. It's bug https://bugs.meego.com/show_bug.cgi?id=25885. You can use connman test python script instead: 1. In one console, run "simple-agent Name= Passphrase=" 2. In another console, run "test-connman connect " Bests Jeff ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Mon, Dec 10, 2012 at 6:46 AM, Carsten Mattner wrote: > On Mon, Dec 10, 2012 at 3:32 PM, Patrik Flykt > wrote: >> On Mon, 2012-12-10 at 11:25 +0100, Carsten Mattner wrote: >>> 2) what (cli) clients can I use? >> >> There is a client/connmanctl in the source code, I don't know if it >> enabled or installed by Archlinux. There also exists a ConnMan extension >> for GNOME3 on extensions.gnome.org. > > Yes it's included in that package. I tried that command but seemed > to still have the error connecting to connmand even though my > users was in the 'network' group. Is the following configuration > enough to give access? > https://projects.archlinux.org/svntogit/community.git/tree/trunk/allow_group_network.diff?h=packages/connman > > https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/connman > > Do I have to pre-configure connections in /etc or ~/.config before > I can refer to them with connmanctl? Any sample files I can base > known connections on you can refer me to? > > How would I connect to wireless ap with SSID ap1 and PSK psk1? > connmanctl connect wifi connmanctl does not yet support Agent functionality, so you can't use it to provide passwords for WPA/WEP connected networks. You can connect to any wifi network with it, but authentication will fail. Auke ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Mon, Dec 10, 2012 at 3:32 PM, Patrik Flykt wrote: > On Mon, 2012-12-10 at 11:25 +0100, Carsten Mattner wrote: >> 2) what (cli) clients can I use? > > There is a client/connmanctl in the source code, I don't know if it > enabled or installed by Archlinux. There also exists a ConnMan extension > for GNOME3 on extensions.gnome.org. Yes it's included in that package. I tried that command but seemed to still have the error connecting to connmand even though my users was in the 'network' group. Is the following configuration enough to give access? https://projects.archlinux.org/svntogit/community.git/tree/trunk/allow_group_network.diff?h=packages/connman https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/connman Do I have to pre-configure connections in /etc or ~/.config before I can refer to them with connmanctl? Any sample files I can base known connections on you can refer me to? How would I connect to wireless ap with SSID ap1 and PSK psk1? connmanctl connect wifi http://git.kernel.org/?p=network/connman/connman.git;a=blob;f=client/commands.c;h=4cc3b2d037;hb=HEAD#l61 ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
On Mon, 2012-12-10 at 11:25 +0100, Carsten Mattner wrote: > 2) what (cli) clients can I use? There is a client/connmanctl in the source code, I don't know if it enabled or installed by Archlinux. There also exists a ConnMan extension for GNOME3 on extensions.gnome.org. Cheers, Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
Re: cli or gui client
https://aur.archlinux.org/packages/gconnman-git/ I'm using this... it works but only for very very simple networks :( On Mon, Dec 10, 2012 at 11:25 AM, Carsten Mattner wrote: > client that just works. I have installed the Archlinux connman > package and started the daemon and the dbus config looks right > to me but I can't even get any of the test scripts from the > connman 1.9 release working (connection fails). > ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman
cli or gui client
I'd like to use connman instead of NetworkManager on a laptop and for mobility it would be great to have a (preferably cli) client that just works. I have installed the Archlinux connman package and started the daemon and the dbus config looks right to me but I can't even get any of the test scripts from the connman 1.9 release working (connection fails). So I have two questions, 1) how can I debug/fix the connection to connmand and 2) what (cli) clients can I use? Also tried E17's connman applet and it didn't quite work. I'd prefer to not depend on E17 anyway. ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman