BBenj
Member
Hello
I'm using a custom HID report descriptor with input, output and feature reports. While input & output works perfectly well, I'm not sure how to use the feature report... I've not seen any example which use a feature report.
Is a feature report linked to an "transmit and receive" endpoint ?
And how to use a feature report in the code ? I tried with usb_tx and usb_rx (using hidapi library host-side) but nothing works. I can send data from the Teensy (16 bytes with usb_tx are reported sent) to the host but the read fail on host side.
Here is my descriptor: (it works with input or output report)
static uint8_t test_report_desc[] = {
0x06, 0xAC, 0xFF, // USAGE_PAGE (0xFFAC)
0x0A, 0x00, 0x02, // USAGE (0x0200)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x01, // COLLECTION (Application)
//0x85, 0x01, // REPORT_ID (1)
0x09, 0x02, // USAGE (Vendor Usage 2)
0x75, 0x20, // REPORT_SIZE (32)
0x95, 0x04, // REPORT_COUNT (4)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x27, 0x80, 0x96, 0x98, 0x00, // LOGICAL_MAXIMUM (10000000)
//0x81, 0x02, // Input
0xB1, 0x02, // FEATURE
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
};
Any help is welcome !
Thanks !
I took a look in usb_dev.c, but the USB protocol is not very simple...
And I'm working on Mac, Mountain Lion, with Teensyduino 1.13 or 1.14 maybe...
I'm using a custom HID report descriptor with input, output and feature reports. While input & output works perfectly well, I'm not sure how to use the feature report... I've not seen any example which use a feature report.
Is a feature report linked to an "transmit and receive" endpoint ?
And how to use a feature report in the code ? I tried with usb_tx and usb_rx (using hidapi library host-side) but nothing works. I can send data from the Teensy (16 bytes with usb_tx are reported sent) to the host but the read fail on host side.
Here is my descriptor: (it works with input or output report)
static uint8_t test_report_desc[] = {
0x06, 0xAC, 0xFF, // USAGE_PAGE (0xFFAC)
0x0A, 0x00, 0x02, // USAGE (0x0200)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x01, // COLLECTION (Application)
//0x85, 0x01, // REPORT_ID (1)
0x09, 0x02, // USAGE (Vendor Usage 2)
0x75, 0x20, // REPORT_SIZE (32)
0x95, 0x04, // REPORT_COUNT (4)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x27, 0x80, 0x96, 0x98, 0x00, // LOGICAL_MAXIMUM (10000000)
//0x81, 0x02, // Input
0xB1, 0x02, // FEATURE
0xc0, // END_COLLECTION
0xc0 // END_COLLECTION
};
Any help is welcome !
Thanks !
I took a look in usb_dev.c, but the USB protocol is not very simple...
And I'm working on Mac, Mountain Lion, with Teensyduino 1.13 or 1.14 maybe...