1
0
mirror of https://github.com/whowechina/aic_pico.git synced 2024-11-28 07:20:49 +01:00

Better pn532 error message

This commit is contained in:
whowechina 2024-04-24 17:48:56 +08:00
parent 2c033a8ab3
commit d6222d8b9b

View File

@ -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));
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 true;