Thursday, May 1, 2008

Using Atheros WiFi in Ubuntu

One of the thing that the Ubuntu lacked is a driver for my Atheros WiFi in my Acer laptop.
Recently I've been trying to make use of an Asus eeePC, which also had an Atheros WiFi. To my surprise, its WiFi is operational when booting from Xandros (eeePC customized, and debian OS-based). But Xandros is too much watered down for my usage (I need to install development environment for libsnmp9 and also need a working mysql server), so I'm installing Ubuntu in a Maxtor Basics Portable drive. Actually I installed a Kubuntu 7.04 Feisty Fawn, with KDE instead of Gnome desktop, but it shouldn't matter much (I hope.. thats the only installer I got back home). Reading this wiki article about Installing Ubuntu in eeePC, finally I found that madwifi is the solution.
To quote the steps :
sudo apt-get install build-essential
tar zxvf madwifi-ng-r2756+ar5007.tar.gz
cd madwifi-ng-r2756+ar5007
make clean
sudo make install
Seems that the madwifi driver that works must be obtained from the snapshots site. I don't want to experiment using other version of the driver, so I use that version of the snapshot too.
But.. there is no wireless Access Point in my home. I must set up an ad-Hoc connection. Fiddling with
iwconfig ath0 mode Ad-Hoc
causes an error message. I began to wonder how I'm going to test the wifi driver, but browsing around for some time (hours? cant recall) then I found that the wifi interface's configuration can only be changed using wlanconfig
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0 essid ABCD
iwconfig ath0 nickname ABCD
iwconfig ath0 channel 6
ifconfig ath0
ifconfig ath0 down
ifconfig ath0 up

Now I got something better than an Ad-Hoc connection -- My Own WiFi Access Point ! :))
Funny, in the past I was complaining that I got an Atheros in the Acer laptop, I had no idea that Atheros could be configured as an Access Point.
If the steps doesn't work, try to reboot once, or fiddle transmit power settings (you should google for madwifi and iwpriv / iwconfig for that)
The same steps works both for my Acer laptop (using the same Kubuntu 7.04 - Feisty Fawn) and the Asus eeePC I borrowed. The original article is actually using an Ubuntu 8.04 Hardy as opposed to 7.04 Feisty, but fortunately it makes no difference.

No comments: