Page
37
of
77
Copyright © Access-IS 2020
Field
Offset
Size in bytes
Value/Description
abData
10
Size of the data
to be sent to the
media
Contains the data to be sent to the media
The NFC module sends out the data in the
abData
field to the media. The media processes the
data and replies with an appropriate response. The NFC module receives the media response and
communicates back to the serial host by sending a
RDR_to_PC_DataBlock
message as in
Table 18. RDR_to_PC_DataBlock message
Field
Offset
Size in bytes
Value/Description
bMessageType
0
1
[0x80]
dwLength
1
4
Size of
abData
field in little endian
bSlot
5
1
Source Reader slot ID. Please refer to
on page 33.
bSeq
6
1
Same as command message
bStatus
7
1
0
bError
8
1
0
bChainParameter
9
1
0
abData
10
Size of the media
response
Media response, if present
If
PC_to_RDR_XfrBlock
message is sent when a media is not present, the reader responds with
bStatus
and
bError
fields set to
[0x42]
and
[0xFE]
respectively. The field
dwLength
is also
set to 0 and no
abData
field is present.
6.4 MIFARE cards
When the reader detects NFC media, the application gets the ATR of the media. Since there is no
ATR present for MIFARE media, the NFC module constructs an ATR from the fixed elements that
identify the card.
The ATR for MIFARE media is 20 bytes long. It has fixed values, with the exception of the 15
th
byte,
which indicates the type of MIFARE media. Table 19 shows the ATRs for different types of MIFARE
media.
Table 19. MIFARE media ATR bytes
MIFARE media type
ATR bytes
1K Classic
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00
03
00 00 00 00 68
4K Classic
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00
04
00 00 00 00 6F
Ultralight
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00
05
00 00 00 00 6E
Note that the value of the 15
th
byte indicates the type of MIFARE media.
The application software can look for these specific ATR bytes to detect MIFARE-type media. Once
it detects a MIFARE-type medium, the application can then use the MIFARE commands to
communicate with it.
Refer to
MIFARE media commands and responses
on page 39 for details of the MIFARE media
commands and responses that you can use.