FIX: 'hf 14a reader' - set timeout for waiting on response for inital call. This will enable the command not to get "stuck"

This commit is contained in:
iceman1001 2017-08-29 14:37:09 +02:00
parent d6a157462c
commit f10cc4a3ae

View file

@ -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));