Skip to content

Commit

Permalink
Fixing libusb busy error (#174)
Browse files Browse the repository at this point in the history
Detaching all kernels before attempting to claim the usb
  • Loading branch information
shreyansh073 authored Apr 2, 2020
1 parent 753c42c commit 0c2c149
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def connect(self, claim=True, wait=False):
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
Expand Down

0 comments on commit 0c2c149

Please sign in to comment.