About non-working device "HID Custom Sensor" #2841
Unanswered
DemTerritory
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am developing a USB HID Custom sensor device with I/O functionality. I chose HID Custom sensor because the standard USB HID driver in Win10 supports such devices and there is no need to write a custom driver.
in the TUD_HID_INOUT_DESCRIPTOR macro, the HID Descriptor with the report descriptor (HID_DESC_TYPE_REPORT=0x22) is described:
/* HID descriptor */
9, HID_DESC_TYPE_HID, U16_TO_U8S_LE(0x0111), 0, 1, HID_DESC_TYPE_REPORT, U16_TO_U8S_LE(_report_desc_len),\
When the device is initialized, the host (Win10), after a series of requests that proceed normally, starts requesting the same report descriptor 0x22 from the HID Descriptor:
USBD Setup Received 80 06 00 22 00 00 40 00
80 06 = Get Standard USB Descriptor
22 = Report Descriptor (HID_DESC_TYPE_REPORT)
This request comes to my microcontroller and is processed by a function from usbd.c:
static bool process_get_descriptor(uint8_t rhport, tusb_control_request_t const * p_request)
And in the function, the descriptor type 22h is apparently considered "Class Specific Descriptor" and is not processed.
The function returns default: return false;
And tinyusb responds to the host "Stall EP0".
Finally, after five repeated attempts of this request, usb host Win10 disconnects my device:
USBD Suspend : Remote Wakeup = 0
That is, the device does not work and is displayed in Device Manager as "HID Custom Sensor" with the status:
This device cannot start. (Code 10)
Failed to initialize sensor from HID collection descriptor.
Is there any way to fix this? I think there is some problem with TinyUSB...
Beta Was this translation helpful? Give feedback.
All reactions