Comments (7)
This could be due to the libusb
library being renamed on your system, possibly to include the version number. You can test this by means of ls /usr/lib/libusb*.a
and seeing if /usr/lib/libusb-1.0.a
or similar is present in the result.
You might be able to use the instructions in this Stack Overflow question to work out what you need to do on your system to overcome this situation. One answer suggests using LD_PRELOAD
.
from hid4java.
But why would 0.3.1 work and 0.4.0 not... When I use official version of 0.3.1 it works, when I use 0.4.0 I rebuilt not...
Actually I don't have any files like this.
from hid4java.
I tried using 0.3.1 binaries with 0.4.0 java sources. This one works better, but read command doesn't work. I have seen that there were some changes (HidDeviceInfo file was removed), which might be reason why read command doesnt work (I get -2 returned instead of data)...
Did you change how you make binaries from 0.3.1 till next (current) version?
from hid4java.
Hmm, looking over 0.3.1 there's nothing in the pom.xml
to indicate a change. Both Java 6 and JNA 4.1.0 were in place by that time (0.3.0 required Java 7+ but this was later relaxed).
If you got the binaries from the Bitcoin Solutions staging repo (as referenced in the README) then it's possible that later ones were compiled under Java 8 targeting a Java 6 language level and byte code format.
From the look of the error message it's a problem with the dynamic linking between the signal11/hidapi library and your libusb. I've no idea why earlier binaries were working unless something changed on your system between when you compiled them and now. Perhaps it would be worth re-compiling the old ones and seeing if they still work?
from hid4java.
I didn't compile binaries. I just took them from your jar file. Now I took them from your repository... they are stored under src/main/resources.
Situation really seems weird... I will try to get old sources and recompile them and see if it works...
from hid4java.
I recompiled with old sources 0.3.1 (and using also old binaries) and it works now (not with new ones, it seems like you might be correct, perhaps new binaries are targeting higher java version)... Since I need this for java 5 I made fork of this project, which is now "locked" at 0.3.1. I will merge changes if you make some, but since you also changed Java implementation from 0.3.1 to 0.4 I will have to be very carefull...
If someone needs Java 5 version it has name hid4java-j15 (here on github)...
You can close this ticket... Thanks for your help and you did good work with this library... Start of using USB hid in my project was much easier than I expected.
from hid4java.
OK. Thanks for the feedback. Closing.
from hid4java.
Related Issues (20)
- HID write always fails with 64bit OS running under Raspberry PI 4 HOT 2
- setAutoDataRead(true) - nothing happens, program waits forever HOT 2
- Add module name HOT 3
- I am not scanning my device using UsbHidEnumerationExample. Do I need to do anything to set the MAC? HOT 6
- Event hidDataReceived not working. HOT 2
- Option to open device in non-exclusive mode HOT 1
- When will 0.8.0 be released as example code doesn't compile when tried with latest published jar? HOT 7
- Support for Raspberry pi 4 HOT 4
- 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
- Regression in `hidApiLibrary.hid_open_path(path)` v 0.8 HOT 6
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.