Lynx
February 26, 2024, 6:20pm
66
This looks very promising:
openwrt:master
← TDT-AG:pr/20240212-modemmanager-track-state
opened 03:09PM - 12 Feb 24 UTC
Maintainer: me / @
Compile tested: x86_64, APU3, latest OpenWrt master
Run tes… ted: x86_64, APU3, latest OpenWrt master
Description:
modemmanager: refactor bearermethod static:
To improve code readability, the required variables for a static IP configuration are now being extracted from the bearer status object within the method.
modemmanager: add netifd connection tracking
Similar to ppp, add an active process which tracks an established data connection. The process exits if the modem was removed or in case connection has been lost and can immediately be re-established. A [merge request](https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1131) is already pending in the ModemManager upstream repository for the source code changes.
modemmanager: integrate new conncection tracking into proto
The ModemManager currently doesn't reconnect in case the connection was lost and network access was regained at a later point. To solve this problem, the proto modemmanager tracks the connection state with the new 'mmcli' 'track-state' option, similar to how we do this for a ppp connections.
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.
Lynx
February 29, 2024, 10:30am
68
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.
Lynx
February 29, 2024, 10:34am
70
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
Lynx
March 7, 2024, 5:03pm
72
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:
openwrt:master
← TDT-AG:pr/20240305-modemmanager
opened 02:47PM - 05 Mar 24 UTC
Maintainer: me / @aleksander0m
Compile tested: not needed only script changes
…
Run tested: x86_64, APU3
Description:
There are situation for mobile routers, that the ModemManager can not stay connected to the mobile network in OpenWrt. There can have various reasons. In order for the system to reconnect automatically, the netifd must be informed that it must re-establish the connection.
The modem manager already does have a script callback handling which is already used by the modemmanager in openwrt. Currently the modem is marked as not unavailable when a disconnected event is detected.
The behavior was changed with this commit, so that a reconnect of the interface is now triggerd via the netifd if the modem disconnects.
Testcases:
* Start a connection via netifd modemmanager proto
* Execute the command `mmcli -m 0 --simple-disconnect`
* With this change the netifd should start a reconnection
* After the reconnection execute `ifdown wwan`
* The interface does not reconnect
Therefor, all use case should be covered.
A ModemManager disconnect starts a reconnection via netifd
A User disconnect does not start a reconnection.
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.
Lynx
April 2, 2024, 3:31pm
75
I can mark this feature request as solved as a variant of my script has recently just been merged into the OpenWrt 'master' branch:
openwrt:master
← TDT-AG:pr/20240305-modemmanager
There are situation for mobile routers, that the modemmanager can not
stay conne… cted to the mobile network. There can have various reasons.
In order for the system to reconnect automatically, the netifd must be
informed that it must re-establish the connection.
The modem manager already does have a script callback handling which is
already used by the modemmanager in openwrt. Currently the modem is marked
as not unavailable when a disconnected event is detected.
The behavior was changed with this commit, so that a reconnect of the
interface is now triggerd via the netifd if the modem disconnects.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
So automatic reconnection in ModemManager should be the norm now.
2 Likes
So how do we download this new 1.22 version of modemmanager?
system
Closed
April 19, 2024, 1:21am
77
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.