Automation Glossary • Set a cellular gateway keepalive and deadman

How to Set a Cellular Gateway Keepalive and Deadman

Merobix Engineering • • 5 min read

A keepalive holds a cellular link open so the carrier does not tear down an idle session, and a deadman timer decides how long a gateway can go silent before the server declares it dead. Set the keepalive too aggressive and you burn data holding a link nobody is using; set the deadman too tight and normal gaps raise false alarms. This procedure is for the engineer tuning both timers together so the link stays up, the data stays lean, and a truly dead site is caught quickly.

Back to Blog

Set a cellular gateway keepalive and deadman in one line: To set a cellular gateway keepalive and deadman, choose a keepalive interval short enough to stop the carrier or a firewall from dropping the idle session but long enough not to waste data, and set the server-side deadman timer to a small multiple of the expected check-in interval so one missed message is tolerated but a genuinely silent gateway is flagged fast.

Set the Keepalive to Hold the Link, Not Waste Data

A keepalive exists because carriers and firewalls tear down connections that sit idle, so a gateway that reports infrequently can find its session gone when it finally has something to send. The keepalive sends a tiny message often enough to keep the session alive through those idle timeouts. Set the interval shorter than the shortest idle timeout in the path - the carrier's, any NAT, any firewall - so the link never gets reaped, which relates to keeping a path open through carrier NAT described in the guide to NAT traversal for remote SCADA gateways.

But do not over-send. Every keepalive is data, and a keepalive far more frequent than the idle timeout requires just burns the plan holding a link that was in no danger of dropping, which matters on a metered site as covered in verifying data usage against polling math. The right interval is the longest one that still beats the idle timeout with margin: frequent enough to survive the shortest timeout in the path, no more. The keepalive itself is closely related to the regular check-in described in the guide to a heartbeat signal in SCADA.

Set the Deadman to Catch a Silent Gateway

The deadman is the server's judgment about when a quiet gateway has actually died. It watches for the gateway's regular messages and, if none arrive within the deadman window, declares the site offline and raises an alarm. Set it as a small multiple of the expected check-in interval so that a single lost message, which happens on any cellular link, does not trip it, but a gateway that has genuinely gone silent is flagged within a couple of missed intervals rather than hours later. The mechanism is the same as the one in the guide to a deadman timer for remote links.

Balance the two failure modes explicitly. A deadman too tight fires on every ordinary gap and trains operators to ignore it, which is worse than no alarm because a real outage then hides among the false ones. A deadman too loose leaves a dead site undetected long enough that an alarm condition at the field could go unseen. Set the window to tolerate the normal jitter of the link but no more, and tie it to the keepalive or heartbeat interval so the two timers are consistent rather than fighting each other.

Coordinate the Two and Verify

Keep the keepalive and deadman consistent, because they are two ends of the same conversation. The gateway sends on the keepalive or heartbeat interval; the server judges silence on the deadman window. If the deadman is shorter than the keepalive interval it will false-trip on every normal gap, and if it is far longer than needed it delays detection of a real death. Set the deadman as a small multiple of whatever cadence the gateway actually sends on, so they move together.

Verify both. Confirm the link survives a long idle stretch without the carrier reaping it, which proves the keepalive is frequent enough, and confirm the server raises an offline alarm shortly after you deliberately silence the gateway, which proves the deadman fires. A keepalive that lets the session drop and a deadman that never fires are both silent failures you only discover during a real outage if you skip this test.

Once live, a platform such as Merobix watches the gateway's check-ins and applies the deadman logic centrally, so a site that goes quiet is flagged on the missed check-ins rather than noticed hours later by an operator. Tuning the keepalive keeps the link healthy and the data lean; tuning the deadman is what turns silence into a timely alarm.

Frequently Asked Questions

How often should a cellular gateway send keepalives?

Just often enough to beat the shortest idle timeout in the path, whether that is the carrier's, a NAT, or a firewall, with a little margin. More frequent than that only wastes data holding a link that was not going to drop. The right interval is the longest one that still survives the shortest idle timeout the session must pass through.

What is the difference between a keepalive and a deadman timer?

A keepalive is sent by the gateway to hold the network session open through idle timeouts. A deadman is applied by the server to decide when a gateway that has stopped sending has actually died. One keeps the link alive; the other detects when the link, or the device, is gone. They should be tuned together and kept consistent.

Why does my offline alarm keep false-tripping?

The deadman window is too tight for the link's normal jitter, so an ordinary missed message trips it. Set the deadman as a small multiple of the gateway's actual check-in interval, so a single lost message is tolerated but a genuinely silent gateway is still caught within a couple of intervals. A deadman that fires on every gap trains operators to ignore the real one.

More in Industrial Networking & Communications
Set an MQTT Keepalive for a Cellular Link  •  Budget antenna cable loss for a cellular gateway  •  Commission a cellular SCADA gateway  •  Diagnose a cellular gateway that keeps dropping  •  Harden a cellular SCADA gateway configuration  •  All Industrial Networking & Communications →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →