Network Manager connectivity mechanism only calls dispatcher script on state change (i.e. LIMITED->FULL)
Summary
Set up the Network Manager configuration file to enable periodic connectivity checking which entails giving it an endpoint from which to do an HTTP GET on a file containing specific text and set the periodicity. From logs, it looks like an HTTP GET is directed out each interface and if none can reach the endpoint then the connection state is set to LIMITED...else it is set to FULL. Set up a dispatcher script to act on connectivity state like below if it is not "FULL". Set NetworkManager logging to TRACE and the periodic connectivity checking is occurring at the proper cadence. However, the dispatcher script only seems to get called on a connectivity change and not at the period of the connectivity check mechanism. Be nice if there was a connectivity check action which occurred at the period of the connectivity check mechanism so further efforts could be taken to recover a connection if it had not yet recovered since the last connectivity action returning with a connectivity state of LIMITED.
https://developer-old.gnome.org/NetworkManager/stable/NetworkManager.html
**#!/usr/bin/env bash
interface=$1 event=$2
if [[ $interface != "" ]] then echo "$interface received $event" | systemd-cat -p info -t modem-event-handler else echo "received $event, state $CONNECTIVITY_STATE" | systemd-cat -p info -t modem-event-handler fi
if [[ $interface == "" ]] && [[ $event == "connectivity-change" ]] && [[ $CONNECTIVITY_STATE != "FULL" ]] then echo "Restart modem connection" | systemd-cat -p info -t modem-event-handler mmcli -m any --command='AT+QPOWD=0' fi**
Version affected
imx8mq-pe100a:~$ nmcli --version nmcli tool, version 1.36.2 imx8mq-pe100a:~$
Steps to reproduce
Actual result
Expected result
Relevant logs
(Please see the DEBUGGING section of "man NetworkManager" and attach any relevant log)