WSU Wireless (PEAP) for the Asus EEE PC

kusznir's picture

For those EEE PC owners out there, you can now get on the net with wireless on campus! Unfortunately, its not trivial; the EEE PC is missing support for "enterprise wireless" in many ways. Fear not, through this howto we'll address the show-stopping shortcomings and get it working!

First off, we need to get some additional software repositories configured so we can pull in additional or updated software packages. The people over at http://wiki.eeeuser.com/addingxandrosrepos have written up how to do this; I'll include the important parts here.

First, a word of warning: doing this haphazardly WILL break your EEE! You must follow all the instructions (especially the pinning instructions). Do not go adding repos as you see fit; few repos will work safely with your EEE!

Now, on to the work: First, open a terminal (ctl-alt-t), and open /etc/apt/sources.list with your favorite editor as root:

sudo nano /etc/apt/sources.list

It should contain some lines already, we want to add 4 additional lines to the end of this file. Position your cursor on an empty line at the end and pate this in:

Write and quit (ctrl-X, yes to save changes, same filename).

If you update your system at this point, you will break it First, we must "pin" the package repositories correctly:
sudo nano /etc/apt/preferences
(note: this file does not yet exist; we are creating it)

Now paste the following into the file:

Package: *
Pin: origin update.eeepc.asus.com
Pin-Priority: 950

Package: *
Pin: origin
Pin-Priority: 925

Package: *
Pin: origin xnv4.xandros.com
Pin-Priority: 900

Package: *
Pin: origin dccamirror.xandros.com
Pin-Priority: 850

Package: *
Pin: origin Pin-Priority:" title="www.geekconnection.org
Pin-Priority:">www.geekconnection.org
Pin-Priority:
750

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600

Write and quit.

Ok, now your repositories are updated, and your eee is more or less safe from accidental package breakage. On to the wireless set up.

