ACR1255U-J1 – Reference Manual
Version V1.01
www.acs.com.hk
Page 46 of 73
6.4.4.
Update Binary Blocks
This command is used for writing a multiple of “data blocks” into the PICC. The data block/trailer block
must be authenticated first before executing this command.
Update Binary APDU Format (Multiple of 16 + 5 bytes)
Command
Class
INS
P1
P2
Lc
Data In
Update Binary
Blocks
FFh
D6h
00h
Block
Number
Number
of bytes
to update
Block Data
(Multiple of 16 bytes)
Where:
Block Number
1 byte. The starting block to be updated.
Number of bytes to update
1 byte.
•
Maximum 16 bytes for MIFARE Classic (1K/4K) or 4
bytes for MIFARE Ultralight.
•
Maximum 48 bytes for MIFARE Classic 1K. (Multiple
Blocks Mode; 3 consecutive blocks)
•
Maximum 240 bytes for MIFARE Classic 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 block/blocks.
Example 1:
10h (16 bytes). The starting block only. (Single Block Mode)
Example 2:
30h (48 bytes). From the starting block to starting block +2. (Multiple Block
Mode)
Note: For safety reasons, 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.
Update Binary Block Response Codes (2 bytes)
Results
SW1
SW2
Meaning
Success
90h
00h
The operation is completed successfully.
Error
63h
00h
The operation is failed.
Examples:
// Update the binary block
04h
of MIFARE Classic (1K/4K) with Data {00 01 .. 0Fh}
APDU = FF D6 00
04
10 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0Fh
// Update the binary block
04h
of MIFARE Ultralight with Data {00 01 02 03h}
APDU = FF D6 00
04
04 00 01 02 03h