Thursday, September 17, 2009

Proprietary Airgo Wifi Driver with OpenWrt

I've got this pre-N Belkin access point (f5d8230-4) sitting around doing nothing. The stock firmware is below average in terms of capabilities. Fortunately the thing is Broadcom and runs Linux, which is fairly common. Belkin have even published the GPL stuff. Unfortunately the Airgo driver is a binary driver with no source. And it uses custom commands for wireless configuration instead of the standard Linux stuff.

So it turns out flashing the thing with OpenWrt is a piece of cake. But as expected the wifi doesn't work. Some fellow in the OpenWrt forums figured out that for the binary driver to load with Linux 2.4.30 all that is needed is a few missing semaphore methods patched back in. And sure with a bit of tomfoolery it is then possible to get the wifi up and running for a few seconds before the router crashes and reboots. After that it appears progress on the Airgo driver has been stagnant for nearly 3 years.

But then I wired in my 3.3v tty cable and got a stack trace of the rebooting router. With gdb I was able to identify there was an issue with a method call in linux/netfilter/nf_hook_slow. Seems the method was patched to incorporate ebtables from Linux 2.6. Eliminating the patch fixes the Airgo. Supposedly this wifi card is used in other routers and those routers are also Broadcom based. I was close to throwing this thing away but with OpenWrt I think I'll hold onto it.

update: It was more troublesome to get working with Kamikaze.