Age | Commit message (Collapse) | Author |
|
Add access to the modem's CellBroadcast interface and to fetch
Cell Broadcast messages.
Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/253
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
The libmm-glib library is LGPLv2+, not GPLv2+.
|
|
|
|
In file included from /usr/include/glib-2.0/glib.h:50,
from ../libmm-glib/mm-common-helpers.h:18,
from ../libmm-glib/mm-manager.c:27:
/usr/include/glib-2.0/glib/ghash.h:68:61: note: expected ‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’
68 | gpointer key,
| ~~~~~~~~~~~~~~~~^~~
../libmm-glib/mm-manager.c:81:43: warning: passing argument 2 of ‘g_hash_table_insert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
81 | g_hash_table_insert (lookup_hash, "org.freedesktop.ModemManager1.Modem.Simple", GSIZE_TO_POINTER (MM_TYPE_MODEM_SIMPLE));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:50,
from ../libmm-glib/mm-common-helpers.h:18,
from ../libmm-glib/mm-manager.c:27:
|
|
|
|
This new interface allows modems to expose the list of available
connection profiles stored in the device and edit or delete them; as
long as the underlying device/protocol allows it.
|
|
|
|
We're running g_async_initable_new_async() ourselves in
mm_manager_new(), so our finish() method should call
g_async_initable_new_finish() explicitly.
There's no change in the logic here, as the generated
mm_gdbus_object_manager_client_new_finish() was already doing this
implicitly.
|
|
The G_OBJECT() casts accept NULL safely.
|
|
The MMManager object keeps an internal proxy object for the Manager
interface, and we must make sure we cleanup this object any time the MM
daemon is restarted. Otherwise, the MMManager may end up trying to use
a stale proxy associated to a previous run of the daemon, and e.g. not
showing properly the runtime version info.
E.g., in this sequence with the example python tester, the runtime
version of the daemon was valid only for the first time the daemon
runs, and if the daemon is restarted, mm_manager_get_version()
would keep returning NULL.
$ ./modem-watcher-python
[ModemWatcher] ModemManager service not available in bus
[ModemWatcher] ModemManager 1.9.990 service is available in bus
[ModemWatcher] Dell Inc. (DW5821e Snapdragon X20 LTE) modem managed by ModemManager [None]: /org/freedesktop/ModemManager1/Modem/0
[ModemWatcher] ModemManager service not available in bus
[ModemWatcher] ModemManager None service is available in bus
[ModemWatcher] Dell Inc. (DW5821e Snapdragon X20 LTE) modem managed by ModemManager [None]: /org/freedesktop/ModemManager1/Modem/0
[ModemWatcher] ModemManager service not available in bus
[ModemWatcher] ModemManager None service is available in bus
[ModemWatcher] Dell Inc. (DW5821e Snapdragon X20 LTE) modem managed by ModemManager [None]: /org/freedesktop/ModemManager1/Modem/0
|
|
This new method allows users of the ModemManager API to take full
control of a given device.
Unlike other operations in the API, the inhibition is maintained as
long as the caller exists in the bus, or until the same caller
uninhibits the device.
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/98
|
|
The reporting of the operation result was reversed in the async method.
|
|
The reporting of the operation result was reversed in the async method.
|
|
This string shows the runtime version of the ModemManager daemon.
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/94
|
|
We were re-using the GDBusObjectManagerClientFlags set in the
MMManager object as GDBusProxyFlags for the Manager1 interface proxy
object, and that was completely broken.
Instead of setting "DO_NOT_AUTO_START" in the proxy, we were actually
setting "DO_NOT_LOAD_PROPERTIES"...
|
|
|
|
|
|
|
|
This commit enables a new core ModemManager daemon option, so that automatic
detection of available modems is totally disabled: '--no-auto-scan'. Note that
this option also replaces the previously used '--test-no-auto-scan' option,
which was only used during tests.
Along with the new ModemManager option, a new ReportKernelEvent() method in
the API is defined, which allows notifying the daemon of which interfaces it
should be accessing, as well as the main details of each interface. The only
mandatory parameters in the new method are 'action' (add/remove), 'name' (the
name of the interface) and 'subsystem' (the subsystem of the interface).
The mmcli tool has support for using the new api method via several new options:
* The '--report-kernel-event' option allows specifying device ports one by
one, and is a direct mapping of the ReportKernelEvent() method:
$ sudo mmcli --report-kernel-event="action=add,name=wwan0,subsystem=net"
$ sudo mmcli --report-kernel-event="action=add,name=cdc-wdm0,subsystem=usbmisc"
* The '--report-kernel-event-auto-scan' option uses udev monitoring to notify
events automatically to the daemon. This allows to operate in a way
equivalent to the default daemon operation (with implicit auto-scan).
Worth noting that the ReportKernelEvent() method is only usable when
'--no-auto-scan' is explicitly used in the daemon. An error will be reported if
the method is tried while standard udev monitoring is enabled (implicit if
auto scan isn't explicitly disabled in the daemon).
If mmcli is going to be used only to report 'real time' events, an optional
'--initial-kernel-events=[PATH]' may be given in the ModemManager call to
automatically process a set of port kernel events one by one on boot. The file
may e.g. contain:
action=add,name=wwan0,subsystem=net
action=add,name=cdc-wdm0,subsystem=usbmisc
|
|
of parameters in mm-call-list class init
|
|
|
|
|
|
There is no implementation of the Contacts interface yet, just avoid exposing it
for now.
https://bugzilla.gnome.org/show_bug.cgi?id=701989
|
|
|
|
|
|
A 'GDBusObjectManagerClient' for a service for which there is no current
name-owner is a perfectly valid and useful object. For example, we could then
connect to the 'notify::name-owner' property to follow the life cycle of the
ModemManager process.
So, don't tie the successful creation of a 'MMManager' to the successful
creation of the internal GDBusProxy for the 'Manager1' interface. If there is
no current name owner, the GDBusProxy wouldn't be created, and instead we
would completely fail the 'MMManager' creation.
|
|
|
|
|
|
In order to have a proper conversion between DBus error names and GErrors for
our known domains, the associations need to be registered before any DBus
call attempt.
Given that the high-level API of libmm-glib has its entry point always in the
MMManager, just register them as soon as the first such object is created.
|
|
|
|
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.
We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:
* Don't include the libmm-glib high level API in the ModemManager daemon, as
the object names would clash with those in the core.
* Define some of the methods of helper objects to be included only if compiling
ModemManager daemon or the mmcli.
|
|
|
|
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModemTime'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModemSimple'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModemMessaging'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModemLocation'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModemCdma'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModem3gppUssd'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModem3gpp'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusModem'.
|
|
Not just a typedef of the gdbus-codegen generated `MmGdbusObject'.
|
|
|
|
|
|
peek() doesn't increase the reference count of the proxy object, while get()
does it.
|
|
This patch fixes mmcli to set the default timeout on the manager proxy
interface (MmGdbusOrgFreedesktopModemManager1) instead of MMManager
itself. The later is not a GDBusProxy object.
|
|
The library will contain a small layer of code on top of the proxies and object
manager client generated by gdbus-codegen. Therefore, the headers auto-generated
from the DBus introspection XMLs need to be distributed along with the
libmm-glib specific headers.
|