Connectivity watchdog

Astonishingly enough many embedded Linux systems that use mobile networks do not have a good watchdog functionality. However, it is quite frequent that connectivity is lost when a USB based cellular modem on embedded systems or Raspberry Pi is used. One example could be a reconfiguration of the sim card in the cellular modem. Many times the Linux network stack does not notice that connectivity is lost and the device goes offline. This can only be fixed through a reboot, which means physically power cycling the USB port. This can cause large costs when a service technician needs to go on-site to do this. The alternative to ask a customer to power cycle is not very attractive either.

That is why the platform provides users with a basic watchdog functionality. Just configure it in the configuration section under the "connectivity watchdog". Any time the qbee agent runs it checks if access to the system server exists. If it does all is OK. If not it counts one failed attempt. This failed attempts counter gets increased any time the server does not respond. If the defined threshold in the configuration is hit the device reboots. This will usually power cycle any devices connected to the USB port such as cellular modems

It is important to note that the base time span between agent runs is determined in settings. This can be anything from 5 minutes to much longer time periods.

How does the watchdog work?

The watchdog is based on agent scheduling interval (in minutes). Let's assume the interval is set to 5 minutes.
The watchdog then has a threshold number of attempts before triggering. Let's assume this is set to 3.
This means that after 3 x 5 minutes = 15 minutes of no connectivity the device is automatically rebooted.