From 601cb0fe0009c02a85b0c98c5649b92ea5e34c1b Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 21 Jan 2019 22:04:44 +0100 Subject: [PATCH] chg: 'hf legic dump' - longer timeout --- client/cmdhflegic.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index 0f580da9f..c1677d00a 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -899,10 +899,17 @@ int CmdLegicDump(const char *Cmd){ clearCommandBuffer(); SendCommand(&c); UsbCommand resp; - if (!WaitForResponseTimeout(CMD_ACK, &resp, 3000)) { - PrintAndLogEx(WARNING, "Command execute time-out"); - return 1; - } + + uint8_t timeout = 0; + while (!WaitForResponseTimeout(CMD_ACK, &resp, 2000)) { + ++timeout; + printf("."); fflush(stdout); + if (timeout > 7) { + PrintAndLogEx(WARNING, "\ncommand execution time out"); + return 1; + } + } + PrintAndLogEx(NORMAL, "\n"); uint8_t isOK = resp.arg[0] & 0xFF; if ( !isOK ) {