Pyusb on Windows 7 cannot find any devices

So I installed Pyusb 1.0.0-alpha-1
On Windows, I cannot get any pens for USB devices.

>>> import usb.core >>> print usb.core.find() None 

I have 1 USB device connected (idVendor = 0x04d8, idProduct = 0x0042) and I tried usb.core.find(idVendor=0x04d8, idProduct=0x0042) , but that also failed.

In Ubuntu with the same versions of pyusb and python (2.6), I can successfully find my device with this code and contact it.

So, how can I get pyusb to search for usb devices in Windows 7?

+4
source share
2 answers

Libusb requires the installation of a special driver for each device with which you want to use it. Usually, you need to write an .inf file containing the identifiers of the USB device. Only if the driver and inf file are installed, libusb will be able to "see" your device.

+4
source

See Turbo J Answer . To install the USB libusb driver for your device, I found two options:

  • Use libusb-win32 inf-wizard.exe to create the INF file, and then use install-filter-win.exe to install libusb as a driver for your device.

  • Use zadig (easier)

    • If the device does not appear, select Options> List all devices.
    • select libusb-win32 as the driver to install.
0
source

Source: https://habr.com/ru/post/1344702/


All Articles