@@ -52,85 +52,82 @@ iptables -A INPUT -p tcp --sport 1883 -j ACCEPT
5252
5353## Kerlink iBTS
5454
55- * [ Product detail page] ( https://www.kerlink.com/product/wirnet-ibts/ )
55+ * [ Product detail page: iBTS ] ( https://www.kerlink.com/product/wirnet-ibts/ )
5656
57- The following steps describe how to install the LoRa Gateway Bridge component
58- on the Kerlink iBTS gateway. These steps must be executed on the gateway.
57+ ### SSH into the gateway
5958
60- 1 . Create a path for the LoRa Gateway Bridge binary:
61- {{<highlight bash >}}
62- mkdir /user/lora-gateway-bridge
63- cd /user/lora-gateway-bridge
64- {{< /highlight >}}
59+ The first step is to login into the gateway using ssh:
6560
66- 2 . Download the latest LoRa Gateway Bridge ARMv5 binary from the
67- [ Downloads] ( https://www.loraserver.io/lora-gateway-bridge/overview/downloads/ )
68- page and extract it:
6961{{<highlight bash >}}
70- # replace VERSION with the version to download
71- wget https://artifacts.loraserver.io/downloads/lora-gateway-bridge/lora-gateway-bridge_VERSION_linux_armv5.tar.gz
72-
73- # extract the .tar.gz file
74- tar zxf lora-gateway-bridge_VERSION_linux_armv5.tar.gz
62+ sh root@GATEWAY-IP-ADDRESS
7563{{</highlight >}}
7664
77- 3 . Create the LoRa Gateway Bridge configuration file and modify it:
78- {{<highlight bash >}}
79- # create the lora-gateway-bridge.toml configuration file
80- ./lora-gateway-bridge configfile > lora-gateway-bridge.toml
65+ Please refer to the [ Kerlink iBTS wiki] ( http://wikikerlink.fr/wirnet-ibts/ )
66+ for login instructions.
8167
82- # modify it using vim
83- vim lora-gateway-bridge.toml
84- {{</highlight >}}
68+ ### Install IPK package
69+
70+ Find the latest package at https://artifacts.loraserver.io/vendor/kerlink/ibts/
71+ and copy the URL to your clipboard. Then on the gateway use ` wget ` to download
72+ the package into a folder named ` /user/.updates ` . Example for ` lora-gateway-bridge_2.7.0-r1_klk_lpbs.ipk ` :
8573
86- 4 . In the ` /user/lora-gateway-bridge ` directory create a file named
87- ` execute_lgb.sh ` file with the following content:
8874{{<highlight bash >}}
89- #!/bin/sh -e
90-
91- # Open firewall ports
92- iptables_accept() {
93- [ -n "${1}" ] || exit 1
94- local RULE="OUTPUT -t filter -p tcp --dport ${1} -j ACCEPT"
95- iptables -C ${RULE} 2> /dev/null || iptables -I ${RULE}
96- local RULE="INPUT -t filter -p tcp --sport ${1} -j ACCEPT"
97- iptables -C ${RULE} 2> /dev/null || iptables -I ${RULE}
98- }
99-
100- iptables_accept 1883
101- iptables_accept 8883
102-
103- (
104- # Lock on pid file
105- exec 8> /var/run/lora-gateway-bridge.pid
106- flock -n -x 8
107- trap "rm -f /var/run/lora-gateway-bridge.pid" EXIT
108-
109- # Start LoRa Gateway Bridge
110- /user/lora-gateway-bridge/lora-gateway-bridge -c /user/lora-gateway-bridge/lora-gateway-bridge.toml 2>&1 | logger -p local1.notice -t lora-gateway-bridge &
111- trap "killall -q lora-gateway-bridge" INT QUIT TERM
112-
113- # Update pid and wait for it
114- pidof lora-gateway-bridge >&8
115- wait
116- ) &
75+ mkdir -p /user/.updates
76+ cd /user/.updates
77+ wget https://artifacts.loraserver.io/vendor/kerlink/ibts/lora-gateway-bridge_2.7.0-r1_klk_lpbs.ipk
11778{{</highlight >}}
11879
119- 5 . Make sure this file is executable:
80+ To trigger the iBTS gateway to install / update the package, run the following commands:
81+
12082{{<highlight bash >}}
121- chmod +x execute_lgb.sh
83+ kerosd -u
84+ reboot
12285{{</highlight >}}
12386
124- 6 . Create the LoRa Gateway Bridge [ Monit] ( https://mmonit.com/monit/documentation/monit.html )
125- configuration named ` /etc/monit.d/lora-gateway-bridge ` :
126- {{<highlight text >}}
127- check process lora-gateway-bridge pidfile /var/run/lora-gateway-bridge.pid
128- start program = "/user/lora-gateway-bridge/execute_lgb.sh"
129- stop program = "/usr/bin/killall -q lora-gateway-bridge"
130- {{</highlight >}}
87+ Please refer to the [ Kerlink iBTS wiki] ( http://wikikerlink.fr/wirnet-ibts/ )
88+ for more information about installing and updating packages.
89+
90+ ### Edit the LoRa Gateway Bridge configuration
91+
92+ To connect the LoRa Gateway Bridge with your MQTT broker, you must update
93+ the LoRa Gateway Bridge configuration file, which is located at:
94+ ` /user/lora-gateway-bridge/lora-gateway-bridge.toml ` .
95+
96+ ### (Re)start and stop commands
97+
98+ Use the following commands to (re)start and stop the LoRa Gateway Bridge Service:
13199
132- 7 . Finally reload the Monit daemon and start the LoRa Gateway Bridge service:
133100{{<highlight bash >}}
134- monit reload
101+ # status
102+ monit status lora-gateway-bridge
103+
104+ # start
135105monit start lora-gateway-bridge
106+
107+ # stop
108+ monit stop lora-gateway-bridge
109+
110+ # restart
111+ monit restart lora-gateway-bridge
112+ {{</highlight >}}
113+
114+ ### Configure packet-forwarder
115+
116+ You must configure the packet-forwarder on the gateway to forward its data to
117+ ` 127.0.0.1 ` at port ` 1700 ` . The file ` /user/spf2/etc/config.json ` must contain the
118+ following lines:
119+
120+ {{<highlight text >}}
121+ "server_address": "127.0.0.1",
122+ "serv_port_up": 1700,
123+ "serv_port_down": 1700,
136124{{</highlight >}}
125+
126+ ## Kerlink iFemtoCell
127+
128+ * [ Product detail page] ( https://www.kerlink.com/product/wirnet-ifemtocell/ )
129+
130+ The installation steps to install the LoRa Gateway Bridge component are exactly
131+ the same as for the iBTS gateway. The only difference is that the packages
132+ are located at https://artifacts.loraserver.io/vendor/kerlink/ifemtocell/ .
133+
0 commit comments