The Atheros AR5007EG wireless card
This page has been deprecated since the release of CentOS 5.4 and, thus, should not be used with current systems.
<<TableOfContents: execution failed [Argument "maxdepth" must be an integer value, not ""] (see also the log)>>
This HowTo includes using third party programs that have not been tested by the CentOS team. Procede at your own risk.
That being said, it's unlikely to break anything.
The AR5007EG card is becoming fairly common, especially in lower end laptops. It is used, for example, in some models of the popular Asus EEE PC. There is no official driver for it, however the MadWifi team and FreeBSD's Sam Leffler have created a driver that will work in both 32 and 64 bit.
Most of the commands on this page will require root privilege as well as root's $PATH, including /sbin and /usr/sbin. Therefore, either log in as root or if using su, use su - with a space and hyphen after the su. This ensures that you will have those two directories in your command path.
2. Determine if you actually have the AR5007EG card
If Windows is still installed on the computer, use its Device Manager to check the card. If you have completely removed Windows, then start with lspci.
lspci | less
Although lspci does not yet correctly identify the AR5007EG, it may give some clues. It may show it as AR5006EG. On a CentOS-5.2 64 bit system, it shows the card as AR242x 802.11 abg. Now run lspci with the -n flag to get the ID numbers.
It should show an ID of 168c:001c.
Some Acer laptops will have a sticker on the bottom of the machine, showing that it has the Atheros AR5BXB63. This sticker may be present on other vendors' machines as well.
3. Remove any ndiswrapper or previous MadWifi installations
If you have already tried with ndiswrapper or MadWifi, there is the possibility that what is there will interfere with this new installation. Therefore, it is better to completely remove any ndiswrapper or previous MadWifi installation.
First remove any drivers that have been installed. If you have followed any of the various howtos around, you will probably have either the net5211 or net5416 driver installed.
(That is a lower case L as in list, not the numeral one.)
If it shows, for example, that you have the net5211 driver installed, remove it.
ndiswrapper -e net5211
If the driver shown is the net5416 then change the 5211 in the previous command to 5416.
Now remove ndiswrapper. If you have installed it via rpm, use
yum -y remove ndiswrapper
If you have installed it from source, then cd into the ndiswrapper directory created when you untarred the source download and type
You should see it search for installations and then echo a message that you should run make uninstall a few more times until you're sure that there's nothing left.
The procedure is similar. If installed via yum use yum -y remove madwifi which should also remove any dependencies that it installed. If you installed it from source, cd into the directory that was created when you untarred the download and type make uninstall.
4. Download the patched snapshot
MadWifi's ticket 1192 has a link to the latest snapshots that work with this card. Download it and save it somewhere. The snapshots are frequently updated, so always make sure you have the latest version.
5. Make sure you have the necessary tools to compile source code
yum -y install gcc gcc-c++ make kernel-devel
This should also pull in kernel-headers and other necessary things.
6. Compile the code
Assuming you are in the directory to which you downloaded the tarball, untar it, cd into the new directory and run make and make install.
tar zxvf madwifi-hal-0.10.5.6-<version>tar.gz cd madwifi-hal-0.10.5.6-<version> make make install
7. Remove and blacklist the ath5k module
This is not always necessary but can help prevent conflicts.
modprobe -r ath5k
will remove the module.
With your favorite text editor edit /etc/modprobe.d/blacklist. Append the following to the file
8. Insert the ath_pci module
In some cases, this can cause problems if done before a reboot. You may get a bunch of errors on the screen. If so, don't panic. Simply reboot and try inserting the module (as detailed below) again.
To insert the module
If this goes without errors, you should be back at a command prompt. See if the module loaded properly.
lsmod | grep ath
You should see something similar to
ath_rate_sample ath_pci wlan ath_hal
(You may also see a few other things that have the string "ath" but they can be ignored.)
9. Bring the card up and scan for networks
ifconfig ath0 up
This should return you to a command prompt. The step isn't always necessary, but doesn't hurt anything. Assuming you had no errors, you can now test if the card is working with
iwlist ath0 scan
You should see a list of wireless networks in your area. If you do, you can now connect to your wireless network in your customary fashion.
Sometimes a reboot is necessary before the module is properly loaded. If you get no results, then try a reboot.
Most laptops have either a switch or button to turn wireless on and off. If you get an error message like interface doesn't support scanning, there's a good chance the switch is in the wrong position.
To get the LED working, use the following commands. (Many thanks to a helpful poster on Fedora Forums for the LED and slider commands.)
sysctl -w dev.wifi0.ledpin=3 sysctl -w dev.wifi0.softled=1
(Some people find the flashing of the LED annoying -- on some machines at least, it doesn't give a steady light to tell you the wireless is on, it simply flashes to indicate activity.)
Some machines have a slider switch for wireless. To get those working, use the following commands
/usr/bin/setkeycodes e055 159 /usr/bin/setkeycodes e056 158
To make either or both of these changes permanent, add them to /etc/rc.local.
Some machines, rather than a slider or switch, have a button that is pushed. If the LED light isn't enabled, it can be difficult to tell if wireless is on or off. If nothing is happening and it seems that it should be, it can be helpful to push the button a few times -- on lowend machines, it sometimes takes a few tries.
10. Troubleshooting checklist
This isn't a very good checklist, only covering things that have been mentioned above, but it might be useful.
Did you completely remove any old ndiswrapper and/or MadWifi installations?
If not, cruft from the old installation might be causing a conflict.
Did you log in as root with root's $PATH?
If you didn't log in as root, or if you did su without the space and hyphen afterwards, you won't have root's path. This can cause problems as some of the commands require /sbin and/or /usr/sbin.
Did you remember to blacklist ath5k?
If not, this can often cause a conflict.
If your laptop has a switch or button to turn wireless on and off, have you definitely put it to the "On" position?
As mentioned, this can be difficult to determine on some laptops, since the LED won't light up. Sometimes, the only way to tell is to push it and keep trying the iwlist ath0 scan command, and see if it works.
If it's still not working, see if there are any errors in dmesg.
dmesg | grep HAL
You may see something like HAL error 3, Hardware didn't respond as expected, or unable to attach hardware: Hardware revision not supported (HAL status 13).
However, this becomes more unlikely with each snapshot. Support for this card gets better all the time.
If you do get such a message, you might be able to fix it by simply trying again.
11. When upgrading the kernel
As this is a third party program, building modules against a kernel version, it will have to be manually updated each time you upgrade the kernel. Although, after a kernel upgrade, you may see a message during boot that dkms is upgrading the module, it doesn't seem to be able to do so. (During normal reboots, you might also see a dkms message that the module is already installed. This can be ignored.)
After a kernel has been upgraded, upon reboot, the wireless card will not work. To fix this, uninstall, make clean, recompile and reinstall.
cd madwifi<version-number> make uninstall make clean make make install modprobe ath_pci
Sometimes, that modprobe will result in errors about module mismatch. If so, you will have to reboot one more time for things to work.
This article was taken from http://home.roadrunner.com/~computertaijutsu/rhwireless.html#5007