Developing your Dorkboard+Benito in Ubuntu

I just recently attended the Arduino Cult Induction given by Feurig. Had a great old time inhaling solder fumes and received a cheap arduino development system to boot. I quickly learned, however, that developing Arduino boards with a Benito in Linux is a HUGE pain and doesn't work out of the box for a number of reasons:

  • The Arduino IDE will not find the Benito programmer at its Kernel-given home at /dev/ttyACM0
  • Java and the AVR tool chain must be installed
  • Braille TTY must be uninstalled
  • In Ubuntu 8.10 the AVR tool chain is broken and needs to be updated
  • The latest Arduino IDE does not come pre-built for 64-bit systems

So here are some things you need to do to start developing your Dorkboard in Ubuntu:

First you need to add a new rule to udev so that is correctly names the Benito. Create a new file called 60-benito.rules in /etc/udev/rules.d like so...

sudo gedit /etc/udev/rules.d/60-benito.rules

and add the following text to it:

# Link the Benito to a standard USB serial device
KERNEL=="ttyACM*", ATTRS{product}=="Benito*", SYMLINK+="ttyUSB%n"

Now save the file, and restart the udev daemon

sudo /etc/init.d/udev restart

and your Benito device will be named properly.

Now we need to remove a conflicting package which Ubunto installs by default:

sudo apt-get remove brltty

You will need to add some Ubuntu packages which the Arduino IDE relies on to function. In your terminal enter the following command:

sudo apt-get install sun-java6-bin sun-java6-jdk avr-libc gcc-avr librxtx-java

If you are using Ubuntu 8.10 you are going to need to jump through some extra hoops because the gcc-var compiler has a problem dealing with long ints, and this is a show stopper for us. Luckily for us 9.04 has already been released so we can just grab the upgraded packages from Ubuntu. I initially tried manually downloading and installing these packages, but it broke apt, so just use the following steps, which I got from Arduino's website:

1. $sudo gedit /etc/apt/sources.list
2. add the following line: deb http://archive.ubuntu.com/ubuntu jaunty main restricted universe multiverse
3. $sudo apt-get update
4. Then update gcc-avr and avr-libc from Synapitic Package Manager
5. remove comment the line added to sources.list by adding a leading #
6. $sudo apt-get update

Finally, you will need the Arduino IDE to start developing your Dorkboard. Go to http://www.arduino.cc/en/Main/Software and get the latest Arudino IDE. As of this writing version 0015 is the newest. If you're on a 32 bit machine, GREAT! Otherwise just grab the 32 bit software anyway, we can just update a file to work on 64 bit machines. To do this untar the arudino tarball wherever you want, then open up a terminal, cd to the arduino-0015 directory and enter the following commands:

rm lib/librxtxSerial.so
ln -s /usr/lib/librxtxSerial.so lib/

You should now be able to run the arduino script in the arduino-0015 dir without any problems. PLEASE post replies if these instructions don't work you your Ubuntu system!

Happy hacking!


Comments

Confirmed working

These indeed are the runes you need...

I'd been wrangling with Fedora 10, for which you need to add yourself to the "uucp" and "lock" groups to get traction, but was still getting annoyed with udev and the arduino software failing to agree on much.

Binned it, installed Jaunty and ran these instructions and now have a dorkboard + Benito talking to the arduino software.

Nice work, thanks for posting this.


double confirmed!

I can now program with the benito on Ubuntu, one less need for evil MS products.

The instructions were clear and simple, the hardest part was upgrading ubuntu (not really that hard, just a few minor glitches)


Yummy Linux AVR fun

Dan, Thanks for the write up, its really well done. I have built custom Fedora and Centos RPMS, as well as a Ubuntu 9.04 .deb package, if any one wants to cheat.


Just letting you all know

Just letting you all know that these instructions work great with Karmic (9.10)!

-- "Push my button, my heart starts pumping, and electricity will keep the good times coming." - Bruce Haack