Restart LoraWan Gateway remotely

Hi Guys,

Does anyone know how to restart a LoraWan GateWay remotely? E.g. via ssh perhaps.

Please let me know your thoughts. Thank you.

@brocaar could you please let me know if you have any knowledge regarding this topic. Thank you.

it depends from LoRaWAN gateway manufacturer and model.

Hi @eugenev thanks for the response. This is the type of gateway I am working with

and a raspberry pi 4 B is used

what prevents you from login to the raspberry via ssh and reboot the system?

Can I do that if I have used the GateWay OS base image to install my operating system?

sure, gateway os is linux based OS. maybe you read the docs before asking?

Hi @eugenev already done thank you. Is there any conceivable way to run a script where if the gateway deactivates it can be identified and the “sudo monit restart chirpstack-concentratord” command can be run?

Please let me know if this is possible. Thank you.

Please see the commands that can be configured in the ChirpStack Gateway Bridge configuration:

  # Commands to execute.
  # The value of the stdout will be used as the key value (string).
  # In case the command failed, it is ignored. In case the same key is defined
  # both as static and dynamic, the dynamic value has priority (as long as the)
  # command does not fail.
  # Example:
  # temperature="/opt/gateway-temperature/"

# Executable commands.
# The configured commands can be triggered by sending a message to the
# ChirpStack Gateway Bridge.
  # Example:
  # [commands.commands.reboot]
  # max_execution_duration="1s"
  # command="/usr/bin/reboot"

Hi @brocaar thank you, I will look into this. May I request if you can please see my response on the GateWay and device dectivation here: Deactivation of device - #27 by marcoaerlic the last three messages at the bottom are very important. Please let me know what you think.
Thank you once again.

@brocaar I was going to run a command such as this command=“sudo monit restart gateway-bridge”, every so often with the downlink. Also is the downlink just the same as this:

I assume it is not. If so, can you point me in the right directions to perform this:

. As I cannot see any command variable in the confirmdatadown packet. I assume I first have to enabl this Parameter? Please let me know (I have addressed alof of topics in this message so I apologise it may not see completely clear).

Yes, you must use the exec command request and the command must match the command setup in the chirpstack-gateway-bridge.toml config file.

1 Like

Hello Guys, I’m new user of Chirpstack, we migrated from TTN for our IoT-Platform
It’s not clear to me whether the command would be executed on the GW bridge or on the GW itself?
Please clarify this. If it’s on the GW itself, that would be a low key replacement for the CUPS protocol and a nice feature for us.

I’ve implemented this previously using the command exec functionality of the Gateway Bridge. It’s at the bottom of the sample configuration.

@bconway thanks but this does not quite answer my question. Were you able to restart the GW with that or the GW bridge?

Look at the docs, it includes a sample command. You can script as advanced functionality as you want.

I’ve added the below config on the toml file of the gateway bridge

which command should I run to trigger the gateway device to restart?
I did try a couple of commands like,

mosquitto_pub -t “gateway/647fdafffe007f74/command/reboot” -m “reboot”
mosquitto_pub -t “gateway/647fdafffe007f74/command” -m “reboot”

(fyi=logged in as root into the server where gateway bridge and chirpstack v4 are installed and using Kona Macro gateway)

Please see this example:

1 Like