NXP Reader Library  v17.1.0.2535
NTAG 42x DNA / TT

These Functions implement the NTAG 42x DNA / TT commands. More...

Collaboration diagram for NTAG 42x DNA / TT:

Modules

 Component : Software
 
 Custom Error Codes
 
 Component : Sam_NonX
 
 Component : Sam_X
 
 Commands_SecureMessaging
 These Components implement the MIFARE MFNTAG42XDNA Secure Messaging related commands.
 
 Commands_MemoryConfiguration
 These Components implement the MIFARE NTAG 42xDNA Memory and Configuration Management related commands.
 
 Commands_KeyManagement
 These Components implement the MIFARE NTAG 42xDNA Key Management related commands.
 
 Commands_FileManagement
 These Components implement the MIFARE NTAG 42xDNA File Management related commands.
 
 Commands_DataManagement
 These Components implement the MIFARE NTAG 42xDNA Data Management related commands.
 
 Commands_ISO7816
 These Components implement the MIFARE NTAG 42xDNA ISO/IEC 7816-4 Basic commands.
 
 Commands_OriginalityCheck
 These Components implement the MIFARE NTAG 42xDNA Originality Check functions.
 
 Commands_TagTamper
 These Components implement the MIFARE NTAG 42xDNA Tag Tamper Protection 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_MFNTAG42XDNA_ORIGINALITY_KEY_FIRST   0x01U
 Originality key for AES.
 
#define PHAL_MFNTAG42XDNA_ORIGINALITY_KEY_LAST   0x04U
 Originality key for AES

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

 
#define PHAL_MFNTAG42XDNA_AUTHENTICATE_RESET   0x08U
 authentication state shall be reset
 

The communication mode to be used.

#define PHAL_MFNTAG42XDNA_COMMUNICATION_PLAIN   0x00U
 Plain mode of communication.
 
#define PHAL_MFNTAG42XDNA_COMMUNICATION_PLAIN_1   0x20U
 Plain mode of communication.
 
#define PHAL_MFNTAG42XDNA_COMMUNICATION_MACD   0x10U
 MAC mode of communication.
 
#define PHAL_MFNTAG42XDNA_COMMUNICATION_ENC   0x30U
 Enciphered mode of communication.
 

Key Types

#define PHAL_MFNTAG42XDNA_KEY_TYPE_2K3DES   0x00U
 2 Key Triple Des
 
#define PHAL_MFNTAG42XDNA_KEY_TYPE_3K3DES   0x01U
 3 Key Triple Des
 
#define PHAL_MFNTAG42XDNA_KEY_TYPE_AES128   0x02U
 AES 128 Key.
 

NTAG 42x DNA / TT Native Commands

#define PHAL_MFNTAG42XDNA_CMD_AUTHENTICATE_EV2_FIRST   0x71
 MFNTAG42XDNA Authenticate Ev2 First command.
 
#define PHAL_MFNTAG42XDNA_CMD_AUTHENTICATE_EV2_NON_FIRST   0x77
 MFNTAG42XDNA Authenticate Ev2 Non First command.
 
#define PHAL_MFNTAG42XDNA_CMD_CHANGE_KEY   0xC4
 MFNTAG42XDNA Change key cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_GET_KEY_VERSION   0x64
 MFNTAG42XDNA Get Key Version.
 
#define PHAL_MFNTAG42XDNA_CMD_GET_VERSION   0x60
 MFNTAG42XDNA Get Version cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_SET_CONFIG   0x5C
 MFNTAG42XDNA Set Configuration Cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_GET_CARD_UID   0x51
 MFNTAG42XDNA Get Card UID cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_GET_FILE_SETTINGS   0xF5
 MFNTAG42XDNA Get File settings cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_GET_FILE_COUNTERS   0xF6
 MFNTAG42XDNA Get File Counters cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_GET_TAG_TAMPER_STATUS   0xF7
 MFNTAG42XDNA Get Tag Tamper Status cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_CHANGE_FILE_SETTINGS   0x5F
 MFNTAG42XDNA Change file settings cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_READ_DATA   0xBD
 MFNTAG42XDNA Read Data cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_READ_DATA_ISO   0xAD
 MFNTAG42XDNA Read Data cmd using ISO chaining.
 
#define PHAL_MFNTAG42XDNA_CMD_WRITE_DATA   0x3D
 MFNTAG42XDNA Write data cmd.
 
#define PHAL_MFNTAG42XDNA_CMD_WRITE_DATA_ISO   0x8D
 MFNTAG42XDNA Write data cmd using ISO chaining.
 
#define PHAL_MFNTAG42XDNA_CMD_READ_SIG   0x3C
 MFNTAG42XDNA Verify read signature command.
 

NTAG 42x DNA / TT ISO7816 Commands

#define PHAL_MFNTAG42XDNA_CMD_ISO7816_SELECT_FILE   0xA4
 ISO Select File.
 
#define PHAL_MFNTAG42XDNA_CMD_ISO7816_READ_BINARY   0xB0
 ISO Read Binary.
 
#define PHAL_MFNTAG42XDNA_CMD_ISO7816_UPDATE_BINARY   0xD6
 ISO UPDATE Binary.
 

NTAG 42x DNA / TT Native Response Codes

#define PHAL_MFNTAG42XDNA_RESP_OPERATION_OK   0x00U
 MFNTAG42XDNA Response - Successful operation.
 
#define PHAL_MFNTAG42XDNA_RESP_OK   0x90U
 MFNTAG42XDNA Response - Successful operation.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_FORMAT   0x0CU
 MFNTAG42XDNA Format Error.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_CMD_INVALID   0x0BU
 MFNTAG42XDNA Invalid Command Error.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_OUT_OF_EEPROM_ERROR   0x0EU
 MFNTAG42XDNA Response - Insufficient NV-Memory.
 
