Doc ID022016 Rev 4
41/47
AN3954
Description of functions
46
“1259” is the original received CRC value
“00” is the protocol error status
Returned value
:
lngStatus:
0: No error
5: CR95HF demonstration board not connected
4: Communication error
Source code example
Private Sub cmdSendReceive_ISO15693_Inventory_Click()
Dim strTagResponse As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDll_SendReceive("260100", strTagResponse)
If (lngStatus = 0) Then
txtISO15693_Inventory_Answer.Text = strTagResponse
Else
txtISO15693_Inventory_Answer.Text = "No answer from the Tag"
End If
End Sub
Private Sub cmdSendReceive_ISO14443B_Initiate_Click()
Dim strTagResponse As String * 256
Dim lngStatus As Long
lngStatus = CR95HFDll_SendReceive("0600", strTagResponse)
If (lngStatus = 0) Then
txtISO14443B_Initiate_Answer.Text = strTagResponse
Else
txtISO14443B_Initiate_Answer.Text = "No answer from the Tag"
End If
End Sub
C/C++ language
Declaration
:
__declspec(dllimport) int __stdcall
CR95HFDll_SendReceive(char *StringCmd, char
*StringReply);
Prototype
:
int iresult;
char strRequest[50]="";
char strTagAnswer[50]="";
iresult=CR95HFDll_SendReceive(strRequest,strTagAnswer);
Input parameter
:
strCR95HFrequest: The RF Request to be sent by the CR95HF IC
to the Tag (with previously selected ISO format).
ISO 15693 Inventory example: “260100”
Where:
“260100” is the ISO 15693 Inventory command.