Problem Uploading Sketch to DF Robot Leonardo & XBEE Board from Ubuntu 13.04

When attempting to upload an Arduino Sketch to my DF Robot Leonardo &XBEE board from the Arduino IDE, I get the following messages / errors:
Binary sketch size: 4,242 bytes (of a 28,672 byte maximum)
avrdude: ser_open(): can't open device "/dev/ttyACM0": No such file or directory
avrdude: ser_send(): write error: Bad file descriptor

Please note that the DF Robot Leonardo & XBEE board is based on the Arduino Leonardo design. As such, the product documentation states that when using Arduino IDE you should use the Arduino Leonardo board.

Note: I can view the Serial monitor and can see a bunch of numbers being written to it (so at least read communications appears to be working).

Arduino setup:
Using the default Arduino SH script (that comes downloaded from the Arduino site)
Board: Arduino Leonardo
Serial Port: ttyACM0
I then do a File->Upload (Ctrl-U) to attempt to upload the sketch to the board

Permissions on the ttyACM0 port:
crw-rw---- 1 root dialout 166, 0 May 26 10:03 /dev/ttyACM0

My environment:
Ubuntu 13.04 – 32 Bit Intel CPU – kernel: 3.8.0-22-generic
--using the Unity graphical display manager
Arduino 1.0.5 (downloaded the Linux 32bit version from http://arduino.cc/en/Main/Software)
--Copied into /opt/arduino-1.0.5
--Ensured user had permission to this directory (and subdirectories)
Added the user account to the following groups (probably more than necessary):
--uucp
--dialout
--tty
Using Oracle Java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b90)
Pretty sure I am using the custom RXTX drivers that come with the Arduino download.

The Leonardo board is connected to the PC via USB
It is on the ttyACM0 serial port

The relevant lines from dmesg are:
[ 9021.728031] usb 4-2: new full-speed USB device number 26 using uhci_hcd
[ 9021.913048] usb 4-2: New USB device found, idVendor=2341, idProduct=0036
[ 9021.913056] usb 4-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 9021.913061] usb 4-2: Product: Arduino Leonardo
[ 9021.913065] usb 4-2: Manufacturer: Arduino LLC
[ 9021.916172] cdc_acm 4-2:1.0: ttyACM0: USB ACM device
[ 9029.652056] usb 4-2: USB disconnect, device number 26
[ 9029.896034] usb 4-2: new full-speed USB device number 27 using uhci_hcd
[ 9030.075048] usb 4-2: New USB device found, idVendor=2341, idProduct=8036
[ 9030.075055] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 9030.075060] usb 4-2: Product: Arduino Leonardo
[ 9030.075065] usb 4-2: Manufacturer: Arduino LLC
[ 9030.078141] cdc_acm 4-2:1.0: This device cannot do calls on its own. It is not a modem.
[ 9030.078179] cdc_acm 4-2:1.0: ttyACM0: USB ACM device
[ 9030.086174] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1d.1/usb4/4-2/4-2:1.2/input/input22
[ 9030.086499] hid-generic 0003:2341:8036.0011: input,hidraw4: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1d.1-2/input2

relevant lsusb gives:
Bus 004 Device 002: ID 2341:8036 Arduino SA

When starting Arduino from the command line, I get these messages:
Experimental: JNI_OnLoad called.
Stable Library

Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7

Any help in resolving this matter would be greatly appreciated :slight_smile: