I'm trying to run rosserial with a teensy 3.6, but am getting the following error
[ERROR] [1603751770.005130]: Error opening serial: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'However, my dmesg | grep tty output shows the following
[ 0.000000] console [tty0] enabled
[12758.910672] cdc_acm 1-2:1.0: ttyACM0: USB ACM deviceTTYACM0 does not show up when I run ls dev/tty* either.
Thanks in advance!
32 Answers
Maybe it is because the device is blacklisted in udev rules.
2When I connect a switched-off smartphone (Alcatel Idol 2 6037K) to the computer's USB port, I also have the same problem. In the kernel logs I have the mention of ttyACM0, but the device does not appear in the system.
[ 7813.982058] usb 2-1.3: new high-speed USB device number 28 using ehci-pci
[ 7814.061817] usb 2-1.3: New USB device found, idVendor=0e8d, idProduct=2000, bcdDevice= 1.00
[ 7814.061823] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7814.061826] usb 2-1.3: Product: MT65xx Preloader
[ 7814.061828] usb 2-1.3: Manufacturer: MediaTek
[ 7814.083399] cdc_acm 2-1.3:1.0: Zero length descriptor references
[ 7814.083411] cdc_acm: probe of 2-1.3:1.0 failed with error -22
[ 7814.123453] cdc_acm 2-1.3:1.1: ttyACM0: USB ACM device
[ 7816.882582] usb 2-1.3: USB disconnect, device number 28This happens because the device disconnects from the system after 2-3 seconds (time between last to lines of kernel log). During these seconds, the device must be opened, otherwise, it is disconnected. You can see how the device appears and disappears during these seconds:
$ ls -la /dev/ttyACM*
ls: cannot access '/dev/ttyACM*': No such file or directory
$ ls -la /dev/ttyACM*
ls: cannot access '/dev/ttyACM*': No such file or directory
$ ls -la /dev/ttyACM*
crw-rw---- 1 root uucp 166, 0 Jun 1 03:30 /dev/ttyACM0
$ ls -la /dev/ttyACM*
crw-rw---- 1 root uucp 166, 0 Jun 1 03:30 /dev/ttyACM0
$ ls -la /dev/ttyACM*
crw-rw---- 1 root uucp 166, 0 Jun 1 03:30 /dev/ttyACM0
$ ls -la /dev/ttyACM*
crw-rw---- 1 root uucp 166, 0 Jun 1 03:30 /dev/ttyACM0
$ ls -la /dev/ttyACM*
crw-rw---- 1 root uucp 166, 0 Jun 1 03:30 /dev/ttyACM0
$ ls -la /dev/ttyACM*
ls: cannot access '/dev/ttyACM*': No such file or directoryI had a problem because my software (SP Flash Tool) did not have sufficient rights to open this device, so the device was disconnecting. After I added the rights, everything worked.