Communication protocol, Command, Normal command (length < 255 bytes) – ACS ACK30 Smart Keyboard User Manual
Page 13: Extended command, Acr30
![background image](/manuals/248163/13/background.png)
ACR30 Reference Manual
Version 3.3 January 2009
Page 13 of 44
ACR30
8.0. Communication protocol
In the normal operation, the ACR30 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
ACR30 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.
8.1. Command
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+4 Header Instruction Data length = N Data Checksum 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. (0 < N < 255) Data Data contents of the command. For a READ command, for example, the data bytes would specify the start address 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, 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: byte 1 2 3 4 5 6 7 01 H 91 H 03 H 11 H 22 H 33 H 93 H 8.1.1. Extended Command A command consists of six protocol bytes and a variable number of data bytes and has the following
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.
instruction, data length and all data bytes.
structure: