C API for BALTECH SDK
ultralight.h File Reference

With this command group, you can access MIFARE Ultralight cards in low-level mode. More...

#include "../typedefs.h"

Go to the source code of this file.

Macros

#define BRP_Ultralight_ErrNoTag   BRP_ERR_STATUS(0x2500, 0x01)
 There's no card in the HF field, or the card doesn't respond. More...
 
#define BRP_Ultralight_ErrAuth   BRP_ERR_STATUS(0x2500, 0x02)
 Authentication with the card has failed. More...
 
#define BRP_Ultralight_ErrHf   BRP_ERR_STATUS(0x2500, 0x03)
 The response frame is invalid, e.g. More...
 
#define BRP_Ultralight_ErrKey   BRP_ERR_STATUS(0x2500, 0x04)
 The encryption key is undefined or inaccessible. More...
 
#define BRP_Ultralight_ErrNack   BRP_ERR_STATUS(0x2500, 0x05)
 The card didn't accept the command. More...
 
#define BRP_Ultralight_ErrInterface   BRP_ERR_STATUS(0x2500, 0x18)
 Communication with the reader chip has failed. More...
 
#define BRP_Ultralight_ErrCmd   BRP_ERR_STATUS(0x2500, 0x19)
 The specified command or parameters are unknown. More...
 
#define BRP_Ultralight_ErrHwNotSupported   BRP_ERR_STATUS(0x2500, 0x20)
 This command isn't supported by the reader hardware. More...
 
#define BRP_Ultralight_ErrFirmwareNotSupported   BRP_ERR_STATUS(0x2500, 0x21)
 This command isn't supported by the reader firmware. More...
 
#define BRP_Ultralight_BreakErr   BRP_ERR_STATUS(0x2500, 0x28)
 The command has been aborted because the HF interface has been requested by another task or command. More...
 

Functions

brp_errcode brp_Ultralight_ExecCmd (brp_protocol protocol, unsigned Cmd, brp_buf Param, size_t Param_len, brp_buf *Response, size_t *Response_len, brp_mempool *mempool)
 Generic command to communicate to a Mifare Ultralight card. More...
 
brp_errcode brp_Ultralight_Read (brp_protocol protocol, unsigned PageAdr, brp_buf *PageData, brp_mempool *mempool)
 Standard read command for Ultralight cards. More...
 
brp_errcode brp_Ultralight_Write (brp_protocol protocol, unsigned PageAdr, brp_buf PageData)
 Standard write command for Ultralight cards. More...
 
brp_errcode brp_Ultralight_AuthE2 (brp_protocol protocol, brp_Ultralight_AuthE2_DivMode DivMode, bool HasExtIdx, unsigned KeyIdx, brp_buf DivData, size_t DivData_len, unsigned KeyExtIdx)
 Authenticates to a Ultralight-c card. More...
 
brp_errcode brp_Ultralight_AuthUser (brp_protocol protocol, brp_Ultralight_AuthUser_CryptoMode CryptoMode, brp_buf Key, size_t Key_len)
 Authenticates to an Ultralight-C/EV1 card. More...
 

Detailed Description

With this command group, you can access MIFARE Ultralight cards in low-level mode.

To work with this command group, a card has to be in ISO 14443-3 Type A selected state. This can be achieved using the iso14a.h.

Definition in file ultralight.h.