Configuring an Atheros AR5212/5213 with Ubuntu 6.06 Dapper
Translation of the original in Catalan. Read it in: CatalàCastellano
The base of the MPK is an Ubuntu 6.06 Dapper, well then yesterday I had the need to configure a Wifi card on it for the first time. The thing is that it gave me a bit more work than expected. So, here I post four notes on how to get it going really quickly.
When starting Ubuntu with the Atheros plugged in, the madwifi drivers of the kernel detect it perfectly but although it did not give me any error and after associating with several APs with WEP and WPA-PSK there was no way to exchange traffic, it always gave the error that it could not find the packet's destination. Finally what I did was download the madwifi drivers, specifically version 0.9.3.3. Which has compiled without problems and after deleting the drivers that Ubuntu includes by default, they have installed into the kernel modules folder. After checking that with a depmod -a they do not give any error I rebooted and the card has been detected without problems.
With the following simple commands:
iwconfig ath0 essid ssid_ap
iwconfig ath0 key codi_wep_en_hexadecimal
ifconfig ath0 up
dhclient ath0
With just that the wifi network is ready to work with WEP encryption, obviously I do not recommend it but there are people who still live deceived trusting in it. In case you want to configure it for WPA-PSK the thing is as simple as creating the following file /etc/wpa_supplicant.conf:
network={
ssid="ssid_ap"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
psk="clau_psk"
}
Then from the command line we can call wpa_supplicant to test it like this:
wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant.conf
Once we see that it has associated we can go to another console and configure the network interface. As always with the iwconfig command we can observe whether the association has been made correctly, among other data such as the signal level.
Finally if you want to put the call to wpa_supplicant in the boot sequence we can add the following to /etc/network/interfaces:
auto ath0
iface ath0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iath0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
To automate WEP, what I have done even though it is a bit of a botch is to make a script that runs the two iwconfig commands and this script is called at the pre-up of the file /etc/network/interfaces.