Getting an XO connected to WLAN from commandline

Martin Langhoff martin at laptop.org
Tue Aug 21 10:28:40 EDT 2012


If you are working on an XO from serial port or the commandline, and
you want to drive NetworkManager to connect to your WLAN without using
X, here's what you can do.

In my case, I have an open AP, ESSID "olpc"

- Create /etc/NetworkManager/system-connections/olpc, containing:
[connection]
id=olpc
uuid=11111111-1111-1111-1111-111111111111
type=802-11-wireless
timestamp=0

[802-11-wireless]
ssid=olpc
mode=infrastructure

[ipv4]
method=auto

#[802-11-wireless-security]
## WPA2:
#key-mgmt=wpa-psk
#psk=The Secret
## WEP:
#key-mgmt=none
#wep-key0=0011223344

 - NM will ignore it unless you
 chmod 600 /etc/NetworkManager/system-connections/olpc

 - NM has already ignored it, and won't notice the new file mode until you
  touch /etc/NetworkManager/system-connections/olpc

 - Monitor /var/log/messages for NM's opinion on your configuration file

 - With this config in place NM should automatically connect if it
sees the ESSID. If not, you can use nmcli
   nmcli con # will list known connections
   nmcli con up "Auto olpc" # try to bring that connection up

All of this works fairly well. It's just not widely documented, and
new to us old-styled iwconfig essid foo && dhclient wlan0 folks...

hth,


m
-- 
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff



More information about the Devel mailing list