So, I have configured and reconfigured the Pi Zero multiple times now for it to behave like a HID keyboard. It appears as a keyboard as well, but as soon as it is connected, it gets disconnected.
This is what dmesg
says on the PC that Pi is connected to:
[ 1481.243001] usb 1-1: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 1.00
[ 1481.243011] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1481.243018] usb 1-1: Product: My virtual keyboard
[ 1481.243025] usb 1-1: Manufacturer: My manufacturer
[ 1481.243031] usb 1-1: SerialNumber: 0123456789
[ 1481.348588] usb 1-1: USB disconnect, device number 16
[ 1481.354283] usbcore: registered new interface driver usbhid
[ 1481.354285] usbhid: USB HID core driver
[ 1541.338789] usb 1-1: new high-speed USB device number 18 using xhci_hcd
[ 1541.482947] usb 1-1: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 1.00
[ 1541.482956] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1541.482962] usb 1-1: Product: My virtual keyboard
[ 1541.482969] usb 1-1: Manufacturer: My manufacturer
[ 1541.482974] usb 1-1: SerialNumber: 0123456789
[ 1541.486432] input: My manufacturer My virtual keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:1D6B:0104.0002/input/input26
[ 1541.542977] hid-generic 0003:1D6B:0104.0002: input,hidraw1: USB HID v1.01 Keyboard [My manufacturer My virtual keyboard] on usb-0000:00:14.0-1/input0
[ 1541.751085] usb 1-1: USB disconnect, device number 18
[ 1543.732239] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1543.855484] usb 1-1: new high-speed USB device number 20 using xhci_hcd
[ 1543.996164] usb 1-1: New USB device found, idVendor=1d6b, idProduct=0104, bcdDevice= 1.00
[ 1543.996174] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1543.996180] usb 1-1: Product: My virtual keyboard
[ 1543.996186] usb 1-1: Manufacturer: My manufacturer
[ 1543.996191] usb 1-1: SerialNumber: 0123456789
[ 1543.999703] input: My manufacturer My virtual keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:1D6B:0104.0003/input/input27
[ 1544.059539] hid-generic 0003:1D6B:0104.0003: input,hidraw1: USB HID v1.01 Keyboard [My manufacturer My virtual keyboard] on usb-0000:00:14.0-1/input0
[ 1544.082932] usb 1-1: USB disconnect, device number 20
[ 1545.655547] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1545.778800] usb 1-1: new high-speed USB device number 22 using xhci_hcd
[ 1545.902183] usb 1-1: device descriptor read/64, error -71
[ 1548.218941] usb 1-1: new high-speed USB device number 23 using xhci_hcd
[ 1551.122655] usb 1-1: new high-speed USB device number 24 using xhci_hcd
This is what dmesg
says on pi:
[ 53.842199] dwc2 20980000.usb: bound driver configfs-gadget
dmesg
log is of the device I am connecting the Pi to – Querious Mar 12 '19 at 7:52