|
From: Xiaofan C. <xia...@gm...> - 2021-06-23 02:28:52
|
On Sat, Jun 19, 2021 at 12:14 PM Tim Roberts <ti...@pr...> wrote: > > On 6/18/21 6:56 PM, Xiaofan Chen wrote: > > What will be the good approach to reconstruct the HID report descriptor? > > I spent some time with this, and I don't think it is possible. There's just not > enough information in the "parsed descriptors" to do that. > > MAYBE (I haven't proven this to myself) you could use the same hub backdoor > that "usbview" uses, and fetch the report descriptor that way. > I have tested the ideas and it does not seem to work, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION can not be used to get the HID Report Descriptors. https://github.com/libusb/hidapi/issues/249#issuecomment-865844126 Ref: https://community.osr.com/discussion/287808/ioctl-usb-get-descriptor-from-node-connection For a HID report descriptor, the Recipient bits of bmRequestType must be set to Interface (1). IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION sets bmRequestType to 0x80. -- Xiaofan |