connman: wifi configuration
Sergey has detailed directions at the bottom of this page for connmanctl here so, no need to rewrite that.
I also found a tutorial on the Intel Developer Zone here that discusses how to use connman.
I used this guide to configure to my home wifi. Either follow his instructions or just refer to my printout below for an example of a successful attempt.
root@quark0171ae:~# connmanctl
connmanctl> enable wifi
Enabled wifi
It will print:
connmanctl> [ 138.361118] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S
[ 138.377075] iwlwifi 0000:01:00.0: Radio type=0x2-0x1-0x0
[ 138.800255] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S
[ 138.815868] iwlwifi 0000:01:00.0: Radio type=0x2-0x1-0x0
[ 139.072513] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
Then scan for services and list them:
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
Here are the services at my house for example:
rip and run guest network wifi_c8f733840a94_72697020616e642072756e206775657374206e6574776f726b_managed_psk
ripandrunbaby wifi_c8f733840a94_726970616e6472756e62616279_managed_psk
SVPMeterConnectWiFi wifi_c8f733840a94_5356504d65746572436f6e6e65637457694669_managed_none
wifi_c8f733840a94_hidden_managed_psk
HOME-86DF wifi_c8f733840a94_484f4d452d38364446_managed_psk
xfinitywifi wifi_c8f733840a94_7866696e69747977696669_managed_none
Tnd home wifi_c8f733840a94_546e6420686f6d6520_managed_psk
ALBNETNEW wifi_c8f733840a94_414c424e45544e4557_managed_psk
aatblt-guest wifi_c8f733840a94_616174626c742d6775657374_managed_none
aatblt wifi_c8f733840a94_616174626c74_managed_psk
DIRECT-eV-BRAVIA wifi_c8f733840a94_4449524543542d65562d425241564941_managed_psk
ATT067 wifi_c8f733840a94_415454303637_managed_psk
BC24GHZ wifi_c8f733840a94_4243323447485a_managed_psk
HOME-3426 wifi_c8f733840a94_484f4d452d33343236_managed_psk
Exit connmanctrl now that you know the networks and build a wifi config file to save your settings. This file is located in a folder /var/lib/connman
where you can save multiple configurations. The default is wifi.config
so I usually make copies of other configurations and swap them out. But I think this service will scan through them if you enable autoconnect inside the interactive version of connmanctrl.
Here is how you make that file:
root@quark0171ae:~# cat << EOF > /var/lib/connman/wifi.config
> [service_wifi_c8f733840a94_726970616e6472756e62616279_managed_psk]
> Type = wifi
> Security = wpa2
> Name = ripandrunbaby
> Passphrase = yourpass
> EOF
My connman connnected at this point automagically:
root@quark0171ae:~# /et[ 301.244385] wlp1s0: authenticate with 60:33:4b:e4:4b:9b
[ 301.269889] wlp1s0: send auth to 60:33:4b:e4:4b:9b (try 1/3)
[ 301.278888] wlp1s0: authenticated
[ 301.291467] wlp1s0: associate with 60:33:4b:e4:4b:9b (try 1/3)
[ 301.310923] wlp1s0: RX AssocResp from 60:33:4b:e4:4b:9b (capab=0x1431 status=0 aid=1)
[ 301.348997] wlp1s0: associated
[ 301.352244] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
If you don't see this if you have a connection:
-sh: /et: No such file or directory
root@quark0171ae:~# ping google.com
PING google.com (74.125.239.39): 56 data bytes
64 bytes from 74.125.239.39: seq=0 ttl=55 time=15.315 ms
And try restarting the service:
root@clanton:# systemctl stop connman
root@clanton:# systemctl start connman