Linux redHat 6 Enterprise edition and leonardo not working

Hi
I'm currently trying to get all my boards up and running on my new Linux systems.
I have successfully uploaded to 2 UNO's, 2 MEGA2560's, 1 Mega ADK and 2 of my Duemilenova's (for detail Arduino mega 2560 SDA SCL pin 20 21 allumage led pendant reset - #6 by Hexor - Français - Arduino Forum)
When I tried a leonardo I see nothing happening on my system.
After I disconnected my duemilenove's and connected my leonardo dmesg tells me

bash-4.1$ dmesg | tail
FIREWALL: IN=eth0 OUT= MAC=00:26:2d:ff:c8:5c:11:00:06:8b:05:d6:08:00 SRC=23.62.99.19 DST=192.168.1.2 LEN=1492 TOS=0x00 PREC=0x00 TTL=57 ID=31953 DF PROTO=TCP SPT=80 DPT=41427 WINDOW=7776 RES=0x00 ACK URGP=0 
FIREWALL: IN=eth0 OUT= MAC=00:26:2d:ff:c8:5c:11:00:06:8b:05:d6:08:00 SRC=23.62.99.19 DST=192.168.1.2 LEN=1492 TOS=0x00 PREC=0x00 TTL=57 ID=35062 DF PROTO=TCP SPT=80 DPT=41427 WINDOW=7776 RES=0x00 ACK URGP=0 
FIREWALL: IN=tun0 OUT= MAC= SRC=9.64.162.21 DST=9.145.143.168 LEN=206 TOS=0x08 PREC=0x60 TTL=60 ID=22566 PROTO=UDP SPT=53 DPT=53904 LEN=186 
usb 2-1.2: USB disconnect, device number 15
ftdi_sio ttyUSB2: FTDI USB Serial Device converter now disconnected from ttyUSB2
ftdi_sio 2-1.2:1.0: device disconnected
usb 1-1.1: USB disconnect, device number 21
ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
ftdi_sio 1-1.1:1.0: device disconnected
usb 2-1.1: USB disconnect, device number 14
bash-4.1$

I disconnected and reconnected it again and the dump above is from the second command. (note that the fact that the 14 gives a little different message is probably caused by the fact this one was connected to my vm)

When I look up information on getting leonardo work on Linux I find "Thee is nothing to do. I just works"
I have no clue where to go and look for problem solving. I tried nearly all commands on Arduino Playground - HomePage but nothing helped.

Hopefully someone can help me

I made some progress.
I replaced the usb cable :blush:. That makes he Leonardo more responsive but still not visible in Arduino IDE 1.5.2 or 1.0.3 (also not as root )
The output of dmesg |tail

usb 2-1.1: USB disconnect, device number 107
usb 2-1.1: new full speed USB device number 108 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=0036
usb 2-1.1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: configuration #1 chosen from 1 choice
cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
usb 2-1.1: USB disconnect, device number 108
usb 2-1.1: new full speed USB device number 109 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: configuration #1 chosen from 1 choice
input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.2/input/input104
generic-usb 0003:2341:8036.005C: input,hidraw1: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1d.0-1.1/input2
bash-4.1$

you can clearly see the first port opening and closing and then he second port opening.
But I do not see an assignment to a usb port like with a uno.
Any help is appreciated.

Nice to see the progress you are doing, I'd be glad to help but I don't have a linux box available at the moment. But from the log it seems you should see a /dev/ttyACM0 device when the Leo is connected: aren't you seeing it?

Spatula
Thanks for the reply
I checked but no such device

bash-4.1$ ls -l /dev/ttyA*
ls: cannot access /dev/ttyA*: No such file or directory
bash-4.1$

The ttyACM0 is created on the first connection (108) which is immediately closed.
I see no device name on the second connection (109) so I don't have a clue what to look for.

If you wonder about the big number...
I found that running vmware makes the leonardo connect and disconnect al the time (sounds like mario when you run windows in the vm :wink: )
Each time the number gets raised twice (once for each port)
As you can see from the following dump

bash-4.1$ dmesg | tail -100
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 18 using ehci_hcd
usb 2-1.1: reset full speed USB device number 18 using ehci_hcd
usb 2-1.1: USB disconnect, device number 18
usb 2-1.1: new full speed USB device number 19 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 19 using ehci_hcd
usb 2-1.1: reset full speed USB device number 19 using ehci_hcd
usb 2-1.1: USB disconnect, device number 19
usb 2-1.1: new full speed USB device number 20 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 20 using ehci_hcd
usb 2-1.1: reset full speed USB device number 20 using ehci_hcd
usb 2-1.1: USB disconnect, device number 20
usb 2-1.1: new full speed USB device number 21 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 21 using ehci_hcd
usb 2-1.1: reset full speed USB device number 21 using ehci_hcd
usb 2-1.1: USB disconnect, device number 21
usb 2-1.1: new full speed USB device number 22 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 22 using ehci_hcd
usb 2-1.1: reset full speed USB device number 22 using ehci_hcd
usb 2-1.1: USB disconnect, device number 22
usb 2-1.1: new full speed USB device number 23 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 23 using ehci_hcd
usb 2-1.1: reset full speed USB device number 23 using ehci_hcd
usb 2-1.1: USB disconnect, device number 23
usb 2-1.1: new full speed USB device number 24 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 24 using ehci_hcd
usb 2-1.1: reset full speed USB device number 24 using ehci_hcd
usb 2-1.1: USB disconnect, device number 24
usb 2-1.1: new full speed USB device number 25 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 25 using ehci_hcd
usb 2-1.1: reset full speed USB device number 25 using ehci_hcd
usb 2-1.1: USB disconnect, device number 25
usb 2-1.1: new full speed USB device number 26 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 26 using ehci_hcd
usb 2-1.1: reset full speed USB device number 26 using ehci_hcd
usb 2-1.1: USB disconnect, device number 26
usb 2-1.1: new full speed USB device number 27 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 27 using ehci_hcd
usb 2-1.1: reset full speed USB device number 27 using ehci_hcd
usb 2-1.1: USB disconnect, device number 27
usb 2-1.1: new full speed USB device number 28 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 28 using ehci_hcd
usb 2-1.1: reset full speed USB device number 28 using ehci_hcd
usb 2-1.1: USB disconnect, device number 28
usb 2-1.1: new full speed USB device number 29 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: reset full speed USB device number 29 using ehci_hcd
usb 2-1.1: reset full speed USB device number 29 using ehci_hcd
usb 2-1.1: USB disconnect, device number 29
usb 2-1.1: new full speed USB device number 30 using ehci_hcd
usb 2-1.1: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.1: Product: Arduino Leonardo
usb 2-1.1: Manufacturer: Arduino LLC
usb 2-1.1: USB disconnect, device number 30
bash-4.1$

This reconnection does not happen with the micro on my system. But I do not know the port for the micro as well (so no upload on micro in linux for me right now)

I still didn't get this to work.
lsusb sees the arduino

bash-4.1$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 014: ID 0a5c:217f Broadcom Corp. Bluetooth Controller
Bus 001 Device 005: ID 17ef:480f Lenovo Integrated Webcam [R5U877]
Bus 001 Device 015: ID 04b3:310c IBM Corp. Wheel Mouse
Bus 002 Device 052: ID 2341:8036 Arduino SA

I have created 99-arduino.rules with following content

SUBSYSTEMS=="usb", ATTRS{idProduct}=="8036", ATTRS{idVendor}=="2341", SYMLINK+="ttyUSB%n" , MODE:="0666"

This makes that the ls -lrt /dev/ttyU* returns following

bash-4.1$ ls -lrt /dev/ttyU*
lrwxrwxrwx. 1 root root 15 Mar 29 23:02 /dev/ttyUSB2 -> bus/usb/002/052
lrwxrwxrwx. 1 root root  7 Mar 29 23:02 /dev/ttyUSB1 -> hidraw1
lrwxrwxrwx. 1 root root 12 Mar 29 23:02 /dev/ttyUSB4 -> input/mouse4
lrwxrwxrwx. 1 root root 13 Mar 29 23:02 /dev/ttyUSB14 -> input/event14
bash-4.1$

If I unplug the Leonardo all these ports disappear.
I do not understand why there are 4 USB ports and why non of them are recognized by the Arduino IDE as Arduino Ports.
These USB ports do not seem to be serial ports

bash-4.1$ ls -lrt /dev/serial
ls: cannot access /dev/serial: No such file or directory
bash-4.1$

udev testing provides following info (shorteded because of maximum message size)

bash-4.1$ udevadm test /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
run_command: calling: test
udevadm_test: version 147
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

