I remember having done the same composite device as yours. The difference is that I did not mix the report descriptors but it was a device with two interfaces.
Quote:
I've add the USBHID report descriptor to the tail of USBMouseKeyboard report descriptor with additional report id equal to 4. hidapi's hid_open_path can open, and the output report length of the opened handle is correct, but can not write to mbed
Can you test (I don't have any hardware right now to test) a HID report descriptor where there are two different report ID for input/output reports:
0x06, 0x00, 0xff, // usage page (vendor defined)
0x09, 0x01, // usage (vendor page 1)
0xA1, 0x01, // Collection application
0x09, 0x01, // usage (vendor page 1)
0x85, 0x04, //report id 4
0x95, input_length, // report count
0x75, 0x08, // report size = 8 bits
0x26, 0xFF, 0x00, // logical maximum = 255
0x15, 0x00, // logical minimum = 0
0x09, 0x01, // usage (vendor page 1)
0x81, 0x02, // Input (array)
0x85, 0x05, //report id 5
0x95, output_length,// report count
0x75, 0x08, // report size = 8 bits
0x26, 0xFF, 0x00, // logical maximum = 255
0x15, 0x00, // logical minimum = 0
0x09, 0x01, // usage (vendor page 1)
0x91, 0x02, // Output (array)
0xC0 // end collection
Hi,
I've add the USBHID report descriptor to the tail of USBMouseKeyboard report descriptor with additional report id equal to 4. hidapi's hid_open_path can open, and the output report length of the opened handle is correct, but can not write to mbed. Could anyone help?
Thank you,
Cid