Cannot comunicate with arduino

I cannot communicate with my arduino because an error with the usb interface.
I am on a raspberrypi400 with kernel

Linux mangia-pi 5.10.31-1-MANJARO-ARM #1 SMP PREEMPT Mon Apr 19 13:28:29 UTC 2021 aarch64 GNU/Linux

My arduino is identified normally by the IDE:

[  533.434688] usb 1-1.2: new full-speed USB device number 8 using xhci_hcd
[  533.548098] usb 1-1.2: New USB device found, idVendor=2341, idProduct=0243, bcdDevice= 0.01
[  533.548123] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[  533.548137] usb 1-1.2: Product: Genuino Uno
[  533.548150] usb 1-1.2: Manufacturer: Arduino LLC (www.arduino.cc)
[  533.548162] usb 1-1.2: SerialNumber: 755333538373511090D1
[  533.558879] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[  550.448837] cdc_acm 1-1.2:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed
[  564.449628] usb 1-1.2: USB disconnect, device number 8
[  566.719419] usb 1-1.3: new full-speed USB device number 9 using xhci_hcd
[  566.832882] usb 1-1.3: New USB device found, idVendor=2341, idProduct=0243, bcdDevice= 0.01
[  566.832907] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[  566.832920] usb 1-1.3: Product: Genuino Uno
[  566.832933] usb 1-1.3: Manufacturer: Arduino LLC (www.arduino.cc)
[  566.832946] usb 1-1.3: SerialNumber: 755333538373511090D1
[  566.841616] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device

but when I try to send the code I have this error in syslog:

[  579.413033] cdc_acm 1-1.3:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed

The same arduino works fine with a portable with debian/testing with kernel 5.10

1 Like

Does it need a special kernel config option or something?

Also, see this:

Looking at the kernel config there is one that stands out to me that is not enabled. If enabled it might bring in more configs also. Could you check your ubuntu kernel config and see if this is enabled?

CONFIG_USB_G_MULTI_CDC

No, I cannot find this option but only one similar not set

cat /boot/config-5.10.0-6-amd64 | grep CONFIG_USB_G_MULTI
# CONFIG_USB_G_MULTI is not set

That is a much older kernel by @ 32 weeks. It is probably the same but they changed around the name. It is by default enabled in our kernel also. I use the RPi defconfig as a base to build our kernel.

I don’t know any kind of special configuration but until now I worked only with amd64 architecture

I cannot read anything related but I am not an expert

This is not an ARM kernel.

Seems you are not on Manjaro ARM, or even regular Manjaro for this.

1 Like

Yes, it comes from a debian stable installation with some packages from testing.

Should I try another version of kernel?

I know, I was checking the differences with a working kernel on another pc with debian

I changed kernel version to

Linux mangia-pi 5.11.15-1-MANJARO-ARM #1 SMP PREEMPT Mon Apr 19 08:54:36 CDT 2021 aarch64 GNU/Linux

but the error remains the same

https://lore.kernel.org/linux-usb/YIKF+r22o2jKSoxo@hovoldconsulting.com/

A very special luck for me :wink:

I will wait because I cannot do anything else!

Thanks a lot!

1 Like

I have not checked if it was fixed in the linux-rpi4 kernel I pushed to the unstable branch yesterday but you might install it and test.

https://forum.manjaro.org/t/new-raspberry-pi-kernels-related-packages/4721/595

This one is buggy me very much :confounded:
I use arduino for my water/gas consumption as well as my alarm system

I see the fix in the kernel I pushed yesterday to the unstable branch. Kernel:

linux-rpi4 5.10.33-1

This is likely due to commit 6069e3e927c8 (“USB: cdc-acm: untangle a
circular dependency between callback and softint”) which had a bug that
was just fixed by commit a8b3b519618f (“USB: CDC-ACM: fix
poison/unpoison imbalance”).

Try it out and see if it fixes your issue.

I downloaded from repository

linux-rpi4-5.10.33-1-aarch64.pkg.tar.zst

and installed with the command

sudo pacman -U ~/linux-rpi4-5.10.33-1-aarch64.pkg.tar.zst

and the arduino worked fine!

Thanks a lot!

3 Likes

It might be a good idea to download and install the same version of the kernel headers package: linux-rpi4-headers
Especially if you build and install packages from the AUR.

Good advice, thanks!