But I just usb libusb_get_descriptor to get the report descriptor, to analyze the HID device.
Because I can get the HID descriptor (e.g. 09 21 1101 00 01 22 4f00) but why I can't get this 79 byte of report descriptor?
Also I try to use libusb_control_transfer
e.g.
libusb_control_transfer(handle,
LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_INTERFACE,
LIBUSB_REQUEST_GET_DESCRIPTOR,
(LIBUSB_DT_REPORT << 8),
0,
buf, 2014,
5000);
but it doesn't work ,with LIBUSB_ERROR_IO returned.
So do you have other ways to analyze a usb device which is a mouse or a keyboard?