aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-24base-manager: remove shadowing variableAleksander Morgado
[1/2] Compiling C object src/ModemManager.p/mm-base-manager.c.o ../src/mm-base-manager.c: In function ‘remove_device_inhibition’: ../src/mm-base-manager.c:1127:20: warning: declaration of ‘l’ shadows a previous local [-Wshadow] 1127 | GList *l; | ^ ../src/mm-base-manager.c:1116:16: note: shadowed declaration is here 1116 | GList *l; | ^
2023-02-23build: unstable release version bump to 1.21.4Aleksander Morgado
2023-02-23quectel: add support for EC21-EUX usb modulesQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-02-21xmm: fix crash parsing XACT? responseAleksander Morgado
Ensure we don't assert when processing an unexpected response. We were not correctly handling the case where g_match_info_matches() was not succeeding. 0x00007d8be96cc462 (libc.so.6 + 0x00028462) abort 0x00007d8be995ff01 (libglib-2.0.so.0 - gtestutils.c: 3253) g_assertion_message 0x00007d8be995ff64 (libglib-2.0.so.0 - gtestutils.c: 3279) g_assertion_message_expr 0x00007d8be858086a (libmm-shared-xmm.so - mm-modem-helpers-xmm.c: 467) mm_xmm_parse_xact_query_response 0x00007d8be857d4e0 (libmm-shared-xmm.so - mm-shared-xmm.c: 310) xact_query_bands_ready 0x00007d8be9a79463 (libgio-2.0.so.0 - gsimpleasyncresult.c: 802) g_simple_async_result_complete 0x00005c8d2a11e9b9 (ModemManager - mm-base-modem-at.c: 538) at_command_ready 0x00007d8be9a79463 (libgio-2.0.so.0 - gsimpleasyncresult.c: 802) g_simple_async_result_complete 0x00005c8d2a19376b (ModemManager - mm-port-serial-at.c) serial_command_ready 0x00007d8be9a79463 (libgio-2.0.so.0 - gsimpleasyncresult.c: 802) g_simple_async_result_complete 0x00005c8d2a18f93f (ModemManager - mm-port-serial.c: 139) command_context_complete_and_free 0x00005c8d2a192985 (ModemManager - mm-port-serial.c: 753) port_serial_got_response 0x00005c8d2a192dff (ModemManager - mm-port-serial.c: 924) common_input_available 0x00007d8be993e3fc (libglib-2.0.so.0 - gmain.c: 3417) g_main_context_dispatch 0x00007d8be993e704 (libglib-2.0.so.0 - gmain.c: 4211) g_main_context_iterate 0x00007d8be993e978 (libglib-2.0.so.0 - gmain.c: 4411) g_main_loop_run 0x00005c8d2a105e66 (ModemManager - main.c: 217) main 0x00007d8be96cc6c5 (libc.so.6 + 0x000286c5) __libc_init_first 0x00007d8be96cc781 (libc.so.6 + 0x00028781) __libc_start_main 0x00005c8d2a105b80 (ModemManager + 0x00061b80) _start
2023-02-21base-manager: fix crash when uninhibiting partially removed deviceAleksander Morgado
If the device is not fully removed from the system during inhibition and port additions happen, we reach a state where the MMDevice object is still tracked by ModemManager and we also have new port additions tracked that will require explicit port probings before a new modem object can be created. Solve this mixup by faking the removal of all existing device ports, which will end up completely removing hte MMDevice, so that new port additions reported afterwards also involve the full device probing process triggered by the plugin manager. The issue could be reproduced easily on a MBIM device that also exposed TTYs, as follows: * mmcli -m a --inhibit, leave it running * rmmod cdc_mbim && sleep 5 && modprobe cdc_mbim (so that the cdc-wdm and net ports go away from the system but NOT the TTYs.) * Cltr+C to stop the inhibit in the mmcli call. ModemManager would assert as follows: 0x000079918bcf2a3f (libc.so.6 + 0x00087a3f) pthread_key_delete 0x000079918bca7c6c (libc.so.6 + 0x0003cc6c) gsignal 0x000079918bc93462 (libc.so.6 + 0x00028462) abort 0x000079918bf26f03 (libglib-2.0.so.0 - gtestutils.c: 3253) g_assertion_message 0x000079918bf26f66 (libglib-2.0.so.0 - gtestutils.c: 3279) g_assertion_message_expr 0x0000594ff1093d0c (ModemManager - mm-base-manager.c: 1110) remove_device_inhibition 0x0000594ff1093968 (ModemManager - mm-base-manager.c: 1247) inhibit_device_auth_ready 0x000079918c0536a8 (libgio-2.0.so.0 - gtask.c: 1230) g_task_return_now 0x000079918c0536db (libgio-2.0.so.0 - gtask.c: 1244) complete_in_idle_cb 0x000079918bf053fc (libglib-2.0.so.0 - gmain.c: 3417) g_main_context_dispatch 0x000079918bf05704 (libglib-2.0.so.0 - gmain.c: 4211) g_main_context_iterate 0x000079918bf05978 (libglib-2.0.so.0 - gmain.c: 4411) g_main_loop_run 0x0000594ff108de66 (ModemManager - main.c: 217) main 0x000079918bc936c5 (libc.so.6 + 0x000286c5) __libc_init_first 0x000079918bc93781 (libc.so.6 + 0x00028781) __libc_start_main 0x0000594ff108db80 (ModemManager + 0x00061b80) _start
2023-02-20broadband-modem-mbim: limit the use of context types defined in MBIMExAleksander Morgado
The Tethering context type UUID was defined by Microsoft in its extensions as `5e4e0601-48dc-4e2b-acb8-08b4016bbaac` (along with others like Admin, Xcap, App and EmergencyCalling), see https://learn.microsoft.com/en-us/windows-hardware/drivers/network/mb-provisioned-context-operations. These UUIDs are expected to be usable only if the modem supports `MBIM_CID_MS_PROVISIONED_CONTEXT_V2` (CID=1) in the Basic Connect Extensions service (3d01dcc5-fef5-4d05-0d3abef7058e9aaf). If the modem doesn't support these, we should try to fallback to a more generic APN type automatically, e.g. "Internet", which was defined in MBIM 1.0 and should always be supported. There should be no problem in a modem to have 2 separate PDN connections with the same context type.
2023-02-17modem-helpers-mbim: add missing support for 'emergency' APN typeAleksander Morgado
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-helpers-mbim: small refactor in the EARFCN/NRARFCN to frequency convertersAleksander Morgado
2023-02-17broadband-modem-mbim: avoid using already freed element during iterationAleksander Morgado
If we remove the current element being iterated in the GList, we can no longer call g_list_next() on it. Ensure we keep a valid pointer to the next element in the list before removing the current one.
2023-02-17broadband-modem-mbim: cell-info core logic implementationsom
Handling of gdbus interface changes for additional properties(service cell type and bandwidth) in broadband modem mbim. Co-author: Shilpa Shivakumar
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-02-17cli,output: coding style fixesAleksander Morgado
2023-02-17cli,output: print valid json for network scan resultFlorian Eckert
A network scan with json output currently returns the following: root@G3-10940 ~ # mmcli -m 0 -J --3gpp-scan --timeout=300 | jq { "modem": { "3gpp": { "scan-networks": [ "operator-code: 26201, operator-name: TDG, access-technologies: lte, availability: forbidden", "operator-code: 26203, operator-name: o2 - de, access-technologies: lte, availability: forbidden", "operator-code: 26202, operator-name: vodafone.de, access-technologies: lte, availability: current" ] } } } This is a valid JSON, but in order to be able to access the individual data elements more easily, the line can also be dumped as a json object. The following commit converts the lines into a JSON obejct, so that it looks like this: root@G3-10940 ~ # mmcli -m 0 -J --3gpp-scan --timeout=300 | jq { "modem": { "3gpp": { "scan-networks": [ { "operator-code": "26201", "operator-name": "TDG", "access-technologies": "lte", "availability": "forbidden" }, { "operator-code": "26203", "operator-name": "o2 - de", "access-technologies": "lte", "availability": "forbidden" }, { "operator-code": "26202", "operator-name": "vodafone.de", "access-technologies": "lte", "availability": "current" } ] } } } Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-02-15iface-modem-3gpp: enable reading of IMEI in FAILED stateMichal Mazur
It was not possible to read IMEI of modem when SIM was not inserted or initialization failed due to modem facility locks. To load IMEI, the 3gpp interface need to be initialized before going to FALLBACK_LIMITED.
2023-02-12build: allow installing examples to be disabledAlyssa Ross
In Nixpkgs, sysconfdir is not writeable in the sandbox in which packages are built, so it's important for us to be able to disable installing example files. (We create configuration files and install them into /etc separately through our "module system".) Signed-off-by: Alyssa Ross <hi@alyssa.is>
2023-02-06mm-broadband-modem-qmi: update signal values while processing NAS signal ↵Akash Aggarwal
info indication
2023-02-03mm-iface-modem-3gpp: reject unspecified values for 5G reg settingsEric Caruso
It seems like users can put the "unsupported" value for both DRX cycle and MICO mode, so we should reject that.
2023-02-03qmi: implement GetCellInfo for LTE, NROliver Kästner
2023-01-30telit: fallback to AT commands in case of MBIM loading revision failureDaniele Palmas
Some firmware versions return an empty string for the revision when using the device caps MBIM request, so use AT commands as a fallback in case this happens.
2023-01-30telit: increase initial delay for AT portsDaniele Palmas
FN990 requires more time for the AT ports to become responsive, so increase the initial delay up to 40 seconds.
2023-01-30telit: add port type hints for FN990 0x1070, 0x1071 compositionsDaniele Palmas
2023-01-30telit: add shared support for 5G modesDaniele Palmas
2023-01-27build: unstable release version bump to 1.21.3Aleksander Morgado
2023-01-23broadband-modem-qmi: don't fail on power indication registration errorLouis-Alexis Eyraud
This commit modifies the QMI DMS Operating Mode indication registration logic. During the power sequence chance, if a QMI_PROTOCOL_ERROR_MISSING_ARGUMENT error was returned in "DMS Set Event Report" operation for Operating Mode Reporting failed, the whole sequence was aborted, leading the modem to be disabled. <debug> [modem0] Power indication registration request is sent ... <debug> [modem0] couldn't update power state: Couldn't register for power indications: QMI protocol error (17): 'MissingArgument' <warn> [modem0] couldn't enable interface: 'Couldn't register for power indications: QMI protocol error (17): 'MissingArgument'' <debug> [modem0] running implicit disable after failed enable... This commit modifies the logic to properly detect the failure and continue the sequence without the indications. Fixes #683 Signed-off-by: Louis-Alexis Eyraud <louis-alexis.eyraud@unabiz.com>
2023-01-22build: fix a typo in meson_options doc stringLubomir Rintel
Now it's perfect!
2023-01-20bearer-qmi: fix a mnc/mcc typoLubomir Rintel
Makes my compiler unhappy: [471/539] Compiling C object src/ModemManager.p/mm-bearer-qmi.c.o ../src/mm-bearer-qmi.c: In function ‘process_operator_reserved_pco’: ../src/mm-bearer-qmi.c:580:18: warning: logical ‘and’ of equal expressions [-Wlogical-op] 580 | if (!tmp_mcc && !tmp_mcc && !container_id && !array->len) | ^~ Fixes: f4b8d14b8d2d ('bearer-qmi: explicitly ignore PCOs with undefined contents:')
2023-01-18broadband-modem-mbim,qmi-shared: Fallback from qmi uim service only when not ↵Ulrich Mohr
supported When using qmi uim service from mbim broadband modem, a fallback from using qmi uim service to normal mbim operations is done every time a call to qmi_set_primary_sim_slot fails. But this may fall for various reasons, and a fallback only makes sense when the device does not support that call Patch reworked by Aleksander Morgado <aleksandermj@chromium.org>
2023-01-18cli: add formating option (json and key/value) for created SMSFrederic Martinsons
Fixes #657 Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
2023-01-18build: enable GLib deprecation warningsLubomir Rintel
These were disabled to avoid a large spew of deprecation warnings post GLib 2.44. That might have been too big a hammer, because it made us miss us of API from newer GLib than we require. Let's re-enable the warnings and lower the bottom bound instead. That way we're get warned about use of API that's too new and also be warned about things that was deprecated long long ago. We may miss things that got deprecated in favor of better API after 2.44, but that's unlikely to be an issue and is definitely better than ignoring everything altogether.
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.
2023-01-18broadband-modem-mbim: Sync state of sim_hot_swap_configured variableMichal Mazur
2023-01-18broadband-modem-mbim: Fix bug in cleanup_unsolicited_events_3gpp()Michal Mazur
2023-01-16bearer-qmi: explicitly ignore PCOs with undefined contents:Aleksander Morgado
There is nothing to process in this kind of PCO fields: <<<<<< TLV: <<<<<< type = "Operator Reserved PCO" (0x2f) <<<<<< length = 8 <<<<<< value = 00:00:00:00:00:00:00:00 <<<<<< translated = [ mcc = '0' mnc = '0' mnc_includes_pcs_digit = 'no' app_specific_info = '{}' container_id = '0' ] Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/690
2023-01-16bearer-qmi: app specific info in PCO may be emptyAleksander Morgado
ModemManager[562783]: <err> [1673538458.350130] mm_utils_bin2hexstr: assertion 'bin != NULL' failed ModemManager[562783]: <dbg> [1673538458.350167] [modem0/bearer0] container ID: 0 ModemManager[562783]: <dbg> [1673538458.350201] [modem0/bearer0] app specific info: (null) Treat it better by only trying to build the app specific info string if there are contents in the array.
2023-01-12bearer-qmi: fix pco array declarationDaniele Palmas
2023-01-11sim-mbim: Reset cached SIM info when SIM is unlockedMichal Mazur
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/684
2023-01-11broadband-modem-qmi: ignore our own profile changed indicationsAleksander Morgado
The device may emit a "WDS Profile Changed" indication triggered from our own "WDS Modify Profile", "WDS Create Profile" or "WDS Delete Profile" operations, so ensure those are fully ignored so that we don't emit the "Updated" signal in the ProfileManager interface. The logic keeps track of the amount of concurrent operations so that the signal is ignored for as long as there is at least one operation running. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/687
2023-01-10build: fix dependency on daemon enums required by pluginsAleksander Morgado
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/686
2023-01-09build: set LD_LIBRARY_PATH along with GI_TYPELIB_PATH when launching stubFrederic Martinsons
Otherwise we may use a wrong typelib shared library (the one that is installed on the system which run the test) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
2023-01-03ci: build single plugins also in main and tagsAleksander Morgado
2023-01-03ci: list of plugins from meson configuration itselfAleksander Morgado
2023-01-03ci: update image with gawk and without autotoolsAleksander Morgado
2023-01-03ci: fix enabling qmi/mbim/qrtr support in single-plugin testsAleksander Morgado
2023-01-03ci: fix disabling introspection in single-plugin testsAleksander Morgado
2023-01-03ci: run suspend-resume build tests also in master and tagsAleksander Morgado
2023-01-03ci: use YAML anchor to setup dependenciesAleksander Morgado
2023-01-03ci: add tests for builtin pluginsAleksander Morgado