mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 18:13:46 +00:00
More attempt to support Sony S360 reader
Initialisation of RC-S360 in mode 0
Better generic nfc-list, does not rely only on DeSelect to avoid duplicates
Restore SetParameters for RC-S360
Handle Diagnose communication test properly
Tested:
- nfc-list => ok except for B' & 3B
- nfc-anticol => fails to send raw frames before select
- nfc-mfultralight => ok
- nfc-mfclassic => ok
- pn53x-tamashell => ok
- pn53x-diagnose => ok
- nfc-dep-initiator => ok
- nfc-dep-target => fails in InitAsTarget
- nfc-emulate-* => fails in InitAsTarget
Commands momentarily disabled for RC-S330:
- InDeselect
- InRelease
- select_passive_target for B'& 3B
This commit is contained in:
16
libnfc/nfc.c
16
libnfc/nfc.c
@@ -406,11 +406,21 @@ nfc_initiator_list_passive_targets (nfc_device_t * pnd,
|
||||
|
||||
while (nfc_initiator_select_passive_target (pnd, nm, pbtInitData, szInitDataLen, &nt)) {
|
||||
nfc_initiator_deselect_target (pnd);
|
||||
if (szTargets > szTargetFound) {
|
||||
memcpy (&(ant[szTargetFound]), &nt, sizeof (nfc_target_t));
|
||||
} else {
|
||||
if (szTargets == szTargetFound) {
|
||||
break;
|
||||
}
|
||||
int i;
|
||||
bool seen = false;
|
||||
// Check if we've already seen this tag
|
||||
for (i = 0; i < szTargetFound; i++) {
|
||||
if (memcmp(&(ant[i]), &nt, sizeof (nfc_target_t)) == 0) {
|
||||
seen = true;
|
||||
}
|
||||
}
|
||||
if (seen) {
|
||||
break;
|
||||
}
|
||||
memcpy (&(ant[szTargetFound]), &nt, sizeof (nfc_target_t));
|
||||
szTargetFound++;
|
||||
// deselect has no effect on FeliCa and Jewel cards so we'll stop after one...
|
||||
// ISO/IEC 14443 B' cards are polled at 100% probability so it's not possible to detect correctly two cards at the same time
|
||||
|
||||
Reference in New Issue
Block a user