Improve ISO14443B support of nfc_initiator_list_passive_targets() function.

This commit is contained in:
Romuald Conty 2010-08-18 13:10:21 +00:00
parent 3dd2257b57
commit 5c206b7815

View file

@ -528,8 +528,15 @@ nfc_initiator_list_passive_targets(nfc_device_t* pnd, const nfc_modulation_t nmI
// Let the reader only try once to find a target
nfc_configure (pnd, NDO_INFINITE_SELECT, false);
byte_t* pbtInitData = NULL;
size_t szInitDataLen = 0;
while (nfc_initiator_select_passive_target (pnd, nmInitModulation, NULL, 0, &nti)) {
if(nmInitModulation == NM_ISO14443B_106) {
// Application Family Identifier (AFI) must equals 0x00 in order to wakeup all ISO14443-B PICCs (see ISO/IEC 14443-3)
pbtInitData = (byte_t*)"\x00";
szInitDataLen = 1;
}
while (nfc_initiator_select_passive_target (pnd, nmInitModulation, pbtInitData, szInitDataLen, &nti)) {
nfc_initiator_deselect_target(pnd);
if(szTargets > szTargetFound) {