0
votes

I'm asking this question because the USB HID Documentation isn't very explicit about this. My question is in regards to Full Speed USB HID devices and their respective Report Descriptors. I have a device, with a Report ID of 2. The Report Count in the Report Descriptor is set to 64. Now, my current understanding, is that the Report Count is preceded by the Report ID when transferring a USB packet. Meaning...the size of the USB packet will be the size specified in the Report Count plus one byte for the Report ID, totaling a size of 65 bytes for the total transfer. I've tried this and it's working.

My question here is, is this a correct understanding of the USB spec, or am i exploiting something that could be patched later on by Windows updates or Mac updates, etc...?

According to the USB HID spec,a USB transaction is limited to 64 bytes for high speed devices. However, this is outdated information since high speed devices can reach 1024 bytes per transfer. Full speed devices are now specified to have 64 bytes maximum per transfer. It also specifies that the Report Count refers to the amount of data fields in a report transfer. It doesn't say USB transaction, just Report Transfer.

For Report ID's, the USB HID spec states, "Report ID items are used to indicate which data fields are represented in each report structure. A Report ID item tag assigns a 1-byte identification prefix to each report transfer."

This leads me to believe, that although it says that full speed devices are limited to 64-bytes per USB transaction, that limit does not take into account Report ID's. Is this correct?

1

1 Answers

0
votes

No, the report ID counts as a data. With the report ID the remaining report data must not be longer than 63 bytes.

Note that this limit is only enforced by hardware in full speed mode. High speed interrupt endpoints can be up to 1024 bytes per transfer.

The current HID spec version 1.11 is from 2001, and thus predates USB 2.0 high speed quite a bit. Interrupt Transfers longer than 64 bytes where not available.

You may want to check the behavior of your device once it is connected to an old USB 1.1 (full speed) hub.