mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-11-04 02:42:58 +00:00
Bootloader memory-dump cleanup sends CMD_PING to wake the communication thread after clearing its run flag. The thread can be waiting for another transmit after the dump ACK, so it sends this command before exiting. The non-BWM bootrom does not handle CMD_PING: its default dispatch enters Fatal(), leaving the device unresponsive even though the dump succeeded. Use CMD_DEVICE_INFO for the wakeup instead. It is already supported by the bootloader and used to identify it before the dump. Keep the wakeup so closing the client does not leave the communication thread waiting. Reproduced on PM5: the dump completed, but the following reset and device probe failed. With only the rebuilt client changed, the same test script passed five OS-to-bootloader, memory-dump and reset-to-OS cycles, with a successful ping after each. No firmware was flashed for this comparison. Built the client with AppleClang through Make, CMake and experimental_lib; client/check passed. GCC 16 compiled the changed translation unit with -Wall -Werror. Existing macOS linker warnings remain. The full GCC host build was not repeated because of the previously observed Apple SDK alignment error. Linux and Windows were not tested; this change replaces an existing protocol command without changing platform-specific code.