call detach_kernel_driver to make endpoints available for raw read/write

This commit is contained in:
Pavol Rusnak 2011-04-05 15:17:49 +02:00
parent c43e3a3bda
commit a690b0b8f1
2 changed files with 3 additions and 0 deletions

View file

@ -11,6 +11,7 @@ class Device:
usbdev = usb.core.find(idVendor = self.VENDORID, idProduct = self.PRODUCTID)
if usbdev == None:
raise Exception('EduBRM device not found')
usbdev.detach_kernel_driver(0)
usbdev.set_configuration()
self.epo = usb.util.find_descriptor(usbdev.get_interface_altsetting(),
custom_match = lambda e: \