Sunday, March 16, 2008

Get Atheros 5007eg working under GNU/Linux

The Wifi card in my new ASUS lappy was Atheros 5007eg and unlike intel's wifi cards, Atheros doesn't seems to be working "out of the box" in any Linux distributions :( But you can use MadWifi tools to get them working right??? well, thats what i thought until i tried madWifi, I've seen many success stories on the web which madWifi worked for Atheros 5006 cards but apparently 5007eg is relatively new and doesn't seems to be working with madWifi "yet"
After typing sudo iwconfig in the Terminal here's what i got...

lo no wireless extensions.

eth0 no wireless extensions.


So i decided to do it the other way. By using the windows driver with "ndiswrapper" and after few hours of hard work ;) i was able to get wifi up and running :D. And the first thing came to my mind was "I gotta blog about this so that no one else will have to waste their time finding ways to get Atheros 5007 working with linux" :)

So, here i'll describe how to get Atheros 5007eg working with Ubuntu. I'm also planning to write a post on how to get it working with Slackware as soon as i get some time to try. :D ok here's what i did.


First go to system>>administration>>Restricted Drivers Manager, Disable HAL and then reboot.

Then you'll have to install ndiswrapper from Synaptic. Here are the three packages you are gonna install.
ndisgtk
ndiswrapper-common
ndiswrapper-utils-1.9

After installing ndiswrapper you'll need the windows driver of your wifi card in my case. I had the Atheros 5007eg driver in a DVD which came with my lappy and if you don't have, you can get appropriate driver from the Atheros website. its http://www.atheros.cz/


Open the Terminal. Go to the folder where you got the windows driver(the .inf file) for your Atheros card and type
ndiswrapper -i xxx.inf (replace xxx with the name of the inf file)

Now we have to blacklist ath_pci for type gksu gedit /etc/modprobe.d/blacklist in the terminal

Add the following line to the end of the file.

blacklist ath_pci

Then type ndiswrapper -l to list the installed drivers if your driver is working you should see something like the following

net5211 : driver installed
device (168C:001C) present (alternate driver: ath_pci)

Type these commands in the terminal one after other

sudo depmod -a

sudo modprobe ndiswrapper

sudo ndiswrapper -m

And type gksudo gedit /etc/modules
and add ndiswrapper to the end of the file and save it.

That's all folks! :D now reboot the machine and you can check whether the wifi is working (of course it is!) by typing sudo iwconfig in the Terminal here's what i get after the process.

lo no wireless extensions.

eth0 no wireless extensions.

ath0 IEEE 802.11g ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:54 Mb/s
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0



Ok! Have fun! and feel free to let me know if you have any problems or any unclear steps in this post
~seejay~