22 Commits

Author SHA1 Message Date
Eric Callahan
399e50e121
flashtool: increase timeout for send block command
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-07-23 08:01:04 -04:00
Eric Callahan
bc1ecea7f7 flashtool: handle situation where software version is not reported
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-31 05:29:03 -04:00
Eric Callahan
418b43b0fa flashtool: usb bootloader request fix
Open the usb device with the O_NOCTTY flag.  This prevents
a SIGHUP signal from killing the flashtool process if the
bootloader request results in a hangup event.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-31 05:29:03 -04:00
Eric Callahan
291c5da31a
flashtool: can bridge uuid detection fix
Handle exceptions if the conversion from USB serial number
to uuid fails for can bridge devices.  Abort detection as the
can bridge device cannot be flashed in one step.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-15 10:59:29 -04:00
Eric Callahan
604b7e5a7d
flashtool: fix mcu_type decoding
SIgned-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-06 05:23:14 -05:00
Eric Callahan
28b873de75 flashtool: improve bootloader wait method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 16:35:33 -05:00
Eric Callahan
6c836fc898 flashtool: don't allow MCU mismatches
Raise a FlashError if Katapult's MCU does not match the
MCU detected in klipper.bin.  If a user wants to flash a  binary
built for a different they can rename klipper.bin, which will
bypass detection.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 06:19:44 -05:00
Eric Callahan
b22330e917 flashtool: support USB-CAN bridge detection
This enables single step flashing for Klipper devices
configured as a USB-CAN bridge.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 06:19:44 -05:00
Eric Callahan
40b22bdf6e flashtool: add support for status requests
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-04 16:44:30 -05:00
Eric Callahan
2005ca5b13 flashtool: prime usb connections with double buffering
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 15:02:21 -05:00
Eric Callahan
542b6a8519 flashtool: support usb/serial bootloader requests
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 15:02:21 -05:00
Eric Callahan
dd8b0a0c9a flashtool: add binary mcu detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 12:34:49 -05:00
Eric Callahan
a8de2feab7 flashtool: support busy acknowledgements
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 12:34:42 -05:00
Eric Callahan
90eb71b610
flashtool: fix CAN bootloader request
Introduce a delay before exiting when requesting the bootloader.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-09-09 10:55:30 -04:00
Eric Callahan
10abb2a086
flashtool: increase default read timeout
Signed-off-by:  Eric Callahan <arksine.code@gmail.com
2024-09-03 15:24:48 -04:00
Eric Callahan
730fde48ab flashtool: use recommended asyncio entry point
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-24 06:26:19 -04:00
Eric Callahan
7de954b916 flashtool: add serial device validation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-24 06:26:19 -04:00
Eric Callahan
4a1532ef24 flashcmd: add support for reporting software version
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-06 19:41:37 -04:00
Eric Callahan
3f28ae2641 flashtool: update stale can errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-06 19:41:37 -04:00
Eric Callahan
0601062acc
flashtool: add some delay after resetting CAN nodes
The previous UUID verification step introduce a delay that allowed
nodes time to reboot before a node ID was assigned.  Reintroduce a
1 second delay.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-10 18:17:37 -05:00
Eric Callahan
13b61caf58
flashtool: remove UUID verification step
When multiple nodes are on the network the UUID query
can result in transmit errors, as multiple nodes with the
same ID will attempt to respond.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-08-28 06:23:38 -04:00
Eric Callahan
4527de65b9
flashtool: rename from flash_can.py
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-31 05:55:20 -04:00