1. The format of the command communication package sent by the host
| STX |
Package Length |
Command |
Parameters |
Data |
Etx |
BCC |
| 0x01 |
2 byte |
1 byte |
1 byte |
N byte |
0x03 |
1 byte |
Description: A. The data segment length is n Bytes, n <= 290;
B. The package length is two bytes. The package length is pre-embedded and the lower byte is post-embedded. It refers to the length of commands, parameters, and data.
C. The package length is decimal. Other fields are transmitted in ASCII code;
D. BCC is the difference or check value of STX, package length, command, parameter, data, and etx.
2. The card reader returns normally.
| STX |
Package Length |
Command |
Parameters |
Data |
Etx |
BCC |
| 0x01 |
2 byte |
1 byte |
1 byte |
N byte |
0x03 |
1 byte |
Description: The same format as the communication package for sending commands
3. The card reader returns an exception.
| STX |
Package Length |
'N' |
Command |
Error Message |
Etx |
BCC |
| 0x01 |
2 byte |
1 byte |
1 byte |
1 byte |
0x03 |
1 byte |
Note: 0x00 undefined commands
0x01 parameter error
0x02 command cannot be executed
0x04 command data error