NXP Reader Library  v17.1.0.2535
MIFARE Identity

These Functions implement the MIFARE Identity commands. More...

Collaboration diagram for MIFARE Identity:

Modules

 Component : Software
 
 Component : Sam_NonX
 
 Component : Sam_X
 
 Commands_SecureMessaging
 These Components implement the MIFARE Identity Secure Messaging related commands.
 
 Commands_MemoryConfiguration
 These Components implement the MIFARE Identity Memory and Configuration Management related commands.
 
 Commands_KeyManagement
 These Components implement the MIFARE Identity Key Management related commands.
 
 Commands_FileManagement
 These Components implement the MIFARE Identity File Management related commands.
 
 Commands_DataManagement
 These Components implement the MIFARE Identity Data Management related commands.
 
 Commands_TransactionManagement
 These Components implement the MIFARE Identity Transaction Management related commands.
 
 Commands_ISO7816
 These Components implement the MIFARE Identity ISO/IEC 7816-4 Basic commands.
 
 Commands_OriginalityCheck
 These Components implement the MIFARE Identity Originality Check functions.
 
 Commands_Miscellaneous
 These Components implement the MIFARE DESFire Light Miscellaneous functions. These are not part of actual Identity data sheet rather its for internal purpose.
 

Other Options for various Functions

#define PHAL_MFIDENTITY_ORIGINALITY_KEY_FIRST   0x01U
 Originality key for AES.
 
#define PHAL_MFIDENTITY_ORIGINALITY_KEY_LAST   0x04U
 Originality key for AES

 
#define PHAL_MFIDENTITY_APP_KEY_LAST   0x04U
 Numebr of application keys.
 
#define PHAL_MFIDENTITY_MAC_DATA_INCOMPLETE   0x01U
 Option for indicating more data to come in next call for MAC calculation.
 
#define PHAL_MFIDENTITY_COMMUNICATION_MAC_ON_RC   0x02U
 MAC is appended over response

 
#define PHAL_MFIDENTITY_AUTHENTICATE_RESET   0x08U
 authentication state shall be reset
 

The communication mode to be used.

#define PHAL_MFIDENTITY_COMMUNICATION_PLAIN   0x00U
 Plain mode of communication.
 
#define PHAL_MFIDENTITY_COMMUNICATION_PLAIN_1   0x20U
 Plain mode of communication.
 
#define PHAL_MFIDENTITY_COMMUNICATION_MACD   0x10U
 MAC mode of communication.
 
#define PHAL_MFIDENTITY_COMMUNICATION_ENC   0x30U
 Enciphered mode of communication.
 

Error Codes mapping to custom values.

#define PHAL_MFIDENTITY_ERR_FORMAT   (PH_ERR_CUSTOM_BEGIN + 0)
 MF Identity Response - No changes done to backup files.
 
#define PHAL_MFIDENTITY_ERR_OUT_OF_EEPROM_ERROR   (PH_ERR_CUSTOM_BEGIN + 1)
 MF Identity Response - Insufficient NV-Memory.
 
#define PHAL_MFIDENTITY_ERR_NO_SUCH_KEY   (PH_ERR_CUSTOM_BEGIN + 2)
 MF Identity Invalid key number specified.
 
#define PHAL_MFIDENTITY_ERR_PERMISSION_DENIED   (PH_ERR_CUSTOM_BEGIN + 3)
 MF Identity Current configuration/status does not allow the requested command.
 
#define PHAL_MFIDENTITY_ERR_APPLICATION_NOT_FOUND   (PH_ERR_CUSTOM_BEGIN + 4)
 MF Identity Requested AID not found on PICC.
 
#define PHAL_MFIDENTITY_ERR_BOUNDARY_ERROR   (PH_ERR_CUSTOM_BEGIN + 5)
 MF Identity Attempt to read/write data from/to beyond the files/record's limits.
 
#define PHAL_MFIDENTITY_ERR_COMMAND_ABORTED   (PH_ERR_CUSTOM_BEGIN + 6)
 MF Identity Previous cmd not fully completed. More...
 
#define PHAL_MFIDENTITY_ERR_COUNT   (PH_ERR_CUSTOM_BEGIN + 7)
 MF Identity Num. More...
 
#define PHAL_MFIDENTITY_ERR_DUPLICATE   (PH_ERR_CUSTOM_BEGIN + 8)
 MF Identity File/Application with same number already exists.
 
#define PHAL_MFIDENTITY_ERR_FILE_NOT_FOUND   (PH_ERR_CUSTOM_BEGIN + 9)
 MF Identity Specified file number does not exist.
 
#define PHAL_MFIDENTITY_ERR_PICC_CRYPTO   (PH_ERR_CUSTOM_BEGIN + 10)
 MF Identity Crypto error returned by PICC.
 
#define PHAL_MFIDENTITY_ERR_PARAMETER_ERROR   (PH_ERR_CUSTOM_BEGIN + 11)
 MF Identity Parameter value error returned by PICC.
 
#define PHAL_MFIDENTITY_ERR_DF_GEN_ERROR   (PH_ERR_CUSTOM_BEGIN + 12)
 MF Identity DesFire Generic error. More...
 
#define PHAL_MFIDENTITY_ERR_DF_7816_GEN_ERROR   (PH_ERR_CUSTOM_BEGIN + 13)
 MF Identity ISO 7816 Generic error. More...
 
#define PHAL_MFIDENTITY_ERR_CMD_INVALID   (PH_ERR_CUSTOM_BEGIN + 14)
 MF Identity ISO 7816 Generic error. More...
 

Key Types

#define PHAL_MFIDENTITY_KEY_TYPE_2K3DES   0x00U
 2 Key Triple Des
 
#define PHAL_MFIDENTITY_KEY_TYPE_3K3DES   0x01U
 3 Key Triple Des
 
#define PHAL_MFIDENTITY_KEY_TYPE_AES128   0x02U
 AES 128 Key.
 

Detailed Description

These Functions implement the MIFARE Identity commands.

Macro Definition Documentation

◆ PHAL_MFIDENTITY_ERR_COMMAND_ABORTED

#define PHAL_MFIDENTITY_ERR_COMMAND_ABORTED   (PH_ERR_CUSTOM_BEGIN + 6)

MF Identity Previous cmd not fully completed.

Not all frames were requested or provided by the PCD.

◆ PHAL_MFIDENTITY_ERR_COUNT

#define PHAL_MFIDENTITY_ERR_COUNT   (PH_ERR_CUSTOM_BEGIN + 7)

MF Identity Num.

of applns limited to 28. No additional applications possible.

◆ PHAL_MFIDENTITY_ERR_DF_GEN_ERROR

#define PHAL_MFIDENTITY_ERR_DF_GEN_ERROR   (PH_ERR_CUSTOM_BEGIN + 12)

MF Identity DesFire Generic error.

Check additional Info.

◆ PHAL_MFIDENTITY_ERR_DF_7816_GEN_ERROR

#define PHAL_MFIDENTITY_ERR_DF_7816_GEN_ERROR   (PH_ERR_CUSTOM_BEGIN + 13)

MF Identity ISO 7816 Generic error.

Check Additional Info.

◆ PHAL_MFIDENTITY_ERR_CMD_INVALID

#define PHAL_MFIDENTITY_ERR_CMD_INVALID   (PH_ERR_CUSTOM_BEGIN + 14)

MF Identity ISO 7816 Generic error.

Check Additional Info.