24#define NBT_AUTHENTICATE_TAG UINT8_C(0x01)
29#define NBT_APPLET_VERSION UINT8_C(0x02)
34#define NBT_AVAILABLE_MEMORY UINT8_C(0x03)
39#define NBT_CHANGE_PASSWORD UINT8_C(0x04)
44#define NBT_CREATE_PASSWORD UINT8_C(0x05)
49#define NBT_DELETE_PASSWORD UINT8_C(0x06)
54#define NBT_GET_DATA UINT8_C(0x07)
59#define NBT_GET_FAP_BYTES UINT8_C(0x08)
64#define NBT_READ_BINARY UINT8_C(0x09)
69#define NBT_READ_FAP_WITH_PASSWORD UINT8_C(0x0A)
74#define NBT_PARSE_FAP_BYTES UINT8_C(0x0B)
79#define NBT_PASS_THROUGH_FETCH_DATA UINT8_C(0x0C)
84#define NBT_PASS_THROUGH_PUT_RESPONSE UINT8_C(0x0D)
89#define NBT_SELECT_APPLICATION UINT8_C(0x0E)
94#define NBT_SELECT_FILE_BY_ID UINT8_C(0x0F)
99#define NBT_UNBLOCK_PASSWORD UINT8_C(0x10)
104#define NBT_UPDATE_BINARY UINT8_C(0x11)
109#define NBT_UPDATE_FAP_BYTES_WITH_PASSWORD UINT8_C(0x12)
114#define NBT_UPDATE_RECURSIVE_BINARY UINT8_C(0x13)
119#define NBT_FAP_FILE_ID UINT16_C(0xE1AF)
124#define NBT_NDEF_FILE_ID UINT16_C(0xE104)
129#define NBT_TOTAL_FILE UINT8_C(0x07)
135#define NBT_FAP_ACCESS_CONDITION_LENGTH UINT8_C(0x06)
140#define NBT_FILE_ID_LENGTH UINT8_C(0x02)
145#define NBT_MAX_LE UINT16_C(0x00FF)
150#define NBT_MAX_LC UINT16_C(0x00FF)
155#define NBT_PASSWORD_ID_MASK UINT8_C(0x1F)
160#define NBT_SIZE_OF_FAP_FILE UINT8_C(0x2A)
166#define NBT_RECURSIVE_READ_INIT_OFFSET UINT16_C(0x0000)
172#define NBT_RECURSIVE_UPDATE_INIT_OFFSET UINT16_C(0x0000)
178#define NBT_RECURSIVE_READ_INIT_MSG_LEN UINT8_C(0xFF)
329 uint8_t binary_data_length);
345 uint32_t data_length,
const uint8_t *data);
420 uint8_t new_password_id,
422 uint16_t pwd_resp, uint16_t pwd_limit);
442 uint8_t password_id);
503 const uint8_t *password_id);
600 uint8_t no_of_fap_policies,
714 uint16_t *pass_through_status_word);
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Provides the library and module identifiers code of the library.
NBT protocol API for exchanging APDUs with NBT product.
ifx_status_t nbt_delete_password(nbt_cmd_t *self, const ifx_blob_t *master_password, uint8_t password_id)
Deletes an existing password, when the FAP file update operation is allowed with ALWAYS access condit...
ifx_status_t nbt_update_fap(nbt_cmd_t *self, const nbt_file_access_policy_t *fap_policy)
Updates file access conditions in FAP file, if FAP file is update always (not password protected).
ifx_status_t nbt_parse_fap_bytes(const ifx_blob_t *fap_bytes, uint8_t no_of_fap_policies, nbt_file_access_policy_t *fap_policies)
Parse response (APDU response type) bytes to array of nbt_file_access_policy_t type object of FAP fil...
ifx_status_t nbt_ndef_read(nbt_cmd_t *self)
Reads NDEF file with password and returns the NDEF message byte data. Method performs the select file...
ifx_status_t nbt_read_binary(nbt_cmd_t *self, uint16_t offset, uint8_t binary_data_length)
Reads the binary data from the currently selected elementary file.
ifx_status_t nbt_pass_through_decode_apdu_bytes(const ifx_apdu_response_t *response, ifx_blob_t *nfc_apdu)
Gets the pass-through NFC APDU in byte array from the response of pass_through_fetch_data() command.
ifx_status_t nbt_update_fap_bytes(nbt_cmd_t *self, const ifx_blob_t *policy_bytes)
Updates file access conditions in FAP file from policy bytes, if FAP file is update always (not passw...
nbt_access_condition
Enumeration defines the access condition of file access policy.
@ NBT_ACCESS_NEVER
Access is not allowed to the file, if file is configured with NEVER access condition.
@ NBT_ACCESS_ALWAYS
No password verification is required, if the file is configured with ALWAYS access condition.
@ NBT_ACCESS_PASSWORD_PROTECTED
Access is allowed only after password verification, if the file is configured with PASSWORD_PROTECTED...
ifx_status_t nbt_pass_through_fetch_data(nbt_cmd_t *self, ifx_apdu_response_t *response)
Issues a pass-through fetch data APDU command. This command can be issued from host devices through I...
ifx_status_t nbt_pass_through_decode_sw(const ifx_apdu_response_t *response, uint16_t *pass_through_status_word)
Gets the pass-through status word from the response of pass_through_fetch_data() command.
ifx_status_t nbt_ndef_update_with_id(nbt_cmd_t *self, uint16_t file_id, ifx_blob_t *ndef_bytes)
Updates the NDEF file with FileID. Method performs the select file with file_id and then update binar...
ifx_status_t nbt_select_application(nbt_cmd_t *self)
Selects the NBT application.
ifx_status_t nbt_read_fap_bytes(nbt_cmd_t *self)
Reads binary data (fap bytes of elementary files) from FAP file.
ifx_status_t nbt_ndef_update_with_id_password(nbt_cmd_t *self, uint16_t file_id, const ifx_blob_t *write_password, ifx_blob_t *ndef_bytes)
Updates NDEF file with FileID, 4-byte password (Optional). Method performs the select file with file_...
nbt_bit_mask_for_pass_through_status_word
Enumeration provides the bit masks to verify the status of pass-though status words.
@ NBT_BIT_MASK_STATE_FIELD_ENTRY
@ NBT_BIT_MASK_STATE_L4_ENTRY
@ NBT_BIT_MASK_NFC_FIELD_IS_PRESENT
@ NBT_BIT_MASK_STATE_L4_EXIT
@ NBT_BIT_MASK_PASS_THROUGH_APDU_AVAILABLE
@ NBT_BIT_MASK_LAYER_4_ACTIVE
@ NBT_BIT_MASK_STATE_FIELD_EXIT
ifx_status_t nbt_ndef_update(nbt_cmd_t *self, ifx_blob_t *ndef_bytes)
Updates NDEF file default ndef FileID (E104), Method performs the select file with file_id and then u...
ifx_status_t nbt_select_file(nbt_cmd_t *self, uint16_t file_id)
Selects the elementary file (EF) with the FileID.
ifx_status_t nbt_change_password(nbt_cmd_t *self, uint8_t pwd_id, const ifx_blob_t *master_password, const ifx_blob_t *new_password)
Changes an existing password with a new password. If the FAP file update operation is password protec...
ifx_status_t nbt_read_fap_bytes_with_password(nbt_cmd_t *self, const ifx_blob_t *master_password)
Reads binary data (fap bytes of elementary files) from FAP file. If FAP file is not password protecte...
ifx_status_t nbt_read_fap(nbt_cmd_t *self, nbt_file_access_policy_t *fap_policies)
Reads binary data (fap bytes of elementary files) from FAP file and store the fap bytes into nbt_file...
uint8_t nbt_access_condition_get(nbt_access_condition access_type, const uint8_t *password_id)
Get the access condition policy byte for NFC read/write and I2C read/write interface password ID as N...
ifx_status_t nbt_ndef_update_with_password(nbt_cmd_t *self, const ifx_blob_t *write_password, ifx_blob_t *ndef_bytes)
Updates NDEF file with 4-byte password (Optional) and default NDEF file Id (E104)....
ifx_status_t nbt_ndef_read_with_id_password(nbt_cmd_t *self, uint16_t file_id, const ifx_blob_t *read_password)
Reads NDEF file with password and return the NDEF message byte data. Method performs the select file ...
ifx_status_t nbt_get_data_applet_version(nbt_cmd_t *self, nbt_applet_version_t *applet_version)
Issues a get data command to retrieve the applet version information.
ifx_status_t nbt_ndef_read_with_password(nbt_cmd_t *self, const ifx_blob_t *read_password)
Reads NDEF file with password and returns the NDEF message byte data. Method performs the select file...
ifx_status_t nbt_read_fap_with_password(nbt_cmd_t *self, const ifx_blob_t *master_password, nbt_file_access_policy_t *fap_policies)
Reads binary data (access condition policy bytes of elementary files) from FAP file and store the fap...
ifx_status_t nbt_select_file_with_password(nbt_cmd_t *self, uint16_t file_id, const ifx_blob_t *read_password, const ifx_blob_t *write_password)
Selects the elementary file with FileID and read or write password. Note that the status word of the ...
ifx_status_t nbt_pass_through_decode_apdu(const ifx_apdu_response_t *response, ifx_apdu_t *nfc_apdu)
Gets the pass-through NFC APDU in APDU format from the response of pass_through_fetch_data() command.
ifx_status_t nbt_create_password(nbt_cmd_t *self, const ifx_blob_t *master_password, uint8_t new_password_id, const ifx_blob_t *new_password, uint16_t pwd_resp, uint16_t pwd_limit)
Creates a new password. If create password command is password-protected then the password to authent...
ifx_status_t nbt_authenticate_tag(nbt_cmd_t *self, const ifx_blob_t *challenge)
Issues an authenticate tag command, which generates the signature on the challenge and can be used fo...
ifx_status_t nbt_get_data(nbt_cmd_t *self, uint16_t get_data_rcp)
Issues a get data command to retrieve the NBT application specific information like applet version an...
ifx_status_t nbt_ndef_read_with_id(nbt_cmd_t *self, uint16_t file_id)
Reads NDEF file and return the NDEF message byte data. Method performs the select file and then read ...
ifx_status_t nbt_update_fap_with_password(nbt_cmd_t *self, const nbt_file_access_policy_t *fap_policy, const ifx_blob_t *master_password)
Updates file access conditions in FAP file. when FAP file is password protected(optional)....
ifx_status_t nbt_update_fap_bytes_with_password(nbt_cmd_t *self, const ifx_blob_t *policy_bytes, const ifx_blob_t *master_password)
Updates file access conditions in FAP file from policy bytes. When FAP file is password protected (op...
ifx_status_t nbt_unblock_password(nbt_cmd_t *self, uint8_t pwd_id, const ifx_blob_t *master_password)
Unblocks the password, which is in blocked state because wrong password limit exceeds.
ifx_status_t nbt_update_binary(nbt_cmd_t *self, uint16_t offset, uint32_t data_length, const uint8_t *data)
Updates the binary data into the currently selected elementary file.
ifx_status_t nbt_get_data_available_memory(nbt_cmd_t *self, nbt_available_memory_t *available_memory)
Issues a get data command to retrieve the available memory.
ifx_status_t nbt_pass_through_put_response(nbt_cmd_t *self, const ifx_apdu_response_t *pass_through_response_data, ifx_apdu_response_t *response)
Sends the response to pass-through fetch data command, forwarding the response over the NFC interface...
Response parser for apdu-nbt commands.
Data storage struct for APDU response information.
Data storage for APDU fields.
Data storage for data and data length where both are required as parameters.
Structure for the applet version.
Structure for the available memory.
Generic NBT command set structure for building and performing NBT commands.
Store the file access condition for both NFC and I2C (read/write operation) interface with FileID.
uint8_t i2c_read_access_condition
I2C read access condition (always, never access condition, and password protected with password ID)
uint16_t file_id
2 bytes of FileID
uint8_t nfc_write_access_condition
NFC write access condition (always, never access condition, and password protected with password ID)
uint8_t nfc_read_access_condition
NFC read access condition (always, never access condition, and password protected with password ID)
uint8_t i2c_write_access_condition
I2C write access condition (always, never access condition, and password protected with password ID)