When I try to access my USB device (a microcontroller which acts as a ttyACM device and just prints an ascii text string out) with minicom or another terminal program it throws an I/O error:
[j0b314:~]$ minicom -b 9600 -D /dev/ttyACM0
minicom: Fehler beim Öffnen der Datei »/dev/ttyACM0«: Eingabe-/Ausgabefehler
The kernel messages looks like this:
Apr 08 08:07:40 ferrero kernel: usb 8-1: reset full-speed USB device number 6 using uhci_hcd
Apr 08 08:07:40 ferrero kernel: usb 8-1: USB disconnect, device number 6
Apr 08 08:07:40 ferrero kernel: usb 8-1: new full-speed USB device number 7 using uhci_hcd
Apr 08 08:07:40 ferrero kernel: usb 8-1: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 0.00
Apr 08 08:07:40 ferrero kernel: usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 08 08:07:40 ferrero kernel: usb 8-1: Product: BLUEPILL_F103C8_128K CDC in FS Mode
Apr 08 08:07:40 ferrero kernel: usb 8-1: Manufacturer: Unknown
Apr 08 08:07:40 ferrero kernel: usb 8-1: SerialNumber: 6D9144804953
Apr 08 08:07:40 ferrero kernel: cdc_acm 8-1:1.0: ttyACM0: USB ACM device
After connecting with minicom the device gets resetted and reconnected:
Apr 08 08:15:57 ferrero kernel: usb 8-1: reset full-speed USB device number 7 using uhci_hcd
Apr 08 08:15:57 ferrero kernel: usb 8-1: USB disconnect, device number 7
Apr 08 08:15:57 ferrero kernel: usb 8-1: new full-speed USB device number 8 using uhci_hcd
Apr 08 08:15:57 ferrero kernel: usb 8-1: New USB device found, idVendor=1eaf, idProduct=0004, bcdDevice= 0.00
Apr 08 08:15:57 ferrero kernel: usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 08 08:15:57 ferrero kernel: usb 8-1: Product: BLUEPILL_F103C8_128K CDC in FS Mode
Apr 08 08:15:57 ferrero kernel: usb 8-1: Manufacturer: Unknown
Apr 08 08:15:57 ferrero kernel: usb 8-1: SerialNumber: 6D9144804953
Apr 08 08:15:57 ferrero kernel: cdc_acm 8-1:1.0: ttyACM0: USB ACM device
My kernel:
[j0b314:~]$ uname -a
Linux ferrero 5.10.23-1-MANJARO #1 SMP PREEMPT Thu Mar 11 18:47:18 UTC 2021 x86_64 GNU/Linux
The device behaves correctly under an Windows 10 (a serial port is installed and you can connect with putty to it.
On an Ubuntu it also works out of the box. I also tested it with a 5.4 kernel but I had still no luck. It looks like the cdc_acm driver does not properly attach to the device.
Sure, but i just downgraded the kernel back to the version before the last update, which was still in cache. So i thought this is still a supported kernel. Or am I wrong there?
Going offtopic, but downgrading a package results in a partial update and those are not supported.
If you downgrade a kernel, keep in mind you also have to downgrade all matching module/driver packages to get a working system.
This started happening to me after updating everything today. Changing kernels doesn’t help, I see the problem on 4.19.187-1-MANJARO as well. Perhaps there’s a change that has been ported to all of them recently.
After another day of testing I have found that the problem also manifests for FTDI D2XX based applications which target ttyUSB nodes. It may be unrelated but the same binary fails on kernel 5.4.112 while it works fine on 5.4.108. There is nothing in the kernel logs and I haven’t dug deeper yet.
Downgrading to 5.4.108 from pacman cache also helped me access my TI TM4C microcontroller which exposes itself as a ttyACM device.