mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
add timeout error
This commit is contained in:
parent
89c19fce9c
commit
ac970064d3
2 changed files with 6 additions and 3 deletions
|
@ -7465,6 +7465,9 @@ static int CmdHF14AGen4Info(const char *cmd) {
|
||||||
size_t resplen = 0;
|
size_t resplen = 0;
|
||||||
int res = mfG4GetConfig(pwd, resp, &resplen, verbose);
|
int res = mfG4GetConfig(pwd, resp, &resplen, verbose);
|
||||||
if (res != PM3_SUCCESS || resplen == 0) {
|
if (res != PM3_SUCCESS || resplen == 0) {
|
||||||
|
if (res == PM3_ETIMEOUT)
|
||||||
|
PrintAndLogEx(ERR, "No card in the field or card command timeout.");
|
||||||
|
else
|
||||||
PrintAndLogEx(ERR, "Error get config. Maybe not a Gen4 card?. error=%d rlen=%d", res, resplen);
|
PrintAndLogEx(ERR, "Error get config. Maybe not a Gen4 card?. error=%d rlen=%d", res, resplen);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1257,7 +1257,7 @@ int mfG4GetConfig(uint8_t *pwd, uint8_t *data, size_t *datalen, bool verbose) {
|
||||||
|
|
||||||
int res = mfG4ExCommand(GEN4_CMD_DUMP_CONFIG, pwd, NULL, 0, resp, &resplen, verbose);
|
int res = mfG4ExCommand(GEN4_CMD_DUMP_CONFIG, pwd, NULL, 0, resp, &resplen, verbose);
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
return PM3_EUNDEF;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data != NULL)
|
if (data != NULL)
|
||||||
|
@ -1275,7 +1275,7 @@ int mfG4GetFactoryTest(uint8_t *pwd, uint8_t *data, size_t *datalen, bool verbos
|
||||||
|
|
||||||
int res = mfG4ExCommand(GEN4_CMD_FACTORY_TEST, pwd, NULL, 0, resp, &resplen, verbose);
|
int res = mfG4ExCommand(GEN4_CMD_FACTORY_TEST, pwd, NULL, 0, resp, &resplen, verbose);
|
||||||
if (res != PM3_SUCCESS) {
|
if (res != PM3_SUCCESS) {
|
||||||
return PM3_EUNDEF;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data != NULL)
|
if (data != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue