USB device /dev/ttyACM0 throws I/O error on connect

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

My release:

[j0b314:~]$ cat /etc/lsb-release 
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.0
DISTRIB_CODENAME=Ornara
DISTRIB_DESCRIPTION="Manjaro 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.

Any thoughts?
Thanks!

Always - sometimes even helpful ones :slight_smile:

Could be a privilege problem - who can access that device?

$ ls -lh /dev/ttyACM0

Did you try as root?

$ sudo minicom -b 9600 -D /dev/ttyACM0

Hi,

no rights problem. I am member of the uucp group:

[j0b314:~]$ ls -lh /dev/ttyACM0 
crw-rw-rw- 1 root uucp 166, 0 12. Apr 09:08 /dev/ttyACM0
[j0b314:~]$ sudo minicom -b 9600 -D /dev/ttyACM0 
[sudo] Passwort für j0b314: 
minicom: Fehler beim Öffnen der Datei »/dev/ttyACM0«: Eingabe-/Ausgabefehler
[j0b314:~]$