ACR128 Dual Interface Smart Card Reader
7.4 Update Binary Blocks
The Update Binary Blocks command is used for writing multiple data blocks into the PICC. The data
block/trailer block must be authenticated first before executing the Update Binary Blocks command.
Table 25-a: 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)
where:
Block Number:
1 Byte. This is the starting block to be updated.
Number of Bytes to Update:
1 Byte. The number of bytes to be updated can be multiple of 16 bytes for
MIFARE 1K/4K or multiple of 4 bytes for MIFARE Ultralight.
Maximum of 48 bytes for MIFARE 1K. (Multiple Blocks Mode; 3 consecutive blocks)
Maximum of 240 bytes for MIFARE 4K. (Multiple Blocks Mode; 15 consecutive blocks)
Block Data (Multiple of 16 + 2 Bytes, or 6 bytes):
The data to be written into the binary 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)
NOTE:
For security considerations, 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.
Table 25-b: Update Binary Block Response Codes (2 Bytes)
Results
SW1
SW2
Meaning
Success
90
00
The operation is completed successfully.
Error
63 00 The
operation
failed.
Examples:
1. 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}
2. Update the binary block 0x04 of MIFARE Ultralight with Data {00 01 02 03}
APDU = {FF D6 00 04 04 00 01 02 03}
Page
30 of 36
ACR128 API
Version 1.7 May 2008