Manual Supercom 646 GPRS rev. 04-02-2011
44
13. Annexe E
13.1 BIN file Format
Periodically, the FTP-GPRS module read the data stored in the central 646 and create a BIN file that is up-
loaded to the FTP server. This BIN file contains the data of all devices read by radio.
File name:
<IMEI>_<FileTime>.BIN
For example:
355632003678233_1236585660786.BIN
The IMEI is a 15 digits number that represents the International Mobile Equipment Identifier of the
FTP-GPRS module.
The FileTime is the local time of the file creation (in milliseconds from midnight, January 1, 1970)
For further details on IMEI and FileTime see in the table below.
The BIN file is a binary file composed of :
- a fixed header of 16 bytes
- a variable length DeviceData structure repeated for each device
- a fixed trailer of 7 bytes
The following table describes the internal data structure of a BIN file:
Sect Field Name
Size [byte] First byte Range
Description
H
e
a
d
e
r
IMEI
8
MSB
0..10
15
-1
International Mobile Equipment Identifier.
This number is unique for each FTP-
GPRS module.
FileTime
8
MSB
0..10
13
-1
Local time of the file creation. Number of
milliseconds from midnight, January 1,
1970 (1970-01-01T00:00).
D
e
v
ic
e
D
a
ta
PrimaryAddr
2
MSB
0..255
M-Bus primary address. Always 0 for the
central 646, the radio devices don't have a
primary address.
IdNumber
4
MSB
0..99'999'999 M-Bus identification number.
TelegramType
2
MSB
0..2
Type of the telegrams. Always 1 (M-Bus)
for the central 646.
TelegramsLength
2
MSB
0..32'767
Length (in bytes) of the following Tele-
gramsData
TelegramsData
Telegrams
Length
-
Concatenated telegrams of the device.
T
ra
ile
r
DeviceListCount
2
MSB
0..32'767
Number of devices in the list.
DeviceReadCount
2
MSB
0..32'767
Number of read devices.
Error
1
-
0; 1
0: No error (DeviceReadCount = Device-
ListCount); 1: some devices are not read
(DeviceReadCount < DeviceListCount)
CRC
2
LSB
CRC16 of this file content according to
RFC1662.
MSB: Most Significant Byte
LSB: Least Significant Byte