Add script handling on modem detection

Florian Eckert fe at dev.tdt.de
Mon Jul 10 11:08:19 UTC 2023


Hello Aleksander,

On 2023-07-10 12:19, Aleksander Morgado wrote:
>> >> I am using the modemmanager on openwrt (master).
>> >> While playing around, I noticed that it might be useful to trigger
>> >> an event after the modemmanager has detected a modem.
>> >> We already use '/usr/lib/ModemManager/connection.d' one a successful
>> >> connection.
>> >
>> >
>> > There's already such interface, but it is not one provided by
>> > ModemManager, but ModemManager re-uses one from Freedesktop. You can
>> > watch for new modems by using the Freedesktop ObjectManager:
>> >
>> > https://www.freedesktop.org/software/ModemManager/api/latest/ref-dbus-standard-interfaces-objectmanager.html
>> >
>> 
>> 
>> Thanks for the hint. I'll have a look at it right away.
>> 
> 
> I believe Florian is asking for a "dispatcher script" to be called
> once we detect a new modem and before MM probes it, right? similar to
> e.g. the dispatcher scripts we run when a bearer gets connected. I may
> be mistaken though

If the modemmanager has found a new modem, I see the following log 
message:

Mon Jul 10 13:05:39 2023 daemon.info [14613]: <info>  [base-manager] 
modem for device 'Modem1' successfully created

Then, as you mentioned, Is there a possibility that the modemmanager can 
call a dispatcher script?



Best regards

Florian


More information about the ModemManager-devel mailing list