OpenMoko WiFi driver

February 5th, 2008 by Samuel Ortiz

After 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:

GTA02 WiFi web browsing

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:

  1. 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.
  2. Cleaning the driver code and make it mainline friendly. This will probably need a significant effort as the current code base needs some cleanups…

15 Responses to “OpenMoko WiFi driver”

  1. Andres Salomon

    If I can get access to hardware and perhaps a spec, I’d be happy to help get the driver code upstream.

  2. antono

    Great job :)

  3. Thomas Wood » Blog Archive » OpenMoko Wifi Driver

    […] http://labs.o-hand.com/2008/02/05/openmoko-wifi-driver/ […]

  4. elektranox

    will we get promiscious mode running at some time?

  5. StevenLeRoux

    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 !

  6. Mickey

    Unfortunately openmoko bug #1250 is still open.

  7. Maledictus

    Is there Documentation for the Chip available so that non-GPL kernels can implement their own drivers?

  8. Samuel

    @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.

  9. IAnjo

    Very cool work! I hope to have it on a freerunner near me soon :)

  10. elektranox

    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)

  11. Samuel

    @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.

  12. Andrzej Zaborowski

    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.

  13. maroi

    maybe it’s not that hard any more:
    https://lists.ath5k.org/pipermail/ath5k-devel/2008-April/000850.html

  14. Fredrik Wendt

    Awesome. Really. This adds at least a month to my patience waiting for the actual device. :)

  15. Holger Schurig

    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.

Leave a Reply