As usual, these notes are merely a document of things that worked for me. There's no guarantee they will work for you, though I certainly hope they will. All opinions expressed here are those of the author and are not necessarily shared by the University of Michigan.
Linksys WMP54G: The Linksys WMP54G is a PCI wifi card for desktop PCs. The version I have is based on the RT61 chips made by Ralink Technologies. The instructions on this page apply to this version and probably also apply to other cards based on the same chips, though I can't say for certain since I've only tried the one card. (Apparently some cards sold by Linksys under the WMP54G model number have different chipsets in them – either a Belkin or a Broadcom chipset. Again I can't confirm this, but it is undoubtedly the case that these instructions will, at most, work only for RT61 chips.) To identify the hardware on a card installed in your machine, type "lspci" into a terminal window in Linux. If you have an RT61-based card, one of the lines of output will say
Network controller: RaLink RT2561/RT61 802.11g PCIor something closely similar.
Drivers: The card comes with a Windows driver and works nicely under Windows. There is a downloadable driver for Linux that also works nicely, but you have to install it right to make it work. That's what this page is about. My experiences are with Fedora Linux version 9. The procedure is probably a bit different for other distributions.
There are (at least) two Linux drivers for this card. There is an open-source one that comes built into Fedora. I tried this one first, and it works, but it was a bit unstable. It would typically work for a few hours or a day, but then hang and I'd lose the network connection. This driver is probably good enough if you're the sort of person who only uses your computer for a few minutes at a time and then turns it off. If you're like me and you leave the computer on for hours, then you may want to look into the other driver, which is an official (though closed-source) driver from Ralink itself, and seems very stable. You can download it from here. The version I used is version 1.1.2.1. (Of course, to download the driver you will need a network connection, which could be difficult since your wireless card isn't working yet. I had to dig an ethernet cable out of the closet and plug directly into the back of the wireless router. You could also download the driver on another computer and then copy it over on a CD or a memory stick.)
After you have downloaded the driver, become root and then open the driver file by typing
tar jvzf RT61_Linux_STA_Drv1.1.2.1.tar.bz2This will create a directory called "RT61_Linux_STA_Drv1.1.2.1" containing the files for the driver.
Building the driver: To build the driver you first need to have the kernel development packages installed and up-to-date. Type:
yum install kernel-headers kernel-develNote that the driver will have to be built and installed anew if you later update the kernel that you are using.
Building the driver works roughly as advertised, but there is one trick. After you enter the directory containing the files for the driver module:
cd RT61_Linux_STA_Drv1.1.2.1/Moduleyou have to type
export KBUILD_NOPEDANTIC=1If you don't do this, you will get an error message when you try to build the driver. (The "export" command is for users of the bash or ksh shells, which is most Fedora users. If you're a csh or tcsh user type
setenv
KBUILD_NOPEDANTIC 1 instead. If you're an sh user I'm not sure what
you type, but you can probably work it out. If you don't know what shell
you are using, you're probably using bash.)
Now build the driver as described in the instructions that come with it:
cp Makefile.6 Makefile make allThe computer will work away for a little while building the driver.
Installing the driver: There is code in the makefile to install the driver for you, but it installs it in the wrong place for Fedora, so I recommend you don't use it. Instead, install by hand as follows. First copy the newly built driver file to the appropriate target directory:
cp rt61.ko /lib/modules/2.6.25.9-76.fc9.i686/kernel/drivers/net/wireless(You will need to set the numbers to match the kernel version you are using. Type
uname -r if you don't know which version you are
using.) Now create the configuration directory the driver will use:
mkdir /etc/Wireless mkdir /etc/Wireless/RT61STACopy the appropriate files to this directory:
cp rt2561s.bin rt2661.bin /etc/Wireless/RT61STA dos2unix rt61sta.dat cp rt61sta.dat /etc/Wireless/RT61STANow go to the configuration directory:
cd /etc/Wireless/RT61STAand edit the file rt61sta.dat using your favorite text editor to contain the right parameters for the network you will be connecting to. I'm using WPA encryption on my card, and for me the file looks something like:
CountryRegion=0 CountryRegionABand=7 WirelessMode=0 SSID=MyNetworkName NetworkType=Managed Channel=0 AuthMode=WPAPSK EncrypType=TKIP ... WPAPSK=MyPassPhraseThe lines in red are the ones you need to change to suit your wireless network, SSID, encryption type, and encryption key/password. Details of the various settings are given in the README file that comes with the driver. Now save and close the file. (If you're one of the 96% of people in the world who don't live in the US, you may also need to change some of the "country" lines as well.)
Finally, edit the file /etc/modprobe.conf and add the lines
blacklist rt61pci blacklist rt2x00pci blacklist rt2x00lib alias ra0 rt61to the end of it, then save and close the file and update your module dependencies by typing
depmod -aThe lines that say "blacklist" are important. These tell Fedora not to use the old open-source driver that comes with the operating system. Without these lines the system will get confused about which driver to use and it won't work.
Getting it working: OK, we're basically ready to go. The first time you set up your wireless network you need to load the driver module by hand. You'll only need to do this once, but it is crucial. Type
insmod rt61
Now you have to start the wireless card by typing, for instance
ifconfig ra0 up(Depending on how you are set up, you might also need to provide an IP address, such as
ifconfig ra0 192.168.1.2 up.)
Now if you type iwconfig you should see an active card:
ra0 RT61 Wireless ESSID:"MyNetworkName"
Mode:Managed Frequency:2.412 GHz Access Point: 01:23:45:67:89:AB
Bit Rate=54 Mb/s
Now, and only now, you can set up your network using the standard Fedora network tools (system-config-network). If there is already an ra0 device in the menu, delete it before recreating it as a new network by hitting the "New" button. You may have to type in your network's details (SSID, etc.) again, but leave the encryption key blank. (At least that's what worked for me for WPA encryption. If you're using WEP and have a problem you could try filling it in.)
At this stage you can check the box that says "Start on boot" for the wireless network if you want to do that. You may also want to disable NetworkManager and/or wpa_supplicant if you're not using them; you can do this using the "Services" item under the administration menu. If you don't know whether you're using them, then it won't do any harm to leave them running. (They make the machine slightly slower to boot up, but otherwise they're mostly unintrusive.)
Now click the box to activate the ra0 device (or just type ifup
ra0) and it should work. Good luck!
Last modified: July 9, 2008
Mark Newman