Commit Graph
8978 Commits
Author SHA1 Message Date
Ujjwal Pande a95c2d2ad9 broadband-modem-qmi: report network rejections
Changes to expose network rejections for QMI based modems.
2024-06-12 09:39:12 +00:00
Ujjwal Pande 4b615a2343 broadband-modem-mbim: report network rejections
Changes to expose network rejections for MBIM based modems.
2024-06-12 09:39:12 +00:00
Ujjwal Pande 2904510e76 api: new NetworkRejection property
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-06-12 09:39:12 +00:00
Lubomir Rintel df8287bf6c modem-helpers: do not leak past PDP on error
If CID parsing from the +CGDCONT response fails, the very last PDP
structure allocated is not put on the list yet and therefore
mm_3gpp_pdp_context_list_free() wouldn't free it.

Let's put it on the list first, as to not leak it on error.
2024-05-31 10:46:59 +00:00
Lubomir Rintel bd0551460b libmm-glib/signal: fix a copy'n'paste error 2024-05-31 10:46:59 +00:00
Lubomir Rintel 000acf4922 sim/qmi: do not leak access technology name 2024-05-31 10:46:59 +00:00
Lubomir Rintel 90824b3e87 bearer/qmi: fix a copy'n'paste error
Probably not a real issue, given if there's a password there's probably
an user name too.
2024-05-31 10:46:59 +00:00
Lubomir Rintel 6ca02a3edf mmcli/sms: do not leak message_reference 2024-05-31 10:46:59 +00:00
Lubomir Rintel 50937f5253 port-qmi: fix array bound check
There's an off-by-one error.
2024-05-31 10:46:30 +00:00
Lubomir Rintel 5cdeea43da quectel/shared: do not leak name string 2024-05-31 10:46:30 +00:00
Lubomir Rintel a42d12f660 shared-qmi: fix a leak in error handling path
str needs to be freed in pds_get_agps_config_ready().
2024-05-31 10:46:30 +00:00
Lubomir Rintel 5f6b095360 broadband-modem: fix a potential leak in cusd_process_string() error handling
On error, *converted may already be allocated and we need to free it
(but not in case we're returning it from the task).
2024-05-31 10:46:30 +00:00
Lubomir Rintel 39a90fc39a ublox/helpers: fix propagation of +URAT response parse error
We have been constructing a GError too late, just leaking it instead of
propagating.
2024-05-31 10:39:59 +00:00
Lubomir Rintel 7dfd59157e shared-qmi: do not leak a string in error path 2024-05-31 10:39:59 +00:00
Aleksander Morgado b3277a8563 port-mbim-fibocom: fix duplicated GError free 2024-05-30 08:46:54 +00:00
Lukas Voegl 7d0737a813 mm-iface-modem: clear signal only if supported
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2024-05-29 12:00:56 +00:00
Lukas Voegl 03318e4791 broadband-modem-cinterion: increase COPS timeout
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2024-05-29 12:00:56 +00:00
Aleksander Morgado 5ea26af0e4 rolling: new plugin
This plugin provides support for modems from Rolling Wireless. The
current approach is to re-use the AT-based and MBIM-based specific
modem implementations from the Fibocom plugin.

Based on an original implementation from:
vanillan wang <vanillanwang@163.com>

See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1170
2024-05-29 10:14:39 +00:00
Aleksander Morgado 800c2bb02a fibocom: MBIM in shared utils is optional 2024-05-29 09:50:05 +00:00
Aleksander Morgado 33649756f5 build: remove unnecessary shared dependency info from plugin option definitions 2024-05-29 09:50:05 +00:00
Aleksander Morgado 6c92749d20 broadband-modem-cinterion: use generic initial EPS bearer management logic
The Cinterion specific implementation relies on the generic one but
adds the authentication information support using ^SGAUTH.

The loading of the initial EPS bearer status (i.e. the one agreed with
the network, not the settings) no longer has any Cinterion specific
behavior. The auth settings are NOT reported in the initial EPS bearer
status.
2024-05-29 09:08:18 +00:00
Aleksander Morgado 9fcff66406 broadband-modem: allow subclassing initial eps bearer cid selection 2024-05-29 09:08:13 +00:00
Aleksander Morgado a063e2a15c fibocom: remove custom initial EPS bearer management
The implementation in the generic MMBroadbandModem object should fit
well instead of the custom implementation.

There is also no need to specify via udev tags which is the initial
EPS bearer context id, we try to automatically guess it in runtime.
2024-05-29 09:05:23 +00:00
Aleksander Morgado e7492270c2 broadband-modem: implement setting initial EPS bearer settings 2024-05-29 09:05:22 +00:00
Aleksander Morgado 471656addf broadband-modem: implement loading initial EPS bearer info 2024-05-29 09:05:22 +00:00
Aleksander Morgado 97cab9f37e broadband-modem: implement loading initial EPS bearer settings
The main issue here is how to select the id of the context that is
used for attach in the modem.

We will assume that the lowest cid value for the IP range returned in
the CGDCONT=? test is the one used for the attach context. This
assumption works with modems following the 3GPP specs (with cid=0) and
also in Qualcomm based modems (with cid=1).
2024-05-29 09:05:04 +00:00
Aleksander Morgado 50755b07d3 cli,3ppp: allow updating EPS settings before enabling 2024-05-29 08:14:13 +00:00
Aleksander Morgado 1263905753 cinterion: remove custom logic to power down modem before initial EPS bearer settings update 2024-05-29 08:14:12 +00:00
Aleksander Morgado cf1035169c fibocom: remove custom logic to power down modem before initial EPS bearer settings update
This is now done for all modems unconditionally.
2024-05-29 08:14:03 +00:00
Aleksander Morgado 1f508a8e1b broadband-modem-qmi: remove custom logic to power down modem before initial EPS bearer settings update 2024-05-29 08:02:40 +00:00
Aleksander Morgado fa169bda9f iface-modem-3gpp: power down before updating initial EPS bearer settings
Before the operation to update the current initial EPS bearer
settings, we will now unconditionally put the modem in low power
mode. so that when the next network registration happens we are sure
the new settings are in place.

This approach was previously applied already to all QMI-based modems
as well as to all Fibocom modems. The approach applies now to all
modems of all vendors and in all control protocols.
2024-05-29 08:02:40 +00:00
Aleksander Morgado c5b9effdc7 iface-modem: allow reporting the previous power state after an update
Let the caller of mm_iface_modem_set_power_state() know which was the
power state in the device before the actual update happened.

This is useful in cases where we want to temporarily switch to a given
power state (e.g. low) before returning to the original power state.
2024-05-29 08:02:40 +00:00
Aleksander Morgado e215f644d6 huawei: trivial: remove trailing whitespaces 2024-05-29 08:01:36 +00:00
Oliver Kästner 8fb660f0e4 huawei: use G_GUINT64_CONSTANT 2024-05-23 00:35:01 +02:00
Oliver Kästner 2d3caa9a35 huawei: enable setting LTE bands 2024-05-23 00:35:01 +02:00
Aleksander Morgado e01eac5bfe test: longer timeout to wait for modem in test fixture
If the system running the test is under heavy load, the modem may need
time to get exposed. Just bump the timeout to a long enough value.
2024-05-17 08:36:43 +00:00
Aleksander Morgado 6a60543495 mtk: FM350 multiplexing support is checked in runtime
This was introduced in 2f306e8e7c
2024-05-17 08:12:47 +00:00
Aleksander Morgado 378d28118b build: unstable release version bump to 1.23.7 2024-05-13 11:29:21 +00:00
Aleksander Morgado 48e2452754 broadband-modem-mbim: add support for MS extensions device reset 2024-05-13 09:43:46 +00:00
Aleksander Morgado c60e76bf71 plugin-manager: use autoptr to simplify methods needing a valid PortContext reference 2024-05-13 09:13:33 +00:00
Aleksander Morgado 21998a7b3e plugin-manager: ensure DeviceContext is valid during the whole cancellation procedure 2024-05-13 09:13:33 +00:00
Aleksander Morgado 0bb31c3e8b plugin-manager: fix comment specifying which context should exist 2024-05-10 10:27:57 +00:00
Aleksander Morgado e77c644ce2 kernel-device-generic: plug memleak when processing platform ports
ptr_array_add_sysfs_attribute_link_basename() already reads the
current subsystem, so we should avoid overwriting the pointer.

  ==1630== 13 bytes in 2 blocks are definitely lost in loss record 270 of 3,092
  ==1630==    at 0x4842839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
  ==1630==    by 0x4A1DDE8: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1)
  ==1630==    by 0x4A329E3: g_strdup (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1)
  ==1630==    by 0x26128E: ptr_array_add_sysfs_attribute_link_basename (mm-kernel-device-generic.c:244)
  ==1630==    by 0x263FD0: preload_contents_platform (mm-kernel-device-generic.c:314)
  ==1630==    by 0x263FD0: preload_contents (mm-kernel-device-generic.c:549)
  ==1630==    by 0x263FD0: check_preload (mm-kernel-device-generic.c:992)
  ==1630==    by 0x263FD0: initable_init (mm-kernel-device-generic.c:1139)
  ==1630==    by 0x4B6DDB9: g_initable_new_valist (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
  ==1630==    by 0x4B6DE6C: g_initable_new (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
  ==1630==    by 0x262087: mm_kernel_device_generic_new_with_rules (mm-kernel-device-generic.c:1054)
  ==1630==    by 0x17F66F: handle_kernel_event (mm-base-manager.c:689)
  ==1630==    by 0x17F7D2: report_kernel_event_auth_ready (mm-base-manager.c:1238)
  ==1630==    by 0x4BA37D8: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
  ==1630==    by 0x4BA3A1A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
2024-05-10 10:27:07 +00:00
Aleksander Morgado 405e7a6012 broadband-modem-mbim: add missing MBIM port header 2024-05-09 14:11:10 +00:00
Aleksander Morgado 35292eec2f base-sim: avoid printing IMSI/ICCID and others twice
The logic initializing the SIM object already prints the loaded
fields, taking into account that some of them should be treated as
personal info (so redacted by default).

   [modem0/sim0] loaded SIM identifier: 8988211000000123456
   [modem0/sim0] loaded SIM identifier: ###
   [modem0/sim0] loaded IMSI: 901700000012345
   [modem0/sim0] loaded IMSI: ###
2024-05-08 21:49:54 +00:00
Alyssa Ross daa8292878 build: prepend to LD_LIBRARY_PATH and GI_TYPELIB_PATH
In Nixpkgs packages are installed in separate prefixes.
Starting from GLib / gobject-introspection 2.80, GLib introspection data
is provided by GLib itself instead of gobject-introspection. This causes
tests failures in Nixpkgs because the GI_TYPELIB_PATH set by the build
environment was overridden, leaving it unable to find GLib:

	    ImportError: cannot import name GLib, introspection typelib not found

Only GI_TYPELIB_PATH needs to be preserved in our case, but I've made
the same change for LD_LIBRARY_PATH, other environments might rely on
that in a similar way.
2024-05-08 09:53:14 +02:00
Aleksander Morgado 218d6d2c58 shared-simtech: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:39 +00:00
Aleksander Morgado 4afb6a3172 shared-cinterion: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:39 +00:00
Aleksander Morgado e4e6857aed shared-quectel: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:39 +00:00
Aleksander Morgado 18a084940a shared-option: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:39 +00:00