nfc_initiator_target_is_present(): support MFUL on PN532 too
This commit is contained in:
parent
7b5ab23452
commit
94f4e001f4
1 changed files with 8 additions and 2 deletions
|
@ -1788,10 +1788,16 @@ pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target *pnt)
|
||||||
(CHIP_DATA(pnd)->current_target->nti.nai.btSak == 0x00)) {
|
(CHIP_DATA(pnd)->current_target->nti.nai.btSak == 0x00)) {
|
||||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping MFUL");
|
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping MFUL");
|
||||||
// MFUL
|
// MFUL
|
||||||
|
// Limitation: test on MFULC non-authenticated with read of first sector forbidden will fail
|
||||||
if (CHIP_DATA(pnd)->type == PN533) {
|
if (CHIP_DATA(pnd)->type == PN533) {
|
||||||
ret = pn53x_Diagnose06(pnd);
|
ret = pn53x_Diagnose06(pnd);
|
||||||
} else {
|
} else {
|
||||||
ret = NFC_EDEVNOTSUPP;
|
uint8_t abtCmd[2] = {0x30, 0x00};
|
||||||
|
if (nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1) > 0) {
|
||||||
|
ret = NFC_SUCCESS;
|
||||||
|
} else {
|
||||||
|
ret = NFC_ETGRELEASED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (CHIP_DATA(pnd)->current_target->nti.nai.btSak & 0x08) {
|
} else if (CHIP_DATA(pnd)->current_target->nti.nai.btSak & 0x08) {
|
||||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping MFC");
|
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping MFC");
|
||||||
|
|
Loading…
Add table
Reference in a new issue