[libnfc] push by yob...@gmail.com - nfc_initiator_target_is_present(): Fix MFC support on PN532 on 2014-01-31 21:33 GMT

3 views
Skip to first unread message

lib...@googlecode.com

unread,
Jan 31, 2014, 4:33:48 PM1/31/14
to libnfc-...@googlegroups.com
Revision: 71eda315c70c
Author: Philippe Teuwen <yob...@gmail.com>
Date: Fri Jan 31 21:33:05 2014 UTC
Log: nfc_initiator_target_is_present(): Fix MFC support on PN532

http://code.google.com/p/libnfc/source/detail?r=71eda315c70c

Modified:
/libnfc/chips/pn53x.c

=======================================
--- /libnfc/chips/pn53x.c Thu Jan 30 17:30:45 2014 UTC
+++ /libnfc/chips/pn53x.c Fri Jan 31 21:33:05 2014 UTC
@@ -1804,10 +1804,12 @@
ret = pn53x_Diagnose06(pnd);
} else {
// Limitation: re-select will lose authentication of already
authenticated sector
- // TODO: buggy when card is removed on Tikitag
+ // Limitation: NP_INFINITE_SELECT will be left as FALSE (we cannot
restore as we don't know what was the original state)
uint8_t pbtInitiatorData[12];
size_t szInitiatorData = 0;
iso14443_cascade_uid(CHIP_DATA(pnd)->current_target->nti.nai.abtUid,
CHIP_DATA(pnd)->current_target->nti.nai.szUidLen, pbtInitiatorData,
&szInitiatorData);
+ if ((ret = pn53x_set_property_bool(pnd, NP_INFINITE_SELECT, false)) <
0)
+ return ret;
if ((ret = pn53x_initiator_select_passive_target_ext(pnd,
CHIP_DATA(pnd)->current_target->nm, pbtInitiatorData, szInitiatorData,
NULL, 300)) == 1) {
ret = NFC_SUCCESS;
} else if ((ret == 0) || (ret == NFC_ETIMEOUT)) {
Reply all
Reply to author
Forward
0 new messages