LoRa Sensor Protocol

  1. PACKET FORMAT
  1. Generic Format

1 byte

3 bytes

N bytes

Protocol

Header

Device Identifier

Payload

VER

FLAGS

  1. Simple Payload Format

1 byte

3 bytes

2 bytes

2 bytes

2 bytes

Protocol

Header

Device Identifier

Temperature

Pressure

Humidity

VER

FLAGS

  1. Extended Payload

                                                                      

1 byte

3 bytes

1byte

1 byte

N bytes

1 byte

N bytes

1 byte

N bytes

Protocol

Header

Device Identifier

Payload Size

Data Block

Data Block

Data Block

VER

FLAGS

Data Type

Data Payload

Data Type

Data Payload

Data Type

Data Payload

  1. Protocol Header

Protocol Version will be changed when fixes or new features will be implemented in the protocol.

Payload type: 01 - Simple Payload, 10 Extended payload, 11 Reserved

Protocol Version (VER)

Flags

7

6

5

4

3

2

1

0

 0

0

Payload Type

  1. Device Identifier (UID)

 UID is unique device ID and will contain latest 3 bytes of the MAC

Byte 1

Byte 2

Byte 3

UID

  1. Payload Size

The size of the data payload.

  1. Data Block

1 byte

N bytes

Data Type

Data Payload

  1. Data Types

Value

Description

Payload Length

0x001

Temperature

2 bytes

0x002

Pressure

2 bytes

0x003

Humidity

2 bytes

0x004

Laser Ranging Sensor

2 bytes

0x005

Air Quality Sensor

2 * 2 bytes

0x006

Accelerometer

3 * 2 bytes

0x007

Battery Level

2 bytes

0x008

Thermal Sensor Raw

1 byte + 32 bytes

0x009

Historical Synchronisation

1 byte


  1. Data Payloads
  1. Temperature

In this type of data, payload contains 2-bytes temperature data. Current sensor operating range is -40 - +80C.

Example Data Payload 0x7E  0x18

Byte 1

Byte 1

Byte 2

0x001

0x7E

0x18

Temperature: 0x187E -> (6270 – 4000)/100 = 22.70 degrees Celsius

  1. Pressure

In this type of data, payload contains 2-bytes pressure data. Current sensor operating range is 300 - 1100hPa.

Byte 1

Byte 1

Byte 2

0x002

Little-Endian pressure in hPa

  1. Humidity

In this type of data, payload contains 2-bytes humidity data

Byte 1

Byte 1

Byte 2

0x003

Percentage: 64.20 %

  1. Air Quality Sensor

Byte 1

Byte 1

Byte 2

Byte 3

Byte 4

0x004

IAQ (0-500)

CO2 ppm

VOC ppm

  1. Laser Ranging Sensor

Byte 1

Byte 1

Byte 2

0x005

Little Endian Range in cm

  1. Accelerometer

In this type of data, payload contains 6-bytes acceleration data. Each 2 bytes represents one axis.

Byte 1

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

0x006

Acceleration X

Acceleration Y

Acceleration Z

  1. Battery Level

Battery voltage will be sent based on the available battery life

Byte 1

Byte 1

Byte 2

0x007

Percentage

  1. Thermal Sensor Raw

Melexis 32 x 24 image each payload sends 1 row.

Byte 1

1 byte

32 bytes

0x008

Row number

Image Data

  1. Historical Synchronisation (HSYNC)

Synchronization data implies sending random selected data from the latest 10 or more historical collected values for every data type listed above. These values will be updated on the server  if for different reasons including collisions, some data is lost during LoRa transmission.

Byte 1

Byte 1

Byte 2

N bytes

...

Byte

N Bytes

0x009

Historic

Offset

Data Type

Data Payload

Data Type

Data Payload