-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid usage_page values in Linux #385
Comments
It sounds like you're using the 'libusb' driver on Linux. Note you'll need to change your udev rules if you're using those, swapping |
@todbot yes, I believe I am. I'm using it indirectly through a third party, so I'll have to see if switching is an option. Thanks. |
The If that's the case, I would try hand-compiling
And then you'll have a |
@todbot thanks kindly for this information! What's not immediately obvious is why the |
Answering my own question, @todbot I have to thank you for going out of your way to look into the 3rd party library, that's very kind. So I've replaced
Is there some translation that can be used to map these values to each other? Grabbing at straws here. :)
We've been using ubuntu@ubuntu1404:~$ cat /etc/udev/rules.d/*.rules
# libusb device access
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/bin/killall -sUSR1 portcommunicationserviced"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/bin/killall -sUSR2 portcommunicationserviced"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/bin/killall -sUSR1 portcommunicationserviced"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/bin/killall -sUSR2 portcommunicationserviced"
KERNEL=="vboxguest", NAME="vboxguest", OWNER="vboxadd", MODE="0660"
KERNEL=="vboxuser", NAME="vboxuser", OWNER="vboxadd", MODE="0666" |
Tested
|
I could solve the problem of zero values by moving to hidraw. However, I now receive odd/incorrect numbers. @tresf Could you find a solution to this problem? If I use https://github.com/flynn/hid However, when I use a library that is signal11 based: path: "/dev/hidraw5", |
Unfortunately no. We (my project) simply cannot support this type of hardware on Linux using the |
it seems to me that the usage_page is not even set and the values we are seeing are some left over. Lines 479 to 555 in a6a622f
|
Actually, it seems that here is a dead PR with the fix: It is unfortunate that the project has no activity since 2016 |
@tresf would you mind renaming the issue to: "Invalid usage_page values in Linux" ? |
Done. |
I have a Honeywell 1400g barcode scanner which identifies itself as:
It has two endpoints:
On Windows and MacOS, I can use UsagePage to distinguish between the two. We toss out the
-116
and keep the140
and we have the proper device and can read HID data from it.Unfortunately, the two endpoints are causing trouble when claiming the device in Linux: both UsagePage values return zero.
The source of
hid.c
makes this appear intentional:Although the documentation recommends to use interface number, for the hardware I'm testing on, interface number is the same between devices. How do other users handle edge-cases where HID returns two device matches on the same physical device on Linux?
The text was updated successfully, but these errors were encountered: