Fixing libusb busy error (#174)

Detaching all kernels before attempting to claim the usb
master
Shreyansh Chandak 2020-04-02 22:42:03 +05:30 committed by GitHub
parent 753c42cf56
commit 0c2c149490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@ class Panda(object):
self.bootstub = device.getProductID() == 0xddee
self.legacy = (device.getbcdDevice() != 0x2300)
self._handle = device.open()
self._handle.setAutoDetachKernelDriver(True)
if claim:
self._handle.claimInterface(0)
#self._handle.setInterfaceAltSetting(0, 0) #Issue in USB stack