From 35ea8e745e666d3ca4dc6995108aaccd2a7d07b8 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 29 Apr 2019 22:39:42 +0200 Subject: [PATCH] Faster CmdHF14AMfChk --- client/cmdhfmf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 45be7c2bc..abd754708 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1938,6 +1938,8 @@ static int CmdHF14AMfChk(const char *Cmd) { // time uint64_t t1 = msclock(); + // fast push mode + conn.block_after_ACK = true; // check keys. for (trgKeyType = (keyType == 2) ? 0 : keyType; trgKeyType < 2; (keyType == 2) ? (++trgKeyType) : (trgKeyType = 2)) { @@ -2011,6 +2013,10 @@ static int CmdHF14AMfChk(const char *Cmd) { } out: + // Disable fast mode and send a dummy command to make it effective + conn.block_after_ACK = false; + SendCommandMIX(CMD_PING, 0, 0, 0, NULL, 0); + WaitForResponseTimeout(CMD_ACK, NULL, 1000); //print keys printKeyTable(SectorsCnt, e_sector);