Table of Contents

Advanced WPA configuration on the default Xandros (without needing ndiswrapper)

This page is intended to help users using the default Xandros distribution, connect to secure wireless networks that utilize a protocols that are not supported by the drivers and wpa_supplicant that is included in the default Xandros distribution. These include WPA-EAP (Enterprise), and others. WPA-PSK has been found to work with the default drivers, but this implementation has been found to also work after following these instructions.

The driver upgrade in these instructions seem to work well for the EeePC 701. There are known changes to these instructions that need to be followed for other versions (901/1000). Hopefully, these differences will be made to this wiki page soon.

Much of what is here, is taken from this forum thread: http://forum.eeeuser.com/viewtopic.php?id=1844

All commands are executed in an xterm command line. Open an xterm in “Easy Mode” with Ctrl-Alt-T.

Download the wpa_supplicant from a Debian repository

First, it's a good idea to save the wpa_supplicant binaries that were included in the default installation.

tar jcf /home/user/old_wpa_supplicant.tar.bz /usr/sbin/wpa_supplicant /usr/sbin/wpa_cli

Then remove them.

sudo rm -v /usr/sbin/wpa_supplicant /usr/sbin/wpa_cli

Now download and install the Debian wpasupplicant. This may be accomplished by using apt-get (if you have previously set up your repo's from:http://wiki.eeeuser.com/addingxandrosrepos):

sudo apt-get install wpasupplicant

Or, downloading the package and installing it by hand:

   sudo dpkg -i <path to downloaded deb>/wpasupplicant_0.5.5-2_i386.deb

Install new madwifi drivers

Thanks to TundraMan, the madwifi drivers have been compiled for the default installed kernel.

   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
   sudo ln -s /sbin/wpa_supplicant /usr/sbin/wpa_supplicant
   sudo ln -s /sbin/wpa_cli /usr/sbin/wpa_cli
   sudo nano /etc/wpa_supplicant/functions.sh

Search (ctrl+w in nano) for “wext” until you come to the line (should be line 188) that looks like this: (should be the 2nd search result)

   WPA_SUP_DRIVER="wext"

Change it to:

   WPA_SUP_DRIVER="madwifi"

Now Ctrl+O to overwrite (save changes) and hit enter, Then Ctrl+X to exit

At this point, if you had a working WIFI configuration and connection, you should be able to still use it. If you modified the /etc/wpa_supplicant/functions.sh file you should be able to connect to basic WPA networks using the Network configuration tool.

Create a wpa_supplicant.conf_MINE for your secure network.

There's a plethora of sample configuration that are available. Your network administrator may be able to help with the exact details. A sample wpa_supplicant.conf is found within the wpasupplicant package that was installed in this directory:

 /usr/share/doc/wpasupplicant/examples/

To create and edit the file:

touch /home/user/wpa_supplicant.conf
nano /home/user/wpa_supplicant.conf

Here's one that worked for me, for my work's network that uses a certificate that I downloaded from their server:

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
#Begin Network Block
#--------------------------------
network={
      ssid="some_secure_network"
      scan_ssid=1
      proto=WPA
      key_mgmt=WPA-EAP
      pairwise=TKIP
      eap=PEAP
      ca_cert="/etc/certs/CAcert.cer"
      identity="myusername"
      password="mypasswrd"
}

Save (Ctrl+O) it in your home directory (/home/user) as wpa_supplicant.conf. Then copy this file to the /etc directory:

sudo cp wpa_supplicant.conf /etc/wpa_supplicant.conf_MINE

Create a New Network Configuration

The instructions below should allow you to keep Network Configurations that you have found to work, that do not require a special setup (i.e. those that do not need EAP).

Create a new wireless connection type:

Your new connection type should now be shown in the GUI.

Now.. modify the file /etc/network/interfaces (as root, or with sudo).

sudo nano /etc/network/interfaces
iface lan6 inet manual

Your connection may have a different lan#. You should be able to identify it with the SSID from the wireless-essid line.

up ifconfig $IFACE up

Insert these lines:

up cp /etc/wpa_supplicant.conf_MINE /etc/wpa_supplicant.conf.ath0
up wpa_cli -p /var/tmp/wpa_supplicant reconfigure

The first line overwrites the wpa_supplicant.conf.ath0 that is automatically generated by the xandros scripts, with your own (wpa_supplicant.conf_MINE). The second line tells the supplicant to reload the configuration (since it used the automatically generated one, when it started).

For reference, here's a sample /etc/network/interfaces that works for WEP (lan2) and WPA-EAP (lan6) :

 auto lo
 iface lo inet loopback
 iface eth0 inet dhcp
 iface lan2 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-channel 6
    wireless-essid work_wep
    wireless-key s:SOMESECUREKEY
    wireless-keymode open
    wireless-mode auto
    wireless-rate auto
    xncs-wireless-encryption wep
iface lan6 inet manual
    down dhclient3 -r -pf /var/run/dhclient.$IFACE.pid -lf /var/run/dhclient.$IFACE.leases $IFACE
    down ifconfig $IFACE down
    up cp /etc/wpa_supplicant.conf_MINE /etc/wpa_supplicant.conf.ath0
    up wpa_cli -p /var/tmp/wpa_supplicant reconfigure
    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 work_wpa
    wireless-key s:SOMEFAKEKEY
    wireless-keymode open
    wireless-mode auto
    wireless-rate auto
    xncs-wireless-encryption wpa

Now… cross your fingers, and attempt to connect to this network configuration. Because of the complexity of the authentication process, the connection may take a minute or more to establish.

Fix network monitor icon on taskbar

After installing Madwifi driver, networkmonitor doesn't report the correct status of wireless interface. It seems disconnected even though you're connected.

A simple way to fix it is, like suggested in http://forum.eeeuser.com/viewtopic.php?id=1844&p=3, to change /usr/bin/startsimple.sh script.

Open an xterm in “Easy Mode” with Ctrl-Alt-T and modify startsimple.sh

  sudo nano /usr/bin/startsimple.sh

Search the line

  networkmonitor ath0 eth0 &

and replace it with

  networkmonitor wifi0 eth0 &

From next boot you should see the “two monitors” icon when connected.