From 97ffda519d438861f34d6de511f9025656470af6 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 6 Jun 2011 11:13:10 +0200 Subject: Add support for connecting to NfcA on IsoDep tags. Always add a ISO14443-3A device handle for tags that are found through the A-gate. This allows the upper stack to connect and maintain a connection to the NfcA technology, even if the tag has IsoDep on top of NfcA. The reason this can work is that libnfc does do the IsoDep activation in software, and if the NfcA target is on a separate handle this activation will not take place if you connect to this handle. Bug: 4195403 Change-Id: I00015e74bdadc6666c2971f8102244670a76e340 --- src/phHal4Nfc_ADD.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/phHal4Nfc_ADD.c') diff --git a/src/phHal4Nfc_ADD.c b/src/phHal4Nfc_ADD.c index 0be1670..5751219 100644 --- a/src/phHal4Nfc_ADD.c +++ b/src/phHal4Nfc_ADD.c @@ -489,17 +489,13 @@ void phHal4Nfc_TargetDiscoveryComplete( psRemoteDevInfo->RemoteDevInfo.Iso14443A_Info.UidLength)) { aRemoteDevTypes[Count] = phHal_eMifare_PICC; - + Count++; } - else/*TYPE 3A*/ - { - aRemoteDevTypes[Count] = phHal_eISO14443_3A_PICC; - } - Count++; } - else if ( !(Sak & ISO_14443_BITMASK) && - !(Sak & NFCIP_BITMASK) && (0 == Count)) + if ( !(Sak & NFCIP_BITMASK) ) { + // Always add a separate 3A target on a separate + // handle, so the upper layers can connect to it. aRemoteDevTypes[Count] = phHal_eISO14443_3A_PICC; Count++; } -- cgit v1.1