Don't track RP2040 no_flash serial number when rebooting The RP2040 USB serial number is all EEs when running a no_flash binary, which will then change once booted into bootsel mode, so don't track it for the reboot Fixes #144
diff --git a/main.cpp b/main.cpp index de16e53..876bf27 100644 --- a/main.cpp +++ b/main.cpp
@@ -7646,8 +7646,11 @@ libusb_get_device_descriptor(to_reboot, &desc); char ser_str[128]; libusb_get_string_descriptor_ascii(to_reboot_handle, desc.iSerialNumber, (unsigned char*)ser_str, sizeof(ser_str)); - settings.ser = ser_str; - fos << "Tracking device serial number " << ser_str << " for reboot\n"; + if (strcmp(ser_str, "EEEEEEEEEEEEEEEE") != 0) { + // don't store EEs serial number, as that is an RP2040 running a no_flash binary + settings.ser = ser_str; + fos << "Tracking device serial number " << ser_str << " for reboot\n"; + } } reboot_device(to_reboot, to_reboot_handle, true, 1);