====== Configuration avancée de WPA sur la distribution Xandros (sans ndiswrapper) ====== Cette page est destinée à aider les utilisateurs de la distribution Xandros pour se connecter à des réseaux sécurisés utilisant un protocole non supporté par les drivers et wpa_supplicant qu iest inclus dans Xandrois. Cela inclus WPA-EAP (Enterprise), et d'autres. WPA-PSK fonctionne avec les drivers par défaut, mais cette implementation fonctionne aussi avec les instructions suivantes. La plupar des instructions sont tirées de ce fil du forum : [[http://forum.eeeuser.com/viewtopic.php?id=1844]] Toutes les commandes sont effectuées dans un terminal. Pour ouvrir xterm en mode basique, appuyez sur Ctrl-Alt-T. **Pour le eeepc 901 il suffit de suivre deux étapes de ce tutoriel: Create a wpa_supplicant.conf_MINE for your secure network. et Create a New Network Configuration ** ===== Télécharger wpa_supplicant depuis un repository Debian ===== En premier lieu, il faut sauvegarder les binaires de wpa_supplicant inclus dans l'installation par défaut. tar jcf /home/user/old_wpa_supplicant.tar.bz /usr/sbin/wpa_supplicant /usr/sbin/wpa_cli Puis il faut les supprimer. sudo rm -v /usr/sbin/wpa_supplicant /usr/sbin/wpa_cli Maintenant téléchargez et installez le wpasupplicant de Debian. On peut le faire en utilisant apt-get (si vous avez au préalable configuré les repository comme indiqué :[[http://wiki.eeeuser.com/addingxandrosrepos]]): sudo apt-get install wpasupplicant Ou alors téléchargez le paquet et installez le à la main : * Localisati ond upaquet [[http://packages.debian.org/etch/i386/wpasupplicant/download]] * Installez ce paquet en utilisant cette commande : sudo dpkg -i /wpasupplicant_0.5.5-2_i386.deb ===== Installez les drivers madwifi ===== 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/ 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 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: **Pour les premiers eeepc (700-701 etc)** up cp /etc/wpa_supplicant.conf_MINE /etc/wpa_supplicant.conf.ath0 up wpa_cli -p /var/tmp/wpa_supplicant reconfigure **Pour le eeepc 901** up cp /etc/wpa_supplicant.conf_MINE /etc/wpa_supplicant.conf.ra0 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 20-30 seconds to establish.