Install Madwifi Drivers in Ubuntu


Note: For Feisty the Atheros wireless cards work out of the box as restricted drivers are installed when Ubuntu detects Atheros cards. This procedure is mainly used for newer Atheros cards running under Edgy.

This procedure will show you how to install the madwifi drivers on your laptop.  A person over at Ubuntu Forums (Griffin3) has a procedure to install madwifi drivers in Ubuntu.  I was never able to use my built in wireless card in my Toshiba laptop until I discovered his procedure.  I thank this person from the bottom of my heart.

As we all know madwifi is a set of Drivers for the Atheros brand of wireless cards.  They are extremely popular and come in quite a few laptops.  Normally Ubuntu supports them out of the box but the newer cards will require you to install the latest drivers.

The folks over at MadWifi are the ones to thank for writing these drivers.  Griffin3 over on Ubuntu forums laid out the procedure.  I am putting this procedure on my website for all to use.

This page is a compilation of resources gotten from other websites.

This procedure has been tested by myself with Edgy Eft 6.10, I cannot guarantee that it will work on other distros.

I have a script to automate the process of this procedure.  If you wish, you can get the script here.  To run the script you must be root and have 755 permission.  To run the script type the following in a terminal.

chmod 755 ~/madwifi.sh
sudo ~/madwifi.sh

This command assumes you downloaded the script to your home folder.  Please change the path to where you downloaded the script to if it differs from what is above.  Once this is done then execute the script.  It will install the madwifi drivers, network manager, and reboot the computer.


I have a madwifi installation script for Feisty, get that script here.  The script differs as it does not install network manager.  Network manager is installed by default under Feisty.  To run the script you must be root and have 755 permission.  To run the script type the following in a terminal.

chmod 755 ~/madwifi_feisty.sh
sudo ~/madwifi_feisty.sh




Installing the MadWifi Drivers

I guess we should get down to business (remember the text that is in red are commands that you enter at the terminal.

If you prefer you can do the procedure step by step.

First thing you need to do is make sure the restricted modules are installed.  To do this go to the synaptic package manager and type Atheros or madwifi.  This will show you which kernel modules are compatible with Atheros madwifi drivers.  I use the 
2.6.17-10-generic module.

Second thing first you need to go over and get the latest madwifi drivers.  I have put the drivers here on my website in .tar.gz format.  Click this link to get the latest madwifi driver.  The file will be named "madwifi-0.9.3.2.tar.gz".

Now that we have the drivers downloaded will need to do the following:

Get what is needed to compile the source:

sudo apt-get -y install build-essential bin86

Once that is done you will need to do the following:

Copy the .tar.gz to the /usr/src/ folder.  This command assumes you downloaded the archive to your home folder.  replace ~ if your downloaded to a different location.

sudo cp ~/madwifi-0.9.3.2.tar.gz /usr/src/

Change to the /usr/src folder.
cd /usr/src

Decompress the tarball.
sudo tar -xzf madwifi-0.9.3.2.tar.gz

Install the sharutils from the package manager.
sudo apt-get -y install sharutils

Change to the folder that the tarball extracted to.
cd /usr/src/madwifi-0.9.3.2


Make the drivers (during this time the procedure may ask you to remove the older drivers, let it do so)

sudo make clean

sudo make
sudo make install

You don't need to but as you are going to reboot you can test your work so far.

sudo modprobe ath_pci

You will need to modify the modules file to make this change permanent.  To do so do the following:
sudo gedit /etc/modules

You will need to add a line at the very end of the file:
ath_pci

You can remove the archive from your home dirtectory by doing the following:

rm -r ~/madwifi-0.9.3.2.tar.gz

Save the modules file and then reboot your machine.  When you login you can configure your Atheros wireless card by going to System--->Administration--->Networking.


To connect to a network you will need to know the SSID.  Follow procedure below to enhance your wireless connection.



Get your Wireless Connection WEP, WPA, and WPA2 Ready

Now that you have your wireless connection up and running you can enable wireless encryption.  With the procedure above you had no wireless encryption at all.  The following procedure was gotten from Debian Admin to enable wireless networks for WPA in Ubuntu Edgy.  Click the link to go there.  Thanks to the folks over there for creating this procedure.

To get your wireless connection encryption capable do the following:

Update the source list
sudo apt-get

Install wpa supplicant
sudo apt-get install wpasupplicant

Install Network Manager (this will allow you to see all available wireless networks)
sudo apt-get install network-manager-gnome network-manager

You will need to edit your interfaces file to do so do the following:
sudo gedit /etc/network/interfaces

Comment out everything other than “lo” entries by using a '#' in front of the line and save the file.

Create a file called /etc/default/wpasupplicant, add entry ENABLED=0 and save the file.
sudo gedit /etc/default/wpasupplicant (this will create the file when you hit save)

Reboot your system.  Upon logging back in you will be able to click on the network manager and see the available wireless networks.

This procedure worked for me so hopefully it will work for you.





Home