...
The internal SD-Card is write protected. All variable data is stored on the external SSD to avoid SD-Card damage over time.
Software Components
...
...
Lobaro Modbus Server
The Lobaro Modbus Server (lobaro-modbus-server
) is responsible for fetching data from the local LoRaWAN Network Server and provides received data via modbus.
To change any filed on the SD Card (including all config files) you need to execute the script:
No Format |
---|
~/enableWriteAccess.sh |
To disable write access, restart the gateway or execute:
No Format |
---|
~/disableWriteAccess.sh |
For editing files vim
is installed.
Open or change configuration of the Lobaro Modbus Server:
sudo vim /etc/lobaro-modbus-server/lobaro-modbus-server.yml
After editing the configuration lobaro-modbus-server
must be restarted:
sudo systemctl restart lobaro-modbus-server
Check the status with
sudo systemctl status lobaro-modbus-server
Check the logs with
sudo journalctl --no-pager -e -u lobaro-modbus-server
Debugging
Beside checking the logs, you can also analyze the files in the dataDir
(see config).
There are two files that help writing the config and checking the results.
device-data.json
- contains raw json received from Chirpstack. Can be used to verifymapping[].register.value
configuration.register-map.json
- contains all register values provided via modbus. All values are formatted asint
.
Example device-data.json
:
{
"0000000000000000-1": {
"adr": true,
"applicationID": "1",
"applicationName": "default",
"data": "AAMEAOQN1g==",
"devEUI": "0000000000000000",
"deviceName": "0000000000000000",
"fCnt": 1,
"fPort": 1,
"object": {
"temp": 22.8,
"vBat": 3.542,
"version": "v0.3.4"
},
"rxInfo": [
{
"gatewayID": "0000000000000000",
"loRaSNR": 8.8,
"location": {
"altitude": 0,
"latitude": 0,
"longitude": 0
},
"name": "default",
"rssi": -36,
"uplinkID": "ce2e086a-d747-4813-9428-b7a4a45abcc8"
}
],
"txInfo": {
"dr": 0,
"frequency": 868300000
}
}
}
Example register-map.json
:
{
"Register": {
"100": {
"Val": 0,
"Type": 1,
"UpdatedAt": "2020-02-07T13:44:03.39750918Z"
}
}
}
Configuration file
Example config:
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...