#define PHAL_MFNTAG42XDNA_RESP_ILLEGAL_COMMAND_CODE   0x1CU
 MFNTAG42XDNA command code not supported.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_INTEGRITY_ERROR   0x1EU
 MFNTAG42XDNA CRC or MAC does not match data padding bytes not valid.
 
#define PHAL_MFNTAG42XDNA_RESP_NO_SUCH_KEY   0x40U
 MFNTAG42XDNA Invalid key number specified.
 
#define PHAL_MFNTAG42XDNA_RESP_CHAINING   0x71U
 MFNTAG42XDNA ISO Chaining Status.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_LENGTH_ERROR   0x7EU
 MFNTAG42XDNA Length of command string invalid.
 
#define PHAL_MFNTAG42XDNA_RESP_PERMISSION_DENIED   0x9DU
 MFNTAG42XDNA Current configuration/status does not allow the requested command.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_PARAMETER_ERROR   0x9EU
 MFNTAG42XDNA Value of params invalid.
 
#define PHAL_MFNTAG42XDNA_RESP_APPLICATION_NOT_FOUND   0xA0U
 MFNTAG42XDNA Requested AID not found on PICC.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_APPL_INTEGRITY_ERROR   0xA1U
 MFNTAG42XDNA Unrecoverable error within application, appln will be disabled.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_AUTHENTICATION_ERROR   0xAEU
 MFNTAG42XDNA Current authentication status does not allow the requested cmd.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_AUTHENTICATION_DELAY   0xADU
 Keep Waiting till Delay is met.
 
#define PHAL_MFNTAG42XDNA_RESP_ADDITIONAL_FRAME   0xAFU
 MFNTAG42XDNA Additional data frame is expected to be sent.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_BOUNDARY_ERROR   0xBEU
 MFNTAG42XDNA Attempt to read/write data from/to beyond the files/record's limits.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_PICC_INTEGRITY   0xC1U
 MFNTAG42XDNA Unrecoverable error within PICC. More...
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_COMMAND_ABORTED   0xCAU
 MFNTAG42XDNA Previous cmd not fully completed. More...
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_PIC_DISABLED   0xCDU
 MFNTAG42XDNA PICC was disabled by an unrecoverable error.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_COUNT   0xCEU
 MFNTAG42XDNA Num. More...
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_DUPLICATE   0xDEU
 MFNTAG42XDNA File/Application with same number already exists.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_EEPROM   0xEEU
 MFNTAG42XDNA Could not complete NV-Write operation due to loss of power.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_FILE_NOT_FOUND   0xF0U
 MFNTAG42XDNA Specified file number does not exist.
 
#define PHAL_MFNTAG42XDNA_RESP_ERR_FILE_INTEGRITY   0xF1U
 MFNTAG42XDNA Unrecoverable error within file. More...
 
#define PHAL_MFNTAG42XDNA_ISO7816_SUCCESS   0x9000U
 Correct execution.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_WRONG_LENGTH   0x6700U
 Wrong length.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_WRONG_PARAMS   0x6A86U
 Wrong parameters P1 and/or P2.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_WRONG_LC   0x6A87U
 Lc inconsistent with P1/p2.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_WRONG_LE   0x6C00U
 Wrong Le.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_NO_PRECISE_DIAGNOSTICS   0x6F00U
 No precise diagnostics.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_EOF_REACHED   0x6282U
 End of File reached.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_LIMITED_FUNCTIONALITY_INS   0x6283U
 Limited Functionality.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_FILE_ACCESS   0x6982U
 File access not allowed.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_FILE_EMPTY   0x6985U
 File empty or access conditions not satisfied.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_FILE_NOT_FOUND   0x6A82U
 File not found.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_MEMORY_FAILURE   0x6581U
 Memory failure (unsuccessful update).
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U
 Wrong parameter p1 or p2. More...
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_WRONG_CLA   0x6E00U
 Wrong Class byte.
 
#define PHAL_MFNTAG42XDNA_ISO7816_ERR_UNSUPPORTED_INS   0x6D00U
 Instruction not supported.
 

Detailed Description

These Functions implement the NTAG 42x DNA / TT commands.

Macro Definition Documentation

◆ PHAL_MFNTAG42XDNA_RESP_ERR_PICC_INTEGRITY

#define PHAL_MFNTAG42XDNA_RESP_ERR_PICC_INTEGRITY   0xC1U

MFNTAG42XDNA Unrecoverable error within PICC.

PICC will be disabled.

◆ PHAL_MFNTAG42XDNA_RESP_ERR_COMMAND_ABORTED

#define PHAL_MFNTAG42XDNA_RESP_ERR_COMMAND_ABORTED   0xCAU

MFNTAG42XDNA Previous cmd not fully completed.

Not all frames were requested or provided by the PCD.

◆ PHAL_MFNTAG42XDNA_RESP_ERR_COUNT

#define PHAL_MFNTAG42XDNA_RESP_ERR_COUNT   0xCEU

MFNTAG42XDNA Num.

of applns limited to 28. No additional applications possible.

◆ PHAL_MFNTAG42XDNA_RESP_ERR_FILE_INTEGRITY

#define PHAL_MFNTAG42XDNA_RESP_ERR_FILE_INTEGRITY   0xF1U

MFNTAG42XDNA Unrecoverable error within file.

File will be disabled.

◆ PHAL_MFNTAG42XDNA_ISO7816_ERR_INCORRECT_PARAMS

#define PHAL_MFNTAG42XDNA_ISO7816_ERR_INCORRECT_PARAMS   0x6B00U

Wrong parameter p1 or p2.

READ RECORDS.