1

Using Jessie 4.4 I'm trying to connect an Arduino Nano clone to my Raspberry via USB. The Arduino works flawlessly on another Linux box, on the RPi it just doesn't get assigned a serial port (no /dev/ttyUSB* or /dev/ttyACM* is created).

dmesg -w on the RPi upon connecting the arduino nano:

[1716122.281116] usb 1-1.3: new full-speed USB device number 20 using dwc_otg
[1716122.384564] usb 1-1.3: New USB device found, idVendor=1a86, idProduct=7523
[1716122.384594] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[1716122.384606] usb 1-1.3: Product: USB2.0-Serial

sudo udevadm monitor --environment:

monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1716116.394966] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/020
DEVNUM=020
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3
DEVTYPE=usb_device
MAJOR=189
MINOR=19
PRODUCT=1a86/7523/254
SEQNUM=1369
SUBSYSTEM=usb
TYPE=255/0/0

KERNEL[1716116.396322] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
ACTION=add
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0
DEVTYPE=usb_interface
INTERFACE=255/1/2
MODALIAS=usb:v1A86p7523d0254dcFFdsc00dp00icFFisc01ip02in00
PRODUCT=1a86/7523/254
SEQNUM=1370
SUBSYSTEM=usb
TYPE=255/0/0

UDEV  [1716116.518982] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/020
DEVNUM=020
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3
DEVTYPE=usb_device
ID_BUS=usb
ID_MODEL=USB2.0-Serial
ID_MODEL_ENC=USB2.0-Serial
ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
ID_MODEL_ID=7523
ID_REVISION=0254
ID_SERIAL=1a86_USB2.0-Serial
ID_USB_INTERFACES=:ff0102:
ID_VENDOR=1a86
ID_VENDOR_ENC=1a86
ID_VENDOR_FROM_DATABASE=QinHeng Electronics
ID_VENDOR_ID=1a86
MAJOR=189
MINOR=19
PRODUCT=1a86/7523/254
SEQNUM=1369
SUBSYSTEM=usb
TYPE=255/0/0
UDEV_LOG=6
USEC_INITIALIZED=16116395156

UDEV  [1716117.565135] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
ACTION=add
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0
DEVTYPE=usb_interface
ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
ID_VENDOR_FROM_DATABASE=QinHeng Electronics
INTERFACE=255/1/2
MODALIAS=usb:v1A86p7523d0254dcFFdsc00dp00icFFisc01ip02in00
PRODUCT=1a86/7523/254
SEQNUM=1370
SUBSYSTEM=usb
TYPE=255/0/0
UDEV_LOG=6
USEC_INITIALIZED=116503955

I can find the arduino in /dev/bus/usb/001/020, but I cannot talk to it in any way and I believe this isn't the serial port is it?


When I plug the same Arduino Nano into another box (not RPi), dmesg gives me the following:

[273917.613894] usb 4-1: new full-speed USB device number 4 using etxhci_hcd-161118
[273917.660804] Got empty serial number. Generate serial number from product.
[273917.669531] ch341 4-1:1.0: ch341-uart converter detected
[273917.691553] usb 4-1: ch341-uart converter now attached to ttyUSB0

and udevadm gives me (full output here):

[...]

UDEV  [274327.981558] add      /devices/pci0000:00/0000:00:1c.0/0000:02:00.0/usb4/4-1/4-1:1.0/ttyUSB0 (usb-serial)
ACTION=add
DEVNAME=/dev/ttyUSB0
DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/usb4/4-1/4-1:1.0/ttyUSB0
PHYSDEVBUS=usb-serial
SEQNUM=1310
SUBSYSTEM=usb-serial
SYNO_INFO_PLATFORM_NAME=evansport
SYNO_KERNEL_VERSION=3.2
USEC_INITIALIZED=27132793

[...]

UDEV  [274328.242164] add      /devices/pci0000:00/0000:00:1c.0/0000:02:00.0/usb4/4-1/4-1:1.0/ttyUSB0/tty/ttyUSB0 (tty)
ACTION=add
BUSNUM=4
DEVNAME=/dev/ttyUSB0
DEVNUM=4
DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/usb4/4-1/4-1:1.0/ttyUSB0/tty/ttyUSB0
MAJOR=188
MINOR=0
PHYSDEVBUS=usb-serial
PHYSDEVDRIVER=ch341-uart
PHYSDEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/usb4/4-1/4-1:1.0/ttyUSB0
SEQNUM=1311
SUBSYSTEM=tty
SYNO_INFO_PLATFORM_NAME=evansport
SYNO_KERNEL_VERSION=3.2
USEC_INITIALIZED=27132912
[...]

What can I do to get the arduino also running on the RPi? I am connected to the Pi via SSH and in a tmux session. I have read people saying that "the user isn't in the correct group" - if that is your suggestion, what user? I also tried udev rules and I am able to assign a symlink to /dev/bus/usb/001/020, but that doesn't really help as that is not the serial port I'm looking for... Can I make the RPi also generate a serial number like the other system is doing, is that my problem?

I have also tried the suggestions here: http://playground.arduino.cc/Linux/All. Doing a diff of /dev before and after connection doesn't show anything magic besides the stuff in /dev/bus/....

2

Could delete this question or have some documentation for posterity. I was missing the arduino drivers. Didn't know I needed them...

apt-get install arduino and a reboot solved my problem.

dmesg now looks like this:

[  807.077295] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[  807.181304] usb 1-1.3: New USB device found, idVendor=1a86, idProduct=7523
[  807.181335] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[  807.181346] usb 1-1.3: Product: USB2.0-Serial
[  807.186060] ch341 1-1.3:1.0: ch341-uart converter detected
[  807.192302] usb 1-1.3: ch341-uart converter now attached to ttyUSB0

and udevadm shows the tty mapping:

UDEV  [808.042439] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/ttyUSB0 (usb-serial)
ACTION=add
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/ttyUSB0
SEQNUM=1037
SUBSYSTEM=usb-serial
USEC_INITIALIZED=70601

UDEV  [808.058962] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/ttyUSB0/tty/ttyUSB0 (tty)
ACTION=add
DEVLINKS=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 /dev/serial/by-path/platform-3f980000.usb-usb-0:1.3:1.0-port0
DEVNAME=/dev/ttyUSB0
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/ttyUSB0/tty/ttyUSB0
ID_BUS=usb
ID_MODEL=USB2.0-Serial
ID_MODEL_ENC=USB2.0-Serial
ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
ID_MODEL_ID=7523
ID_PATH=platform-3f980000.usb-usb-0:1.3:1.0
ID_PATH_TAG=platform-3f980000_usb-usb-0_1_3_1_0
ID_REVISION=0254
ID_SERIAL=1a86_USB2.0-Serial
ID_TYPE=generic
ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
ID_USB_DRIVER=ch341
ID_USB_INTERFACES=:ff0102:
ID_USB_INTERFACE_NUM=00
ID_VENDOR=1a86
ID_VENDOR_ENC=1a86
ID_VENDOR_FROM_DATABASE=QinHeng Electronics
ID_VENDOR_ID=1a86
MAJOR=188
MINOR=0
SEQNUM=1038
SUBSYSTEM=tty
TAGS=:systemd:
USEC_INITIALIZED=76477

My mistake, must have missed the step that installing the arduino drivers is necessary. Also check out that I now have a serial id generated by concatenating the model and vendor id - must be the driver doing its magic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.