SLOA208B November 2014 – March 2019 TRF7970A , TRF7970A
The Update Binary command can only be issued when a file has been selected by an NFC device. If a file has not been selected when an Update Binary is issued, then the error code 0x6982 is sent back to the NFC device. In order for a file to be modified by the Update Binary command the write privileges of the file need to be checked. If the NFC device does not have the privileges to write the file, the error code 0x6A86 is returned.
The Update Binary contains the Lc byte, which is equal to the length of the Data Bytes being sent. The Data Byte fields contain the data to be written into the tag. The Update Binary command shall not have the Le byte.
If the NFC device has the proper write privileges, the Lc byte is then checked with the maximum file size of the selected file. If the length exceeds the maximum file size, then the error code 0x6A86 is returned. Otherwise, the data within the file is overwritten with the Data Field bytes sent by the NFC device.
A special case of the Update Binary commands occurs when an NFC device attempts to overwrite the CC file. The only byte that is allowed to be updated in the CC file is the write privileges of the file. To update the write privilege, the Lc byte should be set to 0x01 and the only Data Field byte should be the new write privilege for the CC file.