--[ Linux and Cisco Aironet wireless cards ]--


General observations

I like the Cisco cards the best out of the whole lot, mostly because they have really stepped to the plate and tried to support linux with an open-source driver (Mozilla Public License) Cisco provides Linux-native drivers and utilities, free for download here. You won't need to use the Cisco-provided drivers, but the client utilities (acu,bcard,leap*) are handy if you want to use a GUI to configure your card. The other real nifty thing is that when an Aironet card is inserted, it will create an interface in /proc that allows you to communicate with the card directly, removing the need for the GUI tool at all. In my case, running kernel 2.4.7, the relevant files are here: /proc/driver/aironet/eth1/* Here is what my directory looks like:

[badmonkey]:~/bin>ls -l /proc/driver/aironet/eth1/
total 0
-rw-r--r--    1 root     root            0 Aug 10 23:37 APList
-rw-r--r--    1 root     root            0 Aug 10 23:37 Config
-rw-r--r--    1 root     root            0 Aug 10 23:37 SSID
-r--r--r--    1 root     root            0 Aug 10 23:37 Stats
-r--r--r--    1 root     root            0 Aug 10 23:37 StatsDelta
-r--r--r--    1 root     root            0 Aug 10 23:37 Status
-rw-r--r--    1 root     root            0 Aug 10 23:37 WepKey

A filesize of zero is normal, since this is the special /proc filesystem, so these are actually hooks into the kernel.
To demonstrate the usefulness of this interface, for example, to check the status of my aironet card I simply do:

[badmonkey]:/proc/driver/aironet/eth1>cat /proc/driver/aironet/eth1/Status 
Mode: 23f
Signal Strength: 100
Signal Quality: 5
SSID: WLAN
AP: 
Freq: 0
BitRate: 11mbs
Driver Version: airo.c 0.2 (Ben Reed & Javier Achirica)
Device: 340 Series
Manufacturer: Cisco Systems
Firmware Version: 4.25.05
Radio type: 2
Country: 0
Hardware Version: 20
Software Version: 425
Software Subversion: 5
Boot block version: 150
Cool, huh?

Software

I had no issues getting either the 340 OR the 350 to work as advertised in infrastructure or adhoc modes under linux-2.2.19+pcmcia-cs-3.1.27 OR linux-2.4.7 with kernel PCMCIA. Haven't tried the Access Point mode yet.

However, getting promiscuous mode (RFMON) mode working under 2.2.x was very annoying, as I had to apply a couple patches by Javier Achirica both the airo.c driver and libpcap in order to enable RFMON mode. It seemed rather kludgey, but it did work.

In kernel 2.4.7, in contrast, already has Javier's RFMON patches incorporated into the airo drivers, which makes life easier. You will also need the latest libpcap from tcpdump.org. I HIGHLY recommend you use kernel 2.4.7 or above, as not only is the aironet driver more complete, but it also supports all the latest Wireless Extensions, and also Cisco extensions.

When you insert the Aironet 340 card, you will see something like this in /var/log/messages:, accompanied by two high beeps.

Aug 10 23:29:35 badmonkey cardmgr[287]: initializing socket 1
Aug 10 23:29:35 badmonkey cardmgr[287]: socket 1: Aironet PC4800
Aug 10 23:29:36 badmonkey cardmgr[287]: executing: 'modprobe airo'
Aug 10 23:29:36 badmonkey kernel: airo:  Probing for PCI adapters 
Aug 10 23:29:36 badmonkey kernel: airo:  Finished probing for PCI adapters 
Aug 10 23:29:36 badmonkey cardmgr[287]: executing: 'modprobe airo_cs'
Aug 10 23:29:36 badmonkey kernel: airo: MAC enabled eth1 0:40:96:36:70:62 
Aug 10 23:29:36 badmonkey kernel: eth1: index 0x05: Vcc 5.0, Vpp 5.0, irq 3, io 0x0100-0x013f 
Aug 10 23:29:36 badmonkey cardmgr[287]: executing: './network start eth1'

When you insert the Aironet 350 card you will see something like this in /var/log/messages:

Aug 10 23:33:19 badmonkey cardmgr[287]: initializing socket 1
Aug 10 23:33:19 badmonkey cardmgr[287]: socket 1: 350 Series Wireless LAN Adapter
Aug 10 23:33:20 badmonkey cardmgr[287]: executing: 'modprobe airo'
Aug 10 23:33:20 badmonkey kernel: airo:  Probing for PCI adapters 
Aug 10 23:33:20 badmonkey kernel: airo:  Finished probing for PCI adapters 
Aug 10 23:33:20 badmonkey cardmgr[287]: executing: 'modprobe airo_cs'
Aug 10 23:33:20 badmonkey kernel: airo: MAC enabled eth1 0:40:96:50:6:b1 
Aug 10 23:33:20 badmonkey kernel: eth1: index 0x05: Vcc 5.0, Vpp 5.0, irq 3, io 0x0100-0x013f 
Aug 10 23:33:20 badmonkey cardmgr[287]: executing: './network start eth1'

You should now have an inteface named eth1 (in my case, since I already have an eth0). ifconfig now reports:

[badmonkey]:~/bin>ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:10:A4:8F:4A:3E  
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1601590 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60386 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1252 txqueuelen:100 
          Interrupt:11 

eth1      Link encap:Ethernet  HWaddr 00:40:96:50:06:B1  
          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:100 
          Interrupt:3 Base address:0x100 

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 

