26
4 LORAWAN COMMUNICATION PROTOCOL
4.1 TRANSMITTING MESSAGES
ATTENTION!
In fields consisting of several bytes, the little-endian byte order is used.
4.1.1 MODEM TRANSMITS PACKETS WITH THE FOLLOWING TYPES
Message with current readings has generated with pre-specified collection period and transmits on
LoRaWAN port 2 in according with the schedule. Message structure shown in table 5.
Table 5
Size in bytes
Field description
Data type
1 byte
Packet type, this packet == 1
uint8
1 byte
Battery charge, %
uint8
1 byte
Temperature, ⁰С
int8
1 byte
External magnetic field
1 – fixed
0 – not fixed
uint8
1 byte
LED indicator lock flag
1 – LED indicator locked
0 – LED indicator unlocked
uint8
4 bytes
Time of the readings at that packet (unixtime UTC)
uint32
1 byte
Leak flag (continuous consumption < 0.3 cubic meter
per 30 minutes
)
1 – leak
0 – normal
uint8
1 byte
Breakthrough flag (continuous consumption > 0.3 cubic meter
per 30
minutes
)
1 – breakthrough
0 – normal
uint8
4 bytes
Current readings (in cubic meters multiplied by 10 000)
uint32
When taking readings, the time zone specified in the settings considered.
4.1.2 TIME CORRECTION REQUEST
Time correction request send once a day on LoRaWAN port 4. Message structure shown in table 6.
Table 6
Size in bytes
Field description
Data type
1 byte
Packet type, this packet == 255
uint8
4 bytes
Time of the meter at a moment of the packet transmission (unixtime UTC)
uint32
After receiving this type of package, the application can send to meter the packet with time
correction.
4.1.3 PACKET WITH CURRENT SETTINGS
Transmits on LoRaWAN port 3. Message structure shown in table 7.
Table 7
Size in bytes
Field description
Data type
1 byte
Packet type, this packet == 0
uint8