mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-28 19:31:19 +08:00
thinfilm simulation when on battery
This commit is contained in:
parent
3dae748314
commit
61538bd635
2 changed files with 11 additions and 6 deletions
|
@ -136,13 +136,13 @@ void SimulateThinFilm(uint8_t *data, size_t len) {
|
|||
EmSendCmdThinfilmRaw(ToSend, ToSendMax);
|
||||
if (!reader_detected) {
|
||||
LED_B_ON();
|
||||
Dbprintf("Reader detected, start beaming data");
|
||||
//Dbprintf("Reader detected, start beaming data");
|
||||
reader_detected = true;
|
||||
}
|
||||
} else {
|
||||
if (reader_detected) {
|
||||
LED_B_OFF();
|
||||
Dbprintf("Reader gone, stop beaming data");
|
||||
//Dbprintf("Reader gone, stop beaming data");
|
||||
reader_detected = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -196,12 +196,17 @@ static int CmdHfThinFilmSim(const char *Cmd) {
|
|||
PacketResponseNG resp;
|
||||
PrintAndLogEx(SUCCESS, "press pm3-button to abort simulation");
|
||||
|
||||
while (!kbd_enter_pressed()) {
|
||||
if (WaitForResponseTimeout(CMD_HF_THINFILM_SIMULATE, &resp, 1500) == 0) continue;
|
||||
int ret;
|
||||
while (!(ret = kbd_enter_pressed())) {
|
||||
if (WaitForResponseTimeout(CMD_HF_THINFILM_SIMULATE, &resp, 500) == 0) continue;
|
||||
if (resp.status != PM3_SUCCESS) break;
|
||||
}
|
||||
|
||||
PrintAndLogEx(INFO, "Done");
|
||||
if (ret) {
|
||||
PrintAndLogEx(INFO, "Client side interrupted");
|
||||
PrintAndLogEx(WARNING, "Simulation still running on Proxmark3 till next command or button press");
|
||||
} else {
|
||||
PrintAndLogEx(INFO, "Done");
|
||||
}
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue