Extending OpenWRt ModemManager protocol handler

Aleksander Morgado aleksander at aleksander.es
Tue Jan 11 09:00:19 UTC 2022


Hey Enrico,

>
> In other words, I think the current situation isn't going to change so soon.
> So I was wondering if we can provide a kind of short-cut, so the protocol handler examines all bearers it finds, skipping all the modem device management.
> This would allow the code to be re-usable.
>
> What do you think?
> Would this solution be acceptable to you?
>

I don't think the protocol handler should be implemented in a way that
touches all bearers it finds; the handler has very specific entry
points (setup, teardown) that receive as input argument the name of
the interface it applies to. Then, we match one by one that name of
the interface to one very specific modem based on the sysfs path
configured in the interface, and then we know which are the bearer
objects we need to look at (the ones in that specific modem). Another
limitation of the protocol handler is that it assumes there's only one
bearer connected, but that's a different story.

If the protocol handler were a process that is running forever, we
could attempt to do that monitoring in all bearers, but given that we
have the very explicit per interface setup/teardown entry points,
we're a bit limited. Ideally, MM and netifd would be in sync without
any other additional process. If we had a way to tell netifd the
underlying network device is really disconnected (is there any way to
do that?), then we could even setup some hotplug scripts in MM itself
or something like that.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list