Hello,

On 5/07/2023 15:22, Florian Eckert wrote:
Hello,

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



Background:
I use an APU3 with an EC25, which supports one SIM slot.
However, the APU3 has two sim slots that are switched via a GPIO pin.
After switching, I have to restart the modem so that it recognizes the new SIM. Now it would be good if I could change the SIM credentials after the modemmanager
has been detected the rebooted modem and tell the netifd to reestablish
the connection with an 'ifup wwan'.

So far I only see the event in the syslog.

Wed Jul  5 15:06:41 2023 daemon.info [5863]: <info>  [device Modem1] creating modem with plugin 'quectel' and '6' ports Wed Jul  5 15:06:41 2023 daemon.info [5863]: <info> [base-manager] modem for device 'Modem1' successfully created


Kind regards,
Dylan Van Assche

Reply via email to