mirror of
https://github.com/whowechina/aic_pico.git
synced 2025-02-26 06:39:46 +01:00
Better pn532 error message
This commit is contained in:
parent
2c033a8ab3
commit
d6222d8b9b
@ -385,7 +385,10 @@ bool pn532_mifare_auth(const uint8_t uid[4], uint8_t block_id, uint8_t key_id, c
|
|||||||
}
|
}
|
||||||
int result = pn532_read_response(0x40, readbuf, sizeof(readbuf));
|
int result = pn532_read_response(0x40, readbuf, sizeof(readbuf));
|
||||||
if (readbuf[0] != 0) {
|
if (readbuf[0] != 0) {
|
||||||
printf("\nPN532 Mifare AUTH failed %d %02x", result, readbuf[0]);
|
printf("\nPN532 Mifare AUTH failed %d %02x key[%2x:%d]: ", result, readbuf[0], param[1], param[2]);
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
printf("%02x", key[i]);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user