User's Manual

ACR1281S   
 Advanced Card Systems Ltd.  Page 43 of 56 
2.4 Update Binary Blocks 
The “Update Binary Blocks command” is used for writing a multiple of “data blocks” into the 
PICC. The data block/trailer block must be authenticated first before executing the “Update Binary 
Blocks command”. 
Table 2.3-1a: Update Binary APDU Format (Multiple of 16 + 5 Bytes) 
Command 
Class  INS  P1  P2  Lc  Data In 
Update Binary 
Blocks 
FF  D6  00  Block 
Number 
Number 
of Bytes 
to 
Update 
Block Data 
(Multiple of 16 
Bytes) 
Block Number (1 Byte): 
The starting block to be updated. 
Number of Bytes to Update (1 Byte): 
•  Multiply of 16 bytes for MIFARE 1K/4K or 4 bytes for MIFARE Ultralight. 
•  Maximum 48 bytes for MIFARE 1K. (Multiple Blocks Mode; 3 consecutive blocks) 
•  Maximum 240 bytes for MIFARE 4K. (Multiple Blocks Mode; 15 consecutive blocks) 
Example 1: 0x10 (16 bytes). The starting block only. (Single Block Mode) 
Example 2: 0x30 (48 bytes). From the starting block to starting block+2. (Multiple Blocks Mode) 
#For safety reason, the Multiple Block Mode is used for accessing Data Blocks only. The Trailer 
Block is not supposed to be accessed in Multiple Blocks Mode. Please use Single Block Mode to 
access the Trailer Block. 
Block Data (Multiply of 16 + 2 Bytes, or 6 bytes): 
The data to be written into the binary block/blocks. 
Table 2.3-1b: Update Binary Block Response Codes (2 Bytes) 
Results 
SW1  SW2  Meaning 
Success  90  00  The operation is completed 
successfully. 
Error 
63  00  The operation is failed. 
Examples: 
// Update the binary block 0x04 of MIFARE 1K/4K with Data {00 01 .. 0F} 
APDU = {FF D6 00 04 10 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F} 
// Update the binary block 0x04 of MIFARE Ultralight with Data {00 01 02 03} 
APDU = {FF D6 00 04 04 00 01 02 03} 










