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

Unable to Open Device Handle #55

Closed tecklund closed 4 years ago

tecklund commented 7 years ago

I am using a DS6878 Barcode Scanner (in HID mode) on OS X. I am running the example code which enumerates the devices allows me to see attached and detached events. However, open always returns false, and my OS retains ownership of the interface. hidDevice.getLastErrorMessage() returns Device not initialised.

gary-rowe commented 7 years ago

Just a quick check - is your device running as a keyboard/mouse in Windows? There is a note in the README covering this:

Check that the usage page is not 0x06 which is reserved for keyboards and mice. Windows opens these devices for its exclusive use and thus hid4java cannot establish its own connection to them. You will need to use the lower level usb4java library for this.
tecklund commented 7 years ago

The usage page is 0x06, but I am not using Windows

gary-rowe commented 7 years ago

Were you able to resolve this?

gary-rowe commented 4 years ago

Closing as no response.