different result on hid_get_input_report and hid_read, or how to read a specified reportid? #801
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#801
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have a Logitech mouse which can be configured by sending data to 0xff00/0x2.
Report descriptor in Windows.
Below code set LED light to red(so I know it's working). read-input returns correct data but read-input-report always returns same result, even in Linux.
In Windows, each usagepage/usage is assigned as a separated device and I can use hid_read, but in Linux several usagepage/usage are all under same /dev/hidraw1, read-input reads 0 bytes and read-input-report returns same wrong data as in Windows.
So how to read data from report id 0x11 in Linux? Thanks.
When hid_get_input_report is issued, it sends a reques to the device over a different channel (control pipe), to which the device has to respond explicitly in the FW implementation.
That path is different in the FW implementation than sending interrupt input reports (available with hid_read).
Most likely the device FW itself if faulty and you're doing it right, but the device doesn't respond with the correct data.
Also, based on my experience with Logitech FW, it is highly likely that they've implented the same logical action (LED set/get status/color) using different reports for read and write (i.e. you send report 0x11 but to get the LED status you might need to get a different report).
I'm pretty sure this is device-specific and nothing that could be fixed on HIDAPI side, closing;
If there really is an issue in HIDAPI code - do reopen.