From 31cfc51c6d32ae1a6acbacede3b749dacc6cc940 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Tue, 27 Nov 2012 17:30:16 -0800 Subject: Increase default IsoDep timeout to 1200ms. An increasing number of IsoDep tags in the field requires more than 600ms to respond to initial NDEF commands. To make sure we can detect these tags properly, increase the default timeout for IsoDep to ~1200ms. Bug: 7600632 Change-Id: I690e2c1993b64c0f639423d5cf0c810f56ad1197 --- inc/phNfcConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/phNfcConfig.h b/inc/phNfcConfig.h index 6bc050c..955c26b 100644 --- a/inc/phNfcConfig.h +++ b/inc/phNfcConfig.h @@ -172,7 +172,7 @@ #ifndef NXP_ISO_XCHG_TIMEOUT -#define NXP_ISO_XCHG_TIMEOUT 0x1AU +#define NXP_ISO_XCHG_TIMEOUT 0x1BU #endif #ifndef NXP_MIFARE_XCHG_TIMEOUT -- cgit v1.1 From 35f614f9db6e01ed6d07eda5fba5d647839d50a3 Mon Sep 17 00:00:00 2001 From: Sunil Jogi Date: Mon, 24 Sep 2012 14:47:18 -0700 Subject: NDEF Type 3 tag reading with padding bytes NDEF Type 3 tag reading was not ignoring the padding bytes, which leads to failure of parsing the NDEF data. This patch fix that problem. Bug: 7600630 Change-Id: I45cf1841bdc343503a8a12d622ac8470c3e64ce4 --- src/phFriNfc_FelicaMap.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/phFriNfc_FelicaMap.c b/src/phFriNfc_FelicaMap.c index 8a810f9..39b98d9 100644 --- a/src/phFriNfc_FelicaMap.c +++ b/src/phFriNfc_FelicaMap.c @@ -631,6 +631,7 @@ static NFCSTATUS phFriNfc_Felica_HChkApduBuff_Size( phFriNfc_NdefMap_t *NdefMap) NFCSTATUS status = NFCSTATUS_PENDING; uint8_t ResetFlag = FALSE; uint32_t Nbc = 0; + uint32_t DataLen = 0; Nbc = phFriNfc_Felica_HGetMaximumBlksToRead(NdefMap,PH_NFCFRI_NDEFMAP_FELI_NBC); @@ -733,7 +734,18 @@ static NFCSTATUS phFriNfc_Felica_HChkApduBuff_Size( phFriNfc_NdefMap_t *NdefMap) } if ( ResetFlag == TRUE) { - *NdefMap->NumOfBytesRead = NdefMap->ApduBuffIndex; + PH_NFCFRI_NDEFMAP_FELI_CAL_LEN_BYTES(NdefMap->FelicaAttrInfo.LenBytes[0], + NdefMap->FelicaAttrInfo.LenBytes[1], + NdefMap->FelicaAttrInfo.LenBytes[2], + DataLen); + if (NdefMap->ApduBuffIndex > DataLen) + { + *NdefMap->NumOfBytesRead = DataLen; + } + else + { + *NdefMap->NumOfBytesRead = NdefMap->ApduBuffIndex; + } /*Reset the index, internal buffer counters back to zero*/ NdefMap->ApduBuffIndex = 0; NdefMap->Felica.Rd_NoBytesToCopy=0; -- cgit v1.1