C API for BALTECH SDK
iso14a.h File Reference
#include "../typedefs.h"

Go to the source code of this file.

Macros

#define BRP_Iso14a_ErrNoTag   BRP_ERR_STATUS(0x1300, 0x01)
 
#define BRP_Iso14a_ErrCollision   BRP_ERR_STATUS(0x1300, 0x02)
 
#define BRP_Iso14a_ErrHf   BRP_ERR_STATUS(0x1300, 0x04)
 
#define BRP_Iso14a_ErrKey   BRP_ERR_STATUS(0x1300, 0x06)
 
#define BRP_Iso14a_ErrFrame   BRP_ERR_STATUS(0x1300, 0x07)
 
#define BRP_Iso14a_ErrCrc   BRP_ERR_STATUS(0x1300, 0x08)
 
#define BRP_Iso14a_ErrCom   BRP_ERR_STATUS(0x1300, 0x10)
 
#define BRP_Iso14a_ErrEeprom   BRP_ERR_STATUS(0x1300, 0x21)
 
#define BRP_Iso14a_ErrCardNotSupported   BRP_ERR_STATUS(0x1300, 0x22)
 
#define BRP_Iso14a_ErrHwNotSupported   BRP_ERR_STATUS(0x1300, 0x23)
 
#define BRP_Iso14a_BreakErr   BRP_ERR_STATUS(0x1300, 0x30)
 

Functions

brp_errcode brp_Iso14a_RequestLegacy (brp_protocol protocol, bool ReqAll, brp_Iso14a_RequestLegacy_UIDSize *UIDSize, unsigned *Coll, unsigned *ProprietaryCoding)
 
brp_errcode brp_Iso14a_Select (brp_protocol protocol, unsigned CascLev, unsigned BitCount, brp_buf PreSelSer, size_t PreSelSer_len, unsigned *SAK, brp_buf *Serial, size_t *Serial_len, brp_mempool *mempool)
 
brp_errcode brp_Iso14a_Halt (brp_protocol protocol)
 
brp_errcode brp_Iso14a_RequestATS (brp_protocol protocol, brp_Iso14a_RequestATS_FSDI FSDI, unsigned CID, brp_buf *ATS, size_t *ATS_len, brp_mempool *mempool)
 
brp_errcode brp_Iso14a_PerformPPS (brp_protocol protocol, unsigned CID, brp_DivisorInteger DSI, brp_DivisorInteger DRI)
 
brp_errcode brp_Iso14a_Request (brp_protocol protocol, bool ReqAll, brp_buf *ATQA, bool *Collision, brp_mempool *mempool)
 
brp_errcode brp_Iso14a_Anticoll (brp_protocol protocol, unsigned BitCount, brp_buf PreSelectedSnr, brp_buf *SelectedSnr, brp_mempool *mempool)
 
brp_errcode brp_Iso14a_SelectOnly (brp_protocol protocol, brp_buf Snr, unsigned *SAK)
 
brp_errcode brp_Iso14a_TransparentCmd (brp_protocol protocol, bool EnMifBwProt, bool EnBitmode, bool EnCRCRX, bool EnCRCTX, bool ParityMode, bool EnParity, unsigned SendDataLen, unsigned Timeout, brp_DivisorInteger DSI, brp_DivisorInteger DRI, brp_buf SendData, size_t SendData_len, brp_buf *RcvData, size_t *RcvData_len, brp_mempool *mempool)
 
brp_errcode brp_Iso14a_TransparentCmdBitlen (brp_protocol protocol, bool EnHighBaudOld, bool EnParTx, unsigned SendDataLen, unsigned Timeout, brp_DivisorInteger DSI, brp_DivisorInteger DRI, brp_buf SendData, size_t SendData_len, unsigned *RecvDataLen, unsigned *CollisionPosition, brp_buf *RecvData, size_t *RecvData_len, brp_mempool *mempool)
 

Detailed Description

This command group implements the low-level ISO 14443-3 (Type A) commands according to the ISO 14443-3 (Type A) standard.

A PICC compliant to ISO 14443-3 (Type A) is always in one of five states:

  1. Power off state
  2. Idle state
  3. Ready state
  4. Active state
  5. Halt state

As long as the PICC is not present in the HF field, it is in power off state. When the PICC gets into the field of the antenna, it automatically switches to the idle state. Once the Iso14a.Request command is invoked, PICCs in idle state will switch to the ready state. From there, a certain PICC, only one at the same time, may be switched to the active state via the Iso14a.Select command. This mechanism is identical for all ISO 14443 Type A PICCs.

PICC communication by means of APDU exchanges is subject to the ISO 14443-4 standard which is explained in detail in the _Iso14L4_ command groupdocumentation". Only PICCs which are compliant to ISO 14443-4 are able to execute commands transmitted according to ISO 14443-4, providing these PICCs are in the active state. However, before the first APDU exchange can be performed, the command Iso14a.RequestATS has to be executed in order to enable the ISO 14443-4 mode in the PICC. The command Iso14a.PerformPPS can be optionally invoked after Iso14a.RequestATS in order to increase communication speed.

For proprietary PICCs that are not compliant to the ISO 14443-4 standard, the command Iso14a.TransparentCmd should be used for communication. It provides a raw communication channel between application and PICC, without any interpretation of the transferred data within the reader, and therewith allows to send/receive arbitrary command/response data to/from the PICC.

After data exchange is completed, the PICC may be switched to the halt state so that it will not respond to any command which may follow. Depending on the PICC being in 14443-4 mode or not, either a special command of the ISO14443-4 command group" or the @ref Iso14a_Halt "Iso14a.Halt" command have to be used for this purpose. PICCs in halt state can only be reactivated by setting as special flag in the Iso14a.Request command.

Definition in file iso14a.h.