restart IOT to reconnect TTN

Hi,

I’ve set up a Mikrotik wAP LR8 kit to connect LoRaWAN to TTN. This is working great.

But every morning I find the status of my gateway “Disconnected” (according to TTN dashboard). On the router’s interface, there seems to be nothing wrong.

I think I found the reason for this: I’m using a dynamic IP, meaning that every morning my ISP assigns me a new IPv4. There is a reconnect, then the connection runs with the new IP. It is at this point where the Mikrotik seems to loose connection with TTN and doesn’t reestablish it. If I reset the router, the connection is reestablished perfectly.

Ideas to fix this:

  • power cycle the router: Possible, but there is a log entry “router was rebooted without proper shutdown”. This doesn’t feel right.
  • reboot the router per script: Better. My current choice.

But: Instead of rebooting the router, I would much prefer to just restart the IoT/Lora module or even just trigger a reconnect of the Lora module. Is there a way to do this? Is there maybe a command like “lora restart” or "lora connect server=“TTNserver” "?