From 0c2c1494908916ce776f1eb047947329e9887049 Mon Sep 17 00:00:00 2001 From: Shreyansh Chandak Date: Thu, 2 Apr 2020 22:42:03 +0530 Subject: [PATCH] Fixing libusb busy error (#174) Detaching all kernels before attempting to claim the usb --- python/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/__init__.py b/python/__init__.py index 8e87aaddfdd9a4..2865a7021750c9 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -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