STM32 USB HID HOST enumeration gamepad is not successful, what should I do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-14 6:09 AM
STM32 USB HID HOST Reads the gamepad. When enumerated, it finds that the handle has a custom device interface type(InterfaceClass) of 0xFF and HID of 0x03. The code is generated using STM32cubemx (5.0.1).
Usbh_core.c:
If(phost->pClass[idx]->ClassCode == phost->device.CfgDesc.Itf_Desc[0].bInterfaceClass)
The former is 0x03 and the latter is 0xFF.
- Labels:
-
STM32CubeMX
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-14 6:33 AM
That means, that the gamepad is not a HID class compliant device.
bInterfaceClass=0xFF means that the interface is vendor-specific, and the protocol to talk to it is proprietary. In operating system (such as Windows), the vendor supplies the driver. In STM32, you can't use this device, unless the vendor tells you the protocol.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-14 6:36 PM
But the PC side is driver-free.
The PC can directly recognize the gamepad.
Click the home button to bring up the interface.
Data can be read using the USBlyzer.
but MCU:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-14 11:54 PM
Modern Windows download drivers through Internet without letting you know.
Post the whole configuration descriptor.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-15 1:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-16 5:49 PM
Change the code and get the description:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-01-18 2:08 PM
There is only one interface, (as bNumInterfaces = 1 in CfgDesc ) and that is bInterfaceClass=0xFF = Vendor.
So it's as I've written above: it's not a HID class, it's a vendor-defined device, which works only with vendor-provided drivers.
JW
