[libmm-glib] MM API usage and GLib

Aleksander Morgado aleksander at aleksander.es
Fri Jul 27 07:05:28 UTC 2018


Hey,

On Thu, Jul 26, 2018 at 6:08 PM, Colin Helliwell
<colin.helliwell at ln-systems.com> wrote:
> Apologies for hijacking the thread, but I also have a need to write a C++ app to access certain MM 'status' info (IMIE, signal strength, etc).
> I can shell out to mmcli and awk/parse the response, but lib-based coding would probably be more 'correct'. I was struggling though to get to grips with how to use the MM/Glib APIs - are there any examples anywhere which will show me how to get started in connecting and then drilling down through the objects...?

Oh, please, don't do the mmcli path, that is extremely ugly and may
get broken at any time. The DBus API is stable, and so that is what
should be used; either via libmm-glib or with raw DBus operations.
The best example on how to use libmm-glib is mmcli itself; it provides
implementation of both async and sync operations, and it relies on
GLib's main loop logic.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list