Comments (6)
Success! With the correct udev rule it finally worked:
KERNEL=="hidraw*", ATTRS{idVendor}=="XXXX", ATTRS{idProduct}=="YYYY", TAG+="uaccess"
(where XXXX and YYYY are, of course, the corresponding vendor and product ids). This is from https://github.com/libsdl-org/SDL/blob/main/src/hidapi/udev/69-hid.rules. Other udev recommendations floating around (ATTRS{busnum}="X"
) didn't work for me.
from hid4java.
Thanks for reporting this. That code hasn't changed beyond documentation since inception so I'm inclined to suspect the underlying compilation of the hidapi
library.
Can you give some more detail on the following:
- which library is being used (
libusb
orhidraw
(default)) - verification that the
udev
settings are correct - exact platform (e.g.
linux-aarch64
)
from hid4java.
- Hidraw (This might be the difference, because in Julia I'm using the build that used libusb backend)
- udev settings should be fine, as it works in Julia on the same computer
linux-x86-64
from hid4java.
If you have time, could you review issue #97 which provides a lot of information regarding Ubuntu and hidraw/libusb.
from hid4java.
I didn't see anything related in #97, but I found out that in version 0.7 linux-x86-64\libhidapi-libusb.so
and linux-x86-64\libhidapi.so
are binary equal and are actually the libusb backend build. So the "regression" stems from the fact there was a build bug in 0.7 which resulted in only one linux backend for 64bit (not 32!): libusb.
Finding out why I can't open devices using the linux backend will need to be investigated further.
from hid4java.
I'm glad you got to the bottom of this issue. Was the wiki Troubleshooting section any help? See https://github.com/gary-rowe/hid4java/wiki/Troubleshooting#how-usb-devices-are-mapped-in-linux
from hid4java.
Related Issues (20)
- MacOS ARM incompatible HOT 3
- Unable to open connection to multiple identical devices HOT 1
- HidApi.read returning -2(DEVICE_ERROR) and "Device not initialised" seen when trying to fetch SN, PID HOT 4
- Specify minimum JNA version required HOT 1
- hid4java always uses the libusb variant of libhidapi on linux-x86-64 HOT 1
- support hidapi 0.14.0 HOT 2
- Branch cleanup HOT 1
- Update MVN repository content
- USB HID Set Report and Get Report HOT 10
- How can i read the scanner data. HOT 3
- Pre-release checklist for 0.8.0
- On Ubuntu 22.04 64bit `WideStringBuffer` is not applicable for `hid_error`
- Support RPi OS "bullseye" aarch64; support old glibc versions HOT 5
- Android support HOT 1
- macOS API calls must be thread safe
- WriteFile: (0x00000005) Access is denied HOT 7
- Threading (?) causing glibc/low level crashes HOT 4
- org.hid4java.HidDevice.read(HidDevice.java:402) java.lang.NegativeArraySizeException: -1 on read failure
- Used in systems with security policies:failed to map segment from shared object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hid4java.