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 under the same 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, only work 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 printout will say
Network controller: RaLink RT2561/RT61 802.11g PCIor something closely similar.
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 Core 6 Linux. The procedure is probably a bit different for other distributions.
Drivers: There are (at least) two drivers for this card. There is an experimental open-source driver from serialmonkey.com which is widely advertised as being unstable under Fedora. I haven't tried it. There is also an official, but closed-source, driver from Ralink itself. This is the one I used. You can download it from here. The version I used is version 1.1.0.0. (Of course, to download it 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.)
After you have downloaded the driver, become root and then open the driver file by typing
tar xvzf RT61_Linux_STA_Drv1.1.0.0.tar.gzThis will create a directory called "RT61_Linux_STA_Drv1.1.0.0" containing the files for the driver.
Kernel: At the time I installed the driver it only worked with Linux kernel version 2.6.18 or older. In order to make it work I had to replace my newer kernel with the older 2.6.18. However, an email correspondent told me that there is a newer version of the driver (1.1.1.0) that works for him with kernel version 2.6.20, so it appears that Ralink has updated the driver. I cannot confirm this myself – I have only used the older version.
(Another previous correspondent informed me that it was quite easy to make the previous version of the driver work with newer kernels by appropriately editing the source code of the driver. Specifically, he said: "edit the rtmp_main.c file in the Modules directory that you have unpacked. The line that needs to be changed is the one that that says:
net_dev->get-wireless-stats=RT61_get_wireless_stats;either delete it or comment it out, and it should compile fine."
I never tried this either so I can't confirm that it works, but it appears not to be necessary now anyway.)
Building the driver: Enter the directory containing the files for the driver module:
cd RT61_Linux_STA_Drv1.1.0.0/ModuleThere is a script called "Configure" in the directory, which is supposed to set up the configuration of the driver for you, but it doesn't appear to work very well with Fedora, so I suggest you do it by hand. Edit the file config.mk to look like this:
LINUX_SRC=/usr/src/kernels/2.6.18-1.2798.fc6-i686 TARGET_MODDIR=/lib/modules/2.6.18-1.2798.fc6/kernel/drivers/net/wireless/(If you're using a different kernel, edit as appropriate.)
Now you can build the driver by typing
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.18-1.2798.fc6/kernel/drivers/net/wirelessNow 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 WEP 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=OPEN EncrypType=WEP DefaultKeyID=1 Key1Type=0 Key1Str=123456789ABCDEF0123456789A …The lines in red are the ones you need to change to suit your wireless network, SSID, encryption type, and encryption key/password. Now save and close the file.
Finally, edit the file /etc/modprobe.conf and add the line
alias ra0 rt61to the end of it, then save and close the file and update your module dependencies by typing
depmod -aGetting it working: OK, we're basically ready to go. This is where there is an important problem with the instructions you may see elsewhere – this is what cost me several annoying hours. The first time you set up your wireless network you need to load the driver module by hand. This is crucial. Type
insmod rt61(If that doesn't work, then change to the module directory itself, which would be /lib/modules/2.6.18-1.2798.fc6/kernel/drivers/net/wireless/ and type
/sbin/insmod rt61.koThat should do it.)
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.) This step is
missing from some of the other instructions, but it's crucial. You cannot,
at this stage, for instance, just type ifup ra0 as you might
imagine. It will not work.
Now if you type iwconfig you should see an active card:
ra0 RT61 Wireless ESSID:"MyNetworkName"
Mode:Managed Frequency:2.412 GHz Access Point: 00:00:00:00:00:00
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, you could delete it and recreate it as a new network or, as I did, create a new profile and a new network device under that profile. Note that you will have to type in your network's details (SSID, keycode, etc.) again when you set up the network using the Fedora tools. It really appears that you do need to do this twice to make everything work.
At this stage you can check the box that says "Start on boot" for the wireless network if you want to do that. Now activate the ra0 device and it should work. Good luck!
Last modified: August 4, 2007
Mark Newman