udev_rules_new: rule file basename '/etc/udev/rules.d/77-mm-usb-device-blacklist.rules' already added, ignoring '/lib/udev/rules.d/77-mm-usb-device-blacklist.rules'
parse_file: reading '/lib/udev/rules.d/10-console.rules' as rules file
...
parse_file: reading '/dev/.udev/rules.d/99-root.rules' as rules file
udev_rules_new: rules use 177204 bytes tokens (14767 * 12 bytes), 39685 bytes buffer
udev_rules_new: temporary index used 56620 bytes (2831 * 20 bytes)
udev_device_new_from_syspath: device 0x7f7482263740 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
udev_device_new_from_syspath: device 0x7f74822638b0 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2'
udev_device_read_db: device 0x7f74822638b0 filled with db file data
udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2' /lib/udev/rules.d/40-libgphoto2.rules:11
util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2' started
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=Arduino_LLC'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ENC=Arduino\x20LLC'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ID=2341'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=Arduino_Leonardo'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ENC=Arduino\x20Leonardo'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ID=8036'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=0100'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=Arduino_LLC_Arduino_Leonardo'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:020200:0a0000:030000:'
util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2' returned with exitcode 0
udev_device_new_from_syspath: device 0x7f7482262a80 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2/2-1'
udev_device_new_from_syspath: device 0x7f7482251c70 has devpath '/devices/pci0000:00/0000:00:1d.0/usb2'
udev_device_new_from_syspath: device 0x7f74822268a0 has devpath '/devices/pci0000:00/0000:00:1d.0'
udev_device_new_from_syspath: device 0x7f7482226a90 has devpath '/devices/pci0000:00'
udev_rules_apply_to_event: LINK 'char/189:179' /lib/udev/rules.d/50-udev-default.rules:4
udev_rules_apply_to_event: MODE 0664 /lib/udev/rules.d/50-udev-default.rules:61
udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2
udev_rules_apply_to_event: MODE 0666 /etc/udev/rules.d/99-arduino.rules:1
udev_rules_apply_to_event: LINK 'ttyUSB2' /etc/udev/rules.d/99-arduino.rules:1
udev_event_execute_rules: no node name set, will use kernel supplied name 'bus/usb/002/052'
udev_device_update_db: unable to create db file '/dev/.udev/db/usb:2-1.2': Permission denied
udev_node_add: creating device node '/dev/bus/usb/002/052', devnum=189:179, mode=0666, uid=0, gid=0
udev_node_mknod: preserve file '/dev/bus/usb/002/052', because it has correct dev_t
udev_node_mknod: preserve permissions /dev/bus/usb/002/052, 020666, uid=0, gid=0
udev_selinux_lsetfilecon: setfilecon /dev/bus/usb/002/052 failed: Operation not permitted
node_symlink: preserve already existing symlink '/dev/char/189:179' to '../bus/usb/002/052'
udev_selinux_lsetfilecon: setfilecon /dev/char/189:179 failed: Operation not permitted
link_find_prioritized: found '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2' claiming '/dev/.udev/links/ttyUSB2'
link_update: creating link '/dev/ttyUSB2' to '/dev/bus/usb/002/052'
node_symlink: preserve already existing symlink '/dev/ttyUSB2' to 'bus/usb/002/052'
udev_selinux_lsetfilecon: setfilecon /dev/ttyUSB2 failed: Operation not permitted
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2
udevadm_test: MAJOR=189
udevadm_test: MINOR=179
udevadm_test: DEVNAME=/dev/bus/usb/002/052
udevadm_test: DEVTYPE=usb_device
udevadm_test: DRIVER=usb
udevadm_test: DEVICE=/proc/bus/usb/002/052
udevadm_test: PRODUCT=2341/8036/100
udevadm_test: TYPE=0/0/0
udevadm_test: BUSNUM=002
udevadm_test: DEVNUM=052
udevadm_test: ACTION=add
udevadm_test: SUBSYSTEM=usb
udevadm_test: ID_VENDOR=Arduino_LLC
udevadm_test: ID_VENDOR_ENC=Arduino\x20LLC
udevadm_test: ID_VENDOR_ID=2341
udevadm_test: ID_MODEL=Arduino_Leonardo
udevadm_test: ID_MODEL_ENC=Arduino\x20Leonardo
udevadm_test: ID_MODEL_ID=8036
udevadm_test: ID_REVISION=0100
udevadm_test: ID_SERIAL=Arduino_LLC_Arduino_Leonardo
udevadm_test: ID_BUS=usb
udevadm_test: ID_USB_INTERFACES=:020200:0a0000:030000:
udevadm_test: DEVLINKS=/dev/char/189:179 /dev/ttyUSB2
udevadm_test: ID_MM_DEVICE_IGNORE=1
udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'
bash-4.1$

