Skip to content

Commit

Permalink
usb: Better help text on failure to mode-switch a Greaseweazle device
Browse files Browse the repository at this point in the history
  • Loading branch information
keirf committed Dec 4, 2024
1 parent f0d43b7 commit 1c65c2a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/greaseweazle/tools/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,13 @@ def usb_reopen(usb, is_update):
# Win10 pyserial returns a short read which fails struct.unpack
pass
usb.ser.close()
s = '''\
Could not find the Greaseweazle device after switching firmware mode.
1. If you are connected via a USB hub, instead try connecting directly.
2. Firmware 1.7 and later fix an issue with some USB hubs.
a. Please try "gw update --bootloader" and "gw update"; and
b. Report the issue if it persists.'''
raise serial.SerialException(s)
for i in range(10):
time.sleep(0.5)
try:
Expand Down

0 comments on commit 1c65c2a

Please sign in to comment.