Using the iRobot Create's Command Module with Linux

Picture of Using the iRobot Create's Command Module with Linux
Since iRobot hasn't provided linux users with a way to use the command module, I had to figure it out myself.

Don't be intimidated, its not hard at all, really. All you need to do is run a couple of scripts.

Lets get started, shall we?
Remove these adsRemove these ads by Signing Up

Step 1: Get the goods

For this tutorial, I'm assuming you have an apt-based package manager. (i.e. you use a Debian derivative, or an Ubuntu derivative) Simply because apt = good.

If you don't, I assume that there are the same packages for yum, but I can't test that. (Fedora doesn't like me)

Now, you must run a long and complicated thingymabober:
sudo apt-get install avrdude avr-libc gcc-avrsudo apt-get remove brltty

And yes, removing that package is safe. (Tip from here) If it gives you an error saying its not installed, you're good, don't worry.

Step 2: Write/Get a Program

Heres the part where you write your program. But to test it out, lets use a demo program.

The command module comes with a CD, and on it, there are 3 demo programs.To test, use the input program. Copy the folder "input" to somewhere on your computer, such as /home/user/avr/input.

Step 3: Edit Makefile

If you wrote your own program, get a makefile from the CD. If you just copied it over, then you already have it.

Open it up, and use find/replace to edit these two lines:

86: DEBUG = dwarf-2...204: AVRDUDE_PORT = com9       # programmer connected to serial device
(Those numbers are line numbers, if you want to do it that way)
86: DEBUG = stabs...204: AVRDUDE_PORT = /dev/ttyUSB0       # programmer connected to serial device

That wasn't too hard, was it?

Step 4: Compile/Download

Picture of Compile/Download
It hasn't been that hard so far, and this step is no different:

First, plug in the command module, via USB, and make sure it is on. Hit the Reset button. Then go onto your computer and open a terminal. Navigate to the directory where your program/makefile are, and type:
make allmake program

Now, go onto your create, and remove the cable. Then press the reset button, and your program will start!
Enki-][5 years ago
I haven't heard about this iRobot Create thing before, but it's good to know that there is Linux support. I may just go out and get one, since at least I know it'll be usable :-). You mentioned apt-based package managers, but why not just link the source (for those of us who prefer not to use package managers)?
Enki-][ Enki-][5 years ago
The source, patches, and build instructions for the packages you mentioned all appear to be available here:

For anyone who doesn't want to bother with yum/apt/rpm/whatever, this is probably a good place to go. That said, the debian packages may be patched up or may just work differently due to version differences. I don't know.

I've gone through a full from-source avr-libc / avr-gcc / avrdude install before, and it's not too hard.
mscs6 years ago
Hi, has anyone managed to get the iRobot Create working on linux without a command module, ie hooked up directly to a laptop with a DB9-USB converter ? If so which exact model of DB9-USB cable turned out to be compatible with linux and the Create ? Also how did you interface with the robot on the linux side... can you just write C or C++ programs that make use of the Open Interface and send raw bytes to the robot for control ? feel free to pm me if you wish to do so. thanks in advance.
zachninme (author)  mscs6 years ago
I'm posting it here because everyone can benefit from the knowledge :-)

Yes, you can communicate directly with the create using the cable that comes with it that is pictured in the first picture in the "trunk" so to speak & not plugged in. Its a serial-to-proprietary connection; if you don't have the serial, you can use any serial-to-usb converter.
From there, you can use any linux equivalent to realterm, or the command line, to send OI commands. You could also write a program in a language w/ a serial library, too.

Beneith the command module is a DB25 connecter that breaks out a few connections, but I can't recall exactly what they are.

This instructable focused on the fact that iRobot doesn't support GNU/Linux officially, but there's plenty of FLOSS out there to handle it with minimal effort.

mscs zachninme6 years ago
Thanks for the reply :)

I've been searching and reading about this robot on the net for several days and went through all the manuals but couldn't find this info and iRobot email support didn't get back to me of course since i am an *unsupported* linux user... so thanks for clarifying.

One more thing though, regarding the serial-usb cable (more specifically a male DB9 to usb), apparently whether this cable works or not depends on the chipset that comes with it, which means it needs to be compatible with linux + compatible with the serial protocol of the Create ?

The following thread highlights this issue, the guy ended up getting (an expensive) PCMCIA-Serial card which isn't an option in my case:

For anyone interested here is some useful info on various serial-usb chipsets under linux, i believe most cables are PL2303.
tharveypa mscs6 years ago
I tried a cheap USB-serial cable that did not work. Now I'm using a Keyspan 19HS which has worked well from several platforms (linux,mac,win).
zachninme (author)  mscs6 years ago
The iRobot cable is standard RS232, so any serial-usb cable should do. I'm lucky enough to have two serial ports, so I haven't looked into it much.
mscs zachninme6 years ago
forgot to post this, another person with serial-usb cable(Aten) trouble... though i'm not sure if that's related to C++ specifically or the actual cable/linux drivers:
tamrin6 years ago
i'm husni, i'm a to get example project with avr-gcc..used to i make line follower with linux
kinghezy7 years ago
You tips seem pretty good for getting started with Linux+iRobot. I had no idea where to start. Hopefully I'll be able to add my own instruction later on. I have Fedora installed and gcc-avr is avr-gcc.
zachninme (author) 7 years ago
I've updated the required packages to JUST the ones you need.
zachninme (author) 7 years ago
Update: Realterm works in Linux with WINE, however, I couldn't get it to work with the create. When I turn it on, I do get data from the create, so its close, but not quite.
technick297 years ago
Cool. I'm using Fedora 7 and I found all of the files using my Package Manager except for avrp avr-prog and avra. Working on getting them now... do you know where I could find them online?
zachninme (author)  technick297 years ago
Chances are, you probably don't need them :P avrdude is the most important one.
Ok, just making sure. I've tried compiling and loading programs, and make all works, but make program works. It's writing to the USB device that's weird (there's no ttyUSB0 file in /dev). I think once I find the substitute for the USB file on Fedora, I'll be fine. Any advice finding the right one without testing a bunch that might be right? ;) Thanks.
zachninme (author)  technick297 years ago
If theres no ttyUSB0 file in /dev, make sure you uninstall the other package. For me, I'd plug it in, the file would appear, and then it would vanish. I don't know if you're programming a create, or just an AVR, if its the latter, it could be on the parallel or serial port.
zachninme (author) 7 years ago
No, don't worry, this is not my contest entry. I just wanted to let those who love linux. (I know you're out there!) Theres a Mac tool on their site, if you're wondering.
Down with Billy G. and up with linux! Anything develpoed by a community and not a trillion dollar comany truely fits the instructable mindset. Great instructable.
zachninme (author)  stone34087 years ago
Thanks :D A note, you can use this to program any AVR uC. You'll need a different makefile, however.
Hungry_Myst7 years ago
*Stares at create* *Sits patiently in front yard* Have you tried using the serial cable (the one that plugs directly into the iRobot) with linux?
zachninme (author)  Hungry_Myst7 years ago
I haven't tried it yet, but the software to interface with it is just this thing you download from sourceforge. I assume they'll be a linux version, but I haven't checked :P
royalestel7 years ago
Heh. Showoff! ;) Thanks, bud. I'm sticking with winders.