mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
hw tune: block client till button pressed
This commit is contained in:
parent
2ec05efa3a
commit
f33d0bf206
2 changed files with 12 additions and 3 deletions
|
@ -319,7 +319,9 @@ void MeasureAntennaTuningHf(void) {
|
||||||
DbprintfEx(FLAG_INPLACE, "%u mV / %5u V", volt, (uint16_t)(volt / 1000));
|
DbprintfEx(FLAG_INPLACE, "%u mV / %5u V", volt, (uint16_t)(volt / 1000));
|
||||||
}
|
}
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||||
Dbprintf("\n[+] cancelled", 1);
|
DbprintfEx(FLAG_NEWLINE, "");
|
||||||
|
Dbprintf("[+] cancelled", 1);
|
||||||
|
reply_ng(CMD_MEASURE_ANTENNA_TUNING_HF, PM3_EOPABORTED, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadMem(int addr) {
|
void ReadMem(int addr) {
|
||||||
|
|
|
@ -85,8 +85,15 @@ int CmdHFTune(const char *Cmd) {
|
||||||
(void)Cmd; // Cmd is not used so far
|
(void)Cmd; // Cmd is not used so far
|
||||||
PrintAndLogEx(SUCCESS, "Measuring HF antenna, press button to exit");
|
PrintAndLogEx(SUCCESS, "Measuring HF antenna, press button to exit");
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandOLD(CMD_MEASURE_ANTENNA_TUNING_HF, 0, 0, 0, NULL, 0);
|
SendCommandNG(CMD_MEASURE_ANTENNA_TUNING_HF, NULL, 0);
|
||||||
return 0;
|
PacketResponseNG resp;
|
||||||
|
if (!WaitForResponseTimeout(CMD_MEASURE_ANTENNA_TUNING_HF, &resp, 1000)) {
|
||||||
|
PrintAndLogEx(WARNING, "Timeout while waiting for Proxmark HF measure, aborting");
|
||||||
|
return PM3_ETIMEOUT;
|
||||||
|
}
|
||||||
|
if (resp.status!=PM3_EOPABORTED)
|
||||||
|
return resp.status;
|
||||||
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdHFSniff(const char *Cmd) {
|
int CmdHFSniff(const char *Cmd) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue