PyUSB Can't Find Device but Driver is Installed

Hilal Kesim Source

The device I am trying to find using PyUSB is a programmable water pump.

To find it, I have been using this code (found on https://www.orangecoat.com/how-to/use-pyusb-to-find-vendor-and-product-ids-for-usb-devices):

#!/usr/bin/python
import sys
import usb.core
# find USB devices
dev = usb.core.find(find_all=True)
# loop through devices, printing vendor and product ids in decimal and hex
for cfg in dev:
  sys.stdout.write('Decimal VendorID=' + str(cfg.idVendor) + ' & ProductID=' + str(cfg.idProduct) + '\n')
  sys.stdout.write('Hexadecimal VendorID=' + hex(cfg.idVendor) + ' & ProductID=' + hex(cfg.idProduct) + '\n\n')

Running this returns nothing. When I use Zadig to see if a driver is installed, it says that there is a driver already installed for my device. I have tried reinstalling the driver using Zadig and using libusb to install a driver and none of those has solved my issue.

Any advice to get PyUSB to find my device would be appreciated!

python-3.xusblibusbpyusb

Answers

comments powered by Disqus