chg: turn off antenna when failed.

This commit is contained in:
iceman1001 2018-01-25 18:02:49 +01:00
commit f6b98acbf6

View file

@ -276,7 +276,7 @@ static void print_atqb_resp(uint8_t *data, uint8_t cid){
PrintAndLog(" Frame Options: CID is %ssupported",(data[6]&1) ? "" : "not "); PrintAndLog(" Frame Options: CID is %ssupported",(data[6]&1) ? "" : "not ");
PrintAndLog("Tag :"); PrintAndLog("Tag :");
PrintAndLog(" Max Buf Length: %u (MBLI) %s", cid>>4, (cid & 0xF0) ? "" : "chained frames not supported"); PrintAndLog(" Max Buf Length: %u (MBLI) %s", cid>>4, (cid & 0xF0) ? "" : "chained frames not supported");
PrintAndLog(" CDI : %u", cid & 0x0f); PrintAndLog(" CID : %u", cid & 0x0f);
return; return;
} }
@ -433,7 +433,6 @@ bool HF14BInfo(bool verbose){
// try unknown 14b read commands (to be identified later) // try unknown 14b read commands (to be identified later)
// could be read of calypso, CEPAS, moneo, or pico pass. // could be read of calypso, CEPAS, moneo, or pico pass.
if (verbose) PrintAndLog("no 14443B tag found"); if (verbose) PrintAndLog("no 14443B tag found");
return false; return false;
} }
@ -460,6 +459,7 @@ bool HF14B_ST_Reader(bool verbose){
UsbCommand resp; UsbCommand resp;
if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) { if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) {
if (verbose) PrintAndLog("timeout while waiting for reply."); if (verbose) PrintAndLog("timeout while waiting for reply.");
switch_off_field_14b();
return false; return false;
} }
@ -503,6 +503,7 @@ bool HF14B_Std_Reader(bool verbose){
if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) { if (!WaitForResponseTimeout(CMD_ACK, &resp, TIMEOUT)) {
if (verbose) PrintAndLog("timeout while waiting for reply."); if (verbose) PrintAndLog("timeout while waiting for reply.");
switch_off_field_14b();
return false; return false;
} }