====== DEPRECATED ====== **IMPORTANT NOTE**: This page is deprecated, updated documentation can be found [[install_drivers|here]] ====== Madwifi-ng ====== This page only deals with the net80211 version of the madwifi-ng driver. For the mac80211 ath5k version see the [[mac80211|mac80211 page]]. To understand the differences, see [[install_drivers#mac80211_versus_ieee80211_stacks|mac80211 versus ieee80211 stacks]] write-up. **IMPORTANT**\\ If you have a new kernel that supports mac80211 and includes the new ath5k driver then you **MUST** blacklist it otherwise the net80211 version of the module below will not work. See [[madwifi-ng#blacklisting_mac80211_driver_version|blacklisting mac80211 driver version]] below. ifconfig ath0 down ifconfig wifi0 down svn -r 4073 checkout http://svn.madwifi-project.org/madwifi/trunk/ madwifi-ng cd madwifi-ng wget http://patches.aircrack-ng.org/madwifi-ng-r4073.patch patch -N -p 1 -i madwifi-ng-r4073.patch ./scripts/madwifi-unload make make install depmod -ae modprobe ath_pci \\ **Notes**: * The patch is designed to eliminate invalid retries. * At "make install", you may be asked if you want to remove old modules, type 'r' to do it. * To determine which version of the madwifi-ng drivers you are currently using, enter "modinfo ath_pci". This will provide the version number plus other information. * When using [[airmon-ng]], specify **wifiX** as interface (or you can create manually a VAP in monitor mode with [[http://madwifi.org/wiki/UserDocs/MonitorModeInterface|wlanconfig]]) and **athX** interface when you have to destroy it. * You should delete all existing VAP before before creating a VAP in monitor mode, using **airmon-ng stop athX** (replacing X with the interface number to delete). ===== Usage Tips ===== ==== Support for Atheros 802.11b/g/n cards ==== Support for Atheros chipID 0x0024 (rev 01) 802.11b/g/n cards (AR5008). The new cards are now (experimentally) supported in trunk. The above code will cause them to work! **NOTE:** 11n rates are not supported yet. ==== Support for Atheros AR2425 (AR5007EG) chipset (including EEE PC) - PCI ID 168c001c ==== **NOTE:** This section is included for historical purposes. The AR5007EG is now supported by the base driver instructions above. To determine the PCI ID under linux, enter "lspci -nn". The output should look similar to this: 03:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01) Notice the "168c:001c" at the end. This is the PCI ID. These are relevant links on the madwifi-project.org site: * [[http://madwifi-project.org/wiki/Compatibility/Atheros#AtherosAR5007EG|Compatibility]] * [[http://madwifi-project.org/ticket/1192|Hardware Support: AR5007EG]] * [[http://madwifi-project.org/ticket/1679|Support for AR2425 (AR5007EG) chipset]] The following links are tarballs already containing everything needed: * [[http://snapshots.madwifi-project.org/special/madwifi-nr-r3366+ar5007.tar.gz|This is a combined r3366 plus AR5007EG patch]] As well, see the next entry. * [[http://www.offensive-security.com/madwifi-r3406-hdm-032608.tar.gz|Combined r3406, karma and AR5007EG patch]] The following link is a tarball oriented towards BackTrack but may be of value to people with an eeepc. * http://metasploit.com/users/hdm/tools/madwifi-r3726-061708-03-hdm.tar.gz The new official HAL (0.10.5.6) supports AR5007EG (and AR5006EG) on 32 and 64 bit systems. Use the instructions above but checkout **http://svn.madwifi-project.org/madwifi/branches/madwifi-hal-0.10.5.6/** instead of **http://svn.madwifi-project.org/madwifi/trunk/**. Very important, prior to applying the madwifi-ng-4073.patch patch, you must edit this file. This is because the madwifi-hal source code is slightly different from the standard madwifi-ng source code. Comment out the following lines like this by adding "#" in front of each line or just delete the lines. #diff -dru madwifi-ng/ath_hal/ar5211/ar5211_reset.c madwifi-ng-fixed/ath_hal/ar5211/ar5211_reset.c #--- madwifi-ng/ath_hal/ar5211/ar5211_reset.c 2009-07-10 01:46:38.000000000 +0200 #+++ madwifi-ng-fixed/ath_hal/ar5211/ar5211_reset.c 2009-07-10 01:52:18.000000000 +0200 #@@ -987,7 +987,7 @@ # if (AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_OAHU && # ath_hal_getnfcheckrequired(ah, (HAL_CHANNEL *) chan)) { # static const uint8_t runtime[3] = { 0, 2, 7 }; #- int16_t nf, nfThresh; #+ int16_t nf, nfThresh = 0; # int i; # # if (!getNoiseFloorThresh(ah, chan, &nfThresh)) #diff -dru madwifi-ng/ath_hal/ar5212/ar5212_reset.c madwifi-ng-fixed/ath_hal/ar5212/ar5212_reset.c #--- madwifi-ng/ath_hal/ar5212/ar5212_reset.c 2009-07-10 01:46:41.000000000 +0200 #+++ madwifi-ng-fixed/ath_hal/ar5212/ar5212_reset.c 2009-07-10 01:53:24.000000000 +0200 #@@ -1264,7 +1264,7 @@ # { # struct ath_hal_5212 *ahp = AH5212(ah); # struct ar5212NfCalHist *h = &ahp->ah_nfCalHist; #- int16_t nf, nfThresh; #+ int16_t nf, nfThresh = 0; # int32_t val; # # if (OS_REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { ===== Troubleshooting Tips ===== ==== Blacklisting mac80211 driver version ==== If you have the file ath5k.ko or ath9k.ko in the /lib/modules directory tree then you have two options to blacklist it. Failure to do this will mean that the ieee80211 madwifi-ng module described on this page will fail to work properly. Here are the options: * Move the file to another area on your system as follows then do "depmod -ae". Move /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ath5k/ath5k.ko to a safe place. Some parts of the path may be different on your distribution/system. Use "locate ath5k.ko" or "find /lib/modules -name *ath5k*" to find the full path. After moving it, do "depmod -ae". * Edit /etc/modprobe.d/blacklist and add "blacklist ath5k" as a new line. In both cases, reboot your system afterwards. If present, do the same for ath9k. ==== Airodump-ng stalls ==== If you change the rate while capturing packets, airodump-ng will stall. There are two possible workarounds: * Set injecting before starting airodump-ng * Restart airodump-ng ==== Mini-PCI Problems ==== If you system contains a mini-PCI wireless card, there are some known issues and solutions. See the [[http://madwifi-project.org/wiki/UserDocs/MiniPCI|Madwifi-ng Mini-PCI page]] for a description of the known problems and solutions.