KerOS 6

Aim

LoRaWAN gateway's main purpose is to forward the LoRaWAN packets emitted by end-devices and received by the gateway to a LoRaWAN Network Server (LNS) and vice-versa.
The packet forwarder is the program running on a LoRa gateway that allow this feature. It is then the bridge between the LoRa technology and the IP technology. This is the main program of a LoRa gateway.

On Wirnet™ iSeries, the packet forwarder is composed on two main programs: lorad and a forwarder

lorad is responsible for the LoRa hardware. Its main purpose is to provide an abstraction of the LoRa chipsets to other processes. It initializes the hardware, configures it (channel frequencies, LBT, diversity, …), and uses it to send/receive LoRa packets or to achieve frequency scans.

The forwarder can be either:

Lorad configuration

lorad is running by default with its configuration file /etc/lorad/lorad.json.
The file allows to configure:

Frequency plan

Kerlink provides lorad configuration file examples to ease channel plan configuration of your gateway.
These files respect the LoRaWAN Regional parameters provided by the LoRa Alliance.
They are available in /usr/share/lorad/frequency_plans/sx130x directory.
On Wirnet™ iBTS, the directory is /usr/share/lorad/frequency_plans/sx1301ar

Available conffiles are:

Frequency plan Country LBT enabled Comment
AS923-1-JP.json Japan Yes
AS923-1.json Asia-1 No
AS923-2.json Indonesia, Vietnam No
AS923-3.json Asia-3 No
AS923-4.json Israel No
AU915-CB01.json Australia No Australia Channel Blocks 0 matches to the channels 0 to 7
AU915_64CH.json Australia No Applicable only on Wirnet™ iBTS Highway (not supported yet)
EU868.json Europe No
EU868_2x8CH.json Europe No Applicable only on Wirnet™ iBTS (not supported yet)
IN865.json India No
KR920.json Korea Yes
RU864.json Russia No
US915-CB01.json United States No US Channel Blocks 0 matches to the channels 0 to 7
US915_64CH.json United States No Applicable only on Wirnet™ iBTS Highway (not supported yet)
f868.json No It is the default file used if the hardware radio of your gateway is 868 MHz. It links to EU868.json
f915.json No It is the default file used if the hardware radio of your gateway is 915 MHz. It links to US915-CB01.json
f923.json No It is the default file used if the hardware radio of your gateway is 923 MHz. It links to AS923-1.json

Calibration and antenna gain

Frequency plan configuration files are incomplete as is to fully configure lorad. It needs the calibration part to be valid.
They are available in /usr/share/lorad/boards
In order to choose the correct file according to your gateway, you must know the codename and the hardware region of your gateway

How to know the codename

The codename is a 4-characters word and is a part of the hostname: klk-<codename>-xxxxxx
You can retrieve the codename according to your gateway on this page

Using terminal, you can do the following command:

env | grep CODENAME 
How to know the hardware region

The hardware region is one of the 3 declinations in which you bought your gateway. Depending on the gateway is a 868, 915 or 923 MHz, the hardware region is "f868", "f915", "f923".

Using terminal, you can do the following command:

env | grep HWRADIO

Create your valid configuration file

You can use a frequency plan among those suggested as examples or create your own. In order to apply it, you need to do the following command:

sudo conflex -ajo /etc/lorad/lorad.json <freq_plan.json> <calibration.json>

This command will merge the frequency plan and the calibration into a valid configuration file, called lorad.json.

On Wirnet™ iBTS, the command is slightly different than on other gateways.
Please use: sudo conflex -azo /etc/lorad/lorad.json <freq_plan.json> <calibration.json>

Activation

Every time you need to apply your modification, do the command:

sudo systemctl restart lorad

Troubleshooting

Logs of lorad are available with the command

sudo journalctl -fu lorad

You can activate debug logs using following commands

sudo sed -i "s:info:debug:g" /usr/lib/systemd/system/lorad.service
sudo systemctl daemon-reload
sudo systemctl restart lorad