-
I'm not sure if I should post this here or in 'Issues', I'm not sure sure if this is an issue, or something that I did wrong. In my hid report descriptor I specified two reports, Writing with Report Id 1 returns 'number of bytes sent' as 33, which is the report size specified for Report Id 2.
However, The transmitted and received data are correct, without errors. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm assuming you're using latest 0.10.1 version of hidapi. Can you try the very same code on Linux/macOS? Your expectations are natural from HID point of view, but I'm afraid this is likely is a Windows backend limitation. And not because of the hidapi implementation on Windows, but because of the WinAPI itself. hidapi is jut strying to be a thin proxy between a user and underlying OS API, when that is possible. What is your Windows version? |
Beta Was this translation helpful? Give feedback.
-
Added this to Wiki FAQ. |
Beta Was this translation helpful? Give feedback.
I'm assuming you're using latest 0.10.1 version of hidapi.
Can you try the very same code on Linux/macOS?
Your expectations are natural from HID point of view, but I'm afraid this is likely is a Windows backend limitation. And not because of the hidapi implementation on Windows, but because of the WinAPI itself. hidapi is jut strying to be a thin proxy between a user and underlying OS API, when that is possible.
WinAPI requires that the buffer passed to
WriteFile
(underlying implementation ofhid_write
) is large-enugh to hold the largest report (the size of larger report is reported by WinAPI as well, and used by hidapi). And, apparently, it doesn't return how many actual bytes are sent t…