Xiaofan Chen wrote: > > Yes I think you need to detach the kernel HID driver. > > For pyusb, I think you can use detach_kernel_driver(). > http://pyusb.svn.sourceforge.net/viewvc/pyusb/trunk/usb/core.py?revision=61&view=markup > > 679 def detach_kernel_driver(self, interface): > 680 r"""Detach a kernel driver. > 681 > 682 If successful, you will then be able to perform I/O. > 683 """ > 684 self._ctx.managed_open() > 685 self._ctx.backend.detach_kernel_driver(self._ctx.handle, > interface) >
This was what was needed, but my python-fu was far to weak to work out how to convert that code into what to actually call from my code. http://www.arcfn.com/2010/04/usb-panic-button-with-linux-and-python.html had the example I needed, and it's now been updated in my code. With the libusb-1.0 windows backend, detaching or not detaching doesn't seem to have any impact, at least, not for this device. Cheers, Karl P ------------------------------------------------------------------------------ _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users