OpenMoko WiFi driver
February 5th, 2008 by Samuel OrtizAfter several weeks of effort, we at OpenedHand managed to have a reliable (and also pretty fast) 802.11 driver for the next OpenMoko phone, the GTA02 a.k.a. Neo FreeRunner. Mandatory web browsing screenshot:

The code is currently sitting in the OpenMoko kernel patchset, split into 3 parts: The driver itself, the SDIO stack (from Atheros), and the SDIO host controller .
The GTA02 is running an AR6001 802.11 b/g chipset from Atheros, and the driver is now capable of associating with open, WEP or WPA (1 or 2) access points. It works fine with a vanilla wpa_supplicant and since we’re using the wext driver you’ll need a 0.5.x wpa_supplicant.
The code is GPL and eventually we’d like to push it upstream. This will require a 2 step effort:
- Getting rid of Atheros SDIO stack and using the kernel’s one. This has been done for Atheros 1.1 firmware based driver (see here), but needs to be done for the new and upcoming 2.0 firmware version.
- Cleaning the driver code and make it mainline friendly. This will probably need a significant effort as the current code base needs some cleanups…
February 19th, 2008 at 12:39 pm
If I can get access to hardware and perhaps a spec, I’d be happy to help get the driver code upstream.
March 23rd, 2008 at 12:55 am
Great job
April 16th, 2008 at 1:20 pm
[…] http://labs.o-hand.com/2008/02/05/openmoko-wifi-driver/ […]
April 16th, 2008 at 3:06 pm
will we get promiscious mode running at some time?
April 16th, 2008 at 3:36 pm
Great
If it’s perfectly working with wpa_supplicant, we will be able to use WPA EAP with cert file
And in France there is everywhere a wifi network “freephonie” which provide SIP access through this connection
Thx !
April 16th, 2008 at 3:48 pm
Unfortunately openmoko bug #1250 is still open.
April 16th, 2008 at 4:04 pm
Is there Documentation for the Chip available so that non-GPL kernels can implement their own drivers?
April 16th, 2008 at 5:08 pm
@Andres: Hardware is any Openmoko FreeRunner (soon available…), but unfortunately you won’t find any public specs for this chip.
@elektranox: promiscuous is not going to be supported soon. The firmware doesn’t support this mode.
@Maledictus: no, no documentation as far as I know. The only thing I got was the original 2.6.18 SDIO driver.
April 16th, 2008 at 5:13 pm
Very cool work! I hope to have it on a freerunner near me soon
April 16th, 2008 at 9:31 pm
then I’ve got 2 new questions:
1. I guess the firmware is saved on the flash memory of the wlan card. Is it possible to get read/write access to this memory from the phone (without soldering cables to the wlan part)
2. Is the firmware downloadable? I didn’t see any links @ http://www.atheros.com/pt/AR6001GL.htm
=> in other words is it possible to reverse engineer the firmware and reflash the devices? (I know it’s unlikely that somebody would effort this much manpower, but I like to dream about it :D)
April 17th, 2008 at 7:27 am
@elektranox: Yes, the firmware is flashed. Reflashing the device is very tricky without Atheros specific tools. I don’t know if they’re willing to open source or even binary release those tools…
As for the firmware reverse engineering, I don’t think you can fetch the firmware back through the SDIO bus.
April 17th, 2008 at 1:06 pm
The protocol provides commands for reading and writing of wlan chip’s memory (RAM) before the firmware boots, through “Bootloader Messaging Interface”. That means that you can run your own programs on the chip even if you can’t write them to ROM.
Other BMI commands include things like installing and uninstalling ROM patches, but I don’t know about any documentation on how these patches should look.
April 17th, 2008 at 2:25 pm
maybe it’s not that hard any more:
https://lists.ath5k.org/pipermail/ath5k-devel/2008-April/000850.html
April 19th, 2008 at 10:30 am
Awesome. Really. This adds at least a month to my patience waiting for the actual device.
May 5th, 2008 at 7:32 am
Hi Samuel !
> Cleaning the driver code and make it mainline friendly.
As one of the main-editors of the in-kernel “Libertas” driver I can assure you that you should _not_ spent too much time on this. Plan an early adoption. The linux wireless community is very friendly to new WLAN drivers and they even adopt driver code that is not really in kernel shape (see the code of the libertas driver when it was included into mainline … it was ugly and a complete violation to “checkpatch.pl” in itself). Still it was merged, given the provision that it was (and is!) continuously massaged to get into shape.
Now many people (e.g. from the embedded & SDIO area) have used the driver, write results and submitted patches. The driver really has benefitted from being in mainline linux.
Please aim for the same.