Receive text messages without polling?

Aleksander Morgado aleksander at aleksander.es
Mon Apr 15 08:30:58 UTC 2019


Hey!

> since long I use a simple Python script that fetches text
> messages via org.freedesktop.ModemManager.Modem.Gsm.SMS.List().
> However, polling is boring. Is there a way to get SMS
> asynchronously, e.g. by D-Bus callback?
>

In the new MM1 .0 DBus API you have the Modem.Messaging interface that
reports messages Added() or Removed() in real time via signals:
https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.Messaging.html

> Btw. I also wonder wether there is a way to make 120 % sure,
> that my modem is *not* used for mobile data? I want text message
> mode only, because any MB of data is charged with one pound of
> my flesh. I just not configure mobile in NM, right?
>

Yes, as long as you don't have any connection setup in NM, MM will not
do anything.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list