Document Version 1.0
Last revised on
2018-‐10-‐22
Page 33 of 79
Reference Manual for uTrust 5501 F Reader/Writer Module
6.2.7.
PAPDU_MIFARE_WRITE_SECTOR
This command writes the contained data to the specified sector of a MIFARE Classic or MIFARE UL/UL
C card (first blocks of the sector, excluding the key block, are written per MIFARE Classic).
Command APDU:
Command
CLA
INS
P1
P2
P3
Data
Write sector
FF
D7
AddrMsb
AddrLsb
Lc
Data
Lc (P3) must be 0x30 when writing to the small sectors of a MIFARE Classic and 0xF0 when writing to
the large sectors of a MIFARE Classic 4K.
Lc must be 0x30 for MIFARE UL; the data will be written from block 4 through the end of the memory.
Response APDU:
Data
Status Word
-‐
SW1, SW2
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:
P2 codes the block number:
Command
CLA
INS
P1
P2
P3
Data
Increment/decrement OLD
FF
F0
00
Block Num
Lc
Data
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