This page describes how to set up your Linksys WUSB54GC adapter, and enabling WPA. Notes: * The instructions in this page may not be necessary for Hardy because Linksys WUSB54GC should work out of box with WPA and is easily setup with the NetworkManager in Gnome or KNetworkManager in Kubuntu. It also works with Gutsy but with some occasional failure to connect. * I guess you can use ndiswrapper for enabling the network card, if you use a 32-bit operating system. If you are running a 64-bit ubuntu (like me), the ndiswrapper approach does not work, because Linksys does not provide 64-bit drivers (yet? (EDIT: They now exist. I've created an easy to use script at [[http://ubuntuforums.org/showthread.php?t=516649]]. It works for 32-bit and 64-bit Ubuntu and Kubuntu 7.04. It's much easier than anything else on this page.)). * This solution is not very elegant. If you know a more elegant solution, feel free to replace this one. == Compiling the rt73 kernel module == Luckily [[http://funcation.blogspot.com/|this post]] gives a hint on working around the problem. Install the linux-headers package for the kernel you are using. Take care, if you are using linux 2.6.15-27-amd64-generic, you need linux-sources-2.6.15-27-amd64-generic (and not just 2.6.15-27, like I tried first. In that case the driver will fail to build). To be sure, you can install the headers like this: {{{ sudo apt-get install linux-headers-`uname -r` }}} I think you also need libssl-dev {{{ sudo apt-get install libssl-dev }}} Download the source code for the RT2571W/RT2671 USB chipset from the [[http://www.ralinktech.com/supp-1.htm|Ralink driver pages]]. At the moment of writing, the file you need, is called {{{RT73_Linux_STA_Drv1.0.3.6.tar.gz}}}. Unpack the driver source code, {{{cd}}} to the {{{Module}}} subdirectory, remove the {{{Makefile}}}, and rename {{{Makefile.6}}} to {{{Makefile}}}. (I.e. if you are using a 2.6-kernel. For a 2.4-kernel you will need {{{Makefile.4}}}.) Edit {{{rtmp_def.h}}}, and add the line {{{ {USB_DEVICE(0x13b1,0x0020)}, /* Linksys WUSB54GC */ \ }}} somewhere between the other similar lines (search for {{{USB_DEVICE}}}). (The hexadecimal numbers are the vendor id and the product id of the usb device. You can check them by plugging in your usb device, and entering {{{lsusb}}}.) Edit {{{rtconfig.h}}}, and comment out the line {{{ #include }}} Run the {{{Configure}}} script. The README file says it is not necessary for 2.6-kernels, but I had to run it anyway to point to my kernel source tree. Now you can {{{make}}} the driver, and copy {{{rt73.ko}}} to {{{/lib/modules//kernel/drivers/net/wireless/}}} == Activating the kernel module == Create a file {{{cat /etc/modprobe.d/rt73}}}, containing this line: {{{ alias rausb0 rt73 }}} Now {{{depmod -a}}} and {{{modprobe rt73}}} should activate your network card. == Enabling WPA == === Compile a custom wpa_supplicant === The linksys WUSB54GC network adapter is not supported by a standard wpa_supplicant. You need to download the [[http://hostap.epitest.fi/wpa_supplicant/|sources of wpa-supplicant]], and apply the modifications described in {{{WPA_Supplicant/README}}}-file of the rt73 driver source packages. These instructions are based on wpa_supplicant 0.4.7, but I applied them to wpa_supplicant 0.4.9 without problems. (note L.B: it worked also without problems for me with 0.4.10; I always choose to edit original file instead of updating file provided by RT73) === Install binaries === (this may need root privileges) (I would recommend to uninstall wpasupplicant package if any (sudo apt-get remove wpasupplicant). It will ask to uninstall knetwork-manager (kubuntu), network-manager, but you will be able to install them later) {{{ cd }}} {{{ cp wpa_cli wpa_supplicant /usr/local/bin }}} === Configuration of wpa_supplicant === Create a the file {{{/etc/wpa_supplicant/wpasupplicant.conf}}}: {{{ ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 ap_scan=1 network={ ssid="" scan_ssid=1 proto=WPA key_mgmt=WPA-PSK group=CCMP TKIP WEP104 WEP40 pairwise=TKIP CCMP psk="" } }}} and add the following to {{{/etc/network/interfaces}}} {{{ auto rausb0 iface rausb0 inet dhcp pre-up wpa_supplicant -i rausb0 -c /etc/wpa_supplicant/wpasupplicant.conf -Dralink -B post-down killall -q wpa_supplicant }}} For some or another reason, the interface does not get an ip-adress when activating. So I added a line to {{{/etc/rc.local}}} as well: {{{ dhclient rausb0 }}} (Don't know if this is still needed after adding '-B' to the pre-up line) (note L.B: it was not necessary for me) == Alternative way of compiling the module == At [[http://www.uni-klu.ac.at/~agebhard/WUSB54GC]] you can find a module package suitable for building a deb file using {{{module-assistant}}}, more details there.