Right now on an ISP-triggered 4G/5G disconnection, ModemManager will not automatically reconnect. It merely reports the disconnection to netifd and that's it. Work is needed to be done to the netifd protocol to tie things up to react to the reported disconnection and reconnect.
The way to solve this, after briefly talking with @jow- about this in IRC would be to have the netifd protocol handler launch a "watcher" process which brings up the connection, and is kept alive and running for as long as the network interface is assumed connected. If MM detects a network-initiated disconnection, the dispatcher script called by MM should kill that watcher process. At that point, netifd (if configured to autoconnect) will then kill the netdev, restart that process and await proto updates.
Anyone up to the task of writing this logic in the netfid modemmanager protocol handler?
Just edit /usr/lib/ModemManager/connection.d/10-report-down
Also, which OpenWrt version do you have? Frustratingly in 22.03.5 the ModemManager package isn't recent enough to support the dispatcher script.
You need ModemManager version 1.18.8 or later - see:
I have an .ipk for ModemManager 1.18.12 that works for the Zyxel in 22.03.5 if that'd be helpful. You could just upload that using the LuCi interface, but you'd need to trust me.
Probably doesn't work then. Is that after a reboot?
I have an .ipk you could use that I know works in 22.03.5. But you shouldn't trust me or anyone offering an .ipk for you to install willy-nilly. So I'm hoping someone can explain how to get historical builds that will work.
@frollic or anyone else, how can @balle15 obtain an .ipk for a later version of ModemManager than presently available in 22.03.5 that might work in 22.03.5? The 23.05 .ipk doesn't work. I managed to obtain an .ipk this way from a snapshot, and that just happened to work fine.
All of this pain is unfortunate; I hope more attention might be given to mobile broadband support in OpenWrt.
Is there a good way to obtain a later version of a packaged program for a given OpenWrt release or branch when that later version hasn't been pulled in yet? Whilst I am sure it is terrible practice, in the past I just downloaded an .ipk for ModemManager version 1.18.12 from a snapshot that just happened to work.