Telemetry2U Technical Bulletin

How to Automatically Reboot a LoRaWAN Gateway When the Internet Drops

Install and configure Watchcat on a compatible Dragino gateway to monitor Internet connectivity and reboot the gateway after a sustained outage.

Gateway: Dragino OpenWrt Access method: SSH Watchdog utility: Watchcat

Restore Gateway Connectivity Without a Site Visit

A gateway can occasionally retain power and local network access while losing its route to the Internet. Watchcat periodically tests a known Internet host and reboots the gateway only when that connection remains unavailable for the configured period.

This procedure is intended for compatible Dragino LoRaWAN gateways using the legacy Watchcat implementation shown below. Schedule a maintenance window because the final step deliberately reboots the gateway and briefly interrupts LoRaWAN packet forwarding.

Compatible gateway firmware

The supplied example uses Dragino OpenWrt 18.06 with Watchcat 1-7.

Local network access

Connect through the gateway access point, LAN port or the same routed network.

SSH administrator access

Use the current root password. The published default applies only if it has not been changed.

Working package feed

The gateway needs Internet and DNS access while updating and installing the package.

Firmware compatibility: newer OpenWrt Watchcat releases use the separate /etc/config/watchcat configuration and commonly use the ping_reboot mode. Confirm the gateway firmware before applying the legacy system.@watchcat commands in this bulletin.

1. Connect to the Dragino Gateway Using SSH

Connect the computer and gateway to the same local network, then open an SSH client such as PuTTY. Use the gateway's current IP address and administrator credentials.

Typical Dragino SSH Details

  • Address: the gateway IP address; 10.130.1.1 is commonly used for a direct local connection.
  • Port: 22 through the gateway access point or local interface; many Dragino models use 2222 through the WAN interface.
  • Username: root
  • Password: dragino if the default password has not been changed.

Change the default password after confirming access. If neither SSH port responds, verify the gateway IP address, connection method and model-specific firmware documentation before continuing.

2. Update the Package List and Install Watchcat

Refresh the opkg package list first, then install Watchcat. Select a command below to copy it to the clipboard.

Update the Package List

Run this command and allow it to complete before installing the package.

Install Watchcat

Install the network watchdog package from the configured package feed.

Do not continue if opkg update reports that it cannot resolve or reach the package server. Correct the gateway's Internet, DNS or system-time problem first.

3. Configure the Internet Outage Timeout

The following legacy Dragino settings ping Google's public DNS address every two minutes. Watchcat reboots the gateway when no reply has been received for 30 minutes, then allows a 60-second delay before forcing the reboot.

Enter the Watchcat Commands

Run the commands in order. Each control copies one complete command.

Outage period: 30 minutes

The Internet must remain unreachable for this period before a reboot is initiated.

Ping interval: 2 minutes

Watchcat tests the configured host at this interval while monitoring connectivity.

Ping host: 8.8.8.8

The network must permit Internet Control Message Protocol echo requests and replies.

Force delay: 60 seconds

This delay is applied before Watchcat performs the forced reboot action.

Dragino OpenWrt 18.06 terminal showing Watchcat installation and 30-minute Internet outage reboot commands
The original example uses Dragino OpenWrt 18.06 and Watchcat 1-7.

Ensure the selected ping host is consistently reachable from the gateway. If Internet Control Message Protocol traffic is blocked, Watchcat may treat a working connection as failed and reboot unnecessarily.

4. Reboot the Gateway and Verify Watchcat

Reboot the gateway to apply the configuration. Wait for it to return online, reconnect through SSH and confirm that the Watchcat process is running.

Reboot the Gateway

Check the Watchcat Process

After reconnecting through SSH, run:

Expected Legacy Output

The process identifier and memory values can vary, but the timeout values should resemble:

1590 root 1200 S /bin/sh /usr/bin/watchcat.sh period 1800 60 8.8.8.8 120

  • 1800 is the 30-minute outage period in seconds.
  • 60 is the forced reboot delay in seconds.
  • 8.8.8.8 is the monitored Internet host.
  • 120 is the two-minute ping interval in seconds.

A process result confirms that Watchcat is running; it does not prove that the reboot condition works on the current network. Test the behaviour only during an approved maintenance window and ensure the gateway returns to the Telemetry2U network afterwards.