Dorkbot DC: Arduino, Meet Fonera


Whew! Well, I presented last night at Dorkbot and it seemed to go pretty well. Thanks to Gareth, Alberto and everyone else who makes Dorkbot possible. Alberto was particularly helpful and encouraging, and I greatly appreciate it.

As promised I’ve got an audio recording of the talk to share, as well as a PDF of my slides and some Arduino and Ruby code. I haven’t yet taken any really good photos of my project, but once I do I’ll add some links to them here.

For those just wandering in: I spoke about using a router with a custom firmware as a way of adding wireless internet access (and more!) to your Arduino project. In particular I used the Fonera router, which is especially ubiquitous and cheap. Once you’ve got a custom firmware loaded you can use a simple serial link to make the router speak to your Arduino and relay whatever internet goodness you might like. I used this functionality to create an ambient display that talks to the WMATA website via wifi and uses a couple of needle gauges and LEDs to tell me when the next bus and train will be arriving at the stops nearest my apartment.

Dorkbot DC: Arduino, Meet Fonera
Audio (MP3/64kbps, 11M)
Slides (PDF, 10M)
bus_o_meter.pde (Arduino code, 3.2k)
wmatarideguide.rb (Ruby class, 1.6k)

The rest of the project code is available inside the slides. You can find some useful hyperlinks in there, too, as well as my email address.

UPDATE: The original version of the Arduino project code uploaded here contained a number of critical bugs. I’ve replaced it with a more complete version, but it should still be considered a work in progress.

About the author

Tom Lee


  • That is really cool. Thanks for making these available. . . and so quickly.
    Amazing what a bit of code on the right hardware can do for your budget.
    I did a similar thing (albeit on a much smaller scale) using a motorola phone and mobile.processing – no wifi just gprs. check it out.

  • Interesting! Thanks for posting the link — I’ve wanted to mess around with Mobile Processing for a while, but it had slipped my mind. Your project makes it seem really doable.

  • I came here from your comment at Jokamajo site, awesome that Fonera is useful for your dev investigation too and thanks for supporting the FON community initiative on your audio file! ;) Again let us know if you need further help and check out the Fonera 2.0 with USB at , it may bring some cool ideas for you to do.
    Jordi – FON

  • Have you used a MAx3232 for the serial communication between the Arduino (5V) and the Fonera (3.3V)?

  • Have you tried to send something form the arduino to the fonera? I’m using OpenWRT and I can only get 1 way serial comunication, from the fonera to the arduino.
    Has anyone achieve this?
    Thanks in advance!

  • binnary: nope, I haven’t done that yet, although my next project will require it. I’ll keep you posted — and please do post here if you figure it out first.

  • Tom: I have successfully get the TX/RX communication working from the arduino to the fonera. The problem was in the arduino’s code.
    You can find more info in the last comment of icarus75 of this url, for the modifications you may do in the /etc/inittab of the openWRT:
    And doing so, you only have to send a Serial.println(“hello”); to the fonera while you are catching the /dev/ttyS0 (for example with a “cat /dev/ttyS0).
    As simply as that. Hope this helps! ;)

  • That’s extremely helpful! I didn’t realize (but probably should have) that the serial console is hooked directly into the shell. That makes a lot of sense, and will make my app much easier — I want to trigger actions on the Fonera, but figuring out how to monitor the serial port in a non-blocking way using only shell commands (since getting a proper scripting language onto the relatively meager Fonera is difficult) was looking to be tricky.

  • An update for interested parties: I’ve made some significant progress on getting python running on the Fonera, which opens up a lot of possibilities for the platform. You can find details here.

By Tom Lee