There are some errors logged but I fail to get the link with the problem I'm having.
Help is really appreciated.

Hi,
since the Leonardo can emulate a mouse or a keyboard the additional input devices are normal. I have them as well, but I also have /dev/ttyACM0. Any chance that other VMs on the same host (if not the host itself) are trying to install the USB device? This could explain the disconnections/reconnections you experienced before.

I don't have VMware but a couple of small VMs on VirtualBox, my host is a Mac and one VM has Lubuntu 12.10. In VirtualBox I have to assign to the VM not just the USB port, but a particular USB device (recognized as Leonardo by the host). This tells me that before I can use it on a VM the device must be recognized by the host. It may be different in VMware but may be worth of attention (can you determine if the host OS sees the Leonardo?).

Finally, here is my dmesg after plugging the Leonardo. You'll notice that I have a different version of usb, use uhci_hcd instead of ehci_hcd, have cdc_acm create the ttyACM0 device (twice), and have one disconnection before the connection is established. This corresponds to the normal mode of operation of Leonardo: the first connection is for accessing the bootloader, then for normal operations the port is reset (just once) and the devices are created.

[  118.936071] usb 2-2: new full-speed USB device number 2 using uhci_hcd
[  119.149925] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[  119.154949] usbcore: registered new interface driver cdc_acm
[  119.154959] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[  126.768086] usb 2-2: USB disconnect, device number 2
[  127.012081] usb 2-2: new full-speed USB device number 3 using uhci_hcd
[  127.194882] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.
[  127.194970] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[  127.316401] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.2/input/input10
[  127.317060] generic-usb 0003:2341:8036.0001: input,hidraw0: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1d.0-2/input2
[  127.318890] usbcore: registered new interface driver usbhid
[  127.318899] usbhid: USB HID core driver

Thanks for helping out.

spatula:
since the Leonardo can emulate a mouse or a keyboard the additional input devices are normal. I have them as well, but I also have /dev/ttyACM0. Any chance that other VMs on the same host (if not the host itself) are trying to install the USB device? This could explain the disconnections/reconnections you experienced before.

Thanks for confirming the additional devices. I do not have a /dev/ttyACM0 which seems to be the problem at hand.
As I'm running Linux native (I run XP in a vm) I have stopped all vm's and the vmware software and tried again. As you can see from the logs below that results in exact the same behaviour.

spatula:
I don't have VMware but a couple of small VMs on VirtualBox, my host is a Mac and one VM has Lubuntu 12.10. In VirtualBox I have to assign to the VM not just the USB port, but a particular USB device (recognized as Leonardo by the host). This tells me that before I can use it on a VM the device must be recognized by the host. It may be different in VMware but may be worth of attention (can you determine if the host OS sees the Leonardo?).

The assigning of USB devices is exactly the same with VMware. If I assign the Leonardo to my windows xp VM machine it works fine.
As my host OS is Linux the host OS does see the Leonardo because A) it can assign it to a vm and B)dsmeg and lsusb see the device.

spatula:
Finally, here is my dmesg after plugging the Leonardo. You'll notice that I have a different version of usb, use uhci_hcd instead of ehci_hcd, have cdc_acm create the ttyACM0 device (twice), and have one disconnection before the connection is established. This corresponds to the normal mode of operation of Leonardo: the first connection is for accessing the bootloader, then for normal operations the port is reset (just once) and the devices are created.

Thanks for sharing your dmesg output. My dmesg looks very similar except for the second connection does not result in a ttyACM* device.

bash-4.1$ dmesg | tail 
usb 2-1.2: new full speed USB device number 55 using ehci_hcd
usb 2-1.2: New USB device found, idVendor=2341, idProduct=0036
usb 2-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-1.2: Product: Arduino Leonardo
usb 2-1.2: Manufacturer: Arduino LLC
usb 2-1.2: configuration #1 chosen from 1 choice
cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
usb 2-1.2: USB disconnect, device number 55
usb 2-1.2: new full speed USB device number 56 using ehci_hcd
usb 2-1.2: New USB device found, idVendor=2341, idProduct=8036
usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.2: Product: Arduino Leonardo
usb 2-1.2: Manufacturer: Arduino LLC
usb 2-1.2: configuration #1 chosen from 1 choice
input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.2/input/input33
generic-usb 0003:2341:8036.0015: input,hidraw1: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:1d.0-1.2/input2

It looks as if udev does not recognize the leonardo com port. It seems as if the ACM port is not identified by

SUBSYSTEMS=="usb", ATTRS{idProduct}=="8036", ATTRS{idVendor}=="2341"

but that is the only consistent info I see in lsusb and dmesg.

Could you provide me with the outcome of the following commands (when Leonardo connected off course)

ls -lrt /dev/serial
ls -lrt /dev/ttyA*
ls -lrt /etc/udev/rules.d/
grep 2341 /etc/udev/rules.d/*

Thanks

Here are some answers:

/dev/serial/by-id:
total 0
lrwxrwxrwx 1 root root 13 Mar 30 21:47 usb-Arduino_LLC_Arduino_Leonardo-if00 -> ../../ttyACM0

/dev/serial/by-path:
total 0
lrwxrwxrwx 1 root root 13 Mar 30 21:47 pci-0000:00:1d.0-usb-0:2:1.0 -> ../../ttyACM0

crw-rw---- 1 root dialout 166, 0 Mar 30 21:47 /dev/ttyACM0

I have no usb-related stuff in /etc/udev/rules.d/, just the default 70-persistent-cd and 70-persistent-net, and none of them contain 2341. I also noticed that in /lib/udev/rules.d/77-mm-usb-device-blacklist.rules the Arduino devices are mentioned at the bottom of the file (this should prevent them to be taken by modem-manager).

# Arduino devices, FT-232-based series and Atmega8U2 (Uno)
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204b", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"

I forgot to mention (just for completeness, it doesn't seem to make much difference) that the dmesg of my previous post comes from a PC with native Lubuntu 12.10, while the same on the Lubuntu VM only shows the second connection (the first connection is managed by the host OS). All the rest (devices, rules, lsusb output) are the same.

thanks for the response
It seems the Arduino specific settings on our systems are pretty much the same. Unfortunately for me it doesn't work on my system.
I'll have a search on usb-Arduino_LLC_Arduino_Leonardo-if00 and pci-0000:00:1d.0-usb-0:2:1.0
Thanks for sharing that you have arduino in the 77-mm-usb-device-blacklist.rules file. With your explanation I know why :smiley:
I have that one to; but removing didn't make a difference.
My current thinking is that I have to look for a disable rule.
Thanks

Try:

echo "0x1b4f 0x9204" > /sys/bus/usb/drivers/cdc_acm/new_id

That should get you the /dev/ttyACMx port.

The cdc_acm driver in newer versions of linux (like Ubuntu 13.04) work fine, but older versions need the above command (or some UDEV wizardy) to enable the port.

todd
I just see your comment now.
I tried that. Didn't help.
Sorry.

Is your Leonardo programmed to be something other than a serial device. If so then what you see maybe normal. When the bootloader shuts down if it is a mouse, say, mice don't have serial ports. Try and upload blink, or something, from the IDE by pressing the reset button at the end (or just before the end) of compilation. Can you reprogram the Leo to have serial output? Then you should see it enumerate as a ttyACM* port, both times.

Maybe get rid of the udev rule, it may be confusing things.

Here's what my kernel log shows when a leonardo, as a mouse, is plugged in.
usb 3-4: new full speed USB device using ohci_hcd and address 31
usb 3-4: configuration #1 chosen from 1 choice
cdc_acm 3-4:1.0: ttyACM0: USB ACM device
usb 3-4: USB disconnect, address 31
usb 3-4: new full speed USB device using ohci_hcd and address 32
usb 3-4: configuration #1 chosen from 1 choice
cdc_acm 3-4:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 3-4:1.0: ttyACM0: USB ACM device
input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:02.0/usb3/3-4/3-4:1.2/input/input23
generic-usb 0003:2341:8036.0014: input,hidraw3: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:02.0-4/input2
usb 3-4: USB disconnect, address 32

Hope this helps.
tf