Kerlink IFemtoCell: Gateway Bridge


#1

I have set up a Loraserver, but can’t get my gateway to work with it. I get stuck at installing the LoRa Gateway Bridge on the kerlink gateway IFemtoCell. Every time I run this following line on the terminal: “mkdir -p /mnt/fsuser-1/lora-gateway-bridge/bin”, when having a SSH connection established to the gateway, I receive this fault in the terminal: “mkdir: can’t create directory ‘/mnt/’: Read-only file system”

Anyone who has the solution for this? I’ve set the gateway up on the App Server UI, and only need to figure this out to make it work (hopefully).


#2

To directly address your issue you would need to find a way to alter a filesystem on the gateway.

But an alternative is to run the lora-gateway-bridge on some other computer (such as the one hosting LoRaServer) and use a legacy protocol between the gateway and the bridge, meaning that the only thing you need to change on the gateway would hopefully be the address of the server it should interact with (you would put in the address and port of the lora-gateway-bridge instance)


#3

Have you seen: https://www.loraserver.io/lora-gateway-bridge/gateway/kerlink/#kerlink-ifemtocell?


#4

Hello. Main file system in IFemtoCell is read only.
Install all packages in /user directory.


#5

Yes, thanks. For some reason I had the link wrong, and therefore it didn’t work.

The gateway bridge is installed and now I have status: running.

I got stuck in this section though: “Edit the LoRa Gateway Bridge configuration”. The descriptions says you should connect the LoRa Gateway Bridge with your MQTT broker. I’m not completely sure where in the configuration file i should change. Is it at the MQTT server? Do i have to insert the ip-address of my server? Thanks for your time, and sorry if my question is stupid :-).


#7

Alright, thanks. For some reason the gateway wont connect on the web-interface.

On server I receive this message when running “sudo systemctl status lora-gateway-bridge”:

The server_address on the packet forwarder (gateway) is “127.0.0.1” while port_up and port_down is 1700. Status is Running, when using following command on the gateway: “monit status lora-gateway-bridge”.

Can’t figure out why it doesn’t work. When running: “journalctl -u lora-gateway-bridge -f -n 50” I receive this message: “You are currently not seeing messages from other users and the system.”


#8

Sorry, I mixed up in my mind what you were asking about when writing the previous reply. The server line in the .toml file needs to be the protocol, port, and address of your MQTT broker.

Since you are running the gateway bridge on the gateway, the MQTT broker is presumably running on a (cloud?) server somewhere, ie a different machine.

You need its routable IP address. If it’s not on an internal subnet it would be best to use MQTT-over-SSL rather than plain MQTT.


#9

Ahh, got a bit confused there (still is). Alright, so the gateway-bridge is on the gateway, while the MQTT broker is on our server (cloud). So the server line in the .toml file needs to be the ip-address of our server then, right? So as a precaution, if I access the web-interface by: “http:/xxx.com:8080/” , I shall change the line on .toml to : server=“tcp://xxx.com:8080”, or?


#10

Your MQTT broker won’t be running on the same port as your web server, port 1883 is traditional for unsecured and 8883 for MQTT-over-SSL. Likely you want either

server=“tcp://some.numeric.ip.address:1883”

for at most initial testing only, but for deployment really

server=“ssl://some.valid.host.name:8883”

And of course that host needs an SSL cert.


#11

That makes sense!

server=“tcp://some.numeric.ip.address:1883”

The numeric address is that the ip address of the server which the MQTT broker has been installed in?

Sorry, I’m asking all these (maybe obvious) questions, but I really want it to work!

Also the plan is to secure it, but first I want it to work


#12

Yes, that’s the ip of the server where the broker is running.


#13

Thanks, for the answer. Unfortunately, it still wont work. I’ve tried to troubleshoot the gateway connectivity, but the tcpdump command doesn’t work on the gateway. “tcpdump: command not found”.

I have a Kerlink IFemToCell gateway.

Is there any other way to troubleshoot the gateway to see if it sends data?


#14

You should allow the outgoing packets in the Kerlink firewall, by default if I remember it’s dropped. You could check iptables -L -n (output section)


#15

