mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
fix 'lf cmdread' - better messaging
This commit is contained in:
parent
6a83a7dc1a
commit
aeab10d67f
1 changed files with 15 additions and 7 deletions
|
@ -297,21 +297,29 @@ int CmdLFCommandRead(const char *Cmd) {
|
||||||
SendCommandNG(CMD_LF_MOD_THEN_ACQ_RAW_ADC, (uint8_t *)&payload, 8 + datalen);
|
SendCommandNG(CMD_LF_MOD_THEN_ACQ_RAW_ADC, (uint8_t *)&payload, 8 + datalen);
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
PacketResponseNG resp;
|
||||||
|
|
||||||
uint8_t i = 10;
|
uint8_t i = 10;
|
||||||
while (!WaitForResponseTimeout(CMD_LF_MOD_THEN_ACQ_RAW_ADC, NULL, 2000) && i != 0) {
|
while (!WaitForResponseTimeout(CMD_LF_MOD_THEN_ACQ_RAW_ADC, &resp, 2000) && i != 0) {
|
||||||
printf(".");
|
printf(".");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (i) {
|
if (resp.status == PM3_SUCCESS) {
|
||||||
PrintAndLogEx(SUCCESS, "Downloading response signal data");
|
if (i) {
|
||||||
getSamples(0, true);
|
PrintAndLogEx(SUCCESS, "Downloading response signal data");
|
||||||
return PM3_SUCCESS;
|
getSamples(0, true);
|
||||||
|
return PM3_SUCCESS;
|
||||||
|
} else {
|
||||||
|
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||||
|
return PM3_ETIMEOUT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
PrintAndLogEx(WARNING, "Command failed.");
|
||||||
return PM3_ETIMEOUT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdFlexdemod(const char *Cmd) {
|
int CmdFlexdemod(const char *Cmd) {
|
||||||
|
|
Loading…
Reference in a new issue