79431107

Date: 2025-02-11 19:18:31
Score: 1
Natty:
Report link

I was able to get the joystick to work for me, you must change the device descriptor to match your desired usage.

For a gamepad/joystick, change subclass to 0, protocol to 1, report length to 5 and device descriptor for 5 buttons max, joystick axis x, joystick axis y, and the hat switch. \x05\x01\x09\x02\xa1\x01\x85\x01\x09\x01\xa1\x00\x05\x09\x19\x01\x29\x05\x15\x00\x25\x01\x95\x05\x75\x01\x81\x02\x95\x01\x75\x03\x81\x01\x05\x01\x09\x30\x09\x31\x16\x00\xf8\x26\xff\x07\x75\x0c\x95\x02\x81\x06\x09\x38\x15\x81\x25\x7f\x75\x08\x95\x01\x81\x06\xc0\xc0

For a mouse and keyboard, refer to github repository https://github.com/thewh1teagle/zero-hid/blob/main/usb_gadget/init_usb_gadget

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Dean