Model 152 Smart Card Reader/Writer Operation Instructions
8182760 Revision G Copyright Axiohm 1998 All Rights Reserved
Page 1.1
Chapter 7:
ISO TPDU Command/Response Structure
Managing Microprocessor Cards is done using Transport Protocol Data Units (TPDU). ISO
7816-3 defines the structure of TPDUs. The Model 152 uses the TPDU structure to
communicate with Microprocessor Cards, (APDU support not yet standardized in industry). The
Model 152 also uses the TPDU structure to format messages for Memory Cards. This has the
advantage of providing an interface closer to a standard than would otherwise be possible.
TPDU Command Structure
CLA
INS
P1
P2
P3
Lc or Le
Data (if P3 si Lc)
CLA
ISO Class byte
INS
ISO instruction code, tells reader/card which kind of operation
P1
ISO Parameter 1, usage varies with commands
P2
ISO Parameter 2, usage varies with commands
P3
ISO Parameter P3, codes Lc or Le fields (see note).
Data
Output data, varies with commands
Le
ISO Parameter Le, maximum length of expected reply
Note: P3 usually codes Lc (length of data to send to card). If there is no data to send to the card
and data is expected from the card, P3 will code Le (maximum length of data expected from the
card). If there is no data to send to the card, and no data is expected in the response, P3 is 0.
If Data or Le are marked N/A, they should not be supplied! (Memory Cards)
TPDU Response Structure
Data (optional)
SW1
SW2
This response format applies when the reader is able to maintain communications with the card
until the operation is completed. Each response may include data (usually Le bytes if operation
was successful), if applicable. Each response is terminated with a two byte status (SW1/SW2),
which should be interpreted according to the card manufacturer’s instructions for
Microprocessor Cards, and according to 7816-3 and IS0 7816-4 for Memory Cards.
If the reader is unable to maintain communications with the card until the operation is
completed, a single byte reader status will be returned. In USI2 protocol, the card removed
status is the ‘*’ character. In the TLP-224 protocol, the card removed status is F7H.