OLPC - Networking

From CimmWiki
Jump to: navigation, search

So, there are several ways to network, the least of which I will go over is mesh networking since I won't be around a school and I haven't met many others who have purchased this laptop yet. As such there will be little to no meshing going on. Great concept, but this life of luxury allows me and my neighbors to each have our own internet connection.

802.11b/g

The OLPC has a wireless networking card for which you can find details at laptop.org's wiki. One of the biggest hindrances is their Sugar / Gnome Network Manager. It is an excellent tool and when I get better with Python, I will surely try to assist them as best I can. In the meantime it's best left disabled since it doesn't handle WPA correctly.

$ service NetworkManager stop
$ chkconfig --levels 5 NetworkManager stop

wpa_supplicant

So far wpa_supplicant has been my trump card. Though intermittent, it has very good support for these laptops. First you have to edit the file, here's how your file should look after edits, note the commented line "update_conf=1". You can uncomment that line to allow wpa_gui and wpa_cli to write changes to the file. You will not have comments after wpa_gui or wpa_cli write to this file though. For those who aren't familiar, a line beginning with a # is a comment.

$ cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

eapol_version=1

#Note.  Most networks work with ap_scan=1 fine.  However
#the XO Laptop will not work with my WPA-PSK-AES
#connection unless I set ap_scan=2.
ap_scan=1

fast_reauth=1

#Allows wpa_cli or wpa_gui to modify configuration file.
#I advise against uncommenting update_conf
#update_conf=1

network={
        ssid="any"
        key_mgmt=NONE
}

For some reason, I don't have a wlan0 but I have an eth0. I had to modify /etc/sysconfig/wpa_supplicant. You may or may not have to do this, post your findings and OLPC build and a "uname -a" output.

INTERFACES="-ieth0"
DRIVERS="-Dwext"

Now we should enable wpa_supplicant to start-up persistently and start it currently.

$ chkconfig --levels 5 wpa_supplicant start
$ service wpa_supplicant start 

For ease of use, I suggest finding a man page on wpa_cli. You can use wpa_passphrase to add a network section for your WPA-PSK.

$ wpa_passphrase SSID 'yourpassphrase' >> /etc/wpa_supplicant/wpa_supplicant.conf
$ wpa_cli reconfigure

As soon as you connect, grab wpa_gui via yum.

$ yum install wpa_supplicant-gui

I have tested this configuration with the following:

  1. WPA-PSK-TKIP
  2. WPA-PSK-CCMP (WPA-PSK-AES)
  3. WPA2-EAP-TKIP+CCMP (i.e. WPA2/IEEE 802.1X/EAP, EAP-PEAPv0 Phase2 method=MSCHAPV2)
  4. no-encryption or no-security.

Soon I will have useful scripts for people who are not used to OLPC / Gnome network manager as well as files that can easily be downloaded. This will be updated, check back often.