Saturday, January 17, 2009

one more option for embedded Linux WiFi hardware

There's now one more 802.11b/g wireless chipset available to use in your next embedded Linux system. Thanks to the Blackfin folks at Analog Devices, we now have a driver for the Marvell '8686 chipset using a GSPI interface suitable for many embedded applications. We also fixed an alignment bug in the core driver so that things work on CPUs such as Blackfin and AVR32. Embedded WiFi modules with this chipset are available from several vendors. The new driver, libertas_spi, is available in wireless-testing and coming to a future kernel (2.6.30, most likely).

GSPI is very easy to interface as it consists of a normal SPI bus, an IRQ line, and one GPIO line that acts as a chip select signal (as such, be sure to enable CONFIG_GENERIC_GPIO in your kernel config in order to build the new libertas_spi driver). The GPIO-style chip select is different from a typical SPI chip select in that the chip select stays asserted for an arbitrary number of SPI bus transactions.

11 comments:

Brian said...

Great posting on mesh - thanks for this. Can you suggest a couple of USB WiFi dongles that will work? I'd like to set up a mesh with several machines, perhaps using different drivers and WiFi devices. Thanks!

Unknown said...

Thanks! The only USB dongles known to work so far are the ones supported by the zd1211rw but we've seen what's likely a firmware problem with them on some USB controllers (the problem manifests itself in mesh mode but not in STA mode).

The Ralink (rt2x00) dongles should be working soon, that driver can support mesh but beaconing was broken for a while (no no mesh, ad-hoc, or AP mode). That will hopefully get resolved soon.

Also the USB WiFi interface inside the OLPC XO-1 laptop can do mesh (mac80211 mesh, rather than its own mesh implementation) if used with the libertas_tf firmware and driver:
http://wireless.kernel.org/en/users/Drivers/libertastf

Right now I would suggest Broadcom b43 and Atheros ath5k hardware. You can get them on PCMCIA cards, PCI cards, etc. (not as cheap and simple as USB but at least they work well).

Brian said...

Thanks for your informative note. I bought the TrendNet USB TEW-424UB - it was listed on the device list http://linuxwireless.org/en/users/Drivers/zd1211rw/devices so I thought it would work.

I tried it on four different machines but no luck - e.g. "command failed: Operation not supported (-95).

I'll keep trying ...

Brian said...

I was able to get a PCI-based TrendNet partially installed - it shows up as mesh0 under ifconfig - however I cannot TEW441PC (http://madwifi-project.org/wiki/Compatibility/Trendnet) Sometimes I get an error "SIOCSIFFLAGS: OPERATION NOT SUPPORTED" when I try to "ifconfig mesh0 ... up/down" Maybe IF I have the ethernet connected? This is very cool - I need to find another compatible card to mesh with ...

Unknown said...

Which kernel are you using? For best results, I'd use 2.6.28 or build from wireless-testing git. That said, the zd1211rw had been supported since 2.6.26 or so and it should work.

Brian said...

I've been working with Jaunty Alpha 4. I've tried more than a dozen cards so far - panning for gold searching for those that work! I've found three I can use to set up mesh0 interfaces. So I have three different machines running - each can ping its own local mesh addr (192.168.2.1 and 2.2 and 2.3) but I get "Destination Host Unreachable" when I try to ping one of the other machines in the mesh. For a mesh_id I'm just using a simple number or short text string. A clue perhaps: when I do "iw dev mesh station dump" I get nothing - no error, but no dump. The only cards I’ve been able to find that let me define a mesh interface all have Atheros chipsets: AR2413, AR5413, AR5001X+ and they all show support for ‘mesh point’ interface mode in 'iw list'. (I haven’t yet been able to create a mesh interface with any of the several Broadcom chipsets I’ve tried.) I'm documenting this process to build on your excellent doc - I'd be glad to share this when it's working and hopefully have a useful compatibility table. It seems like I'm close to mesh-ping but must have some hitch in the process?

Brian said...

I'll try to find a USB dongle that works with zd1211rw from this list: http://linuxwireless.org/en/users/Drivers/zd1211rw/devices

Brian said...

I tried ten more USB WiFi sticks and none had support for the mesh-point interface mode. Could you post specific WiFi dongles and PCI/PCMCIA cards you have used? (Preferably, items I might buy direct from NewEgg or Amazon?) I'm getting a little closer with my systems at least pinging each other in ad-hoc mode. I'll try to document it here: http://www.meshage.com/ -- Thanks for your helpful postings!

Unknown said...

If you're getting a "no support" error then it's a software thing -- namely the driver is not telling the mac80211 stack that it supports MESH_POINT mode. I'll take a look at the current zd1211rw driver but that bit should be set there!

I suggest any PCMCIA card that has a Broadcom b43 chipset. I have used some US Robotics cards that have this and they work great. Atheros ath5k cards work too (with newer kernels) but b43 support has been available longer.

Unknown said...

Yep. NL80211_IFTYPE_MESH_POINT is definitely set in the zd1211rw driver (at least in wireless-testing and, as I recall, mainline as well). Also be absolutely sure that the zd1211rw driver is loaded! Some distributions ship the vendor driver (which doesn't have "rw" in the name) instead, and that might be your whole problem. If so, blacklist or otherwise remove the vendor driver first.

Brian said...

Thank you for your replies - very helpful! I've managed to get a half-dozen quite different PCs working now, with varied cards (PCI and PCMCIA) and even a USB dongle (although, as you've suggested, it seems to be picking about the USB flavor - working on some systems but not all.)

I've been working with the latest Ubuntu/Jaunty daily builds, and installing the latest compat-wireless subsystems - and things are working great. I was pretty stumped for a while there, so thanks for helping me get through this. The software is quite amazing and fun to use ...