Using the Madwifi Package with the D-Link DWL-G520 PCI Card

Date: 11/12/05

Introduction:

I already had this card working with the ndiswrapper package. At the prompting of a user who was trying to get this card to work with the madwifi drivers, I did a fresh install of Fedora Core 4 on my new sata drive.

Preparation & Installation:

With Fedora, I found a lot of opinions on what was needed to do an installation of the drivers. I found that one needed the lastest kernel and kernel source packjaes. Using up2date, I upgraded both packages to Fedora's kernel
2.6.11-1.1369_FC4.

Yum is now auto-confiured on Fedora installations. I had trouble with adding the ATrpm site source to yum, so I directly downloaded the packages and installed them using the rpm install commands at a command prompt. The link to the packages can be found here. 

You will need the following packages for the installation;

madwifi-kmdl-2.6.13-1.1532_FC4-0.9.6.0-18.rhfc4.at.i686.rpm
madwifi-0.9.6.0-18.rhfc4.at.i386.rpm

The packages that you choose much match your currently running kernel and archetecture. I am runniong an AMD Semipro process or, so I elected the i686/i386 packages.

You will also need to pre-install the corutils package, using yum, before you do the actual installation.

Install the madwifi-kmdl package first, then the madwifi-kmdl-2.6.13-1.1532_FC4-0.9.6.0-18.rhfc4.at.i686.rpm next. To make it simple, I installed both packages at once, using the command as root user;

rpm -i madwifi*.rpm.

This should install the drivers, without incident. To test you drivers, type in as root user;

modprobe ath_pci


This should show the atheros wireless card in iwconfig. To see if the driver loaded properly do the following;

/sbin/iwconfig

You should get output for the card like;

ath0      IEEE 802.11  ESSID:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00
          Bit Rate:0 kb/s   Tx-Power:20 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

You now need to know what your values are for the router and wireless encription (essid and WEP, if this is what you are using). The card will not connect until you set these values, unless you have a totally open system. For my system I did the following;

/sbin/iwconfig ath0 mode managed key xxxxxxxxx channel 6 essid <your essid value>

Where you would replace the "x"text after the key command (key xxxxxxxxx) with your WEP password and after essid input your essid address.

To automatically load madwifi, I borrowed from the madwifi wiki page 1 and added the following to my modprobe.conf;

install ath0 /sbin/modprobe ath_pci; /usr/bin/wlanconfig ath0 create wlandev wifi0 wlanmode sta
remove ath0 /usr/bin/wlanconfig ath0 destroy; /sbin/modprobe -r ath_pci


Considerations:

What you would like to do is now automate the commands to run the commands for the wireless card settings. I am currently working on this. You may want to see my page on using ndiswrapper 2, which shows a possible solution.



References:

1. Installing Madwifi on Red Hat Linux wiki page

2. Using ndiswrapper with the WMP54Gv4