Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

How Do I?

This FAQ page answers qestions about how to do specific things.

How do I get my card to use WEP? I get ath0: authorization failed (reason 13)

If you have trouble with iwconfig when using WEP, specifically if you can’t set the essid or associate with an access point, then it may be the order in which you are issuing the iwconfig commands. Silas Bennett recommends the following order:

iwconfig ath0 key XXXXXXXXXX
iwconfig ath0 ap XX:XX:XX:XX:XX:XX
iwconfig ath0 channel X
iwconfig ath0 essid foobar
iwconfig ath0 rate XXMB

If you use debian, then the interfaces (in /etc/networks/interfaces used by ifup) commands would similarly be:

wireless_key XXXXXXXXXX
wireless-ap XX:XX:XX:XX:XX:XX
wireless-channel X
wireless-essid foobar
wireless-rate XXMB

Where all of the Xs and ‘foobar’s are replaced by relevant values. All of the values can be used in ifupdown-roam’s ‘lifaces’. Silas also says the it is not normally necessary to put the lines after iwconfig ath0 ap XX:XX:XX:XX:XX:XX since the channel, essid and rate are set automatically on sucessfully associating with an access point. Also note that you can’t copy the second set of commands into RedHat?’s config files verbatim; they are debian specific.

More information can be found in the archives here.

How do I get the Cisco VPN client to work with madwifi?

Apparently if you use version 4.0.4A or later, it works out of the box, but for previous versions, read on…

According to Tom Marshall, vpnclient needs fixing. This is what Tom has to say:

vpnclient has (bad, evil) code to look for acceptable interfaces based on their name. You need to add “ath” to that list. In interceptor.c you will find the supported_device() function. Add these lines at the appropriate place:

else if(!strncmp(dev->name,"ath",3) && (dev->name[3]>='0' &&
                +dev->name[3]<='9'))
 
{
 
                rc=1;
 
}

Then recompile it and you should find that it works.

Alternatively, you could rename the interface.

How can I use my card as an access point?

Just put the card in master mode to use it as a master station, however, if you want the whole box to behave like a commercial AP, try the following. This is not necessary under normal circumstances, such as if you just want your card to be the master node, and are quite happy to just use kernel routing.

Matt Jarvis sent me the following info on how to use madwifi as an access point. This should please quite a lot of people:

Hi Matt

I was reading your faq and noticed you don’t have a section on how to use madwifi as an access point . Here are the necessary steps, I use this currently and it works although I am struggling with ath_hal_wait timeouts which causes throughput in 802.11g to be poor. Hopefully someone will fix something in the driver soon to improve performance. For 802.11b access points, the hostap driver is a much more mature solution, and has a massive feature set for this kind of application, just find a card with a Prism2 chipset and away you go. However, if you need 802.11g then madwifi is your only option.

Make sure you have bridging turned on in the kernel, either as a module or built in, install bridge-utils (packages are available for many distros, or just roll your own from the sources).

#Set the card in master mode
iwconfig ath0 mode master
#Create the bridge
brctl addbr br0
brctl addif br0 ath0
brctl addif br0 eth0
ifconfig ath0 0.0.0.0
ifconfig eth0 0.0.0.0
ifconfig br0 192.168.0.1

The bridge should now be up, test by pinging another machine on either side. Pings may take a few seconds to work, as the bridge has to work out which side each ip address is on.

If you can ping both the wired and wireless subnets then the bridge is working, and you are now functioning as an access point. This is an extremely insecure configuration, anyone who can connect to your access point is fully integrated into your network, so use additional security, encryption and authentication of some kind. MAC addresses can be spoofed, but MAC based authentication is at least a protection against casual scanners.

Also, Matt (Jarvis) has discovered that the e100 driver (for ethernet cards) does not interact well with the bridging code. A single packet crossing the bridge is enough to cause a kernel panic (he has only tested this with 2.4.22 kernels, but suspects that it may be the case for the whole 2.4 series). To get around this, use the eepro100 driver, which normally manages to work fine.

How can I change the MAC address of my card?

Try the following (replacing the Xs with the MAC)

ifconfig ath0 hw ether XX:XX:XX:XX:XX:XX

How do I get my card to use WPA-PSK?

See: wpa_802.11i for details on getting and setting up madwifi with the wpa_supplicant.

My computer has extra LEDs for wireless information, how can I make them work?

If the LED is connected to the chipsets GPIO pins, then the following commands should make it blink slowly on power up, and then switch to a 3 second blink period on association (similar to the LED behaviour on PC Cards).

sysctl -w dev.ath0.ledpin=1
sysctl -w dev.ath0.softled=1

Note that sysctl parameters are not saved in non-volatile memory, so you’ll want to put these commands in a local boot script.

How do I make my 802.11g card work at 54Mb/s?

This entry was sent in by Gregory Mokhin

By default the madwifi driver doesn’t offer rates higher than 11 Mb/s, even if your 802.11g card supports up to 108 Mb/s. To check, issue the command:

iwlist ath0 rate

Which will print a list of supported rates. If the maximum rate listed is 11 Mb/s, then issue the command:

# iwpriv ath0 mode 3

and then check if higher rates are supported.

For more information, see iwpriv extensions.

How do I see who's connected to my AP?

This is fairly simple, you just need to issue the command:

iwlist ath0 peers

Obviously modifying the ath0 where needed.

Since this command is regarded obsolete and will be removed from new wireless tools versions, you can also get the information (even more detailed) from following command:

cat /proc/sys/net/wlan0/associated_sta

ath0 will be translated to wlan0, or if you already have a wlan0 prism card then ath0 will translate to wlan1 accordingly.

How do I get my card to use turbo mode?

See here: UserDocs/TurboMode

How do I get the card to use monitor mode?

To set the driver into monitor mode, issue the following commands:

iwpriv ath0 mode 2

This locks the card to 802.11b operation.

iwconfig ath0 mode monitor channel XX

Replace the XX with the channel you want to monitor… and bring the interface up.

iwconfig ath0 up