AET63 Reference Manual
version 1.8 September 2006
Advanced Card Systems Ltd.
Page 9 of 29
7. Communication Protocol
In the normal operation, the AET63 acts as a slave device with regard to the communication between a
computer and the reader. The communication is carried out in the form of successive command-response
exchanges. The computer transmits a command to the reader and receives a response from the reader after
the command has been executed. A new command can be transmitted to the AET63 only after the response
to the previous command has been received.
There are two cases where the reader transmits data without having received a command from the
computer, namely, the Reset Message of the reader and the Card Status Message.
7.1 Command
7.1.1
Normal Command (Length < 255 bytes)
A command consists of four protocol bytes and a variable number of data bytes and has the following
structure:
Byte
1
2
3
4 ... N+3 (0<N<255)
N+4
Header
Instruction
Data length = N
Data
Checksum
Header
01
H
to indicate the start of a standard command.
02
H
to indicate the start of an encrypted command (support from firmware 0.67 onwards,
only used in PTVerifySC
(*)
and PTVerifySCAll
(*)
)
Instruction
The instruction code of the command to be carried out by the AET63
Data Length
Number of subsequent data bytes.(0 < N < 255)
Data
Data contents of the command.
For a READ command, for example, the data bytes would specify the start address and the
number of bytes to be read. For a WRITE command, the data bytes would specify the start
address and the data to be written to the card.
The data bytes can represent values to be written to a card and/or command parameters
such as an address, a counter, etc.
Checksum
The checksum is computed by XORing all command bytes including header, instruction,
data length and all data bytes.
Note (*) :
Please refer to “BioTRUSTKey API Manual.doc” for the descriptions of PTVerifySC and
PTVerifySCAll.
The following example shows the structure of a command with instruction code = 91
H
and three data bytes
with the values 11
H
, 22
H
and 33
H
, respectively: