QMI autoconnect behaviour

Hi,

I've tried searching numerous places but can't seem to find the answer to this. I am wondering what the current behaviour is for QMI modems with respect to reconnecting in weak signal environments. Since we are using OpenWRT in places where communications can be very poor, robustness in reconnecting when signal comes and goes is essential.

So far I have done the following in our custom firmware:
UCI configuration sets the modem interface to autoconnect=1:

network.modem=interface
network.modem.proto='qmi'
network.modem.device='/dev/cdc-wdm0'
network.modem.auth='pap'
network.modem.pdptype='ipv4'
network.modem.force_link='1'
network.modem.delay='30'
network.modem.autoconnect='1'

We also patched package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh to remove the proto_block_restart, since we want to keep trying to reconnect if the registration failed:

--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -237,7 +237,9 @@ proto_qmi_setup() {
 		fi
 
 		proto_notify_error "$interface" NETWORK_REGISTRATION_FAILED
-		proto_block_restart "$interface"
+
+		# Josh: disabling this since in the field we want to keep retrying, e.g. if signal is poor
+		#proto_block_restart "$interface"
 		return 1
 	done

This seems to cover most cases but I think some devices in the field are failing to reconnect if they had a successful initial connection - i.e. qmi thinks that they are connected when they are not, if the connection drops out after a connection has been successfully established.

How do uqmi and netifd currently deal with connection dropouts? Is there much in the way of reconnection checking here? Or would I have to write some kind of network watchdog as part of our custom firmware? The modem we are using is a Quectel EC-25.

Josh