Kerlink

The Kerlink IOT station has a mechanism to start “custom” application on boot. These steps will install the LoRa Gateway Bridge ARM build on the Kerlink.

  1. Create the the directories needed:

    mkdir -p /mnt/fsuser-1/chirpstack-gateway-bridge/bin

  2. Download and extract the ChirpStack Gateway Bridge ARMv5 binary into the above directory. See downloads. Make sure the binary is marked as executable.

  3. Save the following content as /mnt/fsuser-1/chirpstack-gateway-bridge/start.sh:

    #!/bin/bash
    
    LOGGER="logger -p local1.notice"
    
    # mosquitto
    iptables -A INPUT -p tcp --sport 1883 -j ACCEPT
    
    /mnt/fsuser-1/chirpstack-gateway-bridge/bin/chirpstack-gateway-bridge --mqtt-server tcp://YOURSERVER:1883  2>&1 | $LOGGER &

    Make sure to replace YOURSERVER with the hostname / IP of your MQTT broker. Also make sure the file is marked as executable.

  4. Save the following content as /mnt/fsuser-1/chirpstack-gateway-bridge/manifest.xml:

    <?xml version="1.0"?>
    <manifest>
    	<app name="chirpstack-gateway-bridge" appid="1" binary="start.sh" >
    		<start param="" autostart="y"/>
    		<stop kill="9"/>
    	</app>
    </manifest>

Note: These steps have been tested using the KerOS firmware v4.1.6. Please make sure you have this version or later installed. You must also install the Kerlink Common Packet Forwarder.

SSH into the gateway

The first step is to login into the gateway using ssh:

ssh root@GATEWAY-IP-ADDRESS

Please refer to the Kerlink wiki for login instructions.

Install IPK package

Find the latest package at https://artifacts.chirpstack.io/vendor/kerlink/ibts/ and copy the URL to your clipboard. Then on the gateway use wget to download the package into a folder named /user/.updates. Example for chirpstack-gateway-bridge_3.4.0-r1_klk_lpbs.ipk:

mkdir -p /user/.updates
cd /user/.updates
wget https://artifacts.chirpstack.io/vendor/kerlink/ibts/chirpstack-gateway-bridge_3.4.0-r1_klk_lpbs.ipk

To trigger the iBTS gateway to install / update the package, run the following commands:

sync
kerosd -u
reboot

Please refer to the Kerlink wiki for more information about installing and updating packages.

Edit the ChirpStack Gateway Bridge configuration

To connect the ChirpStack Gateway Bridge with your MQTT broker, you must update the ChirpStack Gateway Bridge configuration file, which is located at: /user/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml.

(Re)start and stop commands

Use the following commands to (re)start and stop the ChirpStack Gateway Bridge Service:

# status
monit status chirpstack-gateway-bridge

# start
monit start chirpstack-gateway-bridge

# stop
monit stop chirpstack-gateway-bridge

# restart
monit restart chirpstack-gateway-bridge

Configure packet-forwarder

You must configure the packet-forwarder on the gateway to forward its data to 127.0.0.1 at port 1700. The file /user/etc/lorafwd/lorafwd.toml must contain the following lines under the [ gwmp ] section:

node = "127.0.0.1"
service.uplink = 1700
service.downlink = 1700

After updating this configuration file, make sure to restart the lorafwd service:

monit restart lorafwd

Note: These steps have been tested using the KerOS firmware v4.1.6. Please make sure you have this version or later installed. You must also install the Kerlink Common Packet Forwarder.

SSH into the gateway

The first step is to login into the gateway using ssh:

ssh root@GATEWAY-IP-ADDRESS

Please refer to the Kerlink wiki for login instructions.

Install IPK package

Find the latest package at https://artifacts.chirpstack.io/vendor/kerlink/ifemtocell/ and copy the URL to your clipboard. Then on the gateway use wget to download the package into a folder named /user/.updates. Example for chirpstack-gateway-bridge_3.4.0-r1_klk_wifc.ipk:

mkdir -p /user/.updates
cd /user/.updates
wget https://artifacts.chirpstack.io/vendor/kerlink/ifemtocell/chirpstack-gateway-bridge_3.4.0-r1_klk_wifc.ipk

To trigger the iFemtoCell gateway to install / update the package, run the following commands:

sync
kerosd -u
reboot

Please refer to the Kerlink wiki for more information about installing and updating packages.

Edit the ChirpStack Gateway Bridge configuration

To connect the ChirpStack Gateway Bridge with your MQTT broker, you must update the ChirpStack Gateway Bridge configuration file, which is located at: /user/etc/chirpstack-gateway-bridge/chirpstack-gateway-bridge.toml.

(Re)start and stop commands

Use the following commands to (re)start and stop the ChirpStack Gateway Bridge Service:

# status
monit status chirpstack-gateway-bridge

# start
monit start chirpstack-gateway-bridge

# stop
monit stop chirpstack-gateway-bridge

# restart
monit restart chirpstack-gateway-bridge

Configure packet-forwarder

You must configure the packet-forwarder on the gateway to forward its data to 127.0.0.1 at port 1700. The file /user/etc/lorafwd/lorafwd.toml must contain the following lines under the [ gwmp ] section:

node = "127.0.0.1"
service.uplink = 1700
service.downlink = 1700

After updating this configuration file, make sure to restart the lorafwd service:

monit restart lorafwd