2020-11-03 11:53 AM
I followed the custom hid example and finally got it to work, I can send 64 byte packets back and forth. The only issue now is that the device shows up as a mouse in the windows devices dialog.
How can I change it to show up as a generic deviec?
2020-11-03 02:37 PM
How it shows up is determined by Windows. If you change the descriptors, it will generally reflect the changes in Device Manager, however you cannot specify the string that it shows. There is no "generic" USB device class. There are specific generic classes (hah) such as CDC, DFU, HID, etc...
If you are actively debugging, USB sometimes gets into funny states where it may have memory of the previous descriptor and may require replugging, a reboot, and/or using a different port.
2020-11-03 03:11 PM
Well there is a "generic" class for Windows - the Microsoft proprietary "WinUSB device", indicated by a special descriptor.
But, if the OP wants to use the HID API, the device should have HID descriptors - just not the mouse usage page in HID report descriptor and not a mouse type in the interface descriptor.
Also it is possible to override the default Windows driver with a custom INF file that specifies the vendor ad device IDs, but this is encumbered because of signing requirement.
-- pa
2020-11-03 03:14 PM
Could you guys specify what you mean by descriptors? Do you mean the Report Descriptor in usbd_custom_hid_if.c or another one?
2020-11-04 08:01 PM
There are several kinds of descriptors: device, interface, class-specific and so on. Unfortunately USB is complicated.
A good book can help , Jan Axelson's for one.
-- pa