ABCD
1
2
3
Bi-directional communication protocol: device -> server, server -> device.
4
5
Each parcel (PACKAGE) from the device requires confirmation from the server (SERVER_COM)
6
7
If there is no confirmation from the server, the device will duplicate packet until confirmation.
8
9
Data transmission to the server is in continuous TCP session (GPRS).
10
11
Data are transmitted in binary form, byte order little-endian.
12
13
14
The structure and procedure packs
15
ORDER OF TRANSMISSIONDEVICE >><< SERVER
16
first connection with the server
transmitted HEADER - in response to confirmation HEADER

further

PACKAGE + SERVER_COM (confirmation)
17
HEADER
18
SERVER_COM
19
PACKAGE
20
PACKET_0
21
......
22
PACKET_N
23
SERVER_COM
24
subsequent packets

PACKAGE + SERVER_COM (confirmation)
25
26
PACKAGE
27
PACKET_0
28
.....
29
PACKET_N
30
SERVER_COM
31
32
asynchronous command
Only a command (between packages PACKAGE)
SERVER_COM