====== 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: * Package location [[http://packages.debian.org/etch/i386/wpasupplicant/download]] * Install the new package, by executing this command: sudo dpkg -i /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. * Download the drivers here: [[http://www.savefile.com/files/1246149]]. Remember the location. For this documentation, it's ''/home/user/ath.tar.bz2'' * Open a terminal (xterm). In "Easy Mode", it's Ctrl-Alt-T. * Save the older drivers, remove them, and install the new ones. Execute these commands, in the xterm: 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 * Make some soft links to insure some compatibility: sudo ln -s /sbin/wpa_supplicant /usr/sbin/wpa_supplicant sudo ln -s /sbin/wpa_cli /usr/sbin/wpa_cli * Modify the default Xandros linux wpa configuration generation script to use madwifi by default.: 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 * Reboot your Eee PC. 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: * In the "Network Connections" GUI, click on "Create..." button. * Choose "Local Area Network - Wireless" * Choose "Atheros Communications, Inc - AR50..." (might be only option). * Choose your address type (typically "Dynamic IP Address (DHCP)") * Input Network name (SSID). Mode and transfer rate information may be fine at "auto". See your network admin for more info. * Under "Wireless Channel Settings", "Any" may be fine, but your network admin may have more info. * Check the box for "Enable encryption" For "Encryption Type", select WPA. Under "Key", enter any number of ASCII characters until you see the "WPA256 type in ASCII format". This key need not be your actual key, as this will be ignored using this procedure. * Name your connection. "work", "conference", "home", are commonly used names. Of course, you can be more creative. * 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. 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 * Find your new network connection. Each connection starts with a line like: 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. * Just before the 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). * Save the file. 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.