Just checked, but (u)fortunately it says ACCEPT, and not DROP


#16

Try disabling the firewall
/etc/init.d/firewall stop


#17

Please note that if you are using the LoRa Gateway Bridge iFemtoCell package (instructions: https://www.loraserver.io/lora-gateway-bridge/gateway/kerlink/#kerlink-ifemtocell), then this is automatically done for you:


#18

When updating the lora-gateway-bridge on our kerlink gateway from 2.7 to 3.1 we’re only receiving half of the toml file. We updated the gateway like this:

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

kerosd -u
reboot

The status of the update can bee seen by following command:

2019.06.06-11:57:26 -- Update Status : updated 1, failed 0 , partial 0 result : OK

But the toml file created stops in the middle and are obviously missing some text:

(#) By configuring one or multiple managed packet-forwarder sections, the
(#) LoRa Gateway Bridge updates the configuration when the backend receives
(#) a configuration change, after which it will restart the packet-forwarder.
(#)
(#) Example (this configuration can be repeated):
(#)
(#) [[backend.semtech_udp.configuration]]
(#) (#) Gateway ID.
(#) (#)
(#) (#) The LoRa Gateway Bridge will only apply the configuration updates for this
(#) (#) gateway ID.
(#) gateway_id=“0102030405060708”

(#) (#) Base configuration file.
(#) (#)
(#) (#) This file will be used as base-configuration and will not be overwritten on
(#) (#) a configuration update. This file needs to exist and contains the base
(#) (#) configuration and vendor specific
(#) base_file="/etc/lora-packet-forwarder/global_conf.json"

(#) (#) Output configuration file.
(#) (#)
(#) (#) This will be the final configuration for the packet-forwarder, containing
(#) (#) a merged version of the base configuration + the requested configuration
(#) (#) update.
(#) (#) Warning: this file will be overwritten on a configuration update!
(#) output_file="/etc/lora-packet-forwarder/local_conf.json"

(#) (#) Restart command.
(#) (#)
(#) (#) This command is issued by the LoRa Gateway Bridge on a configuration
(#) (#) change. Make sure the LoRa Gateway Bridge process has sufficient
(#) (#) permissions to execute this command.
(#) restart_command="/etc/init.d/lora-packet-forwarder restart"

(#) Integration configuration.
[integration]
(#) Payload marshaler.
(#)
(#) This defines how the MQTT payloads are encoded. Valid options are:
(#) * protobuf: Protobuf encoding (this will become the LoRa Gateway Bridge v3 default)
(#) * json: JSON encoding (easier for debugging, but less compact than ‘protobuf’)
marshaler=“protobuf”

(#) MQTT integration configuration.
[integration.mqtt]
(#) Event topic template.
event_topic_template=“gateway/{{ .GatewayID }}/event/{{ .EventType }}”

(#) Command topic template.
command_topic_template=“gateway/{{ .GatewayID }}/command/#”

(#) MQTT authentication.
[integration.mqtt.auth]
(#) Type defines the MQTT authentication type to use.
(#)
(#) Set this to the name of one of the sections below.
type=“generic”

(#) Generic MQTT authentication.
[integration.mqtt.auth.generic]
(#) MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://127.0.0.1:1883"

(#) Connect with the given username (optional)
username=""

(#) Connect with the given password (optional)
password=""

Where can we get the rest? Or maybe this is all there is? Is the lora-gateway-bridge.toml file the same as the one on the server? Then we can just copy the text into this toml file.


#19

I’m not sure if what you are seeing is an issue, see https://github.com/brocaar/lora-gateway-bridge/blob/master/packaging/vendor/kerlink/ifemtocell/files/lora-gateway-bridge.toml for the lora-gateway-bridge.toml file which is bundled with the iFemtoCell IPK package.

See the header of this file:

# This configuration provides a Semtech UDP packet-forwarder backend and
# integrates with a MQTT broker. Many options and defaults have been omitted
# for simplicity.
#
# See https://www.loraserver.io/lora-gateway-bridge/install/config/ for a full
# configuration example and documentation.

#21

Please keep the discussion ontopic, I don’t think your question relates to the iFemtoCell gateway.