I made a composite CDC + HID device. Interface 0 and 1 is for CDC, interface 2 is for HID. I installed an .inf file for the CDC device (a virtual COM port) with this string in the .inf file: USB\VID_****&PID_****&MI_00.
I then generated an .inf file for the HID device with inf-wizard.exe and altered the inf file by adding &MI_02 (since interface 2 is used) to the VID & PID string. (If I don't do this, windows doesn't manage to install the .inf file for the interface.)
If added libusb0.sys to c:\windows\system32\drivers and libusb0.dll to c:\windows\system32.
When I start testlibusb-win.exe I get this output:
DLL version: 0.1.12.1
Driver version: -1.-1.-1.-1
bus/device idVendor/idProduct
When I try to access my device with libusbjava I get this exception:
ch.ntb.usb.USBException: USB device with idVendor 0x208 and idProduct 0x1611 not found
However my device is shown in the device manager under LibUSB-Win32 Devices with Hardware id's: "USB\VID_0208&PID_1611&REV_0000&MI_02
" and "USB\VID_0208&PID_1611&MI_02"
I don't wish to use the filter driver since it will only be used for a specifice VID and PID.
Why isn't the driver installed?
PS: I'm using MS Windows Vista Business
Best regards,
RoDeNtJe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Update: If I install the .inf file generated with inf-wizard.exe for the complete device (so without specifying interface 2 for the device) I can communicate with the device. But I can't do so, because this way I loose my virtual COM port.
So I guess my problem is that the usblib library doesn't support accessing an interface of a composite device by directly specifying the desired interface in the .inf file. Is there a workaround or will this be implemented (soon?)?
Best regards,
RoDeNtJe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And I never get in the inner loop, so bus.getDevices returns null. Tracking this down a bit further, it seems that LibusbJava (the JNI class) returns 1 for LibusbJava.usb_find_busses() and 0 for LibusbJava.usb_find_devices(). So in short: it doesn't find my device...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Check the version of libusbJava.dll. The libusb0.dll and libusb0.sys versions are ok from my point of view.
About the interface problem: I'm not sure if libusb-win32 does support it or not or if there are any Windows limitation. I doubt that it is possible to install different drivers for different interfaces of the same device. The best place to ask is the libusb-win32 mailing list: http://sourceforge.net/projects/libusb-win32
Regards, Spandi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I made a composite CDC + HID device. Interface 0 and 1 is for CDC, interface 2 is for HID. I installed an .inf file for the CDC device (a virtual COM port) with this string in the .inf file: USB\VID_****&PID_****&MI_00.
I then generated an .inf file for the HID device with inf-wizard.exe and altered the inf file by adding &MI_02 (since interface 2 is used) to the VID & PID string. (If I don't do this, windows doesn't manage to install the .inf file for the interface.)
If added libusb0.sys to c:\windows\system32\drivers and libusb0.dll to c:\windows\system32.
When I start testlibusb-win.exe I get this output:
DLL version: 0.1.12.1
Driver version: -1.-1.-1.-1
bus/device idVendor/idProduct
When I try to access my device with libusbjava I get this exception:
ch.ntb.usb.USBException: USB device with idVendor 0x208 and idProduct 0x1611 not found
However my device is shown in the device manager under LibUSB-Win32 Devices with Hardware id's: "USB\VID_0208&PID_1611&REV_0000&MI_02
" and "USB\VID_0208&PID_1611&MI_02"
I don't wish to use the filter driver since it will only be used for a specifice VID and PID.
Why isn't the driver installed?
PS: I'm using MS Windows Vista Business
Best regards,
RoDeNtJe
Update: If I install the .inf file generated with inf-wizard.exe for the complete device (so without specifying interface 2 for the device) I can communicate with the device. But I can't do so, because this way I loose my virtual COM port.
So I guess my problem is that the usblib library doesn't support accessing an interface of a composite device by directly specifying the desired interface in the .inf file. Is there a workaround or will this be implemented (soon?)?
Best regards,
RoDeNtJe
Update: This method return null: initDevice() in Device.java
This loop executes only one time:
while (bus != null) {
device = bus.getDevices();
while (device != null) {
Usb_Device_Descriptor devDesc = device.getDescriptor();
if ((devDesc.getIdVendor() == idVendor)
&& (devDesc.getIdProduct() == idProduct)) {
logger.info("Device found: " + device.getFilename());
updateMaxPacketSize(device);
return device;
}
device = device.getNext();
}
bus = bus.getNext();
}
And I never get in the inner loop, so bus.getDevices returns null. Tracking this down a bit further, it seems that LibusbJava (the JNI class) returns 1 for LibusbJava.usb_find_busses() and 0 for LibusbJava.usb_find_devices(). So in short: it doesn't find my device...
Hi
Check the version of libusbJava.dll. The libusb0.dll and libusb0.sys versions are ok from my point of view.
About the interface problem: I'm not sure if libusb-win32 does support it or not or if there are any Windows limitation. I doubt that it is possible to install different drivers for different interfaces of the same device. The best place to ask is the libusb-win32 mailing list: http://sourceforge.net/projects/libusb-win32
Regards, Spandi