1

Topic: HidSharp

I have noticed a slight inconsistency in the behaviour of HidSharp on Windows VS Mac OSX...

Essentially, I have a Full Speed HID device which on Windows reports input and output report sizes of 65 bytes, and OSX reports 64 bytes for both.

I have been able to get the device to work on OSX by omitting the first byte on the output report, and by padding the input report with a 0 byte. ( the first byte is always 0 with this device...)

I am quite new to USB Hid, and I have read some documentation which states that the maximum input/output report size for a full speed device is 64 bytes, could this be the reason this is occurring? And if so, why would Windows allow 65 byte report size? Or is there a different reason for what I am seeing here?

Thanks
-Jared

2

Re: HidSharp

If the device does not use Report IDs, MacOS does not include one. Windows includes one, and it must be zero.
When it is sent to the device, Windows will trim off the zero-value Report ID. I have duplicated this behavior in the Linux implementation. That is a flaw in the MacOS implementation, but as yet I haven't found a good way to retrieve the Report Descriptor on MacOS to correct it. If your device uses Report IDs, its behavior is identical on all platforms.