Skip to content

HID report descriptors of USB device with multiple HID interfaces #781

@jonesliu-eaton

Description

@jonesliu-eaton

We used to use libUSB library before, but we need to switch to the hid API library.
Previously, reading two descriptors through libUSB was done using the following method:
int len = usb_control_msg(hidif->dev_handle,
USB_ENDPOINT_IN+1,
USB_REQ_GET_DESCRIPTOR,
(USB_DT_REPORT << 8) + 1, hidif->interfa,
(char*)hidif->ReportDesc, hidif->ReportDescSize,
USB_TIMEOUT);

But now, only the first descriptor can be obtained through the hid API, not the second one
unsigned char descriptor[REPORT_DSC_SIZE];
len = hid_get_report_descriptor(hidif->handle, hidif->ReportDesc, sizeof(descriptor));

So, How can I get two descriptors via hid API library??

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionInformation is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions