(libusb) Fail to open USB device on Windows XP

Dear all,

While I use libusb-0.1.3-x86-mingw32 on Windows XP with the following
code


require “libusb”
usb = LIBUSB::Context.new
device = usb.devices(:idVendor => 0x058f, :idProduct => 0x6387).first
handle = device.open


I always get

‘raise_error’: LIBUSB::ERROR_NOT_SUPPORTED in libusb_open

In the code for ‘open’ (libusb.rb), it’s written

You need proper access permissions on:
Linux: /dev/bus/usb//

Here are my questions:

  1. Does my ‘fail to open’ comes from wrong access permission?
  2. How can I solve this problem on Windows XP?

BR
Emmanuel

Can anybody kindly help me on this issue?
Please. Please. Please.
Thanks. Thanks. Thanks.

Hi,

2012/3/30 Huang E. [email protected]


Here are my questions:

  1. Does my ‘fail to open’ comes from wrong access permission?
  2. How can I solve this problem on Windows XP?

BR
Emmanuel

According to the README.rdoc of libsub,
In contrast to Linux, any access to an USB device by LIBUSB on Windows
requires a proper driver installed in the system. Fortunately creating
such
a driver is quite easy with
Zadighttp://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Main_Page.
Select the interesting USB device and press “Install Driver”. That’s it.
You may take the generated output directory with it’s INI-file and use
it
for driver installation on other 32 or 64 bit Windows systems

I installed Zadig at

After some trial and error, I could open usb device with device.open on
Windows XP.

I guess you can get more reliable answer if you submit an issue on the
libusb github (Issues · larskanis/libusb · GitHub)

Regards,

Park H.

OK, I’ve added a hint for Windows to Device#open in

.

Dear Park,
After following you guidance, I can open usb device without error now.
Thank you very much.
Without your help, I can not make it.

BR
Emmanuel