Support 4G/5G automatic reconnection using ModemManager

This looks very promising:

2 Likes

hi sir, thanks for the script, but after applying it I have the same problem as @balle15 above where the modem status is stuck at
Error: Modem bearer teardown in progress.
and does not reconnect as it should, do you know why ,? is there a possible solution?
I am using Openwrt 23.05 latest version modem manager and Fibocom L850-GL Modem.
Thanks for your kind.
modem

Do you see any helpful information in logread? Maybe the modem needs to be reset. This stuff is controlled by netifd ModemManager proto.

Forgive my ignorance, but I don't know where to check the logs, I searched before asking this but couldn't find it.

From an SSH session, type: logread, and then hit return.

To open an SSH session, if using windows, open PowerShell, then enter 'ssh root@router_ip_address' and then type the router password when prompted.

download this package, reconnection is automatic

Well OK, but this is just pinging and polling:

ModemManager already facilitates intercepting and reporting of disconnection events from the modem.


This pull request seems worth considering and critiquing:

When im using ecm, modemmanager runs module in ppp giving low download speeds. That's y i don't use it anymore. Cdc Ecm mode is the most stable I've tried so far since module is up to itself.

Watchdog app is great so far. Just set parameters correctly.

This approach makes much more sense for me, compared to Modemmanager. Because it will also detect other types of connection issues, i.e. "hanging" modem. Which I observed in real world installs from time to time.
However, looking at the code of Watchdog script, I suspect, that the recovery by means of AT+CFUN=1,1 without checking for successful completion (which might take a couple of seconds, dependent upon modem type) is a bit too simple. Note, that I wrote suspect, because I have a similar, but slightly different solution in combo with MWAN3, which waits for modems feedback, before proceding. And this is used in large fleet of devices, running a customized commercial openwrt solution.

I can mark this feature request as solved as a variant of my script has recently just been merged into the OpenWrt 'master' branch:

So automatic reconnection in ModemManager should be the norm now.

2 Likes

So how do we download this new 1.22 version of modemmanager?