LoRaWAN Communication
General
The LoRaWAN Interface is in compliance with the LoRa Alliance specifications, and is based on the LoRa transmission standards.
Using the LoRa protocol the device can reliably transmit data over large distances without permanent communication.
The interface constantly adapts to the optimal transmit and receive parameters individually to ensure a stable and reliable link to the LoRaWAN Gateway.
The status of the link to the LoRaWAN network is shown on the device’s display.
The LoRaWAN interface is compatible with LoRaWAN V1.0.4 and is a Class C device.
The required parameters and configuration of the LoRaWAN interface are permanently saved inside the device.
All devices are delivered with OTAA mode enabled, the DevEUI of the device is listed on the package and on the device itself.
Infrastructure
The Customer is responsible for a working LoRaWAN Infrastructure, a typical LoRaWAN infrastructure consists out of;
LoRaWAN Gateway
Network Server
If needed YOBIIQ can support customer with the selection and configuration of the infrastructure, this however is not covered by the normal support coverage.
YOBIIQ also supplies a turn-key LoRaWAN Infrastructure if Customer has no experience with the required infrastructure.
(Re)Join Requests
The LoRaWAN interface will perform automatic rejoin requests to the network as configured.
A Rejoin requests will always be sent once every 24 hours, this will allow for easy migrations to another LoRaWAN network.
As long as the device is not connected to a LoRaWAN network, the interface regularly tries to connect to a LoRaWAN network.
These Join requests occur randomly in a ~10 min time period to counteract bandwidth problems if multiple devices are in the same network.
Time synchronization
The LoRaWAN Interface performs a time synchronization during normal operation, it performs this at least once every 24 hours.
The device will adjust its internal clock to match with the time returned by the time synchronization.
Sending measurement registers
The device sends all requested measurements directly from its datalogger via LoRaWAN without any changes to the data.
The requested measurements are read from the data logger at the due date of the interval.
Example of a transmission interval of 15 minutes:
10:00:10am: The LoRaWAN communication module reads out the latest data logger entry. The values stored there are from 10:00:00am.
10:00:11am 10:14:59am: The device tries to transmit the data via the LoRaWAN network.
Notes on the transmission of measurements;
Be aware that, if you operate multiple devices in the same LoRaWAN network, transmissions by these meters may collide. The device will however adjust its transmit parameters to ensure smooth transmissions.
Please make sure that both the device and the LoRaWAN network are configured in such a way that the device can transmit its full package to avoid losing data in failed transmissions.
Device Payloads
All data are based on following format(HEX), the Data field should follow big-endian:
1 Byte
1 Byte
N Bytes
1 Byte
1 Byte
N Bytes
Basic Information
The device sends basic information upon joining a network, and after a reboot.
The basic information is sent over fPort 50
ff
00 (Status)
Status of the device
01 (Manufacturer)
Hex of the manufacturer
02 (Model)
Hex of the model
03 (Device SN)
7 digits serial number
11 (Device Class)
0x00: Class A, 0x01: Class B, 0x02: Class C
06 (Power Event)
0x00: AC Power Off, 0x01: AC Power On
05 (Hardware Version)
Hardware version, example 0100 is version 1.00
04 (Firmware Version)
Firmware version, example 0100 is version 1.00
07 (Battery Voltage)
Random voltage
08 (Battery Percentage)
Random percentage
Device Data
The device allows for configuration of the registers that should be sent and in which interval by using a downlink message.
There are 10 ports available for this configuration which are represented by the fPorts 1-10, each fPort can hold 5 channels. This means that a total of 50 registers can be configured.
The lower slots have a higher priority. The device comes with a “Default Uplink” configured on fPort 1. All downlink commands should be send to the Application port, which the configuration is for
The fPort and Channel are configured under the device as discused within the Serial Communication chapter.
If a configuration downlink is send to fPort 1, the default uplink is overwritten!
The structure of modbus data point is as follow:
0xDD
0xFE
Device timestamp
Current timestamp of the device, taken from device RTC.
Modbus Channel ID
Modbus Channel data type
4 - 7 bytes of data
Modbus Channel data point
The data field of modbus channel data point has between 4 to 7 bytes and contains the following information:
Byte0 + Byte1 + Byte2[7:4]
Logger Timestamp Offset
Uint20, 20 bits Logger Timestamp Offset : Channel Logger Timestamp = Device Timestamp - Logger Timestamp Offset
Byte2[3:2]
Modbus Channel Byte Order
Uint2, 2 bits Modbus Channel Byte Order : 0 = ABCD 1 = CDBA 2 = BADC 3 = DCBA
Byte2[1:0]
Modbus Channel Register Data Size
Uint2, 2 bits Modbus Channel Register Data Size : 0 = 4 bytes of data 1 = 1 byte 2 = 2 bytes 3 = 3 bytes
1 to 4 bytes
Modbus Channel Register Data
The data size is specified in the Modbus Channel Register Data Size field
Default Uplink
The device reports a default uplink on fPort 1 with an interval of 15 minutes.
This allows for testing the connectivity of the device and receive basic registers readings without any configuration to the device.
0xDD
0xFE
Device timestamp
Current timestamp of the device, taken from device RTC.
0xC8 => Modbus Channel ID 200
Modbus Channel data type
4 - 7 bytes of data
Modbus Channel data point
0xC9 => Modbus Channel ID 201
Modbus Channel data type
4 - 7 bytes of data
Modbus Channel data point
The default modbus channel configuration :
0xC8 => Channel ID 200
5 minutes
1
0x0038
4 => Holding 32bit
3 => DCBA
1 => channel enabled
0xC9 => Channel ID 201
5 minutes
1
0x003A
5 => Holding Float
3 => DCBA
1 => channel enabled
Alarms
If an alarm occurs within the device an uplink message is immediately send over fPort 11. The message contains the register number of the alarm and the current value.
0xAA
0xFE
Current timestamp of the device, taken from device RTC.
0xAA
0x00
0xAA
0x01
LoRaWAN watchdog alarm 0x00 : normal 0x01 : alarm
0xAA
0x02
Serial watchdog alarm 0x00 : normal 0x01 : alarm
0xAA
Modbus Channel ID : Uint8 [200 to 249]
Modbus Channel Operation Alarm 0x00 : normal 0x01 : generic exception 0x02 : crc checking failure 0x03 : response size error 0x04 : illegal slave id 0x05 : response timeout 0x81 : illegal function code 0x82 : illegal modbus address 0x83 : illegal write value 0x84 : slave device failure 0x85 : write operation failure
Downlink Commands
Device Configuration
The device supports downlink commands to configure the device, the application port is 50 by default.
ff
0a (Reboot)
1 Byte, Uint8 01 => Reboot the device
ff
0b (Restart)
1 Byte, Uint8
01 => Restart the LoRaWAN Interface.
Example
Restart the LoRaWAN Interface.
Channel
Type
Value
ff
0b (Restart)
01 => Restart
Periodic Packages
To configure the periodic uplinks by the device you can send a downlink to fPort 1 to 5. Each fPort can hold 5 modbus channel IDs. To configure a modbus channel, please go to Modbus Channel Configuration
If confirmed mode is off, the device will send a package 1 time; if confirmed mode is on, the device will resend a package maximum of 3 times if it does not get an acknowledgement from the network.
ff
14 (Interval)
1 Byte, Uint 8
Set the interval of the uplink, in minutes.
15 (Confirmed)
1 Byte, Uint 8
Confirmed mode off => 0 or confirmed mode on => 1
16 (Active)
1 Byte, Uint 8
Set the status of the fPort : inactive => 0 or active => 1
17 (Registers)
Maximum of 5 modbus channel ID (only configured modbus channels will be sent periodically)
Device Parameter Reading
The device supports downlink commands to read its readable parameters, the application port is 100 by default.
FF
CC (Read Parameter)
Maximum of 10 parameter types (only readable parameters)
Last updated