USB problem with RPi4 (balenaOS 2.82.10+rev1)


I’m a new user of Very impressed with the experience so far, and keen to get a real project underway. Unfortunately, I seem to have hit an early hardware issue.

I’m using a Raspberry Pi 4 B 8GB, and trying to get a USB GPS device (GlobalSat BU-353S4) to work. I have confirmed that the hardware works: if I load the Pi with a copy of Ubuntu server (21.04) then lsusb shows:

Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P

However, if I set the Pi up as a balena device (balenaOS 2.82.10+rev1, development edition), and connect to the HostOS then lsusb just shows:

Bus 002 Device 001: ID 1d6b:0003
Bus 001 Device 001: ID 1d6b:0002

If I connect a USB memory stick, this does show up:

Bus 002 Device 002: ID 0781:5583 USB SanDisk 3.2Gen1

but there is no sign of the GPS. It seems that the required modules are present:

# find /lib | grep pl2303

There are indications that not all is well with the USB ports. dmesg | grep usb shows output that includes:

[ 3.366928] usb 1-1: device descriptor read/64, error -71

[ 6.026753] usb 1-1: device not accepting address 4, error -22

I don’t see anything like this with Ubuntu loaded, and - after trying a bunch of different things - an wondering if there is a general problem with the USB support, rather than something specific with the GPS device. I did note that the config.txt for the Ubuntu system includes


I’ve tried including this a balena configuration variable (and checked that it gets into the config.txt) but dmesg output suggests that dwc_otg is still loaded…

I’m assuming that until I can get the device to show up in the HostOS, I can’t expect to be able to use it from a container.

Update: I’ve discovered if I use balenaOS 2.75.0+rev1 instead, then the device is detected, the pl2303 driver is loaded, and /dev/ttyUSB0 is created. So looks like it is a 2.82.10 issue. For completeness, I’ve also tried 2.80.5+rev1 - that also seems to be working. So the problem appears to be specific to balenaOS 2.82.10+rev1 and nothing to do with dwc2 vs dwc_otg.

I’ve spent a few hours troubleshooting the same on a raspberry pi 4-2G. Error messages match the above. It was a small sea of error -22 and -71 in the log files. The exception to your results is that I couldn’t even see a flash drive plugged in – no usb devices worked (at least that I tried). The devices were available and showed in lsusb if I switched to a generic linux image.

Downgrading to 2.80.5 resolves the USB bus issues and I can see the devices that are connected.

Thank you for the suggestion to downgrade releases.

Thanks for reporting what you found. I too was having issues with USB on the Raspberry Pi 4 B 8GB. As soon as I downgraded to 2.80.5+rev1 it now works. Consequently, I was not having issues with USB on the Raspberry Pi 4 B 4GB. That was detecting my USB device just fine using 2.82.10+rev1.

Thanks for reporting this issue. I will create a Github issue for this!

You can track the github issue here: USB GPS modules not appearing in >= 2.82.10+rev1 · Issue #695 · balena-os/balena-raspberrypi · GitHub

@dajm01 @fod_unit – We just released a new version of the OS (version 2.83.10+rev1) that should include a fix for this issue. Go ahead and give it another try if you have a moment, thanks!

Hi @dtischler

I ran this through one of my 2G raspberry Pi 4 units. Behavior changed but the problem remains.

[ 30.504301] usb 1-1: device descriptor read/64, error -71
[ 30.748109] usb 1-1: new high-speed USB device number 7 using xhci_hcd
[ 34.664367] usb 1-1: device descriptor read/64, error -71
[ 37.360355] usb 1-1: device descriptor read/64, error -71
[ 37.468552] usb usb1-port1: attempt power cycle
[ 38.120177] usb 1-1: new high-speed USB device number 8 using xhci_hcd
[ 38.120372] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 38.328298] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 38.536186] usb 1-1: device not accepting address 8, error -22
[ 38.664165] usb 1-1: new high-speed USB device number 9 using xhci_hcd
[ 38.664311] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 38.872298] xhci_hcd 0000:01:00.0: Setup ERROR: setup address command for slot 1.
[ 39.080147] usb 1-1: device not accepting address 9, error -22
[ 39.080484] usb usb1-port1: unable to enumerate USB device
[ 39.224222] usb 1-1: new high-speed USB device number 10 using xhci_hcd
[ 42.328425] usb 1-1: device descriptor read/64, error -71
[ 44.736845] usb 1-1: device descriptor read/64, error -71
[ 44.972267] usb 1-1: new high-speed USB device number 11 using xhci_hcd
[ 47.008473] audit: type=1334 audit(1630719462.944:86): prog-id=18 op=UNLOAD
[ 47.008505] audit: type=1334 audit(1630719462.944:87): prog-id=17 op=UNLOAD
[ 48.480533] usb 1-1: device descriptor read/64, error -71
[ 51.944612] usb 1-1: device descriptor read/64, error -71

lsusb output is basically missing all the devices. Applies to the host and the containers (running privileged - same image):

Bus 002 Device 001: ID 1d6b:0003
Bus 001 Device 001: ID 1d6b:0002

Brilliant, thanks for testing it @fod_unit !

That is a fresh install of v2.83?

In the host OS, can you grab the output from ls /dev please?

hi @dtishler - it is not a fresh install - this was an upgrade. I can do a fresh install if it helps. Here’s the output of /dev

ashmem           cuse       gpiomem       loop0   mem        net    ram11  ram6            rpivid-intcmem  stderr  tty13  tty21  tty3   tty38  tty46  tty54  tty62      uhid     vcs3   vcsa5  vga_arbiter
autofs           disk       hwrng         loop1   mmcblk0    null   ram12  ram7            rpivid-vp9mem   stdin   tty14  tty22  tty30  tty39  tty47  tty55  tty63      uinput   vcs4   vcsa6  vhci
binder           dma_heap   i2c-1         loop2   mmcblk0p1  port   ram13  ram8            serial0         stdout  tty15  tty23  tty31  tty4   tty48  tty56  tty7       urandom  vcs5   vcsu   vhost-net
block            dri        initctl       loop3   mmcblk0p2  ppp    ram14  ram9            serial1         tty     tty16  tty24  tty32  tty40  tty49  tty57  tty8       vc-mem   vcs6   vcsu1  watchdog
bus              fd         input         loop4   mmcblk0p3  ptmx   ram15  random          shm             tty0    tty17  tty25  tty33  tty41  tty5   tty58  tty9       vchiq    vcsa   vcsu2  watchdog0
cachefiles       full       kmsg          loop5   mmcblk0p4  pts    ram2   raw             snapshot        tty1    tty18  tty26  tty34  tty42  tty50  tty59  ttyAMA0    vcio     vcsa1  vcsu3  zero
char             fuse       kvm           loop6   mmcblk0p5  ram0   ram3   rfkill          snd             tty10   tty19  tty27  tty35  tty43  tty51  tty6   ttyS0      vcs      vcsa2  vcsu4  zram0
console          gpiochip0  log           loop7   mmcblk0p6  ram1   ram4   rpivid-h264mem  spidev0.0       tty11   tty2   tty28  tty36  tty44  tty52  tty60  ttyprintk  vcs1     vcsa3  vcsu5
cpu_dma_latency  gpiochip1  loop-control  mapper  mqueue     ram10  ram5   rpivid-hevcmem  spidev0.1       tty12   tty20  tty29  tty37  tty45  tty53  tty61  ubi_ctrl   vcs2     vcsa4  vcsu6

Happy to give you the verbose output on any devices if you need it.

@fod_unit Well, I would have hoped that an Upgrade of the OS would resolve the issue, it should have… But for the sake of testing, could you do a fresh install of v2.83 and again give us the output of lsusb and ls /dev please? Thanks!

@dtischler - scratch install didn’t change the behavior. Here’s the outputs:

Bus 002 Device 001: ID 1d6b:0003  
Bus 001 Device 001: ID 1d6b:0002


ashmem           full          loop1      mmcblk0p5  ram13   rpivid-h264mem  tty    tty20  tty33  tty46  tty59      uinput   vcsa2        vhost-net
autofs           fuse          loop2      mmcblk0p6  ram14   rpivid-hevcmem  tty0   tty21  tty34  tty47  tty6       urandom  vcsa3        watchdog
binder           gpiochip0     loop3      mqueue     ram15   rpivid-intcmem  tty1   tty22  tty35  tty48  tty60      vc-mem   vcsa4        watchdog0
block            gpiochip1     loop4      net        ram2    rpivid-vp9mem   tty10  tty23  tty36  tty49  tty61      vchiq    vcsa5        zero
bus              gpiomem       loop5      null       ram3    serial0         tty11  tty24  tty37  tty5   tty62      vcio     vcsa6        zram0
cachefiles       hwrng         loop6      port       ram4    serial1         tty12  tty25  tty38  tty50  tty63      vcs      vcsu
char             i2c-1         loop7      ppp        ram5    shm             tty13  tty26  tty39  tty51  tty7       vcs1     vcsu1
console          initctl       mapper     ptmx       ram6    snapshot        tty14  tty27  tty4   tty52  tty8       vcs2     vcsu2
cpu_dma_latency  input         mem        pts        ram7    snd             tty15  tty28  tty40  tty53  tty9       vcs3     vcsu3
cuse             kmsg          mmcblk0    ram0       ram8    spidev0.0       tty16  tty29  tty41  tty54  ttyAMA0    vcs4     vcsu4
disk             kvm           mmcblk0p1  ram1       ram9    spidev0.1       tty17  tty3   tty42  tty55  ttyS0      vcs5     vcsu5
dma_heap         log           mmcblk0p2  ram10      random  stderr          tty18  tty30  tty43  tty56  ttyprintk  vcs6     vcsu6
dri              loop-control  mmcblk0p3  ram11      raw     stdin           tty19  tty31  tty44  tty57  ubi_ctrl   vcsa     vga_arbiter
fd               loop0         mmcblk0p4  ram12      rfkill  stdout          tty2   tty32  tty45  tty58  uhid       vcsa1    vhci

Hope this helps!

@dtischler Hi! I have a similar problem- I have a few Raspberry Pi 4 B in the field that have lost all USB functionality after upgrading to balenaOS 2.83.10+rev1. Notably the VLI hub interface does not appear with lsusb. A few observations:

  • This issue seems specific to Rev 1.4 versions of the Raspberry Pi 4 B, identical balenaOS 2.83.10+rev1 images on Rev 1.1 boards work fine.
  • Stock Raspberry Pi OS images on Rev 1.4 boards work as well
  • balenaOS 2.75.0+rev1 on Rev 1.4 boards works

Any ideas would be very appreciated!

1 Like

Excellent point:
" Rev 1.4 removes the EEPROM from the Via VL805, so the kernel and firmware gained a mechanism to load the firmware. "

The VL805 is the USB 3 controller, so maybe something which should be fixed at some point in downstream Yocto? @dtischler

1 Like

@dajm01 @fod_unit @bstein2379 @jswanson @nmaas87 According to linux-raspberrypi_5.10.bbappend: Remove obsolete VL805 patch by floion · Pull Request #712 · balena-os/balena-raspberrypi · GitHub this should now be resolved, would one of you be willing to try out balenaOS v2.85.2+rev3 on a device to see if your issue is cleared up? Thanks!

Hi @dtischler

We have tried balenaOS v2.85.2+rev3 and confirm that the USB GPS device is now accessible, which is great. Apologies for not testing the previous version 2.83.10+rev1. I have also confirmed that the device is a rev1.4 pi 4B.

One quirk is that lsusb in the hostOS doesn’t identify the device. I see the ID: Bus 001 Device 009: ID 067b:2303 but not the further details Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P I see when connected to ubuntu 21.04. I do see details for other devices, e.g. ID 0781:5583 USB SanDisk 3.2Gen1. But this is a minor inconvenience, given that the device is now working!

Thanks for the efforts on this.

Hmmm, and what about if you try a more verbose output with lsusb -v ?

Either way, glad to hear that it’s functional for you @dajm01!

lsusb -v finds the correct manufacturer:

iManufacturer 1 Prolific Technology Inc.

but not the more detailed device descriptor (PL2303 Serial Port etc) that ubuntu reported. Rather, I’m seeing:

iProduct 2 USB-Serial Controller D

Hi @dtischler,

balenaOS v2.85.2+rev3 is working on my end as well! Similarly with RPi 4B Rev 1.4.

Thanks Balena team for getting this out so quickly!

1 Like

Hi @dtischler

After update to balenaOS v2.85.2+rev3, things look much improved. I am getting good data without errors so far. I’ll advise if I see any change after I get a bit more operational time in. Thanks for taking care of this.

1 Like