aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
AgeCommit message (Collapse)Author
2025-05-16api,bearer: new 'DisconnectRequest' propertyDominique Martinet
To report that the bearer has been killed from the modem side and the connection should be terminated. Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
2025-04-25api,modem: new 'IgnoredPorts' propertyLukas Voegl
Expose a new list of 'IgnoredPorts' via D-Bus and therefore remove the use of `MM_MODEM_PORT_TYPE_IGNORED` Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2025-03-29libmm-glib,cell-broadcast: Add setters for channel listGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29libmm-glib,cell-broadcast: Support channels propertyGuido Günther
Support reading channels in the API too Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29libmm-glib,helpers: Add helpers to parse CB channels in and out of stringsGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29libmm-glib,test: Remove trailing whitespaceGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-28libmm-glib,helpers: Add helpers for CellBroadcast channel listsGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-11treewide: Fix typosGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-02-24cell-broadcast: Fix "Since" annotationsEvangelos Ribeiro Tzaras
2024-12-22libmm-glib,unlock-retries: remove invalid 'closure' annotationAleksander Morgado
../libmm-glib/mm-unlock-retries.c:135: Warning: ModemManager: invalid "closure" annotation: only valid on callback parameters
2024-12-01api: Add Cell Broadcast supportGuido Günther
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>
2024-12-01cbm: Add CellBroadcast interfaceGuido Günther
This adds support for the Cell Broadcast interface allowing to receive, list, read and delete Cell Broadcast messages via the org.freedesktop.ModemManager1.Modem.CellBroadcast and org.freedesktop.ModemManager1.Cbm interfaces. Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-10-07api,core,mmcli: Add new 'API' support to set-default-storage for SMSAkula Susmitha
API support has been added to set default storage for SMS. Changes were made to get, set the deafult storage value.
2024-06-12api: new NetworkRejection propertyUjjwal Pande
When a modem is not able to register to the network, MBIM and QMI indications related to registration reports network rejection cause codes if request is rejected by the network. This information is currently logged in the ModemManager but not exposed outside of ModemManager. These are the changes to define interface to expose network reject cause codes over d-bus to the above layers which could be used by above layers to present this information in a user friendly way.
2024-05-31libmm-glib/signal: fix a copy'n'paste errorLubomir Rintel
2024-02-01libmm-glib,3gpp-profile: fix loading roaming allowance in DBus dictionaryAleksander Morgado
2024-02-01libmm-glib,3gpp-profile: fix loading profile source in DBus dictionaryAleksander Morgado
2023-12-12mm-sms-properties: document mm_sms_properties_set_validity_relative ()Chris Talbot
2023-10-27api,errors: new MMCarrierLockError typeAleksander Morgado
This new error type will be used to report errors in the carrier lock operations performed through ModemManager. They have a one to one mapping to the MBIM status specific errors.
2023-10-11ModemManager: Add force option to set initial EPS bearer settingsUjjwal Pande
Adding a new force option to force send initial EPS bearer settings to modem even if they match the existing ones. Currently settings are not sent to the modem if they match old settings
2023-09-18api,modem: new 'Physdev' propertyLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-06-08api: new carrier lock supportUjjwal Pande
Adding support for carrier lock for MBIM modems using google simlock mechanism.
2023-05-09libmm-glib,location-3gpp: fix conversion to gulong in ↵Maxim Anisimov
mm_location_3gpp_new_from_string_variant Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2023-04-27libmm-glib: separate files for flags and enums typesAleksander Morgado
This allows us to skip needing to include the non-existent build_string_from_mask() or get_string() counterparts in the documentation index.
2023-04-27build-aux,mkenums: import custom mkenums tool from libqmi/libmbimAleksander Morgado
We're going to use certain new features included in the custom tool.
2023-02-17libmm-glib,common-helpers: Add multiple apn-type managementFrederic Martinsons
Fixes #676 Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
2023-02-17libmm-glib,tests: extend tests for common helpers (string conversion)Frederic Martinsons
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
2023-02-17modem-cellinfo: adding bandwidth and serving cell typesom
adding bandwidth information in mm-dbus interface for the serving cell. In serving cell, the details on whether the pcell/scell are from MCS or SCG is also updated. Co-author: Shilpa Shivakumar
2023-01-18libmm-glib,common-helpers: undeprecate g_date_time_format_iso8601()Lubomir Rintel
Avoid a deprecation warning with too new glib: ../libmm-glib/mm-common-helpers.c: In function ‘date_time_format_iso8601’: ../libmm-glib/mm-common-helpers.c:1729:5: warning: ‘g_date_time_format_iso8601’ is deprecated: Not available before 2.62 [-Wdeprecated-declarations] 1729 | return g_date_time_format_iso8601 (dt); | ^~~~~~ This call site is protected by version guards and provides an alternative implementation in date_time_format_iso8601().
2023-01-18libmm-glib,common-helpers: avoid using g_time_zone_new_offset()Lubomir Rintel
It requires newer glib than we do: ../libmm-glib/mm-common-helpers.c: In function ‘mm_new_iso8601_time’: ../libmm-glib/mm-common-helpers.c:1787:9: warning: ‘g_time_zone_new_offset’ is deprecated: Not available before 2.58 [-Wdeprecated-declarations] 1787 | tz = g_time_zone_new_offset (offset_minutes * 60); | ^~ In file included from /usr/include/glib-2.0/glib/gdatetime.h:33: /usr/include/glib-2.0/glib/gtimezone.h:67:25: note: declared here 67 | GTimeZone * g_time_zone_new_offset (gint32 seconds); | ^~~~~~~~~~~~~~~~~~~~~~ Let's not use the routine with older versions of glib.
2022-12-31meson: Un-hardcode building a shared libraryFabrice Fontaine
Use library() instead of shared_library() to allow specifying which kind of library to build with "meson setup --default-library ..." This will avoid the following static build failure: FAILED: src/ModemManager /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/bin/m68k-linux-gcc -o src/ModemManager src/ModemManager.p/meson-generated_.._mm-daemon-enums-types.c.o src/ModemManager.p/main.c.o src/ModemManager.p/mm-auth-provider.c.o src/ModemManager.p/mm-base-bearer.c.o src/ModemManager.p/mm-base-call.c.o src/ModemManager.p/mm-base-manager.c.o src/ModemManager.p/mm-base-modem-at.c.o src/ModemManager.p/mm-base-modem.c.o src/ModemManager.p/mm-base-sim.c.o src/ModemManager.p/mm-base-sms.c.o src/ModemManager.p/mm-bearer-list.c.o src/ModemManager.p/mm-broadband-bearer.c.o src/ModemManager.p/mm-broadband-modem.c.o src/ModemManager.p/mm-call-list.c.o src/ModemManager.p/mm-context.c.o src/ModemManager.p/mm-device.c.o src/ModemManager.p/mm-dispatcher.c.o src/ModemManager.p/mm-dispatcher-connection.c.o src/ModemManager.p/mm-dispatcher-fcc-unlock.c.o src/ModemManager.p/mm-filter.c.o src/ModemManager.p/mm-iface-modem-3gpp.c.o src/ModemManager.p/mm-iface-modem-3gpp-profile-manager.c.o src/ModemManager.p/mm-iface-modem-3gpp-ussd.c.o src/ModemManager.p/mm-iface-modem.c.o src/ModemManager.p/mm-iface-modem-cdma.c.o src/ModemManager.p/mm-iface-modem-firmware.c.o src/ModemManager.p/mm-iface-modem-location.c.o src/ModemManager.p/mm-iface-modem-messaging.c.o src/ModemManager.p/mm-iface-modem-oma.c.o src/ModemManager.p/mm-iface-modem-sar.c.o src/ModemManager.p/mm-iface-modem-signal.c.o src/ModemManager.p/mm-iface-modem-simple.c.o src/ModemManager.p/mm-iface-modem-time.c.o src/ModemManager.p/mm-iface-modem-voice.c.o src/ModemManager.p/mm-plugin.c.o src/ModemManager.p/mm-plugin-manager.c.o src/ModemManager.p/mm-port-probe.c.o src/ModemManager.p/mm-port-probe-at.c.o src/ModemManager.p/mm-private-boxed-types.c.o src/ModemManager.p/mm-sms-list.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static '-Wl,-rpath,$ORIGIN/../libmm-glib' -Wl,-rpath-link,/home/autobuild/autobuild/instance-11/output-1/build/modem-manager-1.20.2/build/libmm-glib -Wl,--start-group src/libport.a src/libkerneldevice.a src/libhelpers.a libmm-glib/libmm-glib.so.0.9.0 libqcdm/src/libqcdm.a libmm-glib/generated/tests/libmm-test-generated.a -Wl,--export-dynamic /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libgmodule-2.0.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libglib-2.0.a -pthread -lm /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libpcre.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libgio-2.0.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libgobject-2.0.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libffi.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libz.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libmount.a /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/m68k-buildroot-linux-uclibc/sysroot/usr/lib/libblkid.a -Wl,--end-group /home/autobuild/autobuild/instance-11/output-1/per-package/modem-manager/host/opt/ext-toolchain/bin/../lib/gcc/m68k-buildroot-linux-uclibc/11.2.0/../../../../m68k-buildroot-linux-uclibc/bin/ld: attempted static link of dynamic object `libmm-glib/libmm-glib.so.0.9.0' Fixes: - http://autobuild.buildroot.org/results/9803d593305df36c4a8d67aac2fb4c9a3120a072 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-11-07build: drop autotoolsAleksander Morgado
2022-11-07build: fix building without tests supportAleksander Morgado
2022-11-04iface-modem-signal: print signal quality under INFO verbosityPavan Holla
2022-11-04libmm-glib,simple-connect-properties: new print() methodAleksander Morgado
2022-11-04libmm-glib,bearer-properties: new print() methodAleksander Morgado
2022-11-04libmm-glib,3gpp-profile: new print() methodAleksander Morgado
Can be used right away in the mmcli output generation logic.
2022-11-04libmm-glib,common: add helpers to build printable stringsAleksander Morgado
2022-10-05libmm-glib,common-helpers: minor coding style fix in mm_new_iso8601_time()Aleksander Morgado
2022-10-05libmm-glib,common-helpers: don't assume new_from_unix_utc() always succeedsAleksander Morgado
The g_date_time_new_from_unix_utc() method in glib2 may fail if the given timestamp is too far into the future. The value is supposed to be seconds since unix time origin, but internally it will be converted into usecs, so any value longer than G_MAXINT64 / USEC_PER_SECOND isn't allowed. This is currently used in the CLI, and we're anyway ignoring the error returned in that case, but at least it won't crash if it ever happens.
2022-09-05core: port GRegex/GMatchInfo to use autoptr()Aleksander Morgado
The behavior of GRegex changed in 2.73.2 once it was ported from pcre1 to pcre2. In some cases it was made more strict, which is fine, in other cases it exposed some change in how it behaves on certain matches that is not extremely clear whether it's ok or not. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621 Either way, one thing that was assumed was that initializing all GRegex/GMatchInfo variables to NULL and making sure they're NULL before they're initialized by glib (especially the GMatchInfo) was a good and safer approach. So, whenever possible, g_autoptr() is used to cleanup the allocated GMatchInfo/GRegex variables, and otherwise, g_clear_pointer() is used to ensure that no free/unref is attempted unless the given variable is not NULL, and also so that the variable is reseted to NULL after being disposed.
2022-08-19libmm-glib,sms: simplify 'data' property retrieval logicAleksander Morgado
2022-08-19libmm-glib,sim: add support to get GID1 and GID2 fieldsAleksander Morgado
2022-08-19libmm-glib,sim: add missing separators in source codeAleksander Morgado
2022-08-09libmm-glib,profile-manager: fix memory leaks when listing connection profilesLouis-Alexis Eyraud
This commit fixes memory leaks that occur when invoking mm_modem_3gpp_profile_manager_list function. When processing the connection profile data retrieved from dbus in build_list_results function, the iterator data (of GVariant type) were not properly freed after use in the while loop. ==7903== 2,697 (144 direct, 2,553 indirect) bytes in 3 blocks are definitely lost in loss record 2,525 of 2,538 ==7903== at 0x484086F: malloc (vg_replace_malloc.c:381) ==7903== by 0x4A13938: g_malloc (gmem.c:106) ==7903== by 0x4A2B1F4: g_slice_alloc (gslice.c:1069) ==7903== by 0x4A51322: UnknownInlinedFun (gvariant-core.c:486) ==7903== by 0x4A51322: UnknownInlinedFun (gvariant-core.c:624) ==7903== by 0x4A51322: g_variant_builder_end (gvariant.c:3718) ==7903== by 0x4C2FEC1: parse_value_from_blob.isra.0 (gdbusmessage.c:1866) ==7903== by 0x4C2FE8F: parse_value_from_blob.isra.0 (gdbusmessage.c:1766) ==7903== by 0x4C2FF37: parse_value_from_blob.isra.0 (gdbusmessage.c:1850) ==7903== by 0x4BF93A7: g_dbus_message_new_from_blob (gdbusmessage.c:2226) ==7903== by 0x4C09334: _g_dbus_worker_do_read_cb (gdbusprivate.c:750) ==7903== by 0x4B9EA79: g_task_return_now (gtask.c:1219) ==7903== by 0x4B9EABC: complete_in_idle_cb (gtask.c:1233) ==7903== by 0x4A0774A: g_idle_dispatch (gmain.c:5848) Signed-off-by: Louis-Alexis Eyraud <louis-alexis.eyraud@unabiz.com>
2022-07-25build: make tests optionalDylan Van Assche
Add a meson option -Dtests and --without-tests automake option to disable the compilation of all available testcases. This is useful for compiling projects with Flatpak such as GNOME Control Center which disables all possible integrations since they only need the DBus part of ModemManager. Contributes to https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1392
2022-04-08sms: prevent crash if date is out of rangeCarlo Lobrano
g_date_time_new, and g_date_time_new_utc return NULL if inputs are out of range, and currently mm_new_iso8601_time passes the GDateTime created by those two functions to date_time_format_iso8601 without checking for NULL values, causing a g_date_time_format_iso8601 crash if PDU data is corrupted with wrong date. To prevent this, mm_new_iso8601_time now can return NULL and set a new GError if GDateTime created by g_date_time_new is NULL. Fixes #546
2022-03-29bearer-properties: Match UNKNOWN auth to CHAP for loose comparisonAndrew Lassalle
MBIM and QMI fallback to CHAP when a username or password is present but no authentication type was provided. Consider CHAP==UNKNOWN when using loose comparison.
2022-02-14build,meson: fix 'export_packages' in GIR setupAleksander Morgado
The 'export_packages' field in the generate_gir() command should include the name of the pkg-config package being exported, not the name of the library file. Without this change, building GIR files depending on the one we provide here would fail as the corresponding .pc file isn't found.
2022-02-14mm-call-audio-format: avoid redundant conditionPablo Barciela