Phil Winder’s Blog
My Blog, with Stuff on.

*************************************

Update: As of Ubuntu 8.10, my Buffalo adaptor was recognised instantly and WPA2 works out of the box.  Well done ubuntu!

*************************************

Background:

I am using a Buffalo WLI-U2-KG54 USB wireless device and the default linux USB driver (the rt2500usb) would not support WPA encryption and it would not work at all.  After days of searching through other drivers including the ndiswrapper route/hack I found that USB devices based upon the rt25xx chip should use the rt2570 driver.  Note that this guide should also work with the real rt2500 driver and its varients.  Just replace filenames and identifiers where nessecary.

Assumptions:

A Fresh Install of Ubuntu 8.04.1 (Hardy Heron)
No Local internet access (but access from another computer)
Using WPA TKIP encryption.  For any other type of encryption you will have to make some changes.  But what they are I dont know.

Lets Go!

  1. After a clean install boot up and insert the installation CD
  2. Go to System -> Administration -> Synaptic Package Manager
  3. Go to Settings -> Repositories and Uncheck all checks and check the CDROM.  This removes the internet and adds the cd as a source of files.
  4. Now search for “Build-Essential”.  Right click on Build-Essential and click “Mark for Installation”.  If it asks say yes to installing its dependancies too. Click Apply and install. Close.
  5. Get on the internet and download “http://rt2×00.serialmonkey.com/rt2570-cvs-daily.tar.gz“. These are the drivers that we are going to install.  Save them onto a flash disk or something and go back to the ubuntu PC.
  6. Open up your flash disk and open up /home/.  Copy the tar.gz file accross to your home folder.
  7. Right click on the tar.gz file in the home folder and click “Extract here”.
  8. Now right click and rename the folder to something nice like “rt2570″
  9. Open Applications->Accessories->Terminal.
  10. Now cd to that directory with “cd /home/<yourname>/rt2570
  11. And cd to the Module directory with “cd Module/”
  12. Type “Make” to compile the driver
  13. Type “Make Install” to install the driver
  14. Type “cd ../../” to get out of the folders and type “rm -r rt2570″. This removes the folder we just had.
  15. Now we need to get rid of the old drivers. Type “rmmod rt2500usb”,  “rmmod rt2×00usb”, “rmmod rt2×00lib”, “rmmod mac80211″
  16. Use “lsmod” to find any more drivers that your specific card might be using (for example if you are not using the rt2500usb driver).  Then rmmod them.
  17. Start the correct module with “modprobe rt2570″
  18. Now for the moment of truth.  To test type “ifconfig -a” and see if your wireless adapter is at the bottom.  It will be called rausb0 or ra0 depending if it is a usb device or not.
  19. Turn the device on with “ifconfig rausb0 up”.  (replace rausb0 with your version from now on)
  20. And look for some networks! “iwlist rausb0 scan”.  Now if you find some networks, happy days its all working.  Remember the SSID of that network.  If it isnt, then either your router is wrong, you have the wrong driver or you have made a mistake.
  21. Now we need to stop the old drivers restarting next time we boot so there are two options.  First is delete the files or second is this.  type “gedit /etc/modprobe.d/blacklist”.
  22. At the bottom of the file add “blacklist rt2500usb”, “blacklist rt2×00usb”, “blacklist rt2×00lib”, “blacklist mac80211″.  All on seperate lines.  This blocks attempts to start the old driver.  Save and Close.
  23. Now open “gedit /etc/network/interfaces”.
  24. This is an important bit, so I will do it in a code box.  After the auto lo and iface lo inet loopback lines enter this:


auto rausb0 # place your card name instead of all rausb0's
iface rausb0 inet dhcp
pre-up ifconfig rausb0 up
pre-up ifconfig rausb0 down
pre-up ifconfig rausb0 up
pre-up sudo iwconfig rausb0 mode Managed
pre-up sudo iwpriv rausb0 auth 3
pre-up sudo iwpriv rausb0 enc 3
pre-up sudo iwconfig rausb0 essid "<your ssid from before>"
pre-up sudo iwpriv rausb0 wpapsk <your wpa password>
pre-up sudo iwconfig rausb0 essid
"<your ssid from before>"
Note the quotes around the ssid.  The reason why you have to put the ssid twice is so that the wpapsk key can be generated properly.  I think that all of my problems were because of this.  I was only doing it once for ages.  The up down stuff at the start seems to make it more stable.  The auth 3 means wpa and the enc 3 means TKIP.  If yours is different then take a look at the iwpriv-readme in the driver folder.

Now restart and that should be it.  Next time it reboots the dhclient should find you an address!! yay.  Note that running “/etc/init.d/networking restart” also restarts the network, but doesnt always work.  The first time it seems to, but after that I dont get any DHCP offers.  Dont know why, restart and it should be ok.

Hope that helps.  Ive spent 3 whole days doing that.  And I mean whole days.


Eine Antwort

  1. Woke says:

    Wow…good job

Post Comment

You have to login to answer.


Powered by Wordpress
Theme © 2005 - 2009 FrederikM.de
BlueMod is a modification of the blueblog_DE Theme by Oliver Wunder