C API for BALTECH SDK
iso15.h File Reference

The ISO 15693 command group contains commands for communication with labels compatible to the ISO 15693 standard. More...

#include "../typedefs.h"

Go to the source code of this file.

Macros

#define BRP_Iso15_ErrNoTag   BRP_ERR_STATUS(0x2100, 0x01)
 No label in field of antenna. More...
 
#define BRP_Iso15_ErrCollision   BRP_ERR_STATUS(0x2100, 0x02)
 This status code is triggered by two events: More...
 
#define BRP_Iso15_ErrHf   BRP_ERR_STATUS(0x2100, 0x04)
 General HF Error. More...
 
#define BRP_Iso15_ErrLabel   BRP_ERR_STATUS(0x2100, 0x05)
 Label status error. More...
 
#define BRP_Iso15_ErrCom   BRP_ERR_STATUS(0x2100, 0x10)
 Error in communication to reader chip. More...
 
#define BRP_Iso15_ErrCmd   BRP_ERR_STATUS(0x2100, 0x20)
 Command and/or parameters invalid. More...
 
#define BRP_Iso15_ErrParamNotSupported   BRP_ERR_STATUS(0x2100, 0x23)
 Reader chip does not support label type parameters. More...
 
#define BRP_Iso15_ErrMem   BRP_ERR_STATUS(0x2100, 0x24)
 Either internal list of labels or response buffer full. More...
 
#define BRP_Iso15_ErrLabelBlocksize   BRP_ERR_STATUS(0x2100, 0x25)
 The blocks requested are not equal in size (Read multiple blocks). More...
 
#define BRP_Iso15_ErrHwNotSupported   BRP_ERR_STATUS(0x2100, 0x26)
 Command not supported by hardware. More...
 

Functions

brp_errcode brp_Iso15_SetParam (brp_protocol protocol, bool ModulationIndex, bool TXMode, bool HighDataRate, bool DualSubcarrier)
 This command configures the reader chip. More...
 
brp_errcode brp_Iso15_GetParam (brp_protocol protocol, unsigned *ModulationIndex, unsigned *TXMode, unsigned *HighDataRate, unsigned *DualSubcarrier)
 This command reads the configuration of the reader chip. More...
 
brp_errcode brp_Iso15_GetUIDList (brp_protocol protocol, bool EnAFI, bool NextBlock, bool AutoQuiet, bool EnDSFID, bool En16Slots, unsigned AFI, unsigned *More, brp_Iso15_GetUIDList_Labels_Entry **Labels, size_t *Labels_len, brp_mempool *mempool)
 This command scans for ISO 15693 labels which are in the field of the readers antenna and which are not in quiet-state. More...
 
brp_errcode brp_Iso15_SetMode (brp_protocol protocol, unsigned Mode, brp_buf UID)
 This command configures the mode to address a label. More...
 
brp_errcode brp_Iso15_StayQuiet (brp_protocol protocol)
 This command puts a label into the quiet-state. More...
 
brp_errcode brp_Iso15_ReadBlock (brp_protocol protocol, unsigned BlockID, unsigned BlockNum, bool EnBlockSec, unsigned *LabelStat, unsigned *BlockLen, brp_Iso15_ReadBlock_Data_Entry **Data, size_t *Data_len, brp_mempool *mempool)
 **For new applications please use brp_Iso15_ReadMultipleBlocks() as this command is deprecated and may be removed in future. More...
 
brp_errcode brp_Iso15_WriteBlock (brp_protocol protocol, unsigned BlockID, unsigned BlockNum, unsigned BlockLen, bool OptionFlag, brp_buf *Data, size_t Data_len, unsigned *LabelStat)
 **For new applications please use brp_Iso15_WriteMultipleBlocks() as this command is deprecated and may be removed in future. More...
 
brp_errcode brp_Iso15_LockBlock (brp_protocol protocol, unsigned BlockID, bool OptionFlag, unsigned *LabelStat)
 This command permanently locks the block with ID BlockID. More...
 
brp_errcode brp_Iso15_ResetToReady (brp_protocol protocol, unsigned *LabelStat)
 This command puts a label into ready-state , according to the VICC state transition diagram from the ISO 15693-3 specification. More...
 
brp_errcode brp_Iso15_WriteAFI (brp_protocol protocol, unsigned AFI, bool OptionFlag, unsigned *LabelStat)
 This commands writes the AFI value into the label's memory. More...
 
brp_errcode brp_Iso15_LockAFI (brp_protocol protocol, bool OptionFlag, unsigned *LabelStat)
 This command locks the AFI value permanently into the reader's memory. More...
 
brp_errcode brp_Iso15_WriteDSFID (brp_protocol protocol, unsigned DSFID, bool OptionFlag, unsigned *LabelStat)
 This commands writes the DSFID value into the label's memory. More...
 
brp_errcode brp_Iso15_LockDSFID (brp_protocol protocol, bool OptionFlag, unsigned *LabelStat)
 This command locks the DSFID value permanently into the reader's memory. More...
 
brp_errcode brp_Iso15_GetSystemInformation (brp_protocol protocol, unsigned *LabelStat, bool *EnICRef, bool *EnMemSize, bool *EnAFI, bool *EnDSFID, brp_buf *SNR, unsigned *DSFID, unsigned *AFI, unsigned *BlockNum, unsigned *BlockSize, unsigned *ICRef, brp_mempool *mempool)
 This command gets the system information of a VICC. More...
 
brp_errcode brp_Iso15_GetSecurityStatus (brp_protocol protocol, unsigned BlockID, unsigned BlockNum, unsigned *LabelStat, unsigned **BlockStat, size_t *BlockStat_len, brp_mempool *mempool)
 This command retrieves the block security status of a label. More...
 
brp_errcode brp_Iso15_CustomCommand (brp_protocol protocol, unsigned Cmd, unsigned Opt, unsigned MFC, unsigned TO, brp_buf RequestData, size_t RequestData_len, unsigned *LabelStat, brp_buf *ResponseData, size_t *ResponseData_len, brp_mempool *mempool)
 This command executes any ISO 15693 manufacturer proprietary commands, so- called custom-commands. More...
 
brp_errcode brp_Iso15_ReadSingleBlock (brp_protocol protocol, unsigned BlockID, bool EnBlockSec, unsigned *LabelStat, brp_buf *Payload, size_t *Payload_len, brp_mempool *mempool)
 This command reads a single block from a label. More...
 
brp_errcode brp_Iso15_WriteSingleBlock (brp_protocol protocol, unsigned BlockID, unsigned BlockLen, bool OptionFlag, brp_buf SingleBlockData, size_t SingleBlockData_len, unsigned *LabelStat)
 This command writes a single block to a label. More...
 
brp_errcode brp_Iso15_TransparentCmdLegacy (brp_protocol protocol, bool EnRxWait, bool EnCRCRX, bool EnCRCTX, unsigned Len, unsigned Timeout, brp_buf Data, unsigned RxWait, brp_buf *LabelData, size_t *LabelData_len, brp_mempool *mempool)
 **For new applications please use brp_Iso15_TransparentCmd() as this command is deprecated and may be removed in future. More...
 
brp_errcode brp_Iso15_WriteMultipleBlocks (brp_protocol protocol, unsigned FirstBlockId, brp_Iso15_WriteMultipleBlocks_WriteBlocks_Entry *WriteBlocks, size_t WriteBlocks_len, bool OptionFlag, unsigned *LabelStat)
 Sends the "WriteMultipleBlocks" to the card to store the data passed in WriteBlocks to the data blocks of the presented card starting at block with id Blockid. More...
 
brp_errcode brp_Iso15_ReadMultipleBlocks (brp_protocol protocol, unsigned FirstBlockId, unsigned BlockCount, bool EnBlockSec, unsigned *LabelStat, brp_Iso15_ReadMultipleBlocks_RecvBlocks_Entry **RecvBlocks, size_t *RecvBlocks_len, unsigned **BlocksSecData, size_t *BlocksSecData_len, brp_mempool *mempool)
 This command reads one or multiple blocks from a label. More...
 
brp_errcode brp_Iso15_TransparentCmd (brp_protocol protocol, brp_buf SendData, size_t SendData_len, unsigned Timeout, bool EnCrcRx, bool EnCrcTx, unsigned RxWait, brp_buf *RecvData, size_t *RecvData_len, brp_mempool *mempool)
 This command sends a data stream to a label and returns the communication status and the received label data stream to the host. More...
 

Detailed Description

The ISO 15693 command group contains commands for communication with labels compatible to the ISO 15693 standard.

This document does not replace the official ISO 15693 specification. It is rather meant to be used in combination with it.

The Baltech reader understands the so-called mandatory and optional commands as well as custom commands for some label types. However, custom commands are not documented in this page.

In order to communicate with an ISO 15693 compatible label, it is necessary to know its UID. Every command sent to the reader uses the UID to address the label. This is very important to guarantee that only one label reacts to the command. A command may also be executed without specifying a UID if it is certain that only one label is present in the reader's HF field. However, it is most of the time difficult to know how many labels are present within the antenna's field at a given time. Thus, it is advisable to execute the brp_Iso15_GetUIDList() command before starting to communicate with the label. This command returns a list of available labels along with their UIDs.

The brp_Iso15_StayQuiet() command may be used to set a certain label to quiet-state , i.e. to keep the label from answering to subsequent calls of the brp_Iso15_GetUIDList() command. This may be useful when a label has been fully processed and the application wants to scan for other labels that may also be available in the reader's HF field at the same time. The opposite command which sets a label back to ready-state is brp_Iso15_ResetToReady(). The addressed label will then answer again to subsequent calls of brp_Iso15_GetUIDList().

Once the UID of a specific label is known (e.g. by executing brp_Iso15_GetUIDList()), there are three options to communicate with this label. The communication mode needs to be chosen using the brp_Iso15_SetMode() command. All subsequent commands performing communication with the label will then use this mode. If a different label must be addressed, brp_Iso15_SetMode() has to be called again. The three possible communication modes are:

  • Addressed mode : The 8 byte UID of the label is used to address a distinct label. In this mode, the UID is included in each command frame sent to the label.
  • Selected mode : A label in selected mode responds to commands received from the reader without the need to transfer the UID in each command. Attention: This mode is optional and not supported by all types of ISO 15693 labels.
  • Unaddressed mode : If it is sure that only one label is in the field of the antennas you may execute commands in the unaddressed mode as well. Attention: All labels currently in the reader's antenna field will respond to commands when using this mode.

The memory of labels compliant to ISO 15693 is organized as a sequence of blocks where the block-size is fixed for a certain type of label. The default length of a block is four byte. Each block can be directly accessed and the available commands for data exchange, mainly brp_Iso15_ReadBlock() and brp_Iso15_WriteBlock(), are generally designed to handle one block per call. brp_Iso15_GetSystemInformation() retrieves general information about a specific label.

Definition in file iso15.h.