Last revised on
2017-09-26
Reference Manual for uTrust 4701F and uTrust 4711F Readers
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)
6.2.9. PAPDU_MIFARE_VALUE_BLK_NEW
This command increments or decrements the value of a data object if the card supports it.
Refer to section 3.2.2.1.10 of [PCSC3-AMD1] for further details.
Command APDU:
The data object consists of a TLV structure that defines, which action should be performed, which
block the actions pertain to (the destination(s)) and which value should be applied for the action.
Tags for the action include:
0xA0: Increment
0xA1: Decrement
The Tag to define the destination is:
0x80: Destination
The Tag to define the value is:
0x81: value to increment or decrement Destination by, LSB first
Example:
Increment block 5 by 100
FF C2 00 03 0B
A0 09 increment
80 01 05 block 5
81 04 64 00 00 00 by 100
00
This command returns a Response APDU according to section 2.2 of [PCSC3-SUP2].
Response APDU:
C0 03 Error status, see below
SW1, SW2 (card itself will send SW1, SW2)