Custom HID not recognized as input device

406 Views Asked by At

I used an ESP32-S3 with TinyUSB to create a custom HID device.

The descriptor I used is:

0x05, 0x01,        // Usage Page (Generic Desktop Ctrls)
0x09, 0x37,        // Usage (Dial)
0xA1, 0x01,        // Collection (Application)
0x09, 0x37,        //   Usage (Dial)
0x15, 0x9C,        //   Logical Minimum (-100)
0x25, 0x64,        //   Logical Maximum (100)
0x75, 0x08,        //   Report Size (8)
0x95, 0x04,        //   Report Count (4)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0,              // End Collection

// 19 bytes

Which is meant to support 4 input dials of 8-bit each.

When I plug in my device to a linux host PC, this is reported:

kernel: usb 1-5: new full-speed USB device number 4 using xhci_hcd
kernel: usb 1-5: New USB device found, idVendor=303a, idProduct=4004, bcdDevice= 1.00
kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 1-5: Product: TurboLEDz QuadDial
kernel: usb 1-5: Manufacturer: GSAS Inc.
kernel: usb 1-5: SerialNumber: 000001
mtp-probe[1217981]: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
mtp-probe[1217981]: bus: 1, device: 4 was not an MTP device
kernel: hid-generic 0003:303A:4004.00E4: hiddev0,hidraw0: USB HID v1.11 Device [GSAS Inc. TurboLEDz QuadDial] on usb-0000:00:14.0-5/input0

Note that hid-generic reports it as hiddev0,hidraw0

But evtest will not recognize it as input device.

Compare this with a (throttle) joystick that I plug in, which is reported as:

hid-generic 0003:068E:00FA.00C8: input,hidraw12: USB HID v1.00 Joystick [CH PRODUCTS CH THROTTLE QUADRANT] on usb-0000:00:14.0-11/input0

Note that it reports as input,hidraw12

What is the magic sauce I need to have the PC see it as an input HID device?

0

There are 0 best solutions below