Monday, April 9, 2012

Wifi access using AirPennNet

Anyone that has used AirPennNet knows how flaky and annoying it can be. With a PC or Mac you have to install securew2 after connecting to AirPennNet-help and following their configuration procedure. With the beagleboard there is an ethernet port, but when plugged in on campus you need to authenticate through a browser in order to gain access, plus we also want to be untethered and able to move and work freely. There is no wifi on the board but a USB wireless-N dongle is convenient and easy, and many of them are supported by the generic wext driver. We had to install wpasupplicant in order to be compantible with the network (sudo apt-get install wpasupplicant)

Move to and edit the file interfaces (/etc/network/interfaces) and place this into the file:


auto wlan0
iface wlan0 inet dhcp pre-up wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Bwpa-driver wext wpa-conf /etc/wpa_supplicant.conf



Next move one level up to /etc/ and edit wpa_supplicant.conf, filling out user information:


ctrl_interface=/var/run/wpa_supplicant.conf 

ctrl_interface_group=0 eapol_version=2 ap_scan=1 
network={ 
priority=1 
ssid="AirPennNet" 
key_mgmt=WPA-EAP 
eap=TTLS 
phase2="auth=PAP" 
identity="<YOUR_PENNNAME>" 
password="<YOUR_PASSWORD>"
ca_cert="/etc/ssl/certs/UTN_USERFirst_Hardware_Root_CA.pem" 
}


The first file sets up the wifi network for dynamic networking and loads the driver and wpa support on boot as a background daemon. The second file sets the network up to connect to AirPennNet with the correct security and user info. There is an obvious security issue with placing your information in one file, but great for ease of access and simple setup. The alternative is manually start wpa_cli and put in your info on every login.

After all of this is set up an IP address should be issued to the beagleboard upon the next boot. To check, type in ifconfig -a to see all of the available network connections. If wlan0 exists and has network credentials everything is all set! AirPennNet can still be flaky, and it sometimes takes multiple tries to connect, which is true for our own personal computers too though...

Adapted from:
http://www.seas.upenn.edu/cets/answers/airpennnet-linux.html
A decent general reference for network configuration:
https://help.ubuntu.com/10.04/serverguide/C/network-configuration.html

No comments:

Post a Comment