From 2feb6b0b2879619491041dc10a824f18776e8519 Mon Sep 17 00:00:00 2001 From: comma Date: Fri, 28 Aug 2026 09:19:27 +0800 Subject: [PATCH] usb.py: no trailing GETSTATUS in DFU jump --- panda/board/obj/gitversion.h | 2 +- panda/board/obj/version | 2 +- panda/python/usb.py | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index cc5a10c04..bff2c4a8b 100644 --- a/panda/board/obj/gitversion.h +++ b/panda/board/obj/gitversion.h @@ -1,2 +1,2 @@ extern const uint8_t gitversion[19]; -const uint8_t gitversion[19] = "DEV-51b00e51-DEBUG"; +const uint8_t gitversion[19] = "DEV-542603ec-DEBUG"; diff --git a/panda/board/obj/version b/panda/board/obj/version index 9f0b6cc4e..7a6b359e6 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-51b00e51-DEBUG \ No newline at end of file +DEV-542603ec-DEBUG \ No newline at end of file diff --git a/panda/python/usb.py b/panda/python/usb.py index 0a012896b..dbcb09a7f 100644 --- a/panda/python/usb.py +++ b/panda/python/usb.py @@ -91,8 +91,7 @@ class STBootloaderUSBHandle(BaseSTBootloaderHandle): def jump(self, address): self._libusb_handle.controlWrite(0x21, self.DFU_DNLOAD, 0, 0, b"\x21" + struct.pack("I", address)) self._status() - try: - self._libusb_handle.controlWrite(0x21, self.DFU_DNLOAD, 2, 0, b"") - _ = str(self._libusb_handle.controlRead(0x21, self.DFU_GETSTATUS, 0, 0, 6)) - except Exception: - pass + # NOTE: no trailing GETSTATUS after the Go. The read would block for the + # 15s timeout and then hit the freshly booted app over USB without claiming + # the interface, which disconnects it. + self._libusb_handle.controlWrite(0x21, self.DFU_DNLOAD, 2, 0, b"")