mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
make sure magic wipe cmd gets 2000ms timeout
This commit is contained in:
parent
b751354ea2
commit
289f1c234c
1 changed files with 7 additions and 0 deletions
|
@ -2063,12 +2063,19 @@ void MifareCSetBlock(uint32_t arg0, uint32_t arg1, uint8_t *datain) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t old_timeout = iso14a_get_timeout();
|
||||||
|
|
||||||
|
// 2000 ms timeout
|
||||||
|
// 13560000 / 1000 / (8 * 16) * timeout
|
||||||
|
iso14a_set_timeout(21190);
|
||||||
|
|
||||||
ReaderTransmit(wipeC, sizeof(wipeC), NULL);
|
ReaderTransmit(wipeC, sizeof(wipeC), NULL);
|
||||||
if (!ReaderReceive(receivedAnswer, receivedAnswerPar) || (receivedAnswer[0] != 0x0a)) {
|
if (!ReaderReceive(receivedAnswer, receivedAnswerPar) || (receivedAnswer[0] != 0x0a)) {
|
||||||
if (DBGLEVEL >= DBG_ERROR) Dbprintf("wipeC error");
|
if (DBGLEVEL >= DBG_ERROR) Dbprintf("wipeC error");
|
||||||
errormsg = MAGIC_WIPE;
|
errormsg = MAGIC_WIPE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
iso14a_set_timeout(old_timeout);
|
||||||
|
|
||||||
mifare_classic_halt_ex(NULL);
|
mifare_classic_halt_ex(NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue