USB device not available after reboot

I am testing using a Raspberry Pi 4B as a server (created using the hardware image, cloudhub-pi4-factory-sdcard) and operation is as expected except for one issue: when the server is rebooted the Cloudhub device again becomes available on the client, but the attached USB device at the server is not visible. The only way to restore access to the USB device is to physically disconnect and reconnect the USB device at the server, at which time the USB device again becomes available to the client.

Since the server will not be accessible it is critical that the system come up without physical intervention in the case of a power failure or reboot. Is there an easy fix to this? I have searched the forum but have not found a similar case mentioned.

Thanks -

#2

Sounds like a power issue. If possible can you put a separately powered usb hub between the pi and the device.

Also run dmesg (or logread) after it boots (and the device isnt visible) and grep for "usb" and see if it has any error messages about that

#3

Yes, inserting a powered USB hub in-line does cure the problem. The USB device is rated at a 400 ma draw which is well withing the Pi4 USB power rating of 1.2 amps, and the Pi is being fed with a 3 amp supply, and no other peripherals are connected so it seems I should be ok (?) But apparently something is unhappy.

Log output is below. USB startup appears normal until the end, when the device descriptor read errors occur. These errors are not present when using the USB hub.

[ 0.229602] hub 1-0:1.0: USB hub found
[ 0.229642] hub 1-0:1.0: 1 port detected
[ 0.229971] xhci_hcd 0000:01:00.0: xHCI Host Controller
[ 0.229992] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[ 0.230015] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[ 0.230209] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04
[ 0.230229] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.230245] usb usb2: Product: xHCI Host Controller
[ 0.230259] usb usb2: Manufacturer: Linux 5.4.48 xhci-hcd
[ 0.230272] usb usb2: SerialNumber: 0000:01:00.0
[ 0.230552] hub 2-0:1.0: USB hub found
[ 0.230596] hub 2-0:1.0: 4 ports detected

[ 0.591337] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 0.810986] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.20
[ 0.827323] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 0.827326] usb 1-1: Product: USB2.0 Hub
[ 0.865822] hub 1-1:1.0: USB hub found
[ 0.928446] hub 1-1:1.0: 4 ports detected
[ 1.319328] usb 1-1.3: new high-speed USB device number 3 using xhci_hcd

[ 6.447613] usb 1-1.3: device descriptor read/64, error -110

[ 22.062510] usb 1-1.3: device descriptor read/64, error -110
[ 22.254220] usb 1-1.3: new high-speed USB device number 4 using xhci_hcd
[ 27.437600] usb 1-1.3: device descriptor read/64, error -110

#4

Yes your device is not responding because of the power issue

Dont forget booting the pi will draw more power momentarily when its booting, and that might be just enough to overload the chip if it tries to power up the attached device at the same time.

If the kernel cannot communicate with the device e.g "device descriptor read/64, error -110" then virtualhere wont be able to see it either

#5

I have resolved the issue by running the Pi under the standard Pi OS (instead of the VirtualHere hardware-based image) and using the appropriate executable, this way I can delay start of the server process until boot is complete and the Pi is more settled which results in no problem in getting the USB device initialized.

Thanks for the prompt response Michael and your help in isolating the problem, very much appreciated!