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

Updated windows hidapi DLLs with libusb's hidapi #81

Closed Ktar5 closed 4 years ago

Ktar5 commented 4 years ago

Multiple functions with the hidapi version currently used in the project do not work, such as simply opening a device on Windows 10. This update fixes that and other issues by using a newer version of hidapi.dll from https://github.com/libusb/hidapi which is the currently maintained fork of hidapi.

Ktar5 commented 4 years ago

This should fix #76 , #60 , #44 and most likely others.

gary-rowe commented 4 years ago

Thanks for the pull request! Unfortunately I can't merge it in due to it being Windows only and the native libraries need to be updated for all supported platforms. I'll add you to the AUTHORS file in recognition of your contribution, though.

I've made some changes to the develop branch which demonstrate how to cross compile the native hidapi code. Take a look at the README file FAQ.

gary-rowe commented 4 years ago

I'm re-opening this PR so it can act as a general point of review for the new hidapi libraries. They are awaiting review by anyone who has time to test different environments and devices.

Ktar5 commented 4 years ago

I'll check it out later inthe week thanks!

pwitiw commented 4 years ago

I use this lib in my app running on linux - barcode reader (working as a keyboard). I have to deploy the same app on windows environment. I wonder whether you handled windows issues regarding keyboard like devices (if not, then how long does it take?) or should i rewrite it to use usb4java. Thanks in advance for the answer.

gary-rowe commented 4 years ago

I've been able to update the cross-compilation environment to support generation of Windows DLLs so I'll close this PR.