GALILEOSKY GLONASS/GPS Satellite v4.0 (0223) User’s manual
GalileoSky Ltd.
Page 76
12
Server exchange protocol
This protocol supports bi-directional data exchange between the terminal and the server. The data are
transmitted via GPRS channel with the use of TCP/IP protocol. The server must have static address and port
for connecting terminals as clients.
Data transmission from the terminal to the server:
After establishing terminal-server connection the device sends head pack and then main packs with the
data. Each pack needs confirmation from the server; if confirmation is not received, the terminal sends the
pack once again.
Note that TCP/IP is a stream protocol, i. e there are no packets of the TCP/IP level for the application server
software. Reading from the TPC/IP-socket is a reading of the bytes stream but not reading of the packets.
The GalileoSky protocol packets are not ones of the application level, and for their correct parsing server
software has to select a buffer and capture the packet. In no case, it is possible to rely on the fact that one
read operation from the socket returns the whole GalileoSky protocol packet. The whole GalileoSky
protocol packet can be received after executing some sequential read operations, there can be time
intervals between them, it is connected with the operation aspects of the TCP/IP protocol.
Head pack structure:
Field
Size
Header 0x01
1 byte
Packet length
2 bytes
Tag 1
1 byte
Data, corresponding tag 1
depends on the tag
type
…
Tag N
1 byte
Data, corresponding tag N
depends on the tag
type
Checksum
2 bytes
A high-order bit is an indicator of not transferred data in the archive, 15 low-order bits are the number of
bytes in the packet.
Transmitted tags are set by HeadPack command. Packet length is calculated from the head tag to checksum
beginning. Tags are in ascending order. The data and the checksum are transferred in little-endian format.
Terminal
Server
First packet (HeadPack)
Head packet receiving confirmation
Main packet (MainPack)
Main packet (MainPack)
Main packet receiving confirmation
Main packet receiving confirmation