list_passive_targets: fixed for TypeB on LoGO
This commit is contained in:
parent
9231f47123
commit
f2cb0eaa6e
1 changed files with 7 additions and 1 deletions
|
@ -390,6 +390,12 @@ nfc_initiator_list_passive_targets (nfc_device_t * pnd,
|
||||||
while (nfc_initiator_select_passive_target (pnd, nm, pbtInitData, szInitDataLen, &nt)) {
|
while (nfc_initiator_select_passive_target (pnd, nm, pbtInitData, szInitDataLen, &nt)) {
|
||||||
nfc_initiator_deselect_target (pnd);
|
nfc_initiator_deselect_target (pnd);
|
||||||
|
|
||||||
|
// some readers have to reset the RF field (e.g. LoGO) so we stop if we see more than once the same tag
|
||||||
|
if (nm.nmt == NMT_ISO14443B && szTargetFound >= 1) {
|
||||||
|
if (0 == memcmp(nt.nti.nbi.abtPupi, ant[0].nti.nbi.abtPupi, sizeof (nt.nti.nbi.abtPupi))) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (szTargets > szTargetFound) {
|
if (szTargets > szTargetFound) {
|
||||||
memcpy (&(ant[szTargetFound]), &nt, sizeof (nfc_target_t));
|
memcpy (&(ant[szTargetFound]), &nt, sizeof (nfc_target_t));
|
||||||
} else {
|
} else {
|
||||||
|
@ -398,7 +404,7 @@ nfc_initiator_list_passive_targets (nfc_device_t * pnd,
|
||||||
szTargetFound++;
|
szTargetFound++;
|
||||||
// deselect has no effect on FeliCa and Jewel cards so we'll stop after one...
|
// deselect has no effect on FeliCa and Jewel cards so we'll stop after one...
|
||||||
if ((nm.nmt == NMT_FELICA) || (nm.nmt == NMT_JEWEL)) {
|
if ((nm.nmt == NMT_FELICA) || (nm.nmt == NMT_JEWEL)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*pszTargetFound = szTargetFound;
|
*pszTargetFound = szTargetFound;
|
||||||
|
|
Loading…
Add table
Reference in a new issue