![ACS ACM1252U-Y3 Reference Manual Download Page 39](http://html1.mh-extra.com/html/acs/acm1252u-y3/acm1252u-y3_reference-manual_2841767039.webp)
ACM1252U-Y3
– Reference Manual
Version 1.03
www.acs.com.hk
Page 39 of 92
www.acs.com
.hk
5.2.4.4.
Update Binary Blocks
This command is used to write multiple 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.
•
Multiple of 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 4K (Multiple Blocks
Mode; 15 consecutive blocks).
Block Data
Multiple of 16 bytes, or 4 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 Blocks
Mode).
Note: For safety reasons, the Multiple Blocks Mode is used to access 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
90
00h
The operation was completed
successfully.
Error
63
00h
The operation 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}