6.5. Transmission Protocol
The start of a command (to the reader) or a response (from the reader, including the Reset Message
and Card Status Messages) is indicated by the respective party through the transmission of the single
byte Start-of-Text (STX) character with the value 02
H
.
The end of a command or response is indicated through the single byte End-of-Text (ETX) character
with the value 03
H
.
Within the command and response transmission only ASCII characters representing the hexadecimal
(hex) digits 0...F are used. Each byte of a command or response is split into its upper and lower half
byte (nibble). For each half byte is transmitted the ASCII character representing the respective hex
digit value. For example, to transmit the data byte 3A
H
, two bytes are actually sent on the interface,
namely, 33
H
(ASCII code for '3') followed by 41
H
(ASCII code for 'A'):
Data byte value 3A
H
Transmitted values
33
H
= '3'
41
H
= 'A'
The following example shows the transmission of a command with instruction code A2
H
and one data
byte with the value 3D
H
. The command has the following structure:
byte 1 2
3
4
5
Header
Instruction
Data
length
Data
Checksum
01
H
A2
H
01
H
3D
H
9F
H
This command is transmitted on the serial interface in 12 bytes as follows:
byte 1 2 3 4 5 6 7 8 9 10
11
12
STX '0' '1' 'A'
'2'
'0' '1'
'3' 'D'
'9' 'F' ETX
02
H
30
H
31
H
41
H
32
H
30
H
31
H
33
H
44
H
39
H
46
H
03
H
For the representation of the hex half-byte values as the corresponding ASCII characters in
commands, the BioCARDKey accepts both upper case characters 'A' ... 'F' (41
H
... 46
H
) and lower
case characters 'a' ... 'f' (61
H
... 66
H
):
byte 1 2 3 4 5 6 7 8 9 10
11
12
STX '0' '1' 'A'
'2'
'0' '1'
'3' 'D'
'9' 'F' ETX
02
H
30
H
31
H
41
H
32
H
30
H
31
H
33
H
44
H
39
H
46
H
03
H
is equivalent to:
byte 1 2 3 4 5 6 7 8 9 10
11
12
STX '0' '1'
'a' '2'
'0' '1'
'3' 'd'
'9'
'f' ETX
02
H
30
H
31
H
61
H
32
H
30
H
31
H
33
H
64
H
39
H
66
H
03
H
In its response messages, the BioCARDKey uses upper case characters 'A' ... 'F'.
Document Title Here
Document Title Here
Document Title Here
AET60 Reference Manual
Version 1.7
Page 14 of 24
www.acs.com.hk