uFCoder 2.58
Loading...
Searching...
No Matches
Mifare Classic specific commands

Functions

UFR_STATUS DL_API BlockReadM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockReadSamKeyM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockWriteM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockWriteSamKeyM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockInSectorReadM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockInSectorReadSamKeyM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockInSectorWriteM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockInSectorWriteSamKeyM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API LinearReadSamKeyM (UFR_HANDLE hndUFR, OUT uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesReturned, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 
UFR_STATUS DL_API LinRowReadM (UFR_HANDLE hndUFR, OUT uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesReturned, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 
UFR_STATUS DL_API LinearWriteM (UFR_HANDLE hndUFR, IN const uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesWritten, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 
UFR_STATUS DL_API LinearWriteSamKeyM (UFR_HANDLE hndUFR, IN const uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesWritten, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 
UFR_STATUS DL_API LinearFormatCardM (UFR_HANDLE hndUFR, IN const uint8_t *new_key_A, uint8_t blocks_access_bits, uint8_t sector_trailers_access_bits, uint8_t sector_trailers_byte9, IN const uint8_t *new_key_B, VAR uint8_t *lpucSectorsFormatted, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API SectorTrailerWriteM (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *new_key_A, uint8_t block0_access_bits, uint8_t block1_access_bits, uint8_t block2_access_bits, uint8_t sector_trailer_access_bits, uint8_t sector_trailer_byte9, IN const uint8_t *new_key_B, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API SectorTrailerWriteSamKeyM (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *new_key_A, uint8_t block0_access_bits, uint8_t block1_access_bits, uint8_t block2_access_bits, uint8_t sector_trailer_access_bits, uint8_t sector_trailer_byte9, IN const uint8_t *new_key_B, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API SectorTrailerWriteUnsafeM (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockReadM (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockReadSamKeyM (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorReadM (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorReadSamKeyM (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockWriteM (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockWriteSamKeyM (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorWriteM (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorWriteSamKeyM (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockIncrementM (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockIncrementSamKeyM (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorIncrementM (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorIncrementSamKeyM (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockDecrementM (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockDecrementSamKeyM (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorDecrementM (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API ValueBlockInSectorDecrementSamKeyM (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 
UFR_STATUS DL_API BlockRead_AKM1M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockWrite_AKM1M (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockInSectorRead_AKM1M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockInSectorWrite_AKM1M (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API LinearRead_AKM1M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 
UFR_STATUS DL_API LinRowRead_AKM1M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 
UFR_STATUS DL_API LinearWrite_AKM1M (UFR_HANDLE hndUFR, IN const uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_written, uint8_t auth_mode)
 
UFR_STATUS DL_API LinearFormatCard_AKM1M (UFR_HANDLE hndUFR, IN const uint8_t *new_key_A, uint8_t blocks_access_bits, uint8_t sector_trailers_access_bits, uint8_t sector_trailers_byte9, IN const uint8_t *new_key_B, VAR uint8_t *lpucSectorsFormatted, uint8_t auth_mode)
 
UFR_STATUS DL_API SectorTrailerWrite_AKM1M (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *new_key_A, uint8_t block0_access_bits, uint8_t block1_access_bits, uint8_t block2_access_bits, uint8_t sector_trailer_access_bits, uint8_t sector_trailer_byte9, IN const uint8_t *new_key_B, uint8_t auth_mode)
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM1M (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockRead_AKM1M (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorRead_AKM1M (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockWrite_AKM1M (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorWrite_AKM1M (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockIncrement_AKM1M (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM1M (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockDecrement_AKM1M (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM1M (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockRead_AKM2M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockWrite_AKM2M (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockInSectorRead_AKM2M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockInSectorWrite_AKM2M (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API LinearRead_AKM2M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 
UFR_STATUS DL_API LinRowRead_AKM2M (UFR_HANDLE hndUFR, OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 
UFR_STATUS DL_API LinearWrite_AKM2M (UFR_HANDLE hndUFR, IN const uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_written, uint8_t auth_mode)
 
UFR_STATUS DL_API LinearFormatCard_AKM2M (UFR_HANDLE hndUFR, IN const uint8_t *new_key_A, uint8_t blocks_access_bits, uint8_t sector_trailers_access_bits, uint8_t sector_trailers_byte9, IN const uint8_t *new_key_B, VAR uint8_t *lpucSectorsFormatted, uint8_t auth_mode)
 
UFR_STATUS DL_API SectorTrailerWrite_AKM2M (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *new_key_A, uint8_t block0_access_bits, uint8_t block1_access_bits, uint8_t block2_access_bits, uint8_t sector_trailer_access_bits, uint8_t sector_trailer_byte9, IN const uint8_t *new_key_B, uint8_t auth_mode)
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM2M (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorRead_AKM2M (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockWrite_AKM2M (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorWrite_AKM2M (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockIncrement_AKM2M (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM2M (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockDecrement_AKM2M (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t block_address, uint8_t auth_mode)
 
UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM2M (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 
UFR_STATUS DL_API BlockWrite_PKM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API BlockInSectorRead_PKM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API BlockInSectorWrite_PKM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API LinearRead_PKM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API LinRowRead_PKM (UFR_HANDLE hndUFR, OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API LinearWrite_PKM (UFR_HANDLE hndUFR, IN const uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_written, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API LinearFormatCard_PKM (UFR_HANDLE hndUFR, IN const uint8_t *new_key_A, uint8_t blocks_access_bits, uint8_t sector_trailers_access_bits, uint8_t sector_trailers_byte9, IN const uint8_t *new_key_B, VAR uint8_t *lpucSectorsFormatted, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API SectorTrailerWrite_PKM (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *new_key_A, uint8_t block0_access_bits, uint8_t block1_access_bits, uint8_t block2_access_bits, uint8_t sector_trailer_access_bits, uint8_t sector_trailer_byte9, IN const uint8_t *new_key_B, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe_PKM (UFR_HANDLE hndUFR, uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockRead_PKM (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockInSectorRead_PKM (UFR_HANDLE hndUFR, VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockWrite_PKM (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockInSectorWrite_PKM (UFR_HANDLE hndUFR, int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockIncrement_PKM (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockInSectorIncrement_PKM (UFR_HANDLE hndUFR, int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockDecrement_PKM (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 
UFR_STATUS DL_API ValueBlockInSectorDecrement_PKM (UFR_HANDLE hndUFR, int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 

Detailed Description

Function Documentation

◆ BlockReadM()

UFR_STATUS DL_API BlockReadM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Read particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockRead() or BlockRead_PK() functions. Value 0x60 with BlockRead() or BlockRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.28) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockReadSamKeyM()

UFR_STATUS DL_API BlockReadSamKeyM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Read particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockRead() or BlockRead_PK() functions. Value 0x60 with BlockRead() or BlockRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.28) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15) key Pointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ BlockWriteM()

UFR_STATUS DL_API BlockWriteM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Write particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockWrite() or BlockWrite_PK() functions. Value 0x60 with BlockWrite() or BlockWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockWriteSamKeyM()

UFR_STATUS DL_API BlockWriteSamKeyM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Write particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockInSectorReadM()

UFR_STATUS DL_API BlockInSectorReadM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Read particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorRead() or BlockInSectorRead_PK() functions. Value 0x60 with BlockInSectorRead() or BlockInSectorRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B:use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For keys into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockInSectorReadSamKeyM()

UFR_STATUS DL_API BlockInSectorReadSamKeyM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Read particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockInSectorWriteM()

UFR_STATUS DL_API BlockInSectorWriteM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Write particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockInSectorWriteSamKeyM()

UFR_STATUS DL_API BlockInSectorWriteSamKeyM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Write particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefineswhether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ LinearReadSamKeyM()

UFR_STATUS DL_API LinearReadSamKeyM ( UFR_HANDLE hndUFR,
OUT uint8_t * aucData,
uint16_t usLinearAddress,
uint16_t usDataLength,
VAR uint16_t * lpusBytesReturned,
uint8_t ucKeyMode,
uint8_t ucReaderKeyIndex )

Multi reader support. *only uFR CS with SAM support Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
aucDataPointer to array of bytes containing data
usLinearAddressAddress of byte - where to start reading
usDataLengthLength of data - how many bytes to read
lpusBytesReturnedPointer to variable holding how many bytes are returned
ucKeyModeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearRead() or LinearRead_PK() functions. Value 0x60 with LinearRead() or LinearRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
ucReaderKeyIndexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For keys into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ LinRowReadM()

UFR_STATUS DL_API LinRowReadM ( UFR_HANDLE hndUFR,
OUT uint8_t * aucData,
uint16_t usLinearAddress,
uint16_t usDataLength,
VAR uint16_t * lpusBytesReturned,
uint8_t ucKeyMode,
uint8_t ucReaderKeyIndex )

Multi reader support. Read Linear data Address Space. On the contrary of LinearRead functions, this functions read whole card including trailer blocks and manufacturer block. This function is useful when making “dump” of the whole card. Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
aucDataPointer to array of bytes containing data
usLinearAddressAddress of byte - where to start reading
usDataLengthLength of data - how many bytes to read
lpusBytesReturnedPointer to variable holding how many bytes are returned
ucKeyModeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinRowRead() or LinRowRead_PK() functions. Value 0x60 with LinRowRead() or LinRowRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter
ucReaderKeyIndexIndex of reader key to be used (RK mode)
Returns
Operation status

◆ LinearWriteM()

UFR_STATUS DL_API LinearWriteM ( UFR_HANDLE hndUFR,
IN const uint8_t * aucData,
uint16_t usLinearAddress,
uint16_t usDataLength,
VAR uint16_t * lpusBytesWritten,
uint8_t ucKeyMode,
uint8_t ucReaderKeyIndex )

Multi reader support. These functions are used for writing data to the card using emulation of the linear address space. The method for proving authenticity is determined by the suffix in the functions names.

Parameters
hndUFRhandle of the uFR device
aucDataPointer to array of bytes containing data
usLinearAddressAddress of byte - where to start writting
usDataLengthLength of data - how many bytes to write
lpusBytesReturnedPointer to variable holding how many bytes are returned
ucKeyModeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearRead() or LinearRead_PK() functions. Value 0x60 with LinearRead() or LinearRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
ucReaderKeyIndexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For keys into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ LinearWriteSamKeyM()

UFR_STATUS DL_API LinearWriteSamKeyM ( UFR_HANDLE hndUFR,
IN const uint8_t * aucData,
uint16_t usLinearAddress,
uint16_t usDataLength,
VAR uint16_t * lpusBytesWritten,
uint8_t ucKeyMode,
uint8_t ucReaderKeyIndex )

Multi reader support. *only uFR CS with SAM support These functions are used for writing data to the card using emulation of the linear address space. The method for proving authenticity is determined by the suffix in the functions names.

Parameters
hndUFRhandle of the uFR device
aucDataPointer to array of bytes containing data
usLinearAddressAddress of byte - where to start writting
usDataLengthLength of data - how many bytes to write
lpusBytesReturnedPointer to variable holding how many bytes are returned
ucKeyModeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearRead() or LinearRead_PK() functions. Value 0x60 with LinearRead() or LinearRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
ucReaderKeyIndexIndex of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For keys into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ LinearFormatCardM()

UFR_STATUS DL_API LinearFormatCardM ( UFR_HANDLE hndUFR,
IN const uint8_t * new_key_A,
uint8_t blocks_access_bits,
uint8_t sector_trailers_access_bits,
uint8_t sector_trailers_byte9,
IN const uint8_t * new_key_B,
VAR uint8_t * lpucSectorsFormatted,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. This function is specific to Mifare Classic cards only. It performs “Format card” operation - write new Sector Trailer values on whole card at once. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Bytes 0 - 5 Bytes 6 - 8 Byte 9 Bytes 10 - 15 KeyA Block Access & Trailer Access Bits GPB KeyB For more information, please refer to Mifare Classic Keys and Access Conditions in this document. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authetntication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are caluculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provode to reader.

Parameters
hndUFRhandle of the uFR device
new_key_APointer on 6 bytes array containing a new KeyA
blocks_access_bitsBlock Access permissions bits. Values 0 to 7
sector_trailers_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailers_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyA
lpucSectorsFormattedPointer to variable holding return value how many sectors are successfully formatted
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
key_indexIndex of reader’s key to be used (RK mode)
Returns
Operation status

◆ SectorTrailerWriteM()

UFR_STATUS DL_API SectorTrailerWriteM ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * new_key_A,
uint8_t block0_access_bits,
uint8_t block1_access_bits,
uint8_t block2_access_bits,
uint8_t sector_trailer_access_bits,
uint8_t sector_trailer_byte9,
IN const uint8_t * new_key_B,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculated from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddressof Trailer according to addressing_mode
new_key_APointer on 6 bytes array containing a new KeyA
block0_access_bitsAccess Permissions Bits for Block 0. Values 0 to 7
block1_access_bitsAccess Permissions Bits for Block 1. Values 0 to 7
block2_access_bitsAccess Permissions Bits for Block 2. Values 0 to 7
sector_trailer_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailer_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyB
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
key_indexIndex of reader’s key to be used (RK mode)
Returns
Operation status

◆ SectorTrailerWriteSamKeyM()

UFR_STATUS DL_API SectorTrailerWriteSamKeyM ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * new_key_A,
uint8_t block0_access_bits,
uint8_t block1_access_bits,
uint8_t block2_access_bits,
uint8_t sector_trailer_access_bits,
uint8_t sector_trailer_byte9,
IN const uint8_t * new_key_B,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculated from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
new_key_APointer on 6 bytes array containing a new KeyA
block0_access_bitsAccess Permissions Bits for Block 0. Values 0 to 7
block1_access_bitsAccess Permissions Bits for Block 1. Values 0 to 7
block2_access_bitsAccess Permissions Bits for Block 2. Values 0 to 7
sector_trailer_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailer_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyB
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
key_indexIndex of reader’s key to be used (RK mode)
Returns
Operation status

◆ SectorTrailerWriteUnsafeM()

UFR_STATUS DL_API SectorTrailerWriteUnsafeM ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Difference between this function and SectorTrailerWrite is :

  • SectorTrailerWrite will check parameters and “safely” write them into trailer, non valid values will not be written
  • SectorTrailerWriteUnsafe writes array of 16 bytes as raw binary trailer representation, any value can be written. USE THIS FUNCTION WITH CAUTION, WRONG VALUES CAN DESTROY CARD!
Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
sector_trailerPointer to 16 byte array as binary representation of Sector Trailer
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
key_indexIndex of reader’s key to be used (RK mode)
Returns
Operation status

◆ ValueBlockReadM()

UFR_STATUS DL_API ValueBlockReadM ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127)
Returns
Operation status

◆ ValueBlockReadSamKeyM()

UFR_STATUS DL_API ValueBlockReadSamKeyM ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127)
Returns
Operation status

◆ ValueBlockInSectorReadM()

UFR_STATUS DL_API ValueBlockInSectorReadM ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127)
Returns
Operation status

◆ ValueBlockInSectorReadSamKeyM()

UFR_STATUS DL_API ValueBlockInSectorReadSamKeyM ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockWriteM()

UFR_STATUS DL_API ValueBlockWriteM ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockWriteSamKeyM()

UFR_STATUS DL_API ValueBlockWriteSamKeyM ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockInSectorWriteM()

UFR_STATUS DL_API ValueBlockInSectorWriteM ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockInSectorWriteSamKeyM()

UFR_STATUS DL_API ValueBlockInSectorWriteSamKeyM ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockIncrementM()

UFR_STATUS DL_API ValueBlockIncrementM ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Increments particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_valuevalue showing how much initial block value will be incremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockIncrementSamKeyM()

UFR_STATUS DL_API ValueBlockIncrementSamKeyM ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Increments particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_valuevalue showing how much initial block value will be incremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockInSectorIncrementM()

UFR_STATUS DL_API ValueBlockInSectorIncrementM ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Increments particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_value
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockInSectorIncrementSamKeyM()

UFR_STATUS DL_API ValueBlockInSectorIncrementSamKeyM ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Increments particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_value
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockDecrementM()

UFR_STATUS DL_API ValueBlockDecrementM ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockDecrementSamKeyM()

UFR_STATUS DL_API ValueBlockDecrementSamKeyM ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockInSectorDecrementM()

UFR_STATUS DL_API ValueBlockInSectorDecrementM ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. Decrements particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockInSectorDecrementSamKeyM()

UFR_STATUS DL_API ValueBlockInSectorDecrementSamKeyM ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Multi reader support. *only uFR CS with SAM support Decrements particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
key_indexIndex of reader’s key to be used (RK mode)For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ BlockRead_AKM1M()

UFR_STATUS DL_API BlockRead_AKM1M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Read particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockRead() or BlockRead_PK() functions. Value 0x60 with BlockRead() or BlockRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ BlockWrite_AKM1M()

UFR_STATUS DL_API BlockWrite_AKM1M ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Write particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockRead() or BlockRead_PK() functions. Value 0x60 with BlockRead() or BlockRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ BlockInSectorRead_AKM1M()

UFR_STATUS DL_API BlockInSectorRead_AKM1M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Read particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorRead() or BlockInSectorRead_PK() functions. Value 0x60 with BlockInSectorRead() or BlockInSectorRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B:
Returns
Operation status

◆ BlockInSectorWrite_AKM1M()

UFR_STATUS DL_API BlockInSectorWrite_AKM1M ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Write particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorWrite() or BlockInSectorWrite_PK() functions. Value 0x60 with BlockInSectorWrite() or BlockInSectorWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ LinearRead_AKM1M()

UFR_STATUS DL_API LinearRead_AKM1M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start reading
lengthLength of data - how many bytes to read
bytes_returnedPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearRead() or LinearRead_PK() functions. Value 0x60 with LinearRead() or LinearRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ LinRowRead_AKM1M()

UFR_STATUS DL_API LinRowRead_AKM1M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Read Linear data Address Space. On the contrary of LinearRead functions, this functions read whole card including trailer blocks and manufacturer block. This function is useful when making “dump” of the whole card. Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start reading
lengthLength of data - how many bytes to read
bytes_returnedPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinRowRead() or LinRowRead_PK() functions. Value 0x60 with LinRowRead() or LinRowRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter
Returns
Operation status

◆ LinearWrite_AKM1M()

UFR_STATUS DL_API LinearWrite_AKM1M ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_written,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) These functions are used for writing data to the card using emulation of the linear address space. The method for proving authenticity is determined by the suffix in the functions names.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start writing
lengthLength of data - how many bytes to write
bytes_writtenPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearWrite() or LinearWrite_PK() functions. Value 0x60 with LinearWrite() or LinearWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters
Returns
Operation status

◆ LinearFormatCard_AKM1M()

UFR_STATUS DL_API LinearFormatCard_AKM1M ( UFR_HANDLE hndUFR,
IN const uint8_t * new_key_A,
uint8_t blocks_access_bits,
uint8_t sector_trailers_access_bits,
uint8_t sector_trailers_byte9,
IN const uint8_t * new_key_B,
VAR uint8_t * lpucSectorsFormatted,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) This function is specific to Mifare Classic cards only. It performs “Format card” operation - write new Sector Trailer values on whole card at once. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Bytes 0 - 5 Bytes 6 - 8 Byte 9 Bytes 10 - 15 KeyA Block Access & Trailer Access Bits GPB KeyB For more information, please refer to Mifare Classic Keys and Access Conditions in this document. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authetntication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are caluculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provode to reader.

Parameters
hndUFRhandle of the uFR device
new_key_APointer on 6 bytes array containing a new KeyA
blocks_access_bitsBlock Access permissions bits. Values 0 to 7
sector_trailers_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailers_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyA
lpucSectorsFormattedPointer to variable holding return value how many sectors are successfully formatted
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
Returns
Operation status

◆ SectorTrailerWrite_AKM1M()

UFR_STATUS DL_API SectorTrailerWrite_AKM1M ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * new_key_A,
uint8_t block0_access_bits,
uint8_t block1_access_bits,
uint8_t block2_access_bits,
uint8_t sector_trailer_access_bits,
uint8_t sector_trailer_byte9,
IN const uint8_t * new_key_B,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculated from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
new_key_APointer on 6 bytes array containing a new KeyA
block0_access_bitsAccess Permissions Bits for Block 0. Values 0 to 7
block1_access_bitsAccess Permissions Bits for Block 1. Values 0 to 7
block2_access_bitsAccess Permissions Bits for Block 2. Values 0 to 7
sector_trailer_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailer_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyB
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
Returns
Operation status

◆ SectorTrailerWriteUnsafe_AKM1M()

UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM1M ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Difference between this function and SectorTrailerWrite is :

  • SectorTrailerWrite will check parameters and “safely” write them into trailer, non valid values will not be written
  • SectorTrailerWriteUnsafe writes array of 16 bytes as raw binary trailer representation, any value can be written. USE THIS FUNCTION WITH CAUTION, WRONG VALUES CAN DESTROY CARD!
Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
sector_trailerPointer to 16 byte array as binary representation of Sector Trailer
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
Returns
Operation status

◆ ValueBlockRead_AKM1M()

UFR_STATUS DL_API ValueBlockRead_AKM1M ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockInSectorRead_AKM1M()

UFR_STATUS DL_API ValueBlockInSectorRead_AKM1M ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockWrite_AKM1M()

UFR_STATUS DL_API ValueBlockWrite_AKM1M ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockInSectorWrite_AKM1M()

UFR_STATUS DL_API ValueBlockInSectorWrite_AKM1M ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockIncrement_AKM1M()

UFR_STATUS DL_API ValueBlockIncrement_AKM1M ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Increments particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_valuevalue showing how much initial block value will be incremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81 key_index Index of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15) key Pointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode) ValueBlockDecrement Function description Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader. Function declaration (C language) UFR_STATUS ValueBlockDecrement(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index); UFR_STATUS ValueBlockDecrement_AKM1(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode; UFR_STATUS ValueBlockDecrement_AKM2(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockDecrement_PK(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, const uint8_t *key); *only uFR CS with SAM support UFR_STATUS ValueBlockDecrementSamKey(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index);
Returns
Operation status

◆ ValueBlockInSectorIncrement_AKM1M()

UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM1M ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Increments particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_value
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeIndex of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ ValueBlockDecrement_AKM1M()

UFR_STATUS DL_API ValueBlockDecrement_AKM1M ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented sector_address Absolute Sector address block_in_sector_address Block address in Sector auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81 key_index Index of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15) key Pointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
block_address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockInSectorDecrement_AKM1M()

UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM1M ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 1 (AKM1) Decrements particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ BlockRead_AKM2M()

UFR_STATUS DL_API BlockRead_AKM2M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Read particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ BlockWrite_AKM2M()

UFR_STATUS DL_API BlockWrite_AKM2M ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Write particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockWrite() or BlockWrite_PK() functions. Value 0x60 with BlockWrite() or BlockWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ BlockInSectorRead_AKM2M()

UFR_STATUS DL_API BlockInSectorRead_AKM2M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Read particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorRead() or BlockInSectorRead_PK() functions. Value 0x60 with BlockInSectorRead() or BlockInSectorRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81 key_index Index of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For keys into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15) key Pointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ BlockInSectorWrite_AKM2M()

UFR_STATUS DL_API BlockInSectorWrite_AKM2M ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Write particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorWrite() or BlockInSectorWrite_PK() functions. Value 0x60 with BlockInSectorWrite() or BlockInSectorWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ LinearRead_AKM2M()

UFR_STATUS DL_API LinearRead_AKM2M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start reading
lengthLength of data - how many bytes to read
bytes_returnedPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearRead() or LinearRead_PK() functions. Value 0x60 with LinearRead() or LinearRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81 key_index Index of reader key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) For keys into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.29 and library versions from 5.0.19. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
Returns
Operation status

◆ LinRowRead_AKM2M()

UFR_STATUS DL_API LinRowRead_AKM2M ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Read Linear data Address Space. On the contrary of LinearRead functions, this functions read whole card including trailer blocks and manufacturer block. This function is useful when making “dump” of the whole card. Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start reading
lengthLength of data - how many bytes to read bytes_returned
bytes_returnedPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinRowRead() or LinRowRead_PK() functions. Value 0x60 with LinRowRead() or LinRowRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter.
Returns
Operation status

◆ LinearWrite_AKM2M()

UFR_STATUS DL_API LinearWrite_AKM2M ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_written,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) These functions are used for writing data to the card using emulation of the linear address space. The method for proving authenticity is determined by the suffix in the functions names.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start writing
lengthLength of data - how many bytes to write bytes_returned
bytes_writtenPointer to variable holding how many bytes were written
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearWrite() or LinearWrite_PK() functions. Value 0x60 with LinearWrite() or LinearWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ LinearFormatCard_AKM2M()

UFR_STATUS DL_API LinearFormatCard_AKM2M ( UFR_HANDLE hndUFR,
IN const uint8_t * new_key_A,
uint8_t blocks_access_bits,
uint8_t sector_trailers_access_bits,
uint8_t sector_trailers_byte9,
IN const uint8_t * new_key_B,
VAR uint8_t * lpucSectorsFormatted,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) This function is specific to Mifare Classic cards only. It performs “Format card” operation - write new Sector Trailer values on whole card at once. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Bytes 0 - 5 Bytes 6 - 8 Byte 9 Bytes 10 - 15 KeyA Block Access & Trailer Access Bits GPB KeyB For more information, please refer to Mifare Classic Keys and Access Conditions in this document. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authetntication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are caluculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provode to reader.

Parameters
hndUFRhandle of the uFR device
new_key_APointer on 6 bytes array containing a new KeyA
blocks_access_bitsBlock Access permissions bits. Values 0 to 7
sector_trailers_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailers_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyA
lpucSectorsFormattedPointer to variable holding return value how many sectors are successfully formatted
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
Returns
Operation status

◆ SectorTrailerWrite_AKM2M()

UFR_STATUS DL_API SectorTrailerWrite_AKM2M ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * new_key_A,
uint8_t block0_access_bits,
uint8_t block1_access_bits,
uint8_t block2_access_bits,
uint8_t sector_trailer_access_bits,
uint8_t sector_trailer_byte9,
IN const uint8_t * new_key_B,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculated from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
new_key_APointer on 6 bytes array containing a new KeyA
block0_access_bitsAccess Permissions Bits for Block 0. Values 0 to 7
block1_access_bitsAccess Permissions Bits for Block 1. Values 0 to 7
block2_access_bitsAccess Permissions Bits for Block 2. Values 0 to 7
sector_trailer_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailer_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyB
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
Returns
Operation status

◆ SectorTrailerWriteUnsafe_AKM2M()

UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM2M ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Difference between this function and SectorTrailerWrite is :

  • SectorTrailerWrite will check parameters and “safely” write them into trailer, non valid values will not be written
  • SectorTrailerWriteUnsafe writes array of 16 bytes as raw binary trailer representation, any value can be written. USE THIS FUNCTION WITH CAUTION, WRONG VALUES CAN DESTROY CARD!
Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
sector_trailerPointer to 16 byte array as binary representation of Sector Trailer
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
Returns
Operation status

◆ ValueBlockInSectorRead_AKM2M()

UFR_STATUS DL_API ValueBlockInSectorRead_AKM2M ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockWrite_AKM2M()

UFR_STATUS DL_API ValueBlockWrite_AKM2M ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81 key_index Index of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15) key Pointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode) ValueBlockDecrement Function description Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader. Function declaration (C language) UFR_STATUS ValueBlockDecrement(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index); UFR_STATUS ValueBlockDecrement_AKM1(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode; UFR_STATUS ValueBlockDecrement_AKM2(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockDecrement_PK(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, const uint8_t *key); *only uFR CS with SAM support UFR_STATUS ValueBlockDecrementSamKey(int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index);
Returns
Operation status

◆ ValueBlockInSectorWrite_AKM2M()

UFR_STATUS DL_API ValueBlockInSectorWrite_AKM2M ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockIncrement_AKM2M()

UFR_STATUS DL_API ValueBlockIncrement_AKM2M ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Increments particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_valuevalue showing how much initial block value will be incremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockInSectorIncrement_AKM2M()

UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM2M ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Increments particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_value
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockDecrement_AKM2M()

UFR_STATUS DL_API ValueBlockDecrement_AKM2M ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ ValueBlockInSectorDecrement_AKM2M()

UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM2M ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

Multi reader support. Automatic Key Mode 2 (AKM2) Decrements particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
Returns
Operation status

◆ BlockWrite_PKM()

UFR_STATUS DL_API BlockWrite_PKM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Write particular block using absolute Block address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
block_addressAbsolute block address
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockWrite() or BlockWrite_PK() functions. Value 0x60 with BlockWrite() or BlockWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ BlockInSectorRead_PKM()

UFR_STATUS DL_API BlockInSectorRead_PKM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Read particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorRead() or BlockInSectorRead_PK() functions. Value 0x60 with BlockInSectorRead() or BlockInSectorRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ BlockInSectorWrite_PKM()

UFR_STATUS DL_API BlockInSectorWrite_PKM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Write particular block using relative Block in Sector address.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeForMifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with BlockInSectorWrite() or BlockInSectorWrite_PK() functions. Value 0x60 with BlockInSectorWrite() or BlockInSectorWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ LinearRead_PKM()

UFR_STATUS DL_API LinearRead_PKM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start reading
lengthLength of data - how many bytes to read
bytes_returnedPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearRead() or LinearRead_PK() functions. Value 0x60 with LinearRead() or LinearRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ LinRowRead_PKM()

UFR_STATUS DL_API LinRowRead_PKM ( UFR_HANDLE hndUFR,
OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Read Linear data Address Space. On the contrary of LinearRead functions, this functions read whole card including trailer blocks and manufacturer block. This function is useful when making “dump” of the whole card. Group of functions for linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags. When using this functions with other card types, auth_mode, key_index and key parameters are not relevant but must take default values.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start reading
lengthLength of data - how many bytes to read
bytes_returnedPointer to variable holding how many bytes are returned
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinRowRead() or LinRowRead_PK() functions. Value 0x60 with LinRowRead() or LinRowRead_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ LinearWrite_PKM()

UFR_STATUS DL_API LinearWrite_PKM ( UFR_HANDLE hndUFR,
IN const uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_written,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) These functions are used for writing data to the card using emulation of the linear address space. The method for proving authenticity is determined by the suffix in the functions names.

Parameters
hndUFRhandle of the uFR device
dataPointer to array of bytes containing data
linear_addressAddress of byte - where to start writing
lengthLength of data - how many bytes to write
bytes_writtenPointer to variable holding how many bytes were written
auth_modeFor Mifare Classic tags defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH value 0x61 means “use PWD_AUTH“ with LinearWrite() or LinearWrite_PK() functions. Value 0x60 with LinearWrite() or LinearWrite_PK() functions means “without PWD_AUTH“ and in that case you can send for ucReaderKeyIndex or aucProvidedKey parameters anything you want without influence on the result. For NTAG 21x, Ultralight EV1 and other T2T tags supporting PWD_AUTH you can use _AKM1 or _AKM2 function variants only without PWD_AUTH in any case of the valid values (0x60 or 0x61) provided for this parameter. For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ LinearFormatCard_PKM()

UFR_STATUS DL_API LinearFormatCard_PKM ( UFR_HANDLE hndUFR,
IN const uint8_t * new_key_A,
uint8_t blocks_access_bits,
uint8_t sector_trailers_access_bits,
uint8_t sector_trailers_byte9,
IN const uint8_t * new_key_B,
VAR uint8_t * lpucSectorsFormatted,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) This function is specific to Mifare Classic cards only. It performs “Format card” operation - write new Sector Trailer values on whole card at once. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Bytes 0 - 5 Bytes 6 - 8 Byte 9 Bytes 10 - 15 KeyA Block Access & Trailer Access Bits GPB KeyB For more information, please refer to Mifare Classic Keys and Access Conditions in this document. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authetntication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are caluculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provode to reader.

Parameters
hndUFRhandle of the uFR device
new_key_APointer on 6 bytes array containing a new KeyA
blocks_access_bitsBlock Access permissions bits. Values 0 to 7
sector_trailers_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailers_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyA
lpucSectorsFormattedPointer to variable holding return value how many sectors are successfully formatted
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWrite_PKM()

UFR_STATUS DL_API SectorTrailerWrite_PKM ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * new_key_A,
uint8_t block0_access_bits,
uint8_t block1_access_bits,
uint8_t block2_access_bits,
uint8_t sector_trailer_access_bits,
uint8_t sector_trailer_byte9,
IN const uint8_t * new_key_B,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Mifare Plus using. For firmware versions from 5.0.29 and library versions from 5.0.19, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculated from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
new_key_APointer on 6 bytes array containing a new KeyA
block0_access_bitsAccess Permissions Bits for Block 0. Values 0 to 7
block1_access_bitsAccess Permissions Bits for Block 1. Values 0 to 7
block2_access_bitsAccess Permissions Bits for Block 2. Values 0 to 7
sector_trailer_access_bitsSector Trailer Access permissions bits. Values 0 to 7
sector_trailer_byte9GPB value
new_key_BPointer on 6 bytes array containing a new KeyB
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWriteUnsafe_PKM()

UFR_STATUS DL_API SectorTrailerWriteUnsafe_PKM ( UFR_HANDLE hndUFR,
uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer. It writes following data: KeyA, Block Access Bits, Trailer Access Bits, GeneralPurposeByte(GPB), KeyB, same as construction of Sector Trailer. Difference between this function and SectorTrailerWrite is :

  • SectorTrailerWrite will check parameters and “safely” write them into trailer, non valid values will not be written
  • SectorTrailerWriteUnsafe writes array of 16 bytes as raw binary trailer representation, any value can be written. USE THIS FUNCTION WITH CAUTION, WRONG VALUES CAN DESTROY CARD!
Parameters
hndUFRhandle of the uFR device
addressing_modeDefines if Absolute (0) or Relative (1) Block Addressing mode is used
addressAddress of Trailer according to addressing_mode
sector_trailerPointer to 16 byte array as binary representation of Sector Trailer
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ ValueBlockRead_PKM()

UFR_STATUS DL_API ValueBlockRead_PKM ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockInSectorRead_PKM()

UFR_STATUS DL_API ValueBlockInSectorRead_PKM ( UFR_HANDLE hndUFR,
VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Read particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of reading value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockWrite_PKM()

UFR_STATUS DL_API ValueBlockWrite_PKM ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockInSectorWrite_PKM()

UFR_STATUS DL_API ValueBlockInSectorWrite_PKM ( UFR_HANDLE hndUFR,
int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Write particular Value block using absolute Block address. This function uses Mifare Classic specific mechanism of writing value which is stored into whole block. Value blocks have a fixed data format which permits error detection and correction and a backup management. Value is a signed 4-byte value and it is stored three times, twice non-inverted and once inverted. Negative numbers are stored in standard 2's complement format. For more info, please refer to Mifare Classic documentation. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
valuePointer to variable where retrieved value will be stored
value_addrSignifies a 1-byte address, which can be used to save the storage address of a block, when implementing a powerful backup management. For more info, please refer to Mifare Classic documentation.
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockIncrement_PKM()

UFR_STATUS DL_API ValueBlockIncrement_PKM ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Increments particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_valuevalue showing how much initial block value will be incremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockInSectorIncrement_PKM()

UFR_STATUS DL_API ValueBlockInSectorIncrement_PKM ( UFR_HANDLE hndUFR,
int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Increments particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
increment_value
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockDecrement_PKM()

UFR_STATUS DL_API ValueBlockDecrement_PKM ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Decrements particular Value block with specified value using absolute Block address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
block_addressAbsolute block address
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81 key_index Index of reader’s key to be used (RK mode) For Crypto1 keys (0 - 31) For Mifare Plus AES keys (0 - 15) (fw version to 5.0.36) For key into SAM (1 - 127) For Mifare Plus and fw versions from 5.0.36 and library versions from 5.0.34. in MIFARE_AUTHENT1A or MIFARE_AUTHENT1B mode uses AES key calculated from Crypto1 key (0 -31), and in MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B mode uses AES keys (0 - 15)
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status

◆ ValueBlockInSectorDecrement_PKM()

UFR_STATUS DL_API ValueBlockInSectorDecrement_PKM ( UFR_HANDLE hndUFR,
int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

Multi reader support. Provided Key mode (PK) Decrements particular Value block with specified value using Block in Sector address. Mifare Plus X, SE and EV1 using. For firmware versions from 5.0.36 and library versions from 5.0.34, this functions may be used for Mifare plus cards. If authentication mode is MIFARE_AUTHENT1A or MIFARE_AUTHENT1B, AES key for authentication, and new AES key A and new AES key B are calculate from Crypto1 keys. If authentication mode is MIFARE_PLUS_AES_AUTHENT1A or MIFARE_PLUS_AES_AUTHENT1B, new AES keys are provided to reader.

Parameters
hndUFRhandle of the uFR device
decrement_valuevalue showing how much initial block value will be decremented
sector_addressAbsolute Sector address
block_in_sector_addressBlock address in Sector
auth_modeDefines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 For Mifare Plus tags (PK mode) defines whether to perform authentication with key A or key B: use KeyA - MIFARE_PLUS_AES_AUTHENT1A = 0x80 or KeyB - MIFARE_PLUS_AES_AUTHENT1B = 0x81
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
Returns
Operation status