How to checkout and install madwifi experimental driver for ar5008

From ThinkWiki
Revision as of 01:37, 16 April 2008 by Kevmitch (Talk | contribs)
Jump to: navigation, search

Official support for the AR5008/AR5418 chipset has not yet been included in an official release of the madwifi-hal however, in the meantime, there is pre-release support with which some have found some success. In order to take advantage of the latest version of the code, you can either download the nightly snapshot, or use subversion as described below:

  • make (if necessary) and change to a directory where you new directory
user@box:~/$ mkdir madwifi
user@box:~/$ cd madwifi 
  • Fetch files using svn
user@box:~/madwifi$ svn co http://svn.madwifi.org/madwifi/trunk
.
.
.
Checked out revision ####.
  • Now enter the directory and start compiling:
user@box:~/madwifi$ cd trunk/
user@box:~/madwifi/trunk$ make
.
.
.
  • With a little luck, you now have a properly compiled driver, ready for install. You'll probably be asked to enter the root password.
user@box:~/madwifi/trunk$ sudo make install
  • If you're using debian, you will have to add an entry to your /etc/network/interfaces file in order to be able to bring up the device. To make use of wpa_supplicant in roaming mode, add an entry like
#Wireless
noauto ath0
allow-hotplug ath0

iface ath0 inet manual
    wpa-driver madwifi
    wpa-roam   /etc/network/wpa_supplicant.conf

iface default inet dhcp
  • Now all that's missing is probing the module. This will create two new network interfaces "wifi#" and "wlan#"
user@box:~/madwifi/trunk$ sudo modprobe ath_pci
user@box:~/madwifi/trunk$ /sbin/ifconfig 
ath0      Link encap:Ethernet  HWaddr 00:19:7E:41:09:C1  
          inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:316176 errors:0 dropped:0 overruns:0 frame:0
          TX packets:562494 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:54115716 (51.6 MiB)  TX bytes:823180275 (785.0 MiB)
eth0      Link encap:Ethernet  HWaddr 00:15:58:86:70:EE  
          inet addr:192.168.0.119  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Base address:0x2000 Memory:ee000000-ee020000 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1420 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1420 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:182621 (178.3 KiB)  TX bytes:182621 (178.3 KiB)
wifi0     Link encap:UNSPEC  HWaddr 00-19-7E-41-09-C1-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:462907 errors:753 dropped:0 overruns:0 frame:182
          TX packets:563036 errors:6 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199 
          RX bytes:91695661 (87.4 MiB)  TX bytes:846831037 (807.6 MiB)
          Interrupt:21 


It's the ath0 interface that you're after for actually configuring whatever network manager you choose to use. The wifi0 is the accursed binary hal interface.

Troubleshooting

If you're having trouble getting the ath0 interface to show up on a regular ifconfig, but can see it if you do an ifconfig -a and nothing seems to be happening with wpa_supplicant, the solution (for some unknown reason) is to rename ath0 to wlan0. This is easily done by modifying the udev rule.

Upon the first probing of the ath_pci module, something resembling the following rule line should have been added /etc/udev/rules.d/z25_persistent-net.rules:

# PCI device 0x168c:0x0024 (ath_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="<your mac address>", ATTR{type}=="1", NAME="ath0"

All you need to do is change the "ath0" to "wlan0" and you're good to go. Bring down the interface, remove the module with rmmod ath_pci, run the command pkill wpa, remove /var/run/wpa_supplicant/ath0 if it's still there and reprobe the module. Hopefully that should get you working.

See Also

ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter