Score:1

Getting Arduino to work in raspberry pi with ubuntu server

mu flag

I have a raspberry pi 4b with ubuntu server (21.10) installed. I'd like it to communicate with an arduino uno r3. I have the following problem, the arduino, while detected by lsub it doesn't have an associated file under dev. The server has got an xfce desktop environment and I have installed the arduino IDE v1.8 for arm64 from the website. The IDE is working and I've run the linux-setup script correctly.

When I run lsusb the output is

Bus 001 Device 004: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)

and when I run ls /dev/ttyACM* /dev/ttyUSB*

ls: cannot access '/dev/ttyACM*': No such file or directory
ls: cannot access '/dev/ttyUSB*': No such file or directory

The output of sudo udevadm monitor -u is:

UDEV  [334.511980] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2 (usb)
UDEV  [334.518796] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
UDEV  [334.522288] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2:1.1 (usb)
UDEV  [334.529389] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2 (usb)

and of journalctl --follow (only the relevant parts)

Dec 18 13:31:53 Etheria kernel: usb 1-1.2: new full-speed USB device number 4 using xhci_hcd
Dec 18 13:31:53 Etheria kernel: usb 1-1.2: New USB device found, idVendor=2341, idProduct=0043, bcdDevice= 0.01
Dec 18 13:31:53 Etheria kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Dec 18 13:31:53 Etheria kernel: usb 1-1.2: Manufacturer: Arduino (www.arduino.cc)
Dec 18 13:31:53 Etheria kernel: usb 1-1.2: SerialNumber: 55736303939351714262

(Etheria is the name of the raspberry pi)

Any ideas on what might be happening?

For contrast the Arduino is detected perfectly on my computer (Linux, but OpenSuse) with the same cable.

Edit

Couldn't get it to work on time on ubuntu so I tried manjaro (for arm64) and it could detect the arduino. I think it's some package that is not by default on the server install, if somebody figures that out, please post.

user.dz avatar
ng flag
Welcome to Ask Ubuntu. Could you run these on separate terminal and report output when you plug in Arduino: `sudo udevadm monitor -u` and `journalctl --follow`
mu flag
Of course, adding it to the main question @user.dz
user.dz avatar
ng flag
I am not familiar with raspberry pi but some distributions put `cdc-acm` driver/module in `linux-modules-extra` package. Could you check if it is the case?
mu flag
Ok, it wasn't `linux-modules-extra`, which I had already tried, but it was `linux-modules-extra-raspi` which I hadn't tried for some reason. Thanks a lot. Do you want to publish the answer?
user.dz avatar
ng flag
You could submit the answer, I am here for help. :)
Score:1
mu flag

Thanks to @user.dz we figured out which package was missing. It was missing the linux-modules-extra-raspi. It is a rather large package that contains most of the modules you might be missing from an electronics boards such as i2c and others.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.