Document Version 1.2
Last revised on
2017-09-26
Page 34 of 92
Reference Manual for uTrust 4701F and uTrust 4711F Readers
Example:
Read sector 1 of a Mifare Classic 1K
APDU:
FF B3 00 01 10
SW12:
9000 (OK)
DataOut:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
AA 55 AA 55 AA 55 AA 55 AA 55 AA 55 AA 55 AA 55
00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
(64 bytes)
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 in case of Mifare Classic).
Command APDU:
Command
CLA
INS
P1
P2
P3
Data
Write Sector
FF
D7
AddrMsb
AddrLsb
Lc
Data
Lc (P3) has got to 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 has got to be 0x30 for Mifare UL and the data will get written from block 4 till 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:
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