0% found this document useful (0 votes)
56 views27 pages

Rss Serial Protocol

x

Uploaded by

eroijerg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views27 pages

Rss Serial Protocol

x

Uploaded by

eroijerg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 27

CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.

001

RSS ISO14443 Reader


Serial Protocol

1.030.008.001

Revision 1.02
November 2002

CONFIDENTIAL

Prepared by
R&D Technology Solutionz Limited
for
Rapid Smartcard Solutionz

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 0


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

Table of Contents
1. DOCUMENT REVISION HISTORY............................................................................................1
1.1 CHANGE CONTROL.........................................................................................................................1
1.2 CONFIDENTIALITY AND COPYRIGHT...............................................................................................1
2. INTRODUCTION............................................................................................................................2
2.1 DOCUMENT OVERVIEW...................................................................................................................2
2.2 AUDIENCE.......................................................................................................................................2
2.3 CIRCULATION LIST..........................................................................................................................2
2.4 ATTACHMENTS................................................................................................................................2
2.5 LIMITATIONS...................................................................................................................................2
2.6 ACRONYMS.....................................................................................................................................2
2.7 REFERENCE DOCUMENTS...............................................................................................................3
3. OVERVIEW.....................................................................................................................................4
3.1 CONVENTIONS................................................................................................................................4
4. SERIAL PROTOCOL.....................................................................................................................5
4.1 COMMUNICATIONS PARAMETERS...................................................................................................5
4.1.1 Serial Parameters..................................................................................................................5
4.1.2 Hardware Handshaking.........................................................................................................5
4.1.3 DLE Stuffing..........................................................................................................................5
4.1.4 Timeouts.................................................................................................................................6
4.2 MESSAGE FORMAT..........................................................................................................................7
4.2.1 STX.........................................................................................................................................7
4.2.2 Token......................................................................................................................................7
4.2.3 Message Type.........................................................................................................................7
4.2.4 Data Length...........................................................................................................................7
4.2.5 ETX........................................................................................................................................7
4.2.6 Checksum...............................................................................................................................7
4.3 SERIAL ACKNOWLEDGEMENT.........................................................................................................8
4.3.1 Message Acknowledgement...................................................................................................8
4.3.2 Retries....................................................................................................................................8
5. MESSAGE TYPES..........................................................................................................................9
5.1 STATUS REQUEST..........................................................................................................................10
5.2 LED CONTROL.............................................................................................................................11
5.3 TAG PRESENT...............................................................................................................................12
5.4 MIFARE READ MAD.....................................................................................................................13
5.5 MIFARE UPDATE MAD.................................................................................................................14
5.6 MIFARE READ SECTOR.................................................................................................................15
5.7 MIFARE REWRITE SECTOR............................................................................................................16
5.8 MIFARE WRITE SECTOR................................................................................................................17
5.9 MIFARE VALUE TRANSACTION.....................................................................................................18
5.10 MIFARE LOAD KEY.......................................................................................................................19
5.11 SEND APDU.................................................................................................................................20
5.12 SEND DESELECT...........................................................................................................................21
5.13 INFORMATION MESSAGE...............................................................................................................22
5.14 ERROR MESSAGE..........................................................................................................................23
6. Transaction Flow..............................................................................................................................24

Filename= RSSSerialProtocol.doc

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page i


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

1. DOCUMENT REVISION HISTORY

Rev Description Date Author


1.00 Original 15/10/2002 B P Simpson
1.01 Removed tag-type bit-coding table from Tag Present 18/10/2002 B P Simpson
message and changed ‘Mifare card with MAD’ value.
Added document revision number to footer.
1.02 Added ‘MAD not Present’ error return code to the 22/11/2002 B P Simpson
Mifare Read MAD message.
Corrected the Philips demonstration kit write-key in the
Mifare Write Sector message.
Added note to Mifare Rewrite Sector and Mifare Write
Sector messages regarding block 0 of sector 0.
Numerous changes to the Mifare Value Transaction
message from implementation.
Added ‘Command not supported’ to error message
error codes.

1.1 Change Control


This document is maintained under change control. Any requests for change should go to:
Rapid Smartcard Solutionz Ltd.
P.O. Box 976
Palmerston North
New Zealand
Ph +64 6 952 3720
Fax +64 6 952 3721
Email: [email protected]

1.2 Confidentiality and Copyright


 Copyright Rapid Smartcard Solutionz Limited 2002. All rights reserved.

This document is the property of Rapid Smartcard Solutionz Limited. It may not be copied, distributed
or recorded on any electronic or other medium without the express written permission of Rapid
Smartcard Solutionz Limited.

All material contained in this document which is not readily available in the public domain is regarded
as confidential to Rapid Smartcard Solutionz Limited and may not be divulged to any third party
without the express written permission of Rapid Smartcard Solutionz Limited.

Rapid Smartcard Solutionz extends authorisation to R&D Technology Solutionz to use this document
for its intended purpose.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 1


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

2. INTRODUCTION

2.1 Document Overview


This document defines a serial protocol and high level command set for communicating with a RSS
ISO 14443 compliant reader device connected to a RS-232 compatible serial port.

2.2 Audience
This document is intended for developers and technicians looking to integrate a RSS ISO 14443
compliant reader with a controller.

2.3 Circulation List


All revisions of this document is to be distributed to the following people:
DISTRIBUTION SHEET
Document Status Released
Document Distribution Date 22/11/2002
Name Organisation Country
Andrew Rushworth R&D Technology Solutionz New Zealand
Bevan Johnson R&D Technology Solutionz New Zealand
Braden Simpson R&D Technology Solutionz New Zealand
Katie Ogle Rapid Smartcard Solutionz New Zealand

2.4 Attachments
There are no attachments to this document.

2.5 Limitations
This document is intended for review, and as such is subject to change. Future revisions of this paper
will be distributed via email to those parties identified in section 2.3.

2.6 Acronyms
AC – Application Code [1]
ACK – Acknowledge (ASCII character 0x06)
AID – Application Identifier
APDU – Application Protocol Data Unit
CID – Card Identifier
DLE – Data Length Escape (ASCII character 0x10)
ETX – End of Transmission (ASCII character 0x03)
FCC – Function Cluster Code [1]
LSB – Least Significant Byte
MAD – Mifare Application Directory [1]
MSB – Most Significant Byte
NAK – Negative Acknowledge (ASCII character 0x15)
RF – Radio Frequency

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 2


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

RFID – Radio Frequency Identification


RSS – Rapid Smartcard Solutionz
STX – Start of Transmission (ASCII character 0x02)

2.7 Reference Documents


[1] Mifare Standardization Group [2002] “Mifare Application Directory Standardization Note”
(Revision 2.3)

The following ISO/IEC standards are referenced in this document:


 14443 Part 2, Part 3, and Part 4 – Contact-less proximity cards
 7816 Part 4 – Smart Card Standard for Inter-industry Commands for Interchange

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 3


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

3. OVERVIEW

A number of communications protocols exist for interacting with a RSS ISO 14443 compliant contact-
less reader, however they tend to be either too low-level or are biased towards a specific application,
such as access control.

The aim of this protocol is to serve as a higher-level abstraction that exposes the generic reader
functionality over a standard serial link without the controller device being required to perform a step-
by-step interaction with the card.

3.1 Conventions
The flowing conventions are used in this document:

The C programming language notation for hexadecimal values, the identifier ‘0x’ followed by one or
more pairs of hexadecimal digits, is used except where otherwise stated e.g. 0x01, 0xFF, 0x01FF

The ASCII letter codes are used for control codes in place of their hexadecimal representation to
distinguish them from data values e.g. STX is used in place of 0x02 when it indicates the start of frame.

A zero-length message is often used as a high level response. This consists of the standard message
format with both length bytes set to 0x00 and no data.

This is an asynchronous peer-to-peer protocol and either the controller or the reader can initiate
communications. The communications are full duplex and both devices are required to be able to
transmit and receive simultaneously.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 4


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

4. SERIAL PROTOCOL

The following sections define the serial protocol used between the host and the RSS ISO14443 Reader.

4.1 Communications Parameters

4.1.1 Serial Parameters


Communication with the RSS ISO14443 Reader is via a RS-232C (EIA-232) serial connection with the
following parameters:

Parameter Setting
Baud Rate 57,600
Bits per Character 8
Parity None
Stop Bits 1

4.1.2 Hardware Handshaking


The Request to Send (RTS) and Clear to Send (CTS) serial control lines are used to provide flow
control between the receiver and the transmitter. When a device wishes to send a message it asserts the
RTS line and waits for the CTS line to be asserted by the receiver. Transmission of a message can only
begin when the CTS line is asserted and this should be within 100ms of RTS being asserted. If
handshaking is not required then RTS should be connected to CTS on each device.

4.1.3 DLE Stuffing


To avoid STX, ETX, ACK, and NAK characters (ASCII characters 0x02, 0x03, 0x06, 0x15
respectively) in the body of the message from being interpreted as control codes a DLE character
(0x10) is inserted before that character in the data stream. In order to send a single DLE character two
DLE characters must be sent in sequence.

Example of DLE stuffing:

Original message.
STX 0x01 0xA0 0x00 0x02 0x10 0x41 ETX 0xF3

DLE Stuffing.
STX 0x01 0xA0 0x00 DLE 0x02 DLE 0x10 0x41 ETX 0xF3

Notes:
 The body of the message is between the STX and ETX and so the checksum does not require
a DLE.
 The inserted DLE characters do not change any length variables in the message.
 If the calculated checksum is 0x10 then care must be taken that the STX from the next
message is not misinterpreted.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 5


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

4.1.4 Timeouts
Two different timeouts are observed over the serial link:
1) The time between characters in a message (inter-character timeout).
2) The time between sending a message and receiving an acknowledgement (response timeout).

If the inter-character timeout is exceeded then the receiver should send a NAK to the sender. If the
response timeout is exceeded, and the number of retries has not reached the maximum, then the
message should be resent.

Timeout Time
Inter-character 10 ms
Response timeout 300 ms

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 6


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

4.2 Message Format

A message consists of two framing bytes (STX and ETX), a token, a message type, data length,
message data, and a checksum as shown below:

STX Token Message Type Data Length Data ETX Checksum


0x02 0x00 – 0xFF 0x20 – 0xFF (MSB) (LSB) … 0x03 0x00 – 0xFF

The following sections define each part of the message format.

4.2.1 STX
This is a single byte start of frame marker represented by ASCII character 0x02.

4.2.2 Token
For every new message sent the token is incremented by one, with 0xFF rolling over to 0x00. This
allows the receiver to discard any duplicate messages by comparing the token for the message just
received with the token from the previous message received. On reset the token should be set to zero
and the previously received token set to 0xFF to avoid any conflict with the first received message.

4.2.3 Message Type


This is a single byte that identifies the contents of the message. A response message has the same
message type as the request message but has the most significant bit set e.g.

Status Request 0x20 => Status Response 0xA0

The list of valid message types is given in the Message Types section of this document.

4.2.4 Data Length


The length of the data section in the message is given by a two-byte data length, which gives a
maximum number of data-bytes per message of 65535. The data length does not include the STX,
ETX, Token, Message Type, Checksum, or the data length itself and excludes any inserted DLE
characters. The length is sent in big-endian format with the most significant byte (MSB) first followed
by the least significant byte (LSB). For practical purposes the entire message frame, including
checksum, must be less than 1024 bytes as this is the maximum buffer size defined in the reader.

4.2.5 ETX
This is a single byte end of frame marker represented by ASCII character 0x03.

4.2.6 Checksum
The checksum is exclusive-or (XOR) of all the bytes in the message between the STX and ETX,
excluding any DLE characters that have inserted to escape command bytes. Note that the checksum is
not considered part of the body of the message and so does not require a DLE.

Example message with correct checksum

STX 0x01 0xA0 0x00 0x02 0x10 0x41 ETX 0xF2

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 7


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

4.3 Serial Acknowledgement

4.3.1 Message Acknowledgement


Every serial message received is acknowledged by the receiver with a positive ACK (ASCII character
0x06) or a negative NAK (ASCII character 0x15), depending on the validity of the message. An ACK
indicates that the message was framed correctly, the length was correct, and the checksum was valid for
the data received. A NAK indicates that one or more of the conditions listed below has occurred:

 Another STX was received before an ETX


 An ETX was received before an STX
 An incorrect number of data bytes were received
 A DLE was not followed by a control code or a second DLE
 The message exceeds the available buffer size
 The checksum calculated does not match the checksum that was received

Note: The message type validity and the contents of the message data are not checked at this level.

4.3.2 Retries
If a message is responded to with a NAK then the sender will resend the message up to 3 times before
discarding it. A message that fails every retry is most likely to be incorrectly formatted, oversized,
and/or the receiver is no longer connected or receiving data.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 8


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5. MESSAGE TYPES

The table below lists all the possible message types:

Hex Decimal Command


0x20 32 Status Request
0x21 33 LED Control
(0x22 – 0x2F) (34 – 47) Reserved
0x30 48 Tag Present
(0x31 – 0x4F) (49 – 79) Reserved
0x50 80 Mifare Read MAD
0x51 81 Mifare Update MAD
0x52 82 Mifare Read Sector
0x53 83 Mifare Rewrite Sector
0x54 84 Mifare Write Sector
0x55 85 Mifare Value Transaction
0x56 86 Mifare Load Key
(0x57 – 0x5F) (87 – 95) Reserved
0x60 96 Send APDU
0x61 97 Send Deselect
(0x62 – 0x6F) (98 – 111) Reserved
0x70 112 Information Message
0x71 113 Error Message
(0x72 – 0x7F) (114 – 127) Reserved
(0x80 – 0xFF) (128 – 255) Response Types

Each command is described in detail in the following sections.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 9


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.1 Status Request


This message requests the current status of the reader. This command may be used as a periodic
heartbeat to confirm that the reader is connected and functioning correctly.

Originator: Controller

Format:
Message Type 0x20
Data Length 1
Data Field Size Value
Status Request 1 Byte 0x00

Response:
Message Type 0xA0
Data Length 1
Data Field Size Value
Current Status 1 Byte 0x00 – Normal Status,
0xFF – Major Error Status

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 10


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.2 LED Control


This message sets the current state of the LED display on the reader.

Originator: Controller

Format:
Message Type 0x21
Data Length 1
Data Field Size Value
LED Control 1 Byte 0x00 – LED Display Reader Control,
0x01 – LED Display Off,
0x02 – LED Display On,
0x03 – LED Display Flash Fast,
0x04 – LED Display Flash Medium,
0x05 – LED Display Flash Slow

Response:
Message Type 0xA1
Data Length 0
Data Field Size Value

The LED Display Reader Control setting indicates that the reader has control of the LED display.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 11


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.3 Tag Present


This message informs the controller that a tag has been presented at the reader and is in the read zone.

Originator: Reader

Format:
Message Type 0x30
Data Length varies
Data Field Size Value
Tag Type 1 Byte see table below
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF
Card Identifier 1 Byte 0x00 – 0x0F
Tag Select Data varies varies

Response:
Message Type 0xB0
Data Length 0
Data Field Size Value

Currently accepted tag type values are:


Value Meaning
0x00 Type A card with proprietary application protocol
0x01 Type B card with proprietary application protocol
0x02 Type A card with ISO 14443 Part 4 application protocol
0x03 Type B card with ISO 14443 Part 4 application protocol
0x04 Mifare card
0x05 Mifare card with MAD

The tag select data consists of any information returned from the card during the initial negotiation
with the reader when the card entered the read zone.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 12


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.4 Mifare Read MAD


This message tells the reader to read the Mifare Application Directory (MAD) from the specified
Mifare card in the read zone.

Originator: Controller

Format:
Message Type 0x50
Data Length 4
Data Field Size Value
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF

Response:
Message Type 0xD0
Data Length 32
Data Field Size Value
MAD 32 Bytes Formatted MAD Data
or
Message Type 0xD0
Data Length 1
Data Field Size Value
Read Error 1 Byte 0x00 – MAD not Present
0xFF – Tag not Present

The Mifare Standardization Group document Mifare Application Directory Standardization Note [1]
contains further documentation on the MAD.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 13


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.5 Mifare Update MAD


This message updates the Mifare Application Directory (MAD) entry for a given data sector.

Originator: Controller

Format:
Message Type 0x51
Data Length 0
Data Field Size Value
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF
Write-key Offset 1 Byte 0x00 – 0x1F
Data Sector 1 Byte 0x00 – 0x0F
AID 2 Bytes FCC 0x00 – 0xFF, AC 0x00 – 0xFF

Response:
Message Type 0xD1
Data Length 1
Data Field Size Value
Update Status 1 Byte 0x00 – Update Successful,
0xF6 – Authentication Failed,
0xFF – Tag not Present

The Mifare Standardization Group document Mifare Application Directory Standardization Note [1]
contains further documentation on the MAD.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 14


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.6 Mifare Read Sector


This message is used to read data from the specified sector on the Mifare card.

Originator: Controller

Format:
Message Type 0x52
Data Length 6
Data Field Size Value
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF
Sector Number 1 Byte 0x00 – 0x0F
Read-key Offset 1 Byte 0x00 – 0x1F

Response:
Message Type 0xD2
Data Length 64
Data Field Size Value
Sector Data 64 Bytes Data from the sector
or
Message Type 0xD2
Data Length 1
Data Field Size Value
Read Error 1 Byte 0xF6 – Authentication Failed
0xFF – Tag not Present

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 15


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.7 Mifare Rewrite Sector


This message is used to rewrite data to an existing sector on the Mifare card where the access block for
the sector has already been programmed.

Originator: Controller

Format:
Message Type 0x53
Data Length 54
Data Field Size Value
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF
Sector Number 1 Byte 0x00 – 0x0F
Write-key Offset 1 Byte 0x00 – 0x1F
Write Data 48 Bytes Data to be written

Response:
Message Type 0xD3
Data Length 1
Data Field Size Value
Write Status 1 Bytes 0x00 – Transaction OK,
0xF1 – Write Error,
0xF6 – Authentication Failed,
0xFF – Tag not present

Note that the first block (block 0) of sector 0 is reserved for card information and is read-only; hence
the first 16 bytes of any data sent to be written to sector 0 will be ignored.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 16


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.8 Mifare Write Sector


This message is used to write data to the specified sector on the Mifare card and includes the writing of
the access control block.

Originator: Controller

Format:
Message Type 0x54
Data Length 70
Data Field Size Value
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF
Sector Number 1 Byte 0x00 – 0x0F
Write-key Offset 1 Byte 0x00 – 0x1F
Write Data 48 Bytes Data to be written
Access Block 16 Bytes Access Block data to be written

Response:
Message Type 0xD4
Data Length 1
Data Field Size Value
Write Status 1 Bytes 0x00 – Transaction OK,
0xF1 – Write Error,
0xF6 – Authentication Failed,
0xFF – Tag not present

If the key given by the write-key offset fails to authenticate with the sector then the reader will attempt
to use both the blank tag key (0xFFFFFFFFFFFF) and the Philips demonstration kit write-key
(0xB0B1B2B3B4B5) for authentication before failing.

Note that the first block (block 0) of sector 0 is reserved for card information and is read-only; hence
the first 16 bytes of any data sent to be written to sector 0 will be ignored.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 17


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.9 Mifare Value Transaction


This message initiates a value increment or decrement transaction, with or without transfer.

Originator: Controller

Format:
Message Type 0x55
Data Length 13
Data Field Size Value
Tag ID 4 Bytes 0x00000000 - 0xFFFFFFFF
Key Offset 1 Byte 0x00 – 0x1F
Value Command 1 Byte 0x00 – Decrement,
0x01 – Increment,
0x02 – Restore
Value Sector 1 Byte 0x00 – 0x0F
Value Block 1 Byte 0x00 – 0x02
Transfer Block 1 Byte 0x00 – 0x02
Value 4 Bytes 0x00000000 – 0xFFFFFFFF

Response:
Message Type 0xD5
Data Length 1
Data Field Size Value
Value Status 1 Byte 0x00 – Transaction OK,
0x84 – Transaction Failed,
0xF6 – Authentication Failed,
0xFF – Tag not present

Note that the value should be in little endian format, e.g. the value 0x12345678 should be sent as
0x78563412.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 18


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.10 Mifare Load Key


This message loads a key into a location in the secure key memory on the reader.

Originator: Controller

Format:
Message Type 0x56
Data Length 7
Data Field Size Value
Key Location 1 Byte 0x00 – 0x1F
Key Data 6 Bytes 0x000000000000 – 0xFFFFFFFFFFFF

Response:
Message Type 0xD6
Data Length 1
Data Field Size Value
Load Status 1 Byte 0x00 – Key Load Successful,
0x01 – Invalid Key Location,
0x02 – Invalid Key Length

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 19


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.11 Send APDU


This message sends an ISO 7816 Part 4 APDU command to the contact-less card in the read zone.

Originator: Controller

Format:
Message Type 0x60
Data Length varies
Data Field Size Value
Card Identifier 1 Byte 0x00 – 0x0F
Node Address 1 Byte 0x00
Command APDU 4 Bytes Header (CLA, INS, P1, P2)
Command APDU varies Body (Lc, Data, Le)

Response:
Message Type 0xE0
Data Length varies
Data Field Size Value
Response APDU varies Body (Data)
Response APDU varies Trailer (SW1, SW2)

See the ISO/IEC 7816 Part 4 standard for information on APDU commands.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 20


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.12 Send Deselect


This message sends an ISO 14443 Part 4 deselect command to a card in the read zone.

Originator: Controller

Format:
Message Type 0x61
Data Length 1
Data Field Size Value
Card Identifier 1 Byte 0x00 – 0x0F

Response:
Message Type 0xE1
Data Length 1
Data Field Size Value
Result 1 Byte 0x00 – Success,
0xFF – Tag not present

Note: The Card Identifier (CID) in this message is not the same as the Tag ID

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 21


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.13 Information Message


This message is used for sending informational messages such as version strings, protocol versions,
and serial numbers.

Originator: Reader

Format:
Message Type 0x70
Data Length varies
Data Field Size Value
Message Text varies ASCII Text String

Response:
None

On a reset the reader will send its version string, serial number, and protocol version in three separate
information messages.

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 22


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

5.14 Error Message


This message is sent by the reader to indicate that an error has occurred. The error is identified by a
two-byte code.

Originator: Reader

Format:
Message Type 0x71
Data Length 2
Data Field Size Value
Error Code 2 Bytes 0x0000 – 0xFFFF

Response:
None

The error codes are as follows:

Code Description
0x0000 Unknown message type
0x0001 Invalid message format
0x0002 Invalid state for command
0x0003 Command not supported
0x0004 – 0x0FFF Reserved
0x1000 - 0x1FFF Internal Processing Errors
0x2000 – 0x3FFF Minor System Errors
0x4000 – 0x5FFF Major System Errors
0x5000 – 0xFFFF Reserved

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 23


CONFIDENTIAL Rapid Smartcard Solutionz 1.030.008.001

6. TRANSACTION FLOW

The diagram below shows a typical transaction flow:

Controller Reader
Status Request

Status Response (0x00 - Normal Response)

Poll for Tag

Tag in Read Zone

Identify Tag Type


Tag Present (0x0C - Mifare Tag with MAD)

Tag Present Response

LED Control (0x04 - Display Medium Flash)

LED Control Response

Mifare Read MAD

MAD Data Response

Process MAD
Mifare Read Sector

Sector Data Response

Validate Data
LED Control (0x02 - Display On)

LED Control Response

Perform Transaction
LED Control (0x01 - Display Off)

LED Control Response

Legend:
Message Response
Processing
Processing

RSS ISO14443 Reader Serial Protocol v1.02 22 November 2002 Page 24

You might also like