A
A
abovanaram2021-04-21 13:52:08
Python
abovanaram, 2021-04-21 13:52:08

What drivers should I install to make the PyUSB 1.0 library work?

I plan to use a USB connection to read data from the Davis Vantage PRO 2.
I use the following code

import usb.core
print(list(usb.core.find(find_all=True)))
import usb.util


dev = usb.core.find(idVendor=0x10c4, idProduct=0xea61)
ep = dev[0].interfaces()[0].endpoints()[0]
i = dev[0].interfaces()[0].bInterfaceNumber
dev.reset()

if dev.is_kernel_driver_active(i):
  dev.datach_kernel_driver(i)

dev.set_configuration()
eaddr = ep.bEndpointAddress

r = dev.read(eaddr, 1024)

print(r)


I get an error when starting:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\davis\main.py", line 18, in
if dev.is_kernel_driver_active(i):
File "C:\Users\ Administrator\Desktop\davis\venv\lib\site-packages\usb\core.py", line 1098, in is_kernel_driver_active
return self._ctx.backend.is_kernel_driver_active(
File "C:\Users\Administrator\Desktop\davis\venv\ lib\site-packages\usb\backend\libusb1.py", line 915, in is_kernel_driver_active
return bool(_check(self.lib.libusb_kernel_driver_active(dev_handle.handle,
File "C:\Users\Administrator\Desktop\davis\venv\ lib\site-packages\usb\backend\libusb1.py", line 600,in _check
raise NotImplementedError(_strerror(ret))
NotImplementedError: Operation not supported or unimplemented
on this

platform Installing USB drivers libusb-win32 (v1.2.6.0), libusbK (v3.0.7.0), WinUSB (v6.1.7600.16385) via ZADIG did not help. I have W10/64

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jourloy, 2021-04-22
@Jourloy

I had a similar error on Windows, try running it on linux (virtual, for example) with the necessary driver, it helped me.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question