Model 152 Smart Card Reader/Writer Operation Instructions
8182760 Revision G Copyright Axiohm 1998 All Rights Reserved
Page 1.1
Chapter 5:
TLP-224 Protocol
Transport layer
The transport layer is symmetrical, that is, a transport unit looks the same going either from the
host to reader or from reader to host. The relationship between host and reader is fixed, with the
host initiating all exchanges and the reader responding only when prompted by the host. For
each message sent by one side, the other side may ACK (acknowledge) correct receipt of the
message, NAK (negative acknowledge) correct receipt (requesting a retransmit), or ignore the
message. If the reader receives a NAK, it will retransmit the last message again. The host may
retransmit at its discretion.
Header
Data
Trailer
TYPE
LEN
Command or Response
BCC
ETX
TYPE specifies whether the message is a normal Acknowledge (ACK), or whether it is a
Negative Acknowledge (NAK). The value of TYPE for an ACK is 60H. The value of
TYPE for a NAK is E0H.
LEN
gives the length of the Data portion of the message.
Command or Response is the message being sent. LEN bytes are sent.
BCC
The Block Check Character is computed by exclusive ORing the value of all preceding
bytes in the message, back to and including the TYPE byte.
ETX
Signals the end of the message. Its value is 03H.
Note: During transmission, each byte, including the ACK/NAK, Length, Data and LRC, but
excluding the ETX, is broken into 2 nibbles which are converted into the ASCII equivalent of
HEX, and transmitted. The ETX is transmitted as is. The receiver must reconstruct the inbound.
Thus an actual message takes almost twice as many bytes to transmit as there are bytes to
send. Suppose you want to send a Request Version String Command to the reader. Before
splitting the bytes, the message would look like (all values are HEX):
Header
Data
Trailer
TYPE
LEN
Command or Response
BCC
ETX
60
01
39
58
03
After splitting the bytes according to the TLP-224 rules, the transmitted character string would
look like this:
36 30 30 31 33 39 35 38 03
Response Operation Status Byte