Skip to content

Instantly share code, notes, and snippets.

@slow-is-fast
Created August 3, 2016 13:38
Show Gist options
  • Save slow-is-fast/e6b4b4cfc8eafc6fb530e7c4a792db29 to your computer and use it in GitHub Desktop.
Save slow-is-fast/e6b4b4cfc8eafc6fb530e7c4a792db29 to your computer and use it in GitHub Desktop.
python list connected usb device
import usb.core
dev = usb.core.find(find_all=1)
for cfg in dev:
print cfg.product
print ('Decimal VendorID=' + str(hex(cfg.idVendor)) + ' & ProductID=' + str(cfg.idProduct) + '\n')
print ('Hexadecimal VendorID=' + hex(cfg.idVendor) + ' & ProductID=' + hex(cfg.idProduct) + '\n\n')
@slow-is-fast
Copy link
Author

  • install pyusb
  • install libusb1.0.X

@josemariagarcia95
Copy link

josemariagarcia95 commented Feb 4, 2020

I'm getting "NoBackendError('No backend available')", what could that mean?

@ravikiranb36
Copy link

I'm getting "NoBackendError('No backend available')", what could that mean?

I am also getting same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment