Document Version 1.00
Last revised on
Page 38 of 87
2020-04-10
Reference Manual for uTrust 3720F and uTrust 3721F Readers
6.2.8.
PAPDU_MIFARE_VALUE_BLK_OLD
This command increments or decrements the data in a Value Block on a Mifare Classic card.
Command APDU:
Command
CLA
INS
P1
P2
P3
Data
Increment / Decrement OLD
FF
F0
00
Block Num
Lc
Data
where P2 codes the block number.
The data field is structured as follows
Byte #
Value
Description
B0
0xC0
Decrement
0xC1
Increment
B1
Block number
B2-B5
Value (LSB first)
Response APDU:
Data
Status Word
-
SW1, SW2
Example: decrement block 4 by 1 (key loading and authentication not shown)
(block 4 has got to be set up as value block prior to executing this command, see datasheet for Mifare
Classic cards)
APDU:
FF B0 00 04 00 // Read Block 4
SW12:
9000 (OK)
DataOut:
A9 AA AA AA 56 55 55 55 A9 AA AA AA 05 FA 05 FA
(16 bytes)
APDU:
FF F0 00 04 06 C0 04 01 00 00 00 // decrement block 4 by 1
SW12:
9000 (OK)
APDU:
FF B0 00 04 00 // Read Block 4
SW12:
9000 (OK)
DataOut:
A8 AA AA AA 57 55 55 55 A8 AA AA AA 05 FA 05 FA
(16 bytes)