Skip to content

1. CayenneLPP

Carlos Alatorre edited this page Nov 1, 2023 · 1 revision

What is CayenneLPP?

Provides a convenient and easy way to send data over LPWAN Networks such as LoRaWAN. The CayenneLPP is compliant with the payload size restriction, which can be lowered down to 11 bytes, and allows the device to send multiple sensor data at one time.

It implements basic sensor types specified by OMA SpecWorks, formerly IPSO Alliance. It supports multichannel data, which means that you can use it on multisensor devices.

How does it work?

CayenneLPP allows the device to send different sensor data in different frames. In order to do that, each sensor data must be prefixed with two bytes:

  • Data Channel: Uniquely identifies each sensor in the device across frames, eg. “indoor sensor”
  • Data Type: Identifies the data type in the frame, eg. “temperature”.

Payload structure

Byte 1 Byte N Bytes 1 Byte 1 Byte M Bytes ...
Data1 Ch. Data1 Type Data1 Data2 Ch. Data2 Type Data 2 ...

Data Types

Data Types conform to the IPSO Alliance Smart Objects Guidelines, which identify each data type with an “Object ID”. However, as shown below, a conversion is made to fit the Object ID into a single byte.

LPP_DATA_TYPE = IPSO_OBJECT_ID - 3200

Each data type can use 1 or more bytes to send the data according to the following table.

Type IPSO LPP Hex Data Size Data Resolution per bit
Digital Input 3200 0 0 1 1
Digital Output 3201 1 1 1 1
Analog Input 3202 2 2 2 0.01
Analog Output 3203 3 3 2 0.01
Illuminance Sensor 3301 101 65 2 1
Presence Sensor 3302 102 66 1 1
Temperature Sensor 3303 103 67 2 0.1°C Signed MSB
Humidity Sensor 3304 104 68 1 0.5 % Unsigned
Accelerometer 3313 113 71 6 0.001 G Signed MSB per axis
Barometer 3315 115 73 2 0.1 hPa Unsigned MSB
Gyrometer 3334 134 86 6 0.01 °/s Signed MSB per axis
GPS Location 3336 136 88 9 Latitude : 0.0001 ° Signed MSB
GPS Location 3336 136 88 9 Longitude : 0.0001 ° Signed MSB
GPS Location 3336 136 88 9 Altitude : 0.01 meter Signed MSB

Examples

Device with 2 temperature sensors

Payload (Hex) 03 67 01 10 05 67 00 FF  
Data Channel Type Value
03 ⇒ 3 67 ⇒ Temperature 0110 = 272 ⇒ 27.2°C
05 ⇒ 5 67 ⇒ Temperature 00FF = 255 ⇒ 25.5°C

Device with temperature and acceleration sensors

Frame N

Payload (Hex) 01 67 FF D7  
Data Channel Type Value
01 ⇒ 1 67 ⇒ Temperature FFD7 = -41 ⇒ -4.1°C

Frame N + 1

Payload (Hex) 06 71 04 D2 FB 2E 00 00  
Data Channel Type Value
06 ⇒ 6 71 ⇒ Accelerometer X: 04D2 = +1234 => + 1.234G
06 ⇒ 6 71 ⇒ Accelerometer Y: FB2E = -1234 => - 1.234G
06 ⇒ 6 71 ⇒ Accelerometer Z: 0000 = 0 => 0G

Device with GPS

Payload (Hex) 01 88 06 76 5f f2 96 0a 00 03 e8  
Data Channel Type Value
01 ⇒ 1 88 ⇒ GPS Latitude: 06765f ⇒ 42.3519
01 ⇒ 1 88 ⇒ GPS Longitude: F2960a ⇒ -87.9094
01 ⇒ 1 88 ⇒ GPS Altitude: 0003E8 ⇒ 10 meters