From dd35afc886ba21e5f40c9e7bb278038ba5333ac1 Mon Sep 17 00:00:00 2001 From: Niel Nielsen Date: Fri, 4 Sep 2026 08:54:57 +0200 Subject: [PATCH] Update cmdhw.c Signed-off-by: Niel Nielsen --- client/src/cmdhw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index d3b034d32..a77e0f9cd 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -2308,7 +2308,6 @@ static void progressbar(long sent, long total, int style) { // (DEV.md 8.4): a dropped chunk can't be re-sent, so any failure here means the // caller must restart the whole thing. static int bwm_ota_once(const uint8_t *fw, size_t fwlen, uint32_t write_delay_ms) { - clearCommandBuffer(); PacketResponseNG resp; // BEGIN: tell the BWM how many bytes are coming (it erases the target partition) @@ -2330,6 +2329,7 @@ static int bwm_ota_once(const uint8_t *fw, size_t fwlen, uint32_t write_delay_ms return PM3_EMALLOC; } size_t sent = 0; + clearCommandBuffer(); while (sent < fwlen) { size_t n = MIN(maxchunk, fwlen - sent); buf[0] = BWM_OTA_ACTION_WRITE;