From f10cc4a3aeedfbf88a642148e1d7cf0af70089da Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 29 Aug 2017 14:37:09 +0200 Subject: [PATCH] FIX: 'hf 14a reader' - set timeout for waiting on response for inital call. This will enable the command not to get "stuck" --- client/cmdhf14a.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index 5c7c2c2ef..52806141e 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -172,7 +172,10 @@ int CmdHF14AReader(const char *Cmd) { clearCommandBuffer(); SendCommand(&c); UsbCommand resp; - WaitForResponse(CMD_ACK, &resp); + if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) { + if (Cmd[0] != 's') PrintAndLog("iso14443a card select failed"); + return 0; + } iso14a_card_select_t card; memcpy(&card, (iso14a_card_select_t *)resp.d.asBytes, sizeof(iso14a_card_select_t));