LoRaWAN Uplink Formats
The Dimetix D-Series Add-On can transmit measurement results via LoRaWAN. Dimetix measurement uplinks use LoRaWAN port 60.
Uplink Port
| Port | Direction | Description |
|---|---|---|
60 | Uplink | Dimetix measurement result |
Measurement
The Gateway V4 collects multiple valid distance measurements from the connected Dimetix D-Series sensor and calculates their arithmetic mean. The resulting measurement or an error status is transmitted in the Dimetix LoRaWAN uplink.
Result Types
A measurement cycle can produce the following result types:
| Value | Result | Description |
|---|---|---|
0 | Success | Measurement completed and an averaged distance is available |
1 | Sensor error | The Dimetix sensor reported an error |
2 | Communication error | Communication with the sensor failed |
3 | Insufficient samples | Not enough valid measurements were available |
Payload Format
Dimetix uplinks use LoRaWAN port 60.
Payload format version 2 uses a fixed length of 8 bytes.
| Byte(s) | Field | Type | Description |
|---|---|---|---|
0 | addonNum | uint8 | Add-On identifier. 13 (0x0D) identifies the Dimetix Add-On |
1 | formatVersion | uint8 | Payload format version. Currently 2 |
2 | deviceId | uint8 | Dimetix device address |
3 | resultType | uint8 | Result of the measurement cycle |
4..7 | distance | uint32, big-endian | Averaged distance in units of 0.1 mm for successful measurements |
For a successful measurement (resultType = 0), bytes 4..7 contain the averaged distance as an unsigned 32-bit big-endian integer in units of 0.1 mm.
For error results, bytes 4..7 do not contain a valid distance measurement.
Examples
Successful Measurement
Base64 encoded LoRaWAN payload:
DQIAAAAASLs=
Decoded hexadecimal payload:
0D 02 00 00 00 00 48 BB
| Field | Value |
|---|---|
addonNum | 13 |
formatVersion | 2 |
deviceId | 0 |
resultType | 0 — Success |
distance | 0x000048BB = 18619 |
| Distance | 1861.9 mm |
The parser produces:
{
"addonNum": 13,
"deviceId": 0,
"distance": 18619,
"distanceMm": 1861.9,
"formatVersion": 2,
"meterInterface": "dimetix",
"resultType": 0,
"success": true,
"unit": "0.1mm"
}
Communication Error
Base64 encoded LoRaWAN payload:
DQIAAgAAAAA=
Decoded hexadecimal payload:
0D 02 00 02 00 00 00 00
| Field | Value |
|---|---|
addonNum | 13 |
formatVersion | 2 |
deviceId | 0 |
resultType | 2 — Communication error |
| Result data | 0x00000000 |
The parser produces:
{
"addonNum": 13,
"deviceId": 0,
"errorType": "communication",
"formatVersion": 2,
"meterInterface": "dimetix",
"resultType": 2,
"success": false
}