Page 322 - Hacking Roomba
P. 322
Chapter 14 — Putting Linux on Roomba 303
printf(), malloc(), floating point arithmetic, and so on. Every program in Linux uses the
C library, so making it as small as possible is critical.
Most aspects of OpenWrt are inspected and refactored in a similar way. For example, instead of
the standard OpenSSH to provide an SSH server, OpenWrt uses Dropbear, a complete SSH
server and client in only 220 KB.
Parts and Tools
The parts for this project are:
Asus WL-HDD WLAN Hard drive box, Newegg part number WL-HDD2.5
Generic USB-to-serial adapter (not Keyspan), Newegg part number SBT-USC1K
or similar
Roomba serial tether (or Roo232 from RoombaDevTools.com)
7805 +5 VDC voltage regulator IC, Jameco part number 51262
Two 1 µF polarized electrolytic capacitors, Jameco part number 94160PS
General-purpose circuit board, Radio Shack part number 276-150
TO-220 heat sink for voltage regulator, Jameco part number 326617
Battery holder for 6 AA batteries, Jameco part number 216223
Six 2700 mAh NiMH AA batteries, SparkFun part number Batt-NiMH
Battery charger, 8-bay for NiMH/NiCd batteries, Spark Fun part number
Batt-8Charger
Power plug, female, 3.5 mm × 1.3 mm, Jameco part number 237227CM
Choosing the Right Wireless Router for Roomba
Adding an OpenWrt-capable box to Roomba can be made easy or difficult, but it’ll either be
easy in software and difficult in hardware or vice versa. Almost every OpenWrt router contains
a UART (serial port) that is immediately visible and usable from Linux (as /dev/ttyS0). This
port isn’t brought out to the back panel though, so you’d need to open the router, find the serial
ports, and build a 3.3V-to-5V signal converter. It’s not too difficult if you’re handy with a sol-
dering iron, but it definitely voids the warranty. For an example of bringing out the serial ports
to RS-232 jacks on a WRT54GS, see www.rwhitby.net/wrt54gs/serial.html. The cool
thing about hooking up the serial port is that you can watch boot messages from the router and
log into OpenWrt since it treats ttyS0 as the console.
The other common way of adding a serial port is to get a wireless router with a USB port and
add a USB-to-serial adapter. This avoids opening up the router and the hardware becomes as