pyusb: NotImplementedError: Operation not supported or unimplemented on this platform

102 views Asked by At

using this example:

import usb.core
import usb.util
import usb.control

usbdev = usb.core.find(idVendor=0x0461, idProduct=0x4d22)   #some mouse
x = usbdev.reset()
x = usb.control.get_descriptor(usbdev, 1024, 1, 1)

This works with a mouse or keyboard, but not any other device I have tried. Not a flash drive, hub, camera, DVD drive, or serial port. If I use:

usbdev = usb.core.find(idVendor=0x05e3, idProduct=0x0610)   #Targus hub

The error generated from both reset and get_descriptor is:

NotImplementedError: Operation not supported or unimplemented on this platform

the traceback shows the error generated in libusb1.py at the line:

    _check(_lib.libusb_open(self.devid, byref(self.handle)))

and libusb_open appears to call into a dll in _libusb.py like this:

open  = CFUNC(ct.c_int,  # noqa: A001
              ct.POINTER(device),
              ct.POINTER(ct.POINTER(device_handle)))(
              ("libusb_open", dll), (
              (1, "dev"),
              (1, "dev_handle")))

I want to be able to use: ctrl_transfer, to control a hub, but it generates the same error. Why does this work for a mouse or keyboard, but not for other devices?

0

There are 0 answers