Win 7 64 hotplug support

14 views
Skip to first unread message

Juri Vrljicak

unread,
Aug 31, 2021, 2:25:35 PM8/31/21
to usb4java
I am having troubles with this arch (it is a working webapp in Linux that I have to port).
It works with a proprietary signature pad.

The problem I have in windows is that LibUsb.hasCapability(LibUsb.CAP_HAS_HOTPLUG) returns false.

I tried everything I could read about. Including using Zadig to change drivers for that specific device. I tried libusbK, WinUsb, libusb-win32 (...). I also tried using the  UsbDk (Usb Drivers Development Kit for Windows) and settting OPTION_USE_USBDK.

I am at a dead end. 

Any ideas?

many thanks

Juri Vrljicak

unread,
Sep 3, 2021, 3:01:51 PM9/3/21
to usb4java

The way I workaround this issue was to:

precondition:

               <dependency>
                       <groupId>org.usb4java</groupId>
                       <artifactId>usb4java-javax</artifactId>
                       <version>1.3.0</version>
                </dependency>


1. create an entry javax.usb.services=org.usb4java.javax.Services in javax.usb.properties file

2.         
            usbServices = UsbHostManager.getUsbServices();

        // add a listener to receive events when the host has changes
        // (e.g. device is unplugged or is plugged in)
        UsbServicesListener servicesListener = new MyListener();
        usbServices.addUsbServicesListener(servicesListener);

This way I receive the plug and unplug events.
Reply all
Reply to author
Forward
0 new messages