diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index 4e75a26..00d127d 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -1802,11 +1802,13 @@ pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target *pnt) } 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"); // MFC - if (CHIP_DATA(pnd)->type == PN533) { -//TODO MFC Mini (atqa0004/sak09) fails on PN533 + if ((CHIP_DATA(pnd)->type == PN533) && (CHIP_DATA(pnd)->current_target->nti.nai.btSak != 0x09)) { + // MFC Mini (atqa0004/sak09) fails on PN533, so we exclude it ret = pn53x_Diagnose06(pnd); } else { - if ((ret = pn53x_initiator_select_passive_target_ext(pnd, CHIP_DATA(pnd)->current_target->nm, CHIP_DATA(pnd)->current_target->nti.nai.abtUid, CHIP_DATA(pnd)->current_target->nti.nai.szUidLen, NULL, 50)) == 1) { + // Limitation: re-select will lose authentication of already authenticated sector + // TODO: buggy when card is removed on Tikitag + if ((ret = pn53x_initiator_select_passive_target_ext(pnd, CHIP_DATA(pnd)->current_target->nm, CHIP_DATA(pnd)->current_target->nti.nai.abtUid, CHIP_DATA(pnd)->current_target->nti.nai.szUidLen, NULL, 300)) == 1) { ret = NFC_SUCCESS; } else if ((ret == 0) || (ret == NFC_ETIMEOUT)) { ret = NFC_ETGRELEASED;