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

Functions specific to Mifare Classic® family of cards (Classic 1K and 4K). All functions are dedicated for use with Mifare Classic® cards. However, some functions can be used with other card types, mostly in cases of direct addressing scheme. E.g BlockRead(), BlockWrite(), LinearRead(), LinearWrite() can be used also with the NTAG2XX tags. More...

Functions

UFR_STATUS DL_API BlockInSectorRead (OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Read particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorRead_AKM1 (OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Read particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorRead_AKM2 (OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Read particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorRead_PK (OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Read particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorReadSamKey (OUT uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Read particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorWrite (IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Write particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorWrite_AKM1 (IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Write particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorWrite_AKM2 (IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Write particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorWrite_PK (IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Write particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockInSectorWriteSamKey (IN const uint8_t *data, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Write particular block using relative Block in Sector address.
 
UFR_STATUS DL_API BlockRead (OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Read particular block using absolute Block address.
 
UFR_STATUS DL_API BlockRead_AKM1 (OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Read particular block using absolute Block address.
 
UFR_STATUS DL_API BlockRead_AKM2 (OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Read particular block using absolute Block address.
 
UFR_STATUS DL_API BlockRead_PK (OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Read particular block using absolute Block address.
 
UFR_STATUS DL_API BlockReadSamKey (OUT uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Read particular block using absolute Block address.
 
UFR_STATUS DL_API BlockWrite (IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Write particular block using absolute Block address.
 
UFR_STATUS DL_API BlockWrite_AKM1 (IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Write particular block using absolute Block address.
 
UFR_STATUS DL_API BlockWrite_AKM2 (IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Write particular block using absolute Block address.
 
UFR_STATUS DL_API BlockWrite_PK (IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Write particular block using absolute Block address.
 
UFR_STATUS DL_API BlockWriteSamKey (IN const uint8_t *data, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Write particular block using absolute Block address.
 
UFR_STATUS DL_API LinearFormatCard (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)
 This function is specific to Mifare Classic cards only. It performs “Format card” operation - write new Sector Trailer values on whole card at once.
 
UFR_STATUS DL_API LinearFormatCard_AKM1 (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)
 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.
 
UFR_STATUS DL_API LinearFormatCard_AKM2 (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)
 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.
 
UFR_STATUS DL_API LinearFormatCard_PK (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)
 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.
 
UFR_STATUS DL_API LinearRead (OUT uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesReturned, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 Linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags.
 
UFR_STATUS DL_API LinearRead_AKM1 (OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags.
 
UFR_STATUS DL_API LinearRead_AKM2 (OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags.
 
UFR_STATUS DL_API LinearRead_PK (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)
 Provided Key mode (PK) Linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags.
 
UFR_STATUS DL_API LinearReadSamKey (OUT uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesReturned, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 Linear reading in uFR firmware utilise FAST_READ ISO 14443-3 command with NTAG21x and Mifare Ultralight EV1 tags.
 
UFR_STATUS DL_API LinearWrite (IN const uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesWritten, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 These functions are used for writing data to the card using emulation of the linear address space.
 
UFR_STATUS DL_API LinearWrite_AKM1 (IN const uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_written, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) These functions are used for writing data to the card using emulation of the linear address space.
 
UFR_STATUS DL_API LinearWrite_AKM2 (IN const uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_written, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) These functions are used for writing data to the card using emulation of the linear address space.
 
UFR_STATUS DL_API LinearWrite_PK (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)
 Provided Key mode (PK) These functions are used for writing data to the card using emulation of the linear address space.
 
UFR_STATUS DL_API LinearWriteSamKey (IN const uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesWritten, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 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. *only uFR CS with SAM support.
 
UFR_STATUS DL_API LinRowRead (OUT uint8_t *aucData, uint16_t usLinearAddress, uint16_t usDataLength, VAR uint16_t *lpusBytesReturned, uint8_t ucKeyMode, uint8_t ucReaderKeyIndex)
 Read Linear data Address Space. On the contrary of LinearRead functions, this functions read whole card including trailer blocks and manufacturer block.
 
UFR_STATUS DL_API LinRowRead_AKM1 (OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Read Linear data Address Space.
 
UFR_STATUS DL_API LinRowRead_AKM2 (OUT uint8_t *data, uint16_t linear_address, uint16_t length, VAR uint16_t *bytes_returned, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Read Linear data Address Space.
 
UFR_STATUS DL_API LinRowRead_PK (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)
 Provided Key mode (PK) Read Linear data Address Space.
 
UFR_STATUS DL_API SectorTrailerWrite (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)
 This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWrite_AKM1 (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)
 Automatic Key Mode 1 (AKM1) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWrite_AKM2 (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)
 Automatic Key Mode 2 (AKM2) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWrite_PK (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)
 Provided Key mode (PK) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWriteSamKey (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)
 This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe (uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode, uint8_t key_index)
 This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM1 (uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM2 (uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API SectorTrailerWriteUnsafe_PK (uint8_t addressing_mode, uint8_t address, IN const uint8_t *sector_trailer, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) This function is specific to Mifare Classic cards only. It writes new Sector Trailer value at one Sector Trailer.
 
UFR_STATUS DL_API ValueBlockDecrement (int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Decrements particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockDecrement_AKM1 (int32_t decrement_value, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Decrements particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockDecrement_AKM2 (int32_t decrement_value, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Decrements particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockDecrement_PK (int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Decrements particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockDecrementSamKey (int32_t decrement_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Decrements particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockIncrement (int32_t increment_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Increments particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockIncrement_AKM1 (int32_t increment_value, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Increments particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockIncrement_AKM2 (int32_t increment_value, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Increments particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockIncrement_PK (int32_t increment_value, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 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.
 
UFR_STATUS DL_API ValueBlockIncrementSamKey (int32_t increment_value, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Increments particular Value block with specified value using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorDecrement (int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Decrements particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM1 (int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Decrements particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM2 (int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Decrements particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorDecrement_PK (int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Decrements particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorDecrementSamKey (int32_t decrement_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Decrements particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorIncrement (int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Increments particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM1 (int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Increments particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM2 (int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Increments particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorIncrement_PK (int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Increments particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorIncrementSamKey (int32_t increment_value, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode, uint8_t key_index)
 Increments particular Value block with specified value using Block in Sector address.
 
UFR_STATUS DL_API ValueBlockInSectorRead (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)
 Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorRead_AKM1 (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorRead_AKM2 (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorRead_PK (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)
 Provided Key mode (PK) Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorReadSamKey (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)
 Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorWrite (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)
 Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorWrite_AKM1 (int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorWrite_AKM2 (int32_t value, uint8_t value_addr, uint8_t sector_address, uint8_t block_in_sector_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorWrite_PK (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)
 Provided Key mode (PK) Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockInSectorWriteSamKey (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)
 Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockRead (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockRead_AKM1 (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockRead_AKM2 (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockRead_PK (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockReadSamKey (VAR int32_t *value, VAR uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Read particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockWrite (int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockWrite_AKM1 (int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 1 (AKM1) Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockWrite_AKM2 (int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode)
 Automatic Key Mode 2 (AKM2) Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockWrite_PK (int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode, IN const uint8_t *key)
 Provided Key mode (PK) Write particular Value block using absolute Block address.
 
UFR_STATUS DL_API ValueBlockWriteSamKey (int32_t value, uint8_t value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index)
 Write particular Value block using absolute Block address.
 

Detailed Description

Functions specific to Mifare Classic® family of cards (Classic 1K and 4K). All functions are dedicated for use with Mifare Classic® cards. However, some functions can be used with other card types, mostly in cases of direct addressing scheme. E.g BlockRead(), BlockWrite(), LinearRead(), LinearWrite() can be used also with the NTAG2XX tags.

Function Documentation

◆ BlockInSectorRead()

UFR_STATUS DL_API BlockInSectorRead ( OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Read particular block using relative Block in Sector address.

Parameters
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) 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

◆ BlockInSectorRead_AKM1()

UFR_STATUS DL_API BlockInSectorRead_AKM1 ( OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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

Parameters
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

◆ BlockInSectorRead_AKM2()

UFR_STATUS DL_API BlockInSectorRead_AKM2 ( OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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

Parameters
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

◆ BlockInSectorRead_PK()

UFR_STATUS DL_API BlockInSectorRead_PK ( OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

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

Parameters
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)
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

◆ BlockInSectorReadSamKey()

UFR_STATUS DL_API BlockInSectorReadSamKey ( OUT uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Read particular block using relative Block in Sector address.

*only uFR CS with SAM support.

Parameters
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) 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()

UFR_STATUS DL_API BlockInSectorWrite ( IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Write particular block using relative Block in Sector address.

Parameters
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
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

◆ BlockInSectorWrite_AKM1()

UFR_STATUS DL_API BlockInSectorWrite_AKM1 ( IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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

Parameters
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 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

◆ BlockInSectorWrite_AKM2()

UFR_STATUS DL_API BlockInSectorWrite_AKM2 ( IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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

Parameters
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 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

◆ BlockInSectorWrite_PK()

UFR_STATUS DL_API BlockInSectorWrite_PK ( IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

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

Parameters
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 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)
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

◆ BlockInSectorWriteSamKey()

UFR_STATUS DL_API BlockInSectorWriteSamKey ( IN const uint8_t * data,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

Write particular block using relative Block in Sector address.

*only uFR CS with SAM support.

Parameters
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
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

◆ BlockRead()

UFR_STATUS DL_API BlockRead ( OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Read particular block using absolute Block address.

Parameters
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

◆ BlockRead_AKM1()

UFR_STATUS DL_API BlockRead_AKM1 ( OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

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

Parameters
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_index Index 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

◆ BlockRead_AKM2()

UFR_STATUS DL_API BlockRead_AKM2 ( OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

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

Parameters
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_index Index 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

◆ BlockRead_PK()

UFR_STATUS DL_API BlockRead_PK ( OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

Provided Key mode (PK) Read particular block using absolute Block address.

Parameters
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_index Index 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)
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

◆ BlockReadSamKey()

UFR_STATUS DL_API BlockReadSamKey ( OUT uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Read particular block using absolute Block address.

*only uFR CS with SAM support.

Parameters
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

◆ BlockWrite()

UFR_STATUS DL_API BlockWrite ( IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Write particular block using absolute Block address.

Parameters
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) 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

◆ BlockWrite_AKM1()

UFR_STATUS DL_API BlockWrite_AKM1 ( IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

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

Parameters
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_index Index 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) 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

◆ BlockWrite_AKM2()

UFR_STATUS DL_API BlockWrite_AKM2 ( IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode )

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

Parameters
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_index Index 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) 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

◆ BlockWrite_PK()

UFR_STATUS DL_API BlockWrite_PK ( IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

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

Parameters
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_index Index 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) key Pointer to 6 bytes array containing Crypto1 key (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode)
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

◆ BlockWriteSamKey()

UFR_STATUS DL_API BlockWriteSamKey ( IN const uint8_t * data,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

Write particular block using absolute Block address.

*only uFR CS with SAM support.

Parameters
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) 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

◆ LinearFormatCard()

UFR_STATUS DL_API LinearFormatCard ( 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 )

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
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_B Pointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
new_key_BPointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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

◆ LinearFormatCard_AKM1()

UFR_STATUS DL_API LinearFormatCard_AKM1 ( 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 )

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
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_B Pointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
new_key_BPointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ LinearFormatCard_AKM2()

UFR_STATUS DL_API LinearFormatCard_AKM2 ( 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 )

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
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_B Pointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
new_key_BPointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ LinearFormatCard_PK()

UFR_STATUS DL_API LinearFormatCard_PK ( 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 )

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
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_B Pointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
new_key_BPointer on 6 bytes array containing a new KeyA lpucSectorsFormatted Pointer to variable holding return value how many sectors are successfully formatted auth_mode Defines whether to perform authentication with key A or key B: use KeyA - MIFARE_AUTHENT1A = 0x60 or KeyB - MIFARE_AUTHENT1B = 0x61 key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ LinearRead()

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

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
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

◆ LinearRead_AKM1()

UFR_STATUS DL_API LinearRead_AKM1 ( OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

Automatic Key Mode 1 (AKM1) 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
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 Pointer to variable holding how many bytes are returned auth_mode For 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)
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

◆ LinearRead_AKM2()

UFR_STATUS DL_API LinearRead_AKM2 ( OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

Automatic Key Mode 2 (AKM2) 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
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 Pointer to variable holding how many bytes are returned auth_mode For 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)
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

◆ LinearRead_PK()

UFR_STATUS DL_API LinearRead_PK ( 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 )

Provided Key mode (PK) 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
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 Pointer to variable holding how many bytes are returned auth_mode For 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)
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)
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

◆ LinearReadSamKey()

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

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. *only uFR CS with SAM support

Parameters
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

◆ LinearWrite()

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

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
aucDataPointer to array of bytes containing data
usLinearAddressAddress of byte - where to start writting
usDataLengthLength of data - how many bytes to write
lpusBytesWrittenPointer to variable holding how many bytes were written
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

◆ LinearWrite_AKM1()

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

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
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 Pointer to variable holding how many bytes are returned auth_mode For 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 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)
bytes_writtenPointer to variable holding how many bytes are 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 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

◆ LinearWrite_AKM2()

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

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
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 Pointer to variable holding how many bytes are returned auth_mode For 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 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)
bytes_writtenPointer to variable holding how many bytes are 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 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

◆ LinearWrite_PK()

UFR_STATUS DL_API LinearWrite_PK ( 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 )

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
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 Pointer to variable holding how many bytes are returned auth_mode For 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 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)
bytes_writtenPointer to variable holding how many bytes are 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 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)
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

◆ LinearWriteSamKey()

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

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. *only uFR CS with SAM support.

Parameters
aucDataPointer to array of bytes containing data
usLinearAddressAddress of byte - where to start writting
usDataLengthLength of data - how many bytes to write
lpusBytesWrittenPointer to variable holding how many bytes were written
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

◆ LinRowRead()

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

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. 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
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

◆ LinRowRead_AKM1()

UFR_STATUS DL_API LinRowRead_AKM1 ( OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

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. 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
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 Pointer to variable holding how many bytes are returned auth_mode For 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. key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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. key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ LinRowRead_AKM2()

UFR_STATUS DL_API LinRowRead_AKM2 ( OUT uint8_t * data,
uint16_t linear_address,
uint16_t length,
VAR uint16_t * bytes_returned,
uint8_t auth_mode )

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. 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
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 Pointer to variable holding how many bytes are returned auth_mode For 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. key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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. key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ LinRowRead_PK()

UFR_STATUS DL_API LinRowRead_PK ( 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 )

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. 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
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 Pointer to variable holding how many bytes are returned auth_mode For 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. key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
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. key_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWrite()

UFR_STATUS DL_API SectorTrailerWrite ( 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 )

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
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

◆ SectorTrailerWrite_AKM1()

UFR_STATUS DL_API SectorTrailerWrite_AKM1 ( 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 )

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
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWrite_AKM2()

UFR_STATUS DL_API SectorTrailerWrite_AKM2 ( 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 )

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
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWrite_PK()

UFR_STATUS DL_API SectorTrailerWrite_PK ( 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 )

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
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWriteSamKey()

UFR_STATUS DL_API SectorTrailerWriteSamKey ( 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 )

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. *only uFR CS with SAM support

Parameters
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

◆ SectorTrailerWriteUnsafe()

UFR_STATUS DL_API SectorTrailerWriteUnsafe ( uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode,
uint8_t key_index )

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
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

◆ SectorTrailerWriteUnsafe_AKM1()

UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM1 ( uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode )

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
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWriteUnsafe_AKM2()

UFR_STATUS DL_API SectorTrailerWriteUnsafe_AKM2 ( uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode )

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
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ SectorTrailerWriteUnsafe_PK()

UFR_STATUS DL_API SectorTrailerWriteUnsafe_PK ( uint8_t addressing_mode,
uint8_t address,
IN const uint8_t * sector_trailer,
uint8_t auth_mode,
IN const uint8_t * key )

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
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_index Index of reader’s key to be used (RK mode) key Pointer to 6 byte array containing key bytes (PK mode)
keyPointer to 6 byte array containing key bytes (PK mode)
Returns
Operation status

◆ ValueBlockDecrement()

UFR_STATUS DL_API ValueBlockDecrement ( int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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
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_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) key Pointer 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_AKM1()

UFR_STATUS DL_API ValueBlockDecrement_AKM1 ( int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode )

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
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_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)
Returns
Operation status

◆ ValueBlockDecrement_AKM2()

UFR_STATUS DL_API ValueBlockDecrement_AKM2 ( int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode )

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
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_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)
Returns
Operation status

◆ ValueBlockDecrement_PK()

UFR_STATUS DL_API ValueBlockDecrement_PK ( int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

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
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_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)
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

◆ ValueBlockDecrementSamKey()

UFR_STATUS DL_API ValueBlockDecrementSamKey ( int32_t decrement_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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. *only uFR CS with SAM support

Parameters
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_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) key Pointer 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()

UFR_STATUS DL_API ValueBlockIncrement ( int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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
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)
Returns
Operation status

◆ ValueBlockIncrement_AKM1()

UFR_STATUS DL_API ValueBlockIncrement_AKM1 ( int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode )

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
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

◆ ValueBlockIncrement_AKM2()

UFR_STATUS DL_API ValueBlockIncrement_AKM2 ( int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode )

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
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

◆ ValueBlockIncrement_PK()

UFR_STATUS DL_API ValueBlockIncrement_PK ( int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

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
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);
keyPointer 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

◆ ValueBlockIncrementSamKey()

UFR_STATUS DL_API ValueBlockIncrementSamKey ( int32_t increment_value,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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. *only uFR CS with SAM support

Parameters
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)
Returns
Operation status

◆ ValueBlockInSectorDecrement()

UFR_STATUS DL_API ValueBlockInSectorDecrement ( int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

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
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) key Pointer 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_AKM1()

UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM1 ( int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
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_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)
Returns
Operation status

◆ ValueBlockInSectorDecrement_AKM2()

UFR_STATUS DL_API ValueBlockInSectorDecrement_AKM2 ( int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
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_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)
Returns
Operation status

◆ ValueBlockInSectorDecrement_PK()

UFR_STATUS DL_API ValueBlockInSectorDecrement_PK ( int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

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
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_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)
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

◆ ValueBlockInSectorDecrementSamKey()

UFR_STATUS DL_API ValueBlockInSectorDecrementSamKey ( int32_t decrement_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

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. *only uFR CS with SAM support

Parameters
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) key Pointer 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()

UFR_STATUS DL_API ValueBlockInSectorIncrement ( int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

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
increment_valuevalue showing how much initial block value will be incremented
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) key Pointer 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_AKM1()

UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM1 ( int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
increment_valuevalue showing how much initial block value will be incremented
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_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)
Returns
Operation status

◆ ValueBlockInSectorIncrement_AKM2()

UFR_STATUS DL_API ValueBlockInSectorIncrement_AKM2 ( int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
increment_valuevalue showing how much initial block value will be incremented
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_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)
Returns
Operation status

◆ ValueBlockInSectorIncrement_PK()

UFR_STATUS DL_API ValueBlockInSectorIncrement_PK ( int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
IN const uint8_t * key )

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
increment_valuevalue showing how much initial block value will be incremented
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_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)
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

◆ ValueBlockInSectorIncrementSamKey()

UFR_STATUS DL_API ValueBlockInSectorIncrementSamKey ( int32_t increment_value,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode,
uint8_t key_index )

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. *only uFR CS with SAM support

Parameters
increment_valuevalue showing how much initial block value will be incremented
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) key Pointer 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()

UFR_STATUS DL_API ValueBlockInSectorRead ( 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 )

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
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

◆ ValueBlockInSectorRead_AKM1()

UFR_STATUS DL_API ValueBlockInSectorRead_AKM1 ( VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
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_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

◆ ValueBlockInSectorRead_AKM2()

UFR_STATUS DL_API ValueBlockInSectorRead_AKM2 ( VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
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_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

◆ ValueBlockInSectorRead_PK()

UFR_STATUS DL_API ValueBlockInSectorRead_PK ( 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 )

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
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_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);
keyPointer 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

◆ ValueBlockInSectorReadSamKey()

UFR_STATUS DL_API ValueBlockInSectorReadSamKey ( 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 )

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. *only uFR CS with SAM support

Parameters
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

◆ ValueBlockInSectorWrite()

UFR_STATUS DL_API ValueBlockInSectorWrite ( 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 )

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
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

◆ ValueBlockInSectorWrite_AKM1()

UFR_STATUS DL_API ValueBlockInSectorWrite_AKM1 ( int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
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_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_AKM2()

UFR_STATUS DL_API ValueBlockInSectorWrite_AKM2 ( int32_t value,
uint8_t value_addr,
uint8_t sector_address,
uint8_t block_in_sector_address,
uint8_t auth_mode )

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
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_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_PK()

UFR_STATUS DL_API ValueBlockInSectorWrite_PK ( 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 )

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
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_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);
keyPointer 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

◆ ValueBlockInSectorWriteSamKey()

UFR_STATUS DL_API ValueBlockInSectorWriteSamKey ( 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 )

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. *only uFR CS with SAM support

Parameters
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

◆ ValueBlockRead()

UFR_STATUS DL_API ValueBlockRead ( VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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
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

◆ ValueBlockRead_AKM1()

UFR_STATUS DL_API ValueBlockRead_AKM1 ( VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode )

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
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) ValueBlockWrite Function description 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. Function declaration (C language) UFR_STATUS ValueBlockWrite(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index); UFR_STATUS ValueBlockWrite_AKM1(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_AKM2(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_PK(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, const uint8_t *key); *only uFR CS with SAM support UFR_STATUS ValueBlockWriteSamKey(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index);
Returns
Operation status

◆ ValueBlockRead_AKM2()

UFR_STATUS DL_API ValueBlockRead_AKM2 ( VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode )

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
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) ValueBlockWrite Function description 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. Function declaration (C language) UFR_STATUS ValueBlockWrite(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index); UFR_STATUS ValueBlockWrite_AKM1(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_AKM2(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_PK(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, const uint8_t *key); *only uFR CS with SAM support UFR_STATUS ValueBlockWriteSamKey(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index);
Returns
Operation status

◆ ValueBlockRead_PK()

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

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
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) ValueBlockWrite Function description 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. Function declaration (C language) UFR_STATUS ValueBlockWrite(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index); UFR_STATUS ValueBlockWrite_AKM1(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_AKM2(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_PK(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, const uint8_t *key); *only uFR CS with SAM support UFR_STATUS ValueBlockWriteSamKey(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index);
keyPointer to 6 byte array containing key bytes (PK mode) For Mifare Plus pointer to 16 bytes array containing AES key (PK mode) ValueBlockWrite Function description 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. Function declaration (C language) UFR_STATUS ValueBlockWrite(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index); UFR_STATUS ValueBlockWrite_AKM1(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_AKM2(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode); UFR_STATUS ValueBlockWrite_PK(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, const uint8_t *key); *only uFR CS with SAM support UFR_STATUS ValueBlockWriteSamKey(int32_t *value, uint8_t *value_addr, uint8_t block_address, uint8_t auth_mode, uint8_t key_index);
Returns
Operation status

◆ ValueBlockReadSamKey()

UFR_STATUS DL_API ValueBlockReadSamKey ( VAR int32_t * value,
VAR uint8_t * value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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. *only uFR CS with SAM support

Parameters
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

◆ ValueBlockWrite()

UFR_STATUS DL_API ValueBlockWrite ( int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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
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

◆ ValueBlockWrite_AKM1()

UFR_STATUS DL_API ValueBlockWrite_AKM1 ( int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode )

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
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

◆ ValueBlockWrite_AKM2()

UFR_STATUS DL_API ValueBlockWrite_AKM2 ( int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode )

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
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

◆ ValueBlockWrite_PK()

UFR_STATUS DL_API ValueBlockWrite_PK ( int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode,
IN const uint8_t * key )

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
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);
keyPointer 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

◆ ValueBlockWriteSamKey()

UFR_STATUS DL_API ValueBlockWriteSamKey ( int32_t value,
uint8_t value_addr,
uint8_t block_address,
uint8_t auth_mode,
uint8_t key_index )

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. *only uFR CS with SAM support

Parameters
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