Hello SBoud.2
To send custom ISO 18000-6C (EPC Class1 Gen2) commands the following SDK function can be used STUHFL_T_RET_CODE Gen2_GenericCmd(STUHFL_T_Gen2_GenericCmd *genericCmd)
This SDK uses the following data strcuture.
typedef struct {
uint8_t pwd[STUHFL_D_PASSWORD_LEN]; /**< I Param: Access password. If pwd set to 0x00000000 access command prior to generic command is skipped. */
uint8_t cmd; /**< I Param: Generic command. */
uint8_t noResponseTime; /**< I Param: Tag response timeout. */
uint16_t expectedRcvDataBitLength; /**< I Param: Size in bits of expected received data. NOTE: For the direct commands 0x90 and 0x91 (Tranmission with CRC) CRC is handled by HW and need not to be included into the expected bit count. The received CRC will also not replied to the host. When using command 0x92 handling of any data integrity checking must be done manually.*/
uint16_t sndDataBitLength; /**< I Param: Size in bits of data sent to Tag. */
bool appendRN16; /**< I Param: Append tag handle to generic command. */
uint8_t sndData[STUHFL_D_GEN2_GENERIC_CMD_MAX_SND_DATA_BYTES]; /**< I Param: Data being sent to Tag. */
uint16_t rcvDataLength; /**< O Param: Size in bytes of received data from Tag. */
uint8_t rcvData[STUHFL_D_GEN2_GENERIC_CMD_MAX_RCV_DATA_BYTES]; /**< O Param: Data received from Tag. */
} STUHFL_T_Gen2_GenericCmd;
When executing this ST25R3993 Eval board FW function, it brings first the transponder into Acknowledged state (sending Query/ACK command).
Then, if a pwd is given a access command is executed to bring the transponder into secured state, otherwise the access command is skipped.
After this procedure the exchange of a custom command as defined by the data from sndData happens.
See below further detailes of the parmeters from the structure "STUHFL_T_Gen2_GenericCmd"
- Parameter "pwd": Access password. To skip usage of Access command the password must be set to pwd[] = {0,0,0,0}
- Parameter "cmd": 0x90, 0x91 or 0x92 (Transmission with CRC, Transmission with CRC Expecting Header Bit, Transmission without CRC). For details regarding the difference of these direct command codes please have a look to the ST25R3993 DataSheet - section "2.2.3 Direct commands"
- Parameter "noResponseTime": This define the value of the register 0x07: Rx no response time register (See DS - section "Rx no response time register")
- Parameter "expectedRcvDataBitLength": Size in bits of expected received data. For the direct commands 0x90 and 0x91 (Tranmission with CRC) CRC is handled by HW and did not need to be included into the expected bit count. The received CRC will also not replied to the host. When using command 0x92 handling of any data integrity checking must be done manually.
- Parameter "sndDataBitLength": Size in bits of data to be sent to transponder
- Parameter "appendRN16": If true then the FW appends the current tag handle to generic command, as most of the Gen2 commands need.
- Parameter "sndData": Payload data being to be sent to transponder
- Parameter "rcvDataLength": Size in bytes of received data from transponder
- Parameter "rcvData": Data received from transponder.
When using the SDK, please also check the STUHFL_T_RET_CODE from the function.
The ST25R3993 DataSheet can be downloaded from the following location https://www.st.com/resource/en/datasheet/st25ru3993.pdf
BR
Nick