Gateway remote management feature


#1

Hello @brocaar ,
I’m using your great project to deploy a private lorawan infracstucture.

During my job soon happen the need to be able to control gateway status remotely so I started to apply some customization to lora-gateway-bridge, lorasserver and lora-app-server to be able to present some gateway informations to the web gui.

Thinking to a production pahse where where gateways are installed remotely, the user should be able to access to them and know if the connection to the network server is up and running.

At the moment I’m able to display such additional information in the gateway details page:

  • public_ip
  • gateway packet forwarder version running on the gateway

The lora-gateway-bridge modifications are done assuming the application is running locally on the gateway .

I’m wonder if this job can be intersting for other people: I’m willing to publish such modifications in your repository on github.

I’ll be waiting for your comments!


#2

Continuing on your input: I’m thinking of combining the LoRa Gateway Bridge with the LoRa Channel Manager in order to make it possible to push channel-configuration over MQTT instead of doing this through a separate component.

In this case you would configure the LoRa Gateway Bridge as a kind of packet-forwarder agent (and when this configuration option is enabled, it would turn into a 1-to-1 relation with the packet-forwarder). This potentially would also allow extra functionality e.g. what you describe :slight_smile:


#3

Thank you for the replly… in the meantime let me know If you want to integrate these modifications to the gateway bridge component.


#4

I think until the “agent” mode isn’t in place, this will be tricky as it is unknown where the LoRa Gateway Bridge is located (e.g. on the gateway or somewhere in the cloud). But this quite high on my todo list to investigate this further :slight_smile:


#5

Hello @lorenzo75
In this post, you said that will publish such modification in github. could you please share its link.


#6

Please see the LoRa Gateway Bridge configuration documentation, this is already possible :slight_smile:


#7

Dear Brocaar

I install LoRa Gateway Bridge in lora server side, now I want to control some configuration of gateway in web server of lora, I could not understand what things must be consider on configuration of LoRa Gateway Bridge.
One of important things for me, is remote control of tx power.


#8

Please see the gateway re-configuration section: https://www.loraserver.io/loraserver/features/gateway-management/. In the lora-gateway-bridge.toml configuration this is the section that must be configured:


  # # Managed packet-forwarder configuration.
  # #
  # # 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.
  # [[packet_forwarder.configuration]]
  # # Gateway MAC.
  # #
  # # The LoRa Gateway Bridge will only apply the configuration updates for this
  # # gateway MAC.
  # mac="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"

One of important things for me, is remote control of tx power.

This is not configured on the gateway but requested by the network-server. Please see the following section in loraserver.toml:

  # Downlink TX Power (dBm)
  #
  # When set to -1, the downlink TX Power from the configured band will
  # be used.
  #
  # Please consult the LoRaWAN Regional Parameters and local regulations
  # for valid and legal options. Note that the configured TX Power must be
  # supported by your gateway(s).
  downlink_tx_power=-1

The defaults are defined here: https://github.com/brocaar/lorawan/tree/master/band.