ModemManager and modems discovery in OpenWRt

Aleksander Morgado aleksander at aleksander.es
Mon Nov 18 11:25:39 UTC 2019


Hey!

> Aleksander and Bjørn, I am CC'ing you since this question came up reading your discussion about udev rules usage.
>
> So, modems discovery mechanism in ModemManager is implemented via --report-kernel-event.
> And we have --report-kernel-event-auto-scan as well.
>
> the current method of reporting even tough, is not as robust: and sometimes it may happen a modem is present but not detected.

That would be a bug to analyze. Do you have details on how that happened?

> With all the respect, while --report-kernel-event seems to be a very good decision / design choice, I don't like as much the current hotplug--based method / scripts we use to report for modem events.
> The cache, and all that, they seem too fragile to me. What's your opinion on that?

Well, as long as hotplug events happen when they should, the logic
should be consistent IMO. There's one thing I don't like, though, and
I may be wrong about how it works, but if for any reason there is
another hotplug script taking too much time to run, the reporting of
the events to MM may happen with a lot of time in between events, and
the port probing mechanism may get delayed too much. I have a MR
trying to mitigate that, please see:
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/207

> I would be set out to replace that, maybe implementing some code to listen to netlink events and directly "inject" events in MM, or something like that.
> I would like to have your opinion on that, and directions on the best way to proceed.
>

Not sure what to say :) IMO, if the hotplug scripts is the way openwrt
has to report device events to userspace, we should stick to that. If
that is not working well, we should fix it.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list