[Note: most of the following was derived from a howto at: http://wiki.eeeuser.com/wpa_default_xandros]

So, now time to get to work on the wireless stuff directly. Lets backup the old xandros wpa stuff, delete it, and install the new:

cd
tar -czf wpa_bkup.tgz /usr/sbin/wpa_*
sudo rm -f /usr/sbin/wpa_*
sudo apt-get install wpasupplicant

Unfortunately, the version of the atheros drivers that are included on the EEE do not include decent WPA support (or so I read), so lets go replace them as well:

First, download them. They're at: http://lug.wsu.edu/files/ath.tar_.bz2
Put them in /home/user/ (the default place)

Now, lets install them:

cd /lib/modules/2.6.21.4-eeepc
sudo tar jcf /home/user/old_atheros.tar.bz2 atheros/*
cd atheros
sudo rm *
sudo tar jxf /home/user/ath.tar_.bz2
sudo depmod

Ok, we're most of the way there. We need to clean up some symlinks:

sudo ln -s /sbin/wpa_supplicant /usr/sbin/wpa_supplicant
sudo ln -s /sbin/wpa_cli /usr/sbin/wpa_cli
sudo ln -s /usr/bin/wpa_passphrase /usr/sbin/wpa_passphrase

Now tell Xanderos to use the new wireless drivers:
sudo nano /etc/wpa_supplicant/functions.sh
Look for "wext" (ctrl-x can help you search). You should find a line like this (second result):
WPA_SUP_DRIVER="wext"
Change "wext" to "madwifi", save and quit.

Now, for the WSU configuration:
create a file /etc/wpa_supplicant.conf_MINE:
sudo nano /etc/wpa_supplicant.conf_MINE
Add to it the following, substituting your WSU network ID and Password as indicated:

ctrl_interface=/var/tmp/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
#Sets AP sellection to be handled by wpa_supplicant or the driver. 
# 0=driver 1=wpa_supplicant
ap_scan=1

network={
        ssid="WSU Wireless"
        key_mgmt=WPA-EAP
        eap=PEAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        phase2="auth=MSCHAPV2"
        identity="<WSU NetID>"
        password="<WSU NetID Password>"
        priority=6
}

Ok, most of the way there. Lets fix the little network monitor app at the bottom of the screen to register wireless networks again:
sudo nano /usr/bin/startsimple.sh
In that file, look for the line:
networkmonitor ath0 eth0 &
Modify it to read:
networkmonitor wifi0 eth0 &

Now lets create the connection that appears in the GUI:
(If you have previously created a connection for "WSU Wireless", please delete it first to avoid confusion later)

Create a new wireless connection type:

  • In the "Network Connections" GUI, click on "Create..." button.
  • Choose "Local Area Network - Wireless"
  • Choose "Atheros Communications, Inc - AR50..." (might be only option).
  • Choose "Dynamic IP Address (DHCP)"
  • Input Network name (SSID) "WSU Wireless". Leave the other two at auto.
  • Under "Wireless Channel Settings", leave it at "Any".
  • Check the box for "Enable encryption" For "Encryption Type", select WPA. Under "Key", enter any number of letters until you see the WPA256 type in ASCII format". This key will be ignored using this procedure, but has to be there to "trick" the config gui into using WPA.
  • Name your connection. I recommend "WSU Wireless (PEAP)".
  • Choose whether or not you want to "Connect automatically at system startup". Do NOT check the box for "Start this connection when finished".
  • Click on the "Finish" button.

Now we have to go correct for a few shortcomings of the network manager. Edit the interfaces file:
sudo nano /etc/network/interfaces
Look for the section including "WSU Wireless". This should be the one we just created. It will look something like:

iface lan9 inet manual
    down dhclient3 -r -pf /var/run/dhclient.$IFACE.pid -lf /var/run/dhclient.$IFACE.leases $IFACE
    down ifconfig $IFACE down
    up ifconfig $IFACE up
    up dhclient3 -cf /etc/dhcp3/dhclient.$LOGICAL.conf -pf /var/run/dhclient.$IFACE.pid -lf /var/run/dhclient.$IFACE.leases $IFACE
    wireless-essid "WSU Wireless"
    wireless-key s:aklsdjflkjaksjdf
    wireless-keymode open
    wireless-mode auto
    wireless-rate auto
    xncs-wireless-encryption wpa

(note that the iface number and wireless key will likely be different than mine).
Insert these two lines right before the first "up" line:
up cp /etc/wpa_supplicant.conf_MINE /etc/wpa_supplicant.conf.ath0
up wpa_cli -p /var/tmp/wpa_supplicant reconfigure

Now, you should be done! Save your changes, find the network listed in the network monitor, click on it once, click on "connection" and select "connect".

You may or may not have to reboot your computer for the changes to fully take effect. Also, I recommend unplugging the wired network, if used, at least 30 seconds before you try to bring up the wireless network. Also, at this point I would recommend only connecting to the network through the network manager; do not use the wireless networks tool -- it may create a new connection and ignore all your hard work.

Have fun! If you have any problems, hop on #wsulug or contact me!

--Jim

AttachmentSize
ath.tar_.bz2295.35 KB

Comments

Hendri's picture

Re: WSU Wireless (PEAP) for the Asus EEE PC

Hello,

After following these instructions Wireless worked at my EEE PC, but after a while (say 5 or 10 minutes) no network connection was possible.

After a networksearch I found the following webpage:

http://www.aircrack-ng.org/doku.php?id=madwifi-ng

Support for Atheros AR2425 (AR5007EG) chipset (including EEE PC) - PCI ID 168c001c

I downloaded the http://svn.madwifi.org/madwifi/branches/madwifi-hal-0.10.5.6/ code and as far as I can see the problems are gone.

You can find a tar.bz2 file with the compiled code at:

http://hmi.ewi.utwente.nl/eee_madwifi.tar.bz2

Hendri Hondorp (University of Twente)

Ian's picture

Re: WSU Wireless (PEAP) for the Asus EEE PC

Thanks for this write up, my school just introduced a similar wireless protocol and I was almost afraid I wouldn't be able to get it to work.

 Good job!

jcmeloni's picture

Re: WSU Wireless (PEAP) for the Asus EEE PC

Thanks SO MUCH for putting this together. I finally had a chance to try it out today, and got oh so close to success.

On connect attempt, I get the dreaded "Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory" error.

Before I go off trying things based on user comments elsewhere, I wanted to check to see if you ran into this problem during your initial attempts and had any thoughts on the fix.

I'm pretty sure I can cobble together the solution (me and the shell go way back) but I figured I'd check with you first and potentially save myself some hair-pulling.

 Thanks again for supporting the eeepc users!

jcmeloni's picture

Re: WSU Wireless (PEAP) for the Asus EEE PC

....and we have a connection.
Finally had a chance to get back to this, and the error was purely my own (in /etc/network/interfaces the line xncs-wireless-encryption [enc type] still had wep as the enc type instead of wpa).
So, thanks again, and here's proof that the EeePC connects perfectly to the WSU Wireless network (at least in Avery Hall!).

binford2k's picture

Re: WSU Wireless (PEAP) for the Asus EEE PC

Hey, helping out is what we're here for. In exchange though, you've gotta come to some meetings and give a talk about your Plone book ;-)

jcmeloni's picture

Re: WSU Wireless (PEAP) for the Asus EEE PC

Ha ha! Ok, it's a deal. That sure is an old book, though. It would be more fun to talk about _Sams Teach Yourself PHP, MySQL and Apache All-in-One, 4th edition_ which just made it to shelves, if for no other reason than I should have a bunch of free copies to give away. :) But sure, if there's anything you folks want me to come talk about, I'd be happy to do so.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.