Extending OpenWRt ModemManager protocol handler

Aleksander Morgado aleksander at aleksander.es
Mon Jan 10 10:53:54 UTC 2022


Hey Enrico,

>
> So here I am at my second attempt to build a solution to enable multi-modems and multi-bearers usage in OpenWRt, with re-connection handling for persistent connectivity.
>
> This time I wrote a simpler application which only monitors existing bearers, and tries to keep them connected.
> An helper script is invoked whenever a bearer is added, connected, disconnected or removed.
> Was wondering for what could be the best path forward for reusing existing modemmanager protocol handler in this scenario.
> I plan to post the app to some git hosting site once it's in a more mature form.

The problem with the protocol handler is that it's highly tied to
netifd, and as far as I know, there is no support in netifd to monitor
the status of the interfaces or even to somehow report the real status
of the interface to netifd. I think that is the main thing to solve
right now: https://bugs.openwrt.org/index.php?do=details&task_id=3499

What your application is doing is something that netifd should be
really doing. Not saying your app is wrong, just that a very generic
reconnection logic like yours probably fits better as a netifd fix
instead, not as a third-party workaround.

I've written similar applications like the one you wrote for multiple
different setups, usually with additional things like device recovery
toggling power via gpio and such, but never got around to publish them
anywhere because a) they may have been too specific to a given setup
and b) I still think the netifd fix should be done first.

If you're interested in solving this, I highly encourage you or anyone
else to try to solve the netifd issue first, as that would give us all
we need in terms of reconnections and sync between the netifd iface
state and the real modem state.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list