Fix issues for NTAG21x tags

- Change default tag from NTAG_213 to NTAG_UNKNOWN so unknown tags can
  be detected.  ntag_get_info() MUST be called after connect;
- Fix reuse function which used to reset all tag info;
- Introduce ntag21x error reporting through freefare_error(3);
This commit is contained in:
SloCompTech 2018-03-07 20:54:04 +01:00 committed by Romain Tartière
parent 75f08d3a85
commit c18f702840
10 changed files with 119 additions and 20 deletions

View file

@ -153,8 +153,8 @@ main(int argc, char *argv[])
}
}
break;
case 4: // Random UID
{} // Compilation fails if label is directly followed by the declaration rather than a statement
case 4: { // Random UID
} // Compilation fails if label is directly followed by the declaration rather than a statement
MifareDESFireKey key_picc = mifare_desfire_des_key_new_with_version(key_data_picc);
res = mifare_desfire_authenticate(tags[i], 0, key_picc);
if (res < 0) {