I've been running Raspberry Pi for the past 6 years with no issues. It has two Arduinos connected via USB ports (ttyACM0 and ttyACM1), and DALI hat which occupies ttyS0.
The other day I had issues with the SD card, which prompted upgrade to another SD card and complete OS reinstall. However, afterwards, all three above mentioned serial ports, although recognized by the OS, simply can't send or receive any data.
Some of the stuff I've tried:
1. I have enabled serial port in raspi-config in order for DALI hat to be visible, and left SSH over serial port disabled. This is normal part of config. I'm however not focusing on DALI hat as troubleshooting USB ports is easier and likely the issue is the same for all three devices.
2. I've tried using minicom (instead of my software) to connect to Arduinos, however it stays offline. When I connect the same Arduino to PC, it works with no issues, so it shouldn't be a hardware problem, and besides, the same setup (albeit with older OS version) has been working fine with no issues, which points to some misconfiguration in the new OS.
3. I've checked if my user (pi) has permissions to access ports - it does, it's a member of dialout group:
4. I've tried using /dev/serial0 instead of /dev/ttyS0, but it made no difference.
5. Unfortunately I don't get any meaningful error in my app when I try writing data to the USB port, it just throws NullPointerException error somewhere in the native code.
Other stuff:
a) My device is Rasbperry Pi 3 B+:
b) I can see that all devices and ports are recognized by the OS:
I'd be grateful for any ideas or pointers.
The other day I had issues with the SD card, which prompted upgrade to another SD card and complete OS reinstall. However, afterwards, all three above mentioned serial ports, although recognized by the OS, simply can't send or receive any data.
Some of the stuff I've tried:
1. I have enabled serial port in raspi-config in order for DALI hat to be visible, and left SSH over serial port disabled. This is normal part of config. I'm however not focusing on DALI hat as troubleshooting USB ports is easier and likely the issue is the same for all three devices.
2. I've tried using minicom (instead of my software) to connect to Arduinos, however it stays offline. When I connect the same Arduino to PC, it works with no issues, so it shouldn't be a hardware problem, and besides, the same setup (albeit with older OS version) has been working fine with no issues, which points to some misconfiguration in the new OS.
3. I've checked if my user (pi) has permissions to access ports - it does, it's a member of dialout group:
Code:
$ groups pipi : pi adm dialout cdrom sudo audio video plugdev games users input render netdev spi i2c gpio lpadmin
5. Unfortunately I don't get any meaningful error in my app when I try writing data to the USB port, it just throws NullPointerException error somewhere in the native code.
Other stuff:
a) My device is Rasbperry Pi 3 B+:
Code:
$ uname -aLinux dobby 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
Code:
$ lsusbBus 001 Device 004: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)Bus 001 Device 006: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)Bus 001 Device 005: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC) Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 HubBus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Code:
$ ls /dev/ttyA*/dev/ttyACM0 /dev/ttyACM1$ ls /dev/ttyS*/dev/ttyS0
Code:
$ dmesg | grep tty[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=PARTUUID=6f419e06-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles[ 0.000404] printk: console [tty1] enabled[ 2.823801] 3f201000.serial: ttyAMA1 at MMIO 0x3f201000 (irq = 99, base_baud = 0) is a PL011 rev2[ 2.824114] serial serial0: tty port ttyAMA1 registered[ 2.828023] 3f215040.serial: ttyS0 at MMIO 0x3f215040 (irq = 71, base_baud = 50000000) is a 16550[ 7.065065] systemd[1]: Created slice system-getty.slice - Slice /system/getty.[ 9.821070] cdc_acm 1-1.1.3:1.0: ttyACM0: USB ACM device[56708.467958] cdc_acm 1-1.1.2:1.0: ttyACM1: USB ACM device
Code:
$ dmesg | grep usb[ 0.093111] usbcore: registered new interface driver usbfs[ 0.093162] usbcore: registered new interface driver hub[ 0.093227] usbcore: registered new device driver usb[ 1.800541] usbcore: registered new device driver r8152-cfgselector[ 1.800651] usbcore: registered new interface driver r8152[ 1.800701] usbcore: registered new interface driver lan78xx[ 1.800814] usbcore: registered new interface driver smsc95xx[ 2.731819] dwc_otg 3f980000.usb: DWC OTG Controller[ 2.731884] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1[ 2.731933] dwc_otg 3f980000.usb: irq 74, io mem 0x00000000[ 2.732297] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06[ 2.732316] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1[ 2.732330] usb usb1: Product: DWC OTG Controller[ 2.732342] usb usb1: Manufacturer: Linux 6.6.51+rpt-rpi-v8 dwc_otg_hcd[ 2.732354] usb usb1: SerialNumber: 3f980000.usb[ 2.735298] usbcore: registered new interface driver uas[ 2.735393] usbcore: registered new interface driver usb-storage[ 2.749837] usbcore: registered new interface driver usbhid[ 2.749848] usbhid: USB HID core driver[ 3.040831] usb 1-1: new high-speed USB device number 2 using dwc_otg[ 3.253285] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3[ 3.253321] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0[ 3.544782] usb 1-1.1: new high-speed USB device number 3 using dwc_otg[ 3.645478] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3[ 3.645512] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0[ 3.952923] usb 1-1.1.3: new full-speed USB device number 4 using dwc_otg[ 4.070981] usb 1-1.1.3: New USB device found, idVendor=2341, idProduct=0042, bcdDevice= 0.01[ 4.071020] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220[ 4.071036] usb 1-1.1.3: Manufacturer: Arduino (www.arduino.cc)[ 4.071048] usb 1-1.1.3: SerialNumber: 95736323632351307290[ 4.360768] usb 1-1.1.1: new high-speed USB device number 5 using dwc_otg[ 4.465404] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00[ 4.465439] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0[ 9.821331] usbcore: registered new interface driver cdc_acm[ 10.217247] usbcore: registered new interface driver brcmfmac[56708.351743] usb 1-1.1.2: new full-speed USB device number 6 using dwc_otg[56708.465747] usb 1-1.1.2: New USB device found, idVendor=2341, idProduct=0042, bcdDevice= 0.01[56708.465782] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220[56708.465798] usb 1-1.1.2: Manufacturer: Arduino (www.arduino.cc)[56708.465810] usb 1-1.1.2: SerialNumber: 558383439333512152F1
Statistics: Posted by domchi — Sun Nov 03, 2024 6:04 pm — Replies 2 — Views 71