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>
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>
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>
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>
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>