From c190ac09553334e06b096034e9a0040237f2354b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 8 May 2019 11:14:29 +0200 Subject: [PATCH] Hide conn error when hw reset, as suggested by @iceman --- client/cmdhw.c | 1 + client/comms.c | 4 +++- client/flash.c | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/cmdhw.c b/client/cmdhw.c index b9b2f047e..b6bcfb5eb 100644 --- a/client/cmdhw.c +++ b/client/cmdhw.c @@ -400,6 +400,7 @@ static int CmdReset(const char *Cmd) { (void)Cmd; // Cmd is not used so far clearCommandBuffer(); SendCommandNG(CMD_HARDWARE_RESET, NULL, 0); + PrintAndLogEx(INFO, "Proxmark3 has been reset."); return PM3_SUCCESS; } diff --git a/client/comms.c b/client/comms.c index 11e8b25dc..e19c74dd7 100644 --- a/client/comms.c +++ b/client/comms.c @@ -330,7 +330,9 @@ __attribute__((force_align_arg_pointer)) // Signal to main thread that communications seems off. // main thread will kill and restart this thread. if (commfailed) { - PrintAndLogEx(WARNING, "Communicating with Proxmark3 device " _RED_("failed")); + if (conn.last_command != CMD_HARDWARE_RESET) { + PrintAndLogEx(WARNING, "Communicating with Proxmark3 device " _RED_("failed")); + } __atomic_test_and_set(&comm_thread_dead, __ATOMIC_SEQ_CST); break; } diff --git a/client/flash.c b/client/flash.c index 943b8c8b7..d9ffe1384 100644 --- a/client/flash.c +++ b/client/flash.c @@ -444,7 +444,6 @@ void flash_free(flash_file_t *ctx) { // just reset the unit int flash_stop_flashing(void) { - PrintAndLogEx(SUCCESS, _BLUE_("Resetting hardware...") "Subsequent communication error is " _BLUE_("normal")); SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, NULL, 0); msleep(100); return 0;