Latest news:
11th March 2009 - 0.9.8.4: A (hopefully) better --uninstall which reinstalls module packages.
10th March 2009 - 0.9.8.2: thanks to JayD239 the SVN URL is no longer broken. Please update
21st October 2008 - 0.9.8.1: madwifi.sh now automatically adds ath_pci to /etc/modules to make Ubuntu load it automatically at boot. It also removes ath_pci from autoload when --uninstalling.
15th October 2008 - 0.9.8: By requests I added an --uninstall option. I didn't test it much so let's hope it works
21st July 2008 - 0.9.7: New option --info and some hardware checking.
16th July 2008 - For AR5007 (AR252x in lspci, found at least on Asus EEE) on 32-bit you will need a special tarball of madwifi-ng or madwifi-hal that can be downloaded from http://snapshots.madwifi-project.org/special/. 64-bit users should check this (ndiswrapper method) or this (madwifi-hal method) out.
--
The new open source ath5k and ath9k drivers included in Ubuntu 8.10 Intrepid Ibex and newer (should) replace MadWifi.
When upgrading to 8.10 or newer version of Ubuntu you might want to --uninstall MadWifi first to avoid conflicts with the new drivers. Since 8.10 Atheros WiFi should work straight out-of-the-box.
--
What is this script all about?
I have been working on an installation script for MadWifi, the best Atheros driver for Linux at the moment, that should work in Ubuntu, Debian and Fedora. I have been using it with my MacBook [AR5418] for some time and found it very useful.
Do I need this script? Will it solve my WiFi problems?
If you're in need of MadWifi, then this script should help you. Please note that MadWifi does not support any USB devices. To find out which cards are supported see http://madwifi-project.org/wiki/Compatibility.
Okay, so how do I use this script to install MadWifi?
Basically, if you have a working Internet connection (no worries if you don't, see below), all you need to do is download the script
Code:
wget http://kolmoskone.homelinux.org/~kaja/kamaa/madwifi.sh -O madwifi.sh
chmod +x madwifi.sh
(you can also upgrade your current madwifi.sh to the latest version with these commands)
And then run it with sudo
What is going to happen when I run the script?
This will install the build dependencies, fetch the latest source code from MadWifi SVN, compile and install the module. After it completes you should be able to connect to an AP with Ubuntu's NetworkManager icon in the notification area. 8) (it might take up to about a minute to pick up a network)
Is there anything I should do after installing?
If it works well enough, do sudo ./madwifi.sh --save to save the working version of sources. If an update breaks the sources you can then do sudo ./madwifi.sh --working to use the saved sources.
You might want to see --help every once in a while to help you remind how the script works.
How about kernel updates?
Note that you have to run the script after every kernel update! For a reinstall you can also use sudo ./madwifi.sh --reinstall which doesn't fetch a new version of MadWifi but uses the one last installed.
Installing without an Internet connection or using a source tarball (not fun)
SVN code does not always compile succesfully and not all of us can access a wired connection to the Internet. That's why I have included a possibility to use a source tarball from madwifi.org.
You need to put madwifi.sh, madwifi-VERSION.tar.gz (from http://madwifi-project.org/ or http://snapshots.madwifi-project.org/madwifi-trunk/) and the following Ubuntu packages (from http://packages.ubuntu.com/): make, gcc, libc6-dev, linux-headers-YOURKERNELVERSION on a removable media (CD, flash memory,...). VERSION is something like 0.9.4 or trunk-r3721-20080613 and can be seen in the tarball filename. You can easily find out YOURKERNELVERSION by running the uname -r command.
Tip: You can download the files to the hard drive in OS X or Windows (or whatever you might be dual booting) and then access the downloaded files in Ubuntu!
If you have a wired connection in Ubuntu the dependencies will be automatically installed, so you don't need to manually install the packages then, just download the tarball and run the script.
Once you have the files, insert the removable media and install the packages by double clicking on them in Nautilus or by running
Code:
sudo dpkg -i /path/to/package.deb
Then run the script like this:
Code:
chmod +x madwifi.sh
sudo ./madwifi.sh --tarball /path/to/madwifi-VERSION.tar.gz
Of course you need to substitute VERSION with the actual MadWifi version. After it completes you should be able to connect to an AP with Ubuntu's NetworkManager icon in the notification area. 8)
Note that you have to run the last command after every kernel update, so keep the source tarball at hand! You can also start using the SVN way now that you have a working connection.
Troubleshooting and different versions of MadWifi
If the driver isn't working, try another version of it (trunk, ng, hal or different revision)!
The script installs trunk by default.
Especially when having this output
Code:
ath_pci: HAL doesn't support MAC revision
it's most likely fixed by trying ng tarball or hal tarball.
There are alternatives to MadWifi called ath5k and ath9k. If the script doesn't work and you get some results by running for example
try running
Code:
sudo modprobe -r ath5k
before running the script. If it helps, blacklist ath5k. If it doesn't, try the same replacing ath5k with atk9k.
Problems?
If the script is broken or sucks in any way, please let me know.
When reporting problems please provide the following information:
* output of command sudo ./madwifi.sh --info
* are you using SVN or a (version?) snapshot
* any interesting lines in dmesg output that the above command does not show
* information on the hardware used, laptop or pci card make/model
Bookmarks