Response, Acr30 – ACS ACK30 Smart Keyboard User Manual
Page 14
ACR30 Reference Manual
Version 3.3 January 2009
Page 14 of 44
ACR30
byte
1
2
3
4
5
6 ... N+5
(N>0)
N+6
Header
Instruction
Data Length = N
Data
Checksum
FF
H
Data
Length
N
Header
Always
01
H
to indicate the start of a command.
Instruction
The instruction code of the command to be carried out by the ACR30.
Data Length Number of subsequent data bytes, and is encoded in 3 bytes. The first byte is FF
H
.
The second byte and the third byte represent data length N.
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.
8.2. Response
The response from the ACR30 to any command depends if the command where received by the
reader without error (e.g., checksum error).
8.2.1.
No transmission error with normal response (Length < 255 bytes)
The response by the ACR30 to a correctly received command consists of three protocol bytes, two
status bytes and a variable number of data bytes and has the following structure:
byte
1
2
3
4
5 ... N+4
(0 N+5 Header SW1 SW2 Data length = N Data Checksum Header Always 01 H to indicate the start of the response. SW1 Indicates the command execution status: 90 H = command successfully executed 60 H = error in command data; command cannot be executed 67 H = error detected in command execution FF H = status message initiated by the reader SW2 Further qualification of the command execution status. A table listing the possible values of the status bytes SW1 and SW2 and the
corresponding meaning is given in Appendix B.