20190905
9
6. Communications
TCP is a connection-oriented protocol. Before either end can send data to the other, a connection must be
established between them.
Host is the three-way handshake initiator.
After connection is established , host can send the dedicated command to achieve some application
,
as following .
Ethernet Header(14)
IP Header(20)
TCP Header(20)
TCP command or response
CRC
Command symbols definitions are as below:
STX
02H
ETX
03H
ACK
06H
NACK
15H
m
1 byte parameter
n
1 byte parameter
<Data…>
contents of data
(command list)
Command Hexadecimal Format
Description
V
STX V ETX
Get device firmware version & status
D
STX Dmn ETX
Show pre-saved message page on LCD
C
STX C ETX
Erase LCD and buffer
M
STX Mn ETX
Enable/Disable reader
K
STX Kn ETX
Enable/Disable keypad
B
STX Bn ETX
Control beep
P
STX Pmn ETX
Change operation parameters
@
STX @ ETX
Initialize device
F
STX F ETX
Blink the display
I
STX I n ETX
Inquiry the keycode of key
X
STX X m n ETX
Define the keycode of keys
Y
STX Y n <Data…> ETX
Show text message and save it to the text message page
b
STX bn ETX
Enable/Disable LCD backlight
R
STX Rm<P0,…,P3> ETX
Enable/Disable Client mode
(*) only work with graphic LCD models
A.
Get device firmware version & status
HOST to DEVICE (3 bytes)
STX
V
ETX
02H
56H
03H
DEVICE to HOST (10 bytes)
“ROMXXXXV S”
XXXX
: Firmware Number