uFCoder 2.62
Loading...
Searching...
No Matches
EEPROM manipulation

Functions related to reading/writing data in the reader EEPROM, e.g user data, keys and more. More...

Functions

UFR_STATUS DL_API ChangeReaderPassword (IN uint8_t *old_password, IN uint8_t *new_password)
 This function is used in Common, Advance and Access Control set of functions.
 
UFR_STATUS DL_API ReaderEepromRead (OUT uint8_t *data, uint32_t address, uint32_t size)
 Function returns array of data read from EEPROM. Maximal length of array is 128 bytes.
 
UFR_STATUS DL_API ReaderEepromWrite (IN uint8_t *data, uint32_t address, uint32_t size, IN uint8_t *password)
 Function writes array of data into EEPROM. Maximal length of array is 128 bytes.
 
UFR_STATUS DL_API ReaderKeysLock (IN const uint8_t *password)
 Lock reader’s keys to prevent further changing.
 
UFR_STATUS DL_API ReaderKeysUnlock (IN const uint8_t *password)
 Unlock reader’s keys if they are locked with previous function. The factory setting is that reader keys are unlocked.
 
UFR_STATUS DL_API ReaderKeyWrite (IN const uint8_t *aucKey, uint8_t ucKeyIndex)
 Store a new key or change existing key under provided index parameter.
 
UFR_STATUS DL_API ReadUserData (OUT uint8_t *aucData)
 Read user data written in device NV memory.
 
UFR_STATUS DL_API ReadUserDataExt (OUT uint8_t *aucData)
 Read user data written in device NV memory.
 
UFR_STATUS DL_API WriteUserData (IN const uint8_t *aucData)
 Write user data into the device's NV memory.
 
UFR_STATUS DL_API WriteUserDataExt (IN const uint8_t *aucData)
 Write user data into the device's NV memory.
 

Detailed Description

Functions related to reading/writing data in the reader EEPROM, e.g user data, keys and more.

Function Documentation

◆ ChangeReaderPassword()

UFR_STATUS DL_API ChangeReaderPassword ( IN uint8_t * old_password,
IN uint8_t * new_password )

This function is used in Common, Advance and Access Control set of functions.

It defines/changes password which I used for:

  • Locking/unlocking keys stored into reader
  • Setting date/time of RTC
Parameters
old_passwordpointer to the 8 bytes array containing current password
new_passwordpointer to the 8 bytes array containing new password
Returns
Operation status

◆ ReaderEepromRead()

UFR_STATUS DL_API ReaderEepromRead ( OUT uint8_t * data,
uint32_t address,
uint32_t size )

Function returns array of data read from EEPROM. Maximal length of array is 128 bytes.

Parameters
datapointer to array containing data from EEPROM
addressaddress of first data
sizelength of array
Returns
Operation status

◆ ReaderEepromWrite()

UFR_STATUS DL_API ReaderEepromWrite ( IN uint8_t * data,
uint32_t address,
uint32_t size,
IN uint8_t * password )

Function writes array of data into EEPROM. Maximal length of array is 128 bytes.

Function requires password which length is 8 bytes. Factory password is “11111111” (0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31).

Parameters
datapointer to array containing data
addressaddress of first data
sizelength of array password pointer to array containing password Functions that works with Mifare Desfire Card (AES encryption in reader) AES encryption and decryption is performed in the reader. AES keys are stored into reader.
passwordpointer to array containing password Functions that works with Mifare Desfire Card (AES encryption in reader) AES encryption and decryption is performed in the reader. AES keys are stored into reader.
Returns
Operation status

◆ ReaderKeysLock()

UFR_STATUS DL_API ReaderKeysLock ( IN const uint8_t * password)

Lock reader’s keys to prevent further changing.

Parameters
passwordpointer to the 8 bytes array containing valid password.
Returns
Operation status

◆ ReaderKeysUnlock()

UFR_STATUS DL_API ReaderKeysUnlock ( IN const uint8_t * password)

Unlock reader’s keys if they are locked with previous function. The factory setting is that reader keys are unlocked.

Parameters
passwordpointer to the 8 bytes array containing valid password.
Returns
Operation status

◆ ReaderKeyWrite()

UFR_STATUS DL_API ReaderKeyWrite ( IN const uint8_t * aucKey,
uint8_t ucKeyIndex )

Store a new key or change existing key under provided index parameter.

The keys are in a special area in EEPROM that can not be read anymore which gains protection.

Parameters
aucKeyPointer to an array of 6 bytes containing the key. Default key values are always “FF FF FF FF FF FF” hex.
ucKeyIndexkey Index. Possible values ​​are 0 to 31.
Returns
Operation status

◆ ReadUserData()

UFR_STATUS DL_API ReadUserData ( OUT uint8_t * aucData)

Read user data written in device NV memory.

User data is 16 byte long.

Parameters
aucDatapointer to a 16 bytes array containing user data
Returns
Operation status

◆ ReadUserDataExt()

UFR_STATUS DL_API ReadUserDataExt ( OUT uint8_t * aucData)

Read user data written in device NV memory.

User data is 32 byte long.

Parameters
aucDatapointer to a 32 bytes array containing user data
Returns
Operation status

◆ WriteUserData()

UFR_STATUS DL_API WriteUserData ( IN const uint8_t * aucData)

Write user data into the device's NV memory.

User data is 16 byte long.

Parameters
aucDatapointer to a 16 byte array containing user data
Returns
Operation status

◆ WriteUserDataExt()

UFR_STATUS DL_API WriteUserDataExt ( IN const uint8_t * aucData)

Write user data into the device's NV memory.

User data is 32 byte long.

Parameters
aucDatapointer to a 32 byte array containing user data
Returns
Operation status