nfc_initiator_transceive_bytes() returns NFC_EMFCAUTHFAIL when AUTH command failed on a Mifare Classic
This commit is contained in:
parent
3629219a3b
commit
9f90a04a84
4 changed files with 8 additions and 6 deletions
|
|
@ -285,15 +285,12 @@ pn53x_transceive(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx
|
|||
break;
|
||||
case EMFAUTH:
|
||||
// When a MIFARE Classic AUTH fails, the tag is automatically in HALT state
|
||||
res = NFC_ETGRELEASED;
|
||||
res = NFC_EMFCAUTHFAIL;
|
||||
break;
|
||||
default:
|
||||
res = NFC_ECHIP;
|
||||
break;
|
||||
};
|
||||
/*
|
||||
{ EMFAUTH, "Mifare Authentication Error" },
|
||||
*/
|
||||
|
||||
if (res < 0) {
|
||||
pnd->last_error = res;
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ nfc_initiator_deselect_target(nfc_device *pnd)
|
|||
*
|
||||
* @warning The configuration option \a NP_HANDLE_PARITY must be set to \c true (the default value).
|
||||
*
|
||||
* @note When used with MIFARE Classic, NFC_ETGRELEASED error is returned if authentication command failed. You need to re-select the tag to operate with.
|
||||
* @note When used with MIFARE Classic, NFC_EMFCAUTHFAIL error is returned if authentication command failed. You need to re-select the tag to operate with.
|
||||
*
|
||||
*/
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue