0

I have several Arduino Leonardos connected to a Raspberry Pi (running Ubuntu) via USB. They appear as /dev/ttyACM0, /dev/ttyACM1, etc.

Occasionally, one will disappear and even pressing the Arduino's reset button won't bring it back. Is there any way to "refresh" or "reinitialize" the ttyACM* devices to make them reappear without having to reboot the Raspberry Pi?

dlu
1,6612 gold badges15 silver badges29 bronze badges
asked Jan 13, 2016 at 2:10
1
  • System logs say...? Commented Jan 13, 2016 at 2:19

2 Answers 2

3

The USB devices are created dynamically. You might find this question and answer from the SE Raspberry Pi helpful: How to force rescan of USB serial devices?.

You can use the dmesg(8) command on the Pi to see the messages generated by the USB sub-system. Watch the output to see if there are errors associated with the Arduino dropping off the bus. This is what the output will look like (roughly, this is from an Uno connected to a Raspbian system), note the last line which is a disconnect from unplugging the Uno from the Pi. Resetting the Uno did not do anything that the Pi saw. I would guess that that is because the reset button on the Uno doesn't reset the 16U2 (the processor handling the USB port).

[ 459.936719] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[ 460.051182] usb 1-1.3: New USB device found, idVendor=2a03, idProduct=0043
[ 460.051212] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 460.051229] usb 1-1.3: Product: Arduino Uno
[ 460.051245] usb 1-1.3: Manufacturer: Arduino Srl 
[ 460.051262] usb 1-1.3: SerialNumber: 75431343334351F061E2
[ 460.088018] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
[ 460.089250] usbcore: registered new interface driver cdc_acm
[ 460.089270] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 534.212365] usb 1-1.3: USB disconnect, device number 5

From reading that question and its answers it appears that some versions of the Leonardo may have problems that can cause this behavior.

Another thing that might be worth looking into is the power supply for the Leonardos. If they are being powered by the Pi through the USB interface that might be pushing the capability of the Pi to provide power.

answered Jan 13, 2016 at 2:59
0

Every device is also found on a symlink, named by its hardware wireing. So this names stay the same after re-appering!

root@raspberrypi:/etc/udev/rules.d# ls -l /dev/serial/by-path/
total 0
lrwxrwxrwx 1 root root 13 May 2 18:11 platform-20980000.usb-usb-0:1.2:1.0 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 May 2 18:11 platform-20980000.usb-usb-0:1.3.1:1.0-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 May 2 18:11 platform-20980000.usb-usb-0:1.3.1:1.0-port1 -> ../../ttyUSB1
answered Sep 17, 2022 at 15:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.