Roomba vacuum cleaner hacking

Late last year I got a Roomba vacuum cleaner from a friend. My wife and I wanted to evaluate such a device for a while. The battery was completely dead, and before spending lots of money on a  new battery, for a device that I didn’t know if it still worked, I tried to hook it up with the battery from my old netbook. That didn’t work out, so I ordered an original part. The friend didn’t want the Roomba anymore, so I thought if it’s not good for cleaning, I would use it as base to build some robot.

We still use it to clean the floor. Well, it doesn’t quite meet the cleanliness requirements of my wife, but she does clean the floor less often manually. Nonetheless, I looked around how to hack the device. I found lots of information on how to connect to it through the serial connector as well as an alternative firmware. The connector is a mini-din 7 and it is said that a MacMini connector should work as well. The local Mac store didn’t have a MacMini cable, so I ordered a mini-din-7 connector from Conrad. I had the cable soldered together quickly.

Of course the ideal device to connect to the Roomba would have wireless connectivity already in place as you don’t want to span wires across the floor as it drives around. As it turns out I have my old OpenMoko Freerunner still laying around, waiting for a new purpose. A perfect fit, i thought. Especially since I wanted to implement some SLAM for the roomba, and that could well run on the freerunner. Only that I couldn’t find any information about an UART connection other than with the debug board. And as with previous versions of QtMoko, I still couldn’t figure out to get an FTDI converter running with the USB host mode. On the desktop, you just plug in your FTDI cable, and the tty device is created. Not so on the freerunner. So I started digging a bit deeper with some help from this site. I tried with “modprobe ftdi_sio” before, but apparently, with the old kernel that’s still used, the ftdi signature database is quite out of date. Explicitly specifying the device to the module helps here. The required data can be obtained with lsusb.

root@neo:~# lsusb
Bus 001 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@neo:~# modprobe ftdi_sio vendor=0x067b product=0x2303
root@neo:~# dmesg | tail
[ 452.300000] usb 1-2: Manufacturer: Prolific Technology Inc.
[ 452.300000] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
[ 452.300000] usb 1-2: Detected FT8U232AM
[ 452.310000] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0

Connecting to the roomba and listening with minicom I couldn’t see anything. And in fact, the documentation says, it’s a binary protocol. So I went looking for some simple interfacing library or some commandline tool. And besides some pearl scripts and processing app, I also found an Android app that talks directly to some roomba blootooth adapter. So I thought I could as a first step just redirect the USB serial port to a bluetooth serial host. But not even establishing a bluetooth serial host worked out on the freerunner, although I found some good tutorial on that [2][3].

As I upgraded qtmoko, I installed onto the NAND, to see how much faster it runs from the internal memory than from an SD card. I can’t even remember why I booted it almost exclusively from the micro sd card in recent years. The limitation showed up quickly when I wanted to install java to try some processing test application. The memory was exhausted. Hence, I installed the latest version of qtmoko onto the sdcard again. But WTF!!! Instead of booting it displayed a kernel panic message. I got help on  IRC in the #openmoko channel. PaulFertser suggested, I’d try adding “glamo_mci.sd_max_clk=10000000” to the kernel commandline in /boot/append-GTA02. And in fact, that helped. He explained that there is a problem with the glamo driver, and that while the developers say it’s not required, this hack sometimes helps.

Next, I compiled roombacmd on the freerunner. That’s actually the type of program I was looking for: a commandline tool that I could operate while ssh’ing into the freerunner. It didn’t display any error, but the Roomba wouldn’t move and all sensor readings were zeroes.

After some more research on the internet, I think that the device doesn’t have a firmware that offers the serial control interface. It could be upgraded with a device called OSMO, but the information was removed from the official iRobot site. There are two versions: a blue and a black one. I would need the blue one, but so far I only found the black one for sale on the internet.

So, too bad. All the effort for nothing. Please tell me, if you know someone who has a blue OSMO laying around.

2 Replies to “Roomba vacuum cleaner hacking”

  1. Hi, did you ever get this working? I too have a Roomba and looking at how to do SLAM. Thinking of using an onboard Radpberry Pi to interface to Pc…

Leave a Reply

Your email address will not be published. Required fields are marked *