Once the card is up, you can query it, or reconfigure it by echo-ing config lines into /proc/driver/aironet/eth1/Config. Alternatively, you can use acu, the cisco supplied GUI utility. THe /proc interface is a lot more script friendly -- so for example to enable IBSS (adhoc mode) with a SSID of "foo", I would do the following:

echo "Mode: adhoc" >>/proc/driver/aironet/eth1/Config
echo "Nodename: foobaz" >>/proc/driver/aironet/eth1/Config
echo "SSID: foo" >>/proc/driver/aironet/eth1/Config

Firmware issues

Cisco is the only manufacturer I have found so far who supports upgrading the firmware under Linux. Go Cisco! When you download a firmware image from them, it will be an compressed .EXE, once uncompressed, it becomes an .IMG file which the "acu" utility can use to upgrade the firmware. Very Nice.

The only wrinkle is that initially I was using the Aironet cards with an SMC2652W access point, but after a while the SMC Access Point would simply _fall_ off the network for no apparent reason. After a few calls to SMC technical support, I was told that older versions of the Aironet firmware would actually *KILL* the SMC Access Points! Bizarre. I'm not sure which Aironet firmware versions they are talking about, but after upgrading to 4.25.05, I haven't experienced the problem again.

Promiscuous mode support

I've had the best luck with Cisco in terms of getting promiscuous mode working WELL. Since I got this working, I no longer need to pay $$$ to wildpackets for their Windows-only AiroPeek product. Now you can do it for FREE.

ingredients:

Steps:

1) Recompile your 2.4.7 kernel, you only need to have these items selected to get it to work (from /usr/src/linux/.config):

CONFIG_NET_RADIO=y
CONFIG_AIRO=m
CONFIG_AIRO_CS=m
CONFIG_NET_WIRELESS=y
The version of the airo.c driver I am using identifies itself as: "airo.c 0.2 (Ben Reed & Javier Achirica)"; This can be found in the kernel sources: /usr/src/linux/drivers/net/wireless/airo.c I chose to build the aironet drivers as modules, so I could play around with it more easily. Make sure you do a make modules_install. For some reason, the make modules_install didn't make the symlinks in /lib/modules/2.4.7/pcmcia for me, so I had to do the following (under Redhat 6.2 only) in order to get the pcmcia startup scripts to load the right modules:
cd /lib/modules/2.4.7/pcmcia
ln -s ../kernel/drivers/net/wireless/airo.o airo.o
ln -s ../kernel/drivers/net/wireless/airo_cs.o airo_cs.o
Reboot with your new kernel.

2) Grab latest libpcap-current (all I know is that 0.6.2 doesn't have support for 802.11 headers, so you need the newest, it will be included the next release of libpcap after 0.6.2) Build and install it.

3) Grab latest ethereal (0.8.19 as of this writing), Ethereal is a _very_ featureful sniffer program which can decode 802.11b packets. It should find your libpcap libraries with no problems. Build and install it.

4) To enable RFMON mode, do the following:

echo "Mode: rfmon" >>/proc/driver/aironet/eth1/Config
This means that the card is now acting as a radio monitor, grabbing raw 802.11b frames. NOTE: you can't transmit frames while you are in RFMON mode.

5) Mark the interface as up (necessary for tcpdump, and ethereal to sniff on the interface)

ifconfig eth1 up

Start ethereal, and Boom! you should immediately start seeing 802.11b beacon frames if there is an AP nearby. Nice.

WEP (encryption)

You can use the cisco-provided "acu" X-windows utility to configure every aspect of your card, including the WEP keys.

NOTE: If, when you run ./acu it complains it can't open the prefs file, and when you try to set the WEP keys you get a segmentation fault which kills the program, like so:

[badmonkey]:/home/anindya/wireless/cisco_provided/utilities>./acu
Cant open prefs: No such file or directory
Segmentation fault

As root, create the directory /opt/cisco, then re-run acu, it will then create an ACU.PREFS file there, and you should now be able to configure WEP.

It is also possible to use the /proc interface to configure WEP.

To set your WEP keys (keys 0-4): NOTE: that this writes the WEP key physically to the card's firmware. You cannot set temporary WEP keys through /proc. (Temporary WEP keys are lost when the card loses power.) For example, use something like below:

echo 0 hh:hh:hh:hh:hh:hh:hh:hh:hh:hh:hh:hh:hh >/proc/driver/aironet/ethX/WepKey
echo 1 hh:hh:hh:hh:hh:hh:hh:hh:hh:hh:hh:hh:hh >/proc/driver/aironet/ethX/WepKey
etc..
To set which key to use (Tx key), for example, to use key "1":
echo 1 >/proc/driver/aironet/ethX/WepKey

I have successfully used both 64-bit and 128-bit WEP with Linux to talk to an SMC 2652W AP without problems.

Incidentally, Tim Newsham's wep_crack and wep_decrypt tools will work with Aironet packet captures! The only wrinkle I have discovered is that latest ethereal-0.8.19 for some reason will not decode the IP traffic in the decrypted packet dump -- not sure why, but ethereal-0.8.17 will decode it just fine.

Access Point (AP) mode

So far I don't think this is supported under Linux -- I'm not sure that Cisco would want to include this in their driver simply because they want to sell more access points.

Cisco Aironet links


Last Modified: Monday, 27-Aug-2001 17:05:51 EDT
Comments, Suggestions welcome. Flames to /dev/null:
webNOSPAMmaster@gooNOSPAMnda.org