gary-rowe / hid4java

A cross-platform Java Native Access (JNA) wrapper for the libusb/hidapi library. Works out of the box on Windows/Mac/Linux.
MIT License
229 stars 71 forks source link

Running in Linux (Ubuntu 15/10) #33

Closed xgonc closed 8 years ago

xgonc commented 8 years ago

Hello,

I built my application to a single JAR file, and it works as expected in Windows 7/8, and Mac (mountain lion). However in Ubuntu 15/10 I see the devices with lsusb, but I cannot get them from the Java code. I suspect this a dependency issue. Libusb is installed in a non standard location, so I created a symbolic link like this: /usr/lib/libusb.a -> /usr/lib/i386-linux-gnu/libusb.a

I don't have any more clues to solve this...

Note java installed: java version "1.7.0_85" OpenJDK Runtime Environment (IcedTea 2.6.1) (7u85-2.6.1-5) OpenJDK Server VM (build 24.85-b03, mixed mode)

Please help me. Thanks.

andyrozman commented 8 years ago

You need to set udev rule for your device, or else your user has no access to devices. In ubuntu you are running as non-privileged user, access to hardware needs to be permitted... Google "udev rules ubuntu"

gary-rowe commented 8 years ago

Thanks @andyrozman. The README file provides the details you need @xgonc.

xgonc commented 8 years ago

That was the issue. Solved. Thanks.