summaryrefslogtreecommitdiffstats
path: root/src/phHciNfc_RFReader.c
diff options
context:
space:
mode:
authorMartijn Coenen <martijn.coenen@nxp.com>2010-11-02 08:53:36 -0600
committerNick Pelly <npelly@google.com>2010-11-02 12:13:11 -0500
commitfa199fc046cb0bc698d564daaba669a180b7c6f4 (patch)
treea1ebb605046b1d1b140490fa766d91e9b6f3cfe1 /src/phHciNfc_RFReader.c
parentc2866714540bec65af19240e95a10d3090df0cf9 (diff)
downloadexternal_libnfc-nxp-fa199fc046cb0bc698d564daaba669a180b7c6f4.zip
external_libnfc-nxp-fa199fc046cb0bc698d564daaba669a180b7c6f4.tar.gz
external_libnfc-nxp-fa199fc046cb0bc698d564daaba669a180b7c6f4.tar.bz2
Fixed ICODE and Felica presence checking.
For Felica, the wrong command was used. For ICODE (ISO15693), there was no check implemented at all Change-Id: I40b17feb8b9184cc3c2765cb5b32ea82ebec143b
Diffstat (limited to 'src/phHciNfc_RFReader.c')
-rw-r--r--src/phHciNfc_RFReader.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/phHciNfc_RFReader.c b/src/phHciNfc_RFReader.c
index cf124f3..e0aa2dc 100644
--- a/src/phHciNfc_RFReader.c
+++ b/src/phHciNfc_RFReader.c
@@ -1675,18 +1675,21 @@ phHciNfc_ReaderMgmt_Presence_Check(
&& (reader_pipe_id != HCI_UNKNOWN_PIPE_ID )
)
{
-#if 0
+ uint8_t cmd[11];
+ phHciNfc_Pipe_Info_t *p_pipe_info = NULL;
p_pipe_info = psHciContext->p_pipe_list[reader_pipe_id];
- p_pipe_info->param_info = ;
- p_pipe_info->param_length = ;
+ p_pipe_info->param_info = &cmd;
+ p_pipe_info->param_length = 11;
+ // masked inventory command:
+ // set #slots to 1 to use mask without padding,
+ // need to set inventory flag to enable setting #slots
+ cmd[0] = 0x04 | 0x20; // FLAG_INVENTORY | FLAG_SLOTS
+ cmd[1] = 0x01; // CMD_INVENTORY
+ cmd[2] = 64; // mask bit-length
+ memcpy(cmd + 3, &(psHciContext->p_target_info->RemoteDevInfo.Iso15693_Info.Uid), 8);
status = phHciNfc_Send_ISO15693_Command(
psHciContext, pHwRef
,reader_pipe_id, NXP_ISO15693_CMD );
-#else
- status = PHNFCSTVAL(CID_NFC_HCI,
- NFCSTATUS_FEATURE_NOT_SUPPORTED);
-
-#endif
}
break;