How to Get the Linksys WMP54gv4 Wireless Card to work in Linux

Last updated 6/4/05

NOTE: Since I originally wrote this article, I have made some progress with ndiswrapper on my systems. If you would like to jump to this page, click here.

Additionally, if you want a seamless install of your Linksys ralink card, try Mandriva 2005 Limited Edition. I just installed this distro on my main box and configured my card in the Mandrake Control Center easily. WEP is supported. It uses the ra0 module without ndiswrapper.

Problem
:

The card just does not work out of the box. For the tests, I used the Fedora Core 3, Mandrake 10.1 and SuSE 9.1 Pro installs on my main system.

Page 2  describes how to get the card working on Slackware 10.

Page 3  describes how the card was configured using ndiswrapper in Fedora Core 4 Test 3.

Page 4 describes how the card was configured using ndiswrapper in Puppy Linux

Page 5 describes how the card was configured using ndiswrapper in Debian Sarge

Methods tried;

1. ndiswrapper with the included CD drivers.

The drivers require stacks in the kernel set to over 4. Most new kernels (2.6 series) come with stacks set to 4. This issue is noted in both Fedora Core 3 and Mandrake 10 beta. Linuxant has a kernel with 16 stacks built in, which seems to be needed when using the Win XP driver included in the cd. However, the stk kernel provided by Linuxant still crashed the system when modprobing the driver, using  modprobe ndiswrapper. Trying to use system-config-network to fine tune the card failed.

I had an install of Mandrake 10 beta and upgraded the kernel to the latest available. The same issue arose, as the kernel defaults at 4stacks and the option in the kernel source to change this was disabled. trying to fine tune the connection using the Mandrake Control Center resulted in the system freezing when initializing the card.

For the Fedora Core 3 install, I attempted to use the kernel-2.6.9-1.667.stk16.i686.rpm kernel, which mached my running kernel. 1

Note: Installing this kernel will overwrite your existing kernel. You also must make sure that the original kernel source is installed before proceeding.

I also have a permenant license for the Linuxant driver, which is reported to work,  but the license only is good for one adapter. Since I already have the license for my D-link  G-520 PCMCIA card, I was not willing to spend another $20.00 USD to try a new license.

2. The Ralink driver:

The ralink web site has a driver for Linux. The driver installed correctly, but would not bring up my browser in Mandrake. It just hung. I treied to install a vanilla kernel, but the system balked at this and refused to do the build.

3. ndiswrapper with alternate drivers. 2

I started out utilizing this thread noted extensively to do the configuration.

http://www.linuxquestions.org/questions/showthread.php?postid=1155233

lspci | grep 802  to identify the chip

with ndiswrapper, try the win2k driver first.

Go back to Linux, log as root on a console, locate the driver file named

Rt2500.INF and load it:
$ ndiswrapper -i Rt2500.INF

Check if the driver is installed:
$ ndiswrapper -l

You should get something like:
Installed ndis drivers:
rt2500 hardware present,fuzzy

Before attaching the ndiswrapper kernel module, take a look at the

/etc/ndiswrapper/rt2500 directory and make a copy of the rt2500.sys file:
$ cp rt2500.sys RT2500.sys

Load ndiswrapper kernel module:
$ modprobe ndiswrapper

Check the network adapter name:
$ iwconfig

The default name for a wireless network adapter is wlan0. Then, create

the wireless interface configuration file named

/etc/sysconfig/network-scripts/ifcfg-wlan0:

DEVICE=wlan0
BOOTPROTO=dhcp
onBOOT=on
MODE=managed
ESSID='default'
KEY=<wep key> # leave out the brackets, of course
USERCTL=no
PEERDNS=no
TYPE=wireless
CHANNEL=6  # adjust this to fit you router setting
RATE=auto

Make sure the ndiswrapper kernel module is loaded at boot time.
$ ndiswrapper -m


What Worked (Fedora Core 3 install)

After some trial and error, I decided to concentrate on the Fedora install.  I finally went with the ralink driver from their site at  http://www.ralinktech.com/supp-1.htm .

Downloaded the driver version RT2500-Linux-STA-1.4.4.0.tar.gz. Then, I followed the instructions provided by the thread at http://www.linuxquestions.org/questions/showthread.php?postid=1155233 as outlined by wrOngway;


In the RT2500-Linux-STA-1.4.3.0/STA/Module directory:

make -C /lib/modules/$(uname -r)/build SUBDIRS=$PWD modules

and to install it:

make -C /lib/modules/$(uname -r)/build SUBDIRS=$PWD modules_install depmod -a modprobe rt2500

Once that was done, I created a ifcfg-wlan0 in /etc/sysconfig/network-scripts, as noted in section #3 above, ndiswrapper with alternate drivers. An easy way to do this is to copy the existing ifcfg-eth0 file; cp ifcfg-eth0 ifcfg-wlan0, making sure that you do so in a terminal window from within the etc/sysconfig/network-scripts directory.

Finally, add to the etc/modprobe.conf file; alias rt2500 wlan0

and run depmod -a

Final Snag;

Finally, a connection! however, some issues, yet to be resolved. The wlan0 connection fails at boot. I found that I had to go to a terminal window and use the command ifconfig wlan0 up to get the card seen. Then, I needed to go to  system-config-network and activate the connection. I guess the answer is to disable the onboot option and write a small script to get the card up. I will be working on this and will post an update.

Update: I added the following script, using gedit, to get the internet access up, calling the file wgo;

#!/bin/bash
clear
echo "starting wlan0..."
/sbin/ifconfig wlan0 up
echo "configuring wlan0..."
/sbin/ifup wlan0
sleep 5
exit

I placed this file in my home directory. After setting the following permissions;

cd /home/name-of-home-directory
/sbin/chmod +x wgo
/sbin/chmod 775 wgo

The script is then invoked, from a terminal window, by moving into your home directory;

./wgo

To DO:

The next step for my Fedora install will be to make a desktop icon to run the script.

SuSE 9.1 pro Install

Next, I moved to my Suse 9.1 install on the same system. unfortunately, neither the official Ralink driver, or ndiswrapper worked on this distro. Apparently, Suse has also removed the option to effectively disable limiting the stacks on their 2.6. 4-52 kernel,so I moved on, since there is no obvious work around for this issue. It was at this point that I found a bb-zone article on installing the Sourceforge ralink drivers on Suse. I followed these directions to the letter and soon had my wireless up and running. I highly recommend this article to do your install, rather than repeating the fine work found in this article.

UPDATE: I just installed the free version of SuSE 9.2 on my box, utilizing the same directions the 9.1 install. I found that I needed to install the kernel sources which are not installed automatically in the normal installation of 9.2. In addition, I needed to install the GCC, make-devel and ncurses-devel packages before  preparing the kernel for the driver install. The ralink/RT2500 drivers work flawlessly on this system.


Mandrake 10.1 Installation

All my attempts to install the ndiswrapper drivers failed in Mandrake 10.1, due to the kernel stack issue, even after trying to upgrade to the kernel 2.6.8.12mdk version. I elected to try the new beta version of Ralink drivers. 6 These drivers proved to be more fitting for the Mandrake install.

One thing that I found is that the mandrake install did not include the g++ package to do the compile. After installing this package through the Mandrake Control Center, I proceeded with the compile process. The readme file in the source package is critical for this install.

Once the package was installed using make and make install, I went on the install the Ralink utility  that assists in configuring the network card settings. Qmake must be installed to assure a proper build of this utility. Invoke the utility by typing ./RaConfig00 in a terminal window as superuser (root). One caveat, the system needs to be rebooted to assure that the rt2500 driver is loaded on boot. The compile process should have added alias ra0 rt2500 to the /etc/modprobe.conf file. If not, you may need to manually add it.

Once there, I had to configure the parameters as Ad-Hoc, my ESSID and WEP key. The channel must also be set to your specifications (in my case 6).

Finally, use Mandrake's Control Center to assure that the card is properly set up (start-->system-->configuration-->configure your computer-->network & internet-->new connection-->wireless). The new connection window should show ralink (ra0) as a selection. Make sure that the driver is set to load at boot, using DHCP. 



References;

1. http://www.linuxant.com/driverloader/wlan/full/downloads-fc3-kernel-i686.php

2. http://www.linuxquestions.org/questions/showthread.php?postid=1155233

3. http://www.ralinktech.com/supp-1.htm

4. ndiswrapper Wiki Page

5. Ralink RT2500 Linux Howto

6. Ralink beta drivers


Page 2: The WMP54g on Slackware 10