Preferred way to get signal information

matthew stanger stangerm2 at gmail.com
Wed Oct 3 02:14:28 UTC 2018


Hi Nick,

If your using c/c++ consider looking into the library ModemManager
exposes, this is how mmcli works
(https://cgit.freedesktop.org/ModemManager/ModemManager/tree/libmm-glib).
It handles the dbus calls for you and just exposes some nice c code
wrappers. In your case you should look at how 'mm-modem-signal.c'
works and consider linking the library and including the libmm-glib.h
header.

If you're using another language you could also use dbus to access
information from ModemManager directly, you can read up more on dbus
here (https://www.freedesktop.org/wiki/Software/dbus/). For all the
API's exposed by ModemManager via dbus you can checkout the API doc
page (https://www.freedesktop.org/software/ModemManager/api/latest/).
Python has a very nice dbus support library and there are lot's of
examples online. Hope that helps.

Cheers



Cheers,
On Tue, Oct 2, 2018 at 5:49 PM Nick B <nickberry17 at icloud.com> wrote:
>
> Good day,
>
>
> Is there a preferred way to get the signal information from modem manager periodically for the purposes of illuminating some LED’s?  Currently I am running mmcli -m 0 and using grep to strip it down to just the number and taking action based on that value. (—signal-get is not producing any output for me, I’m afraid.) I am just wondering if there is a preferred solution out there already that I am missing.
>
> Also, I see that uqmi has some more signal values available, but I have witnessed that running uqmi while modem manager controls a modem could cause modem manager to lose access to the modem.  I vaguely recall a whisper that there may be a preferred way to run uqmi commands from within modem manager, is that correct?  Is there a way to get the full uqmi —get-signal-info information from mmcli directly?  I suppose I could always just run the AT commands to get the signal info via modem manager.
>
>
> Best,
>
> Nicholas
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


More information about the ModemManager-devel mailing list