I followed this guide to setup my Pi Zero W as a keyboard HID. Connected it to a laptop (via the data USB, not the power) to see no effect. When I started investigating, I saw that dmesg
is showing the following errors when I connect the Pi Zero to my Linux laptop:
[5438430.923017] usb 1-1: new high-speed USB device number 66 using xhci_hcd
[5438436.307148] usb 1-1: device descriptor read/64, error -110
[5438451.923484] usb 1-1: device descriptor read/64, error -110
[5438452.163467] usb 1-1: new high-speed USB device number 67 using xhci_hcd
[5438457.299567] usb 1-1: device descriptor read/64, error -110
[5438472.919856] usb 1-1: device descriptor read/64, error -110
[5438473.027879] usb usb1-port1: attempt power cycle
[5438473.679853] usb 1-1: new high-speed USB device number 68 using xhci_hcd
[5438479.059979] usb 1-1: device descriptor read/64, error -110
[5438494.676268] usb 1-1: device descriptor read/64, error -110
[5438494.912270] usb 1-1: new high-speed USB device number 69 using xhci_hcd
[5438500.052383] usb 1-1: device descriptor read/64, error -110
[5438515.668687] usb 1-1: device descriptor read/64, error -110
[5438515.776709] usb usb1-port1: unable to enumerate USB device
A quick search for that error seemed to imply that it's something power-related, but I couldn't figure out what. It seems like Pi Zero does get enough power from the USB to fully boot up, I can easily SSH into it while it's connected to the computer, just the the computer it's connected to seems to think something is wrong. I tried several OTG cables, which work fine for connecting phone to PC. My kernel and GPU firmware are both from Mar 2018 (much newer than the pre-2016 versions that gave issues to some). Has anyone run into this?
EDIT Other observations:
- gadget does not seem to be recognized in either Linux, OSX, or Windows (on Linux, I can tell that dmesg is reacting to it, but showing -110 error)
- Seems like the gadget is now being recognized as "full-speed" instead of "high-speed" when plugged in, I'm not sure if the issue is the cable or something else, it was the same cables I was using yesterday, so I'm not sure
- Plugging Pi Zero into laptop's own USB port results in it failing to configure itself as a gadget but remaining on otherwise (so I can ssh in), plugging the same Pi Zero (with the same cable) into the docking station USB of the same laptop results in a bootloop, with a forced reboot after dmesg fails to mount the device.
My kernel and GPU firmware are both from Mar 2018
- have you tried a more recent image, Feb 2020 - also, is that dmesg log on the laptop?rpi-update
, the kernel is now from Apr 27 2020, issue persists. And yes, the dmesg is on the laptop the pi is being connected to, so it sees that something is there but fails to initialize it.