Commit Graph
8722 Commits
Author SHA1 Message Date
Madhav ad462f68bd NEWS: Use inclusive terms
Remove non-inclusive terms.
2023-10-27 09:41:17 +00:00
Aleksander Morgado 10b8ee4cb9 modem-helpers-qmi: avoid "ip-version-mismatch" error if possible
Based on the WDS client being connected, we'll convert this error into
"IPv4 only allowed" or "IPv6 only allowed".
2023-10-27 11:34:26 +02:00
Aleksander Morgado d0f97a4c62 modem-helpers-qmi: translate QMI internal verbose call reason into MM errors
Just a few key translations for now.
2023-10-27 11:34:26 +02:00
Aleksander Morgado 1f9a04268f core: ensure all errors returned in DBus operations are normalized
We want to ensure that all errors reported via DBus operations are
normalized to MM-specific errors.

We don't want to return QMI or MBIM specific errors, as those are
protocol specific and we don't want DBus clients to need to rely on
knowing which is the protocol in use by the device.
2023-10-27 11:34:26 +02:00
Aleksander Morgado 9569b99f41 base-bearer: normalize connection error exposed in DBus
The connection error exposed in the DBus interface should be an error
defined in the ModemManager API, and therefore it should be normalized
before being exposed.

This was already being done by limiting the exposure to MM specific
errors, but now we also try to normalize QMI or MBIM errors into MM
specific ones.
2023-10-27 07:33:44 +00:00
Aleksander Morgado 2de0763ac8 api,errors: new MMCarrierLockError type
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-27 07:33:44 +00:00
Aleksander Morgado bfb0658909 modem-helpers-qmi: register QMI error translations
We register translations for QMI core and QMI protocol errors. These
translations are a best-effort, and they are not meant to be
exhaustive.

The original error description is included in the translated GError,
so that the details of the issue are not lost.
2023-10-26 12:35:50 +00:00
Aleksander Morgado b54de958ce modem-helpers-qmi: group error translation methods together 2023-10-26 12:35:50 +00:00
Aleksander Morgado a307380113 modem-helpers-qmi: minor method rename 2023-10-26 12:35:50 +00:00
Aleksander Morgado cbb825a236 modem-helpers-mbim: register MBIM error translations
We register translations for MBIM core, MBIM protocol and MBIM status
errors. These translations are a best-effort, and they are not meant
to be exhaustive.

The original error description is included in the translated GError,
so that the details of the issue are not lost.
2023-10-26 12:35:50 +00:00
Aleksander Morgado 08a954a88b modem-helpers-mbim: move error translation method
Moved to the end of the file, we'll add all new error translations
together.
2023-10-26 12:35:50 +00:00
Aleksander Morgado 5e088fb3bb modem-helpers-mbim: minor method rename 2023-10-26 12:35:50 +00:00
Aleksander Morgado 81d2655950 error-helpers: allow registering error mappings
E.g. from QMI/MBIM errors into MM errors.
2023-10-26 12:35:50 +00:00
Aleksander Morgado 59aae421a1 core,error-helpers: new method to normalize GErrors
The ModemManager API should not expose or return error types out of
the error domains it supports.

Default to a generic core error "Failed", while keeping the original
error description.
2023-10-26 12:35:50 +00:00
Aleksander Morgado e0bcf0a3c4 api,errors: add generic MM_CORE_ERROR_THROTTLED error
Will be used to report operations that are not run as they have been
attempted too many times already.

Modems will usually report this kind of error e.g. when attempting to
connect with the same invalid APN too many times. The modem at some
point decides that it won't attempt the APN connection with the
network any more, so it returns this error to the caller right away.
2023-10-26 12:35:43 +00:00
Aleksander Morgado 8115b651de api,errors: add generic MM_CORE_ERROR_PROTOCOL error
Will be used to report control protocol failures detected in the
communication with the device (e.g. malformed QMI or MBIM messages,
and so on).
2023-10-26 10:56:31 +00:00
Aleksander Morgado 575cdb7411 api,errors: add generic MM_CORE_ERROR_TIMEOUT error
Will be used to report operation timeout errors.
2023-10-26 10:56:30 +00:00
Aleksander Morgado f730238a92 core,error-helpers: fix formatting in ME error strings 2023-10-25 12:44:14 +00:00
Madhav 48ee4d3012 mm-port-probe: Invoke the mm_port_mbim_open function with a GCancellable object
After the modem recovers, the ports are up but not yet responsive. When MM tries to probe the ports, they do not respond.
As a result, the probing tasks are left ongoing, waiting for a response from the modem.

If the modem drops off the bus for any reason, the cdc-wdm port probing task is not immediately canceled.
This patch fixes this issue by passing a cancellable object to mm_port_mbim_open().

In other words, the patch ensures that the cdc-wdm port probing task is canceled if the
modem drops off the bus before the task completes. This prevents the task from preventing
other port probing tasks from starting.
2023-10-19 19:59:48 +00:00
Aleksander Morgado 74904b3cb1 quectel: coding style fixes 2023-10-18 21:29:06 +00:00
mank.wang 1b6e4c4349 quectel: avoid incorrect module version report after the upgrade
After LVFS upgrade, the module needs to be restarted. ModemManager
queries the module information, sometimes the module is not ready, and
the information queried by "mmcli -m any --firmware-status" is
incomplete,

It is now modified to re query once per second when obtaining
incomplete versions, up to a maximum of 16 times.

Signed-off-by: mank.wang <mank.wang@quectel.com>
2023-10-18 21:29:06 +00:00
Rukun Mao 7b878765c6 broadband-modem-mbim: reprobe modem and update SIM info after "nonInitialized" error
When the subscriber ready status notification's ready state becomes "initialized"
from "nonInitialized", it indicates a new SIM is inserted, for which a modem
reprobe is needed.
2023-10-18 21:18:50 +00:00
Puliang Lu 9db7b18f4d fibocom: Added support for firmware objects
Added load_update_settings, load_update_settings_finish
Add support for fastboot flash
2023-10-18 21:01:35 +00:00
Aleksander Morgado a6c2ea64f8 iface-modem-3gpp-profile-manager: throttle emission of the "updated" signal
Emit the "Updated" signal max one time per 2 seconds, even if we get
many more notifications from the modem during that time.
2023-10-18 07:31:30 +00:00
Madhav 0b323dce22 mm-broadband-modem-mbim: Enable PROCESS_NOTIFICATION_FLAG_SLOT_INFO_STATUS during sim hot swap setup
Add PROCESS_NOTIFICATION_FLAG_SLOT_INFO_STATUS to enable and setup
flags, this should help SIM detection on inactive slots when the
modem is in a failed state.

This helps fix the following scenario, If a physical SIM card (pSIM) is
inserted into a device that is currently using its eSIM slot,
but does not have any eSIM profiles installed, the pSIM will not be detected.
2023-10-18 00:43:44 +00:00
Aleksander Morgado 16b8b6a08f ublox: remove ID_MM_PROCESS tags
The ID_MM_PROCESS tag should be set by the user when using the
allowlist filter, we must not ship any device flagged by default with
that tag.

Moreover, the two ENV actions in a single rule is something not
currently supported by the builtin udev rule parser that is used in
systems without udev (e.g. openwrt).

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/779
2023-10-17 21:45:35 +00:00
Robert Marko 8182a10d5d quectel: add support for RM520N
RM520N in USB mode exposes the following:
ttyUSB0 (if #0): QCDM/DIAG port
ttyUSB1 (if #1): GPS data port
ttyUSB2 (if #2): AT primary port
ttyUSB3 (if #3): AT secondary port

So, lets mark them so ModemManager can properly manage them.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-10-12 13:16:36 +02:00
Ujjwal Pande ae02c47634 ModemManager: Add force option to set initial EPS bearer settings
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-10-11 14:07:53 +00:00
Rukun Mao b7433b4c14 iface-modem: new logic to detect SIM swap with explicit IMSI/ICCID query
This improves SIM hot swap check process, and it can help avoid unnecessary
modem reprobe during suspend-resume without SIM inserted.

The changes in this CL implemented the new logic ONLY for MBIM, and the
new logic has not been implemented for QMI and AT yet. Thus, we keep the
legacy `mm_iface_modem_check_for_sim_swap()' till the new logic for QMI
and AT has been implemented.
2023-10-11 14:01:33 +00:00
ming-pei.hsu 4fdda13c4e mtk: rename for old mtk plugin
Use mtk-legacy to instead mtk plugin.
2023-10-11 13:27:31 +00:00
Aleksander Morgado 16c3e33812 udev: always ignore the Qualcomm recovery layout (05c6:9008) 2023-10-11 12:52:00 +00:00
Aleksander Morgado bc7eda356b build: post-release version bump to 1.23.0 2023-10-11 12:45:04 +00:00
Aleksander Morgado 03f786ce66 release: bump version to 1.22.0
Require libmbim 1.30.0 and libqmi 1.34.0.
2023-10-11 12:32:44 +00:00
Aleksander Morgado 4605653c6f NEWS: add multi SIM support in cinterion 2023-10-11 12:31:17 +00:00
okaestne 23fc7871db iface-modem: fix error message for failed mode setting 2023-10-09 00:54:32 +02:00
Aleksander Morgado 8e81064020 core: use more inclusive words in logs 2023-10-06 08:57:32 +00:00
Lukas Voegl fe0e6059ba cinterion: implement setting primary slot
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-10-05 11:36:08 +00:00
Lukas Voegl 1341c65b5c cinterion: implement loading multiple SIMs
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-10-05 11:36:08 +00:00
Daniel Hofmann 9da04f6158 broadband-modem-qmi: Treat QMI_VOICE_USER_ACTION_UNKNOWN as QMI_VOICE_USER_ACTION_NOT_REQUIRED.
This fixes a bug where network-initiated USSD-Notify messages were not
processed (and forwarded to higher-level applications) at all, while
they should have been processed (and forwareded to higher-level
applications). Previously, when there was a USSD conversation between
the user and the network, the last message from the network (which, by
definition, is not a message with
user_action==QMI_VOICE_USER_ACTION_REQUIRED) would be silently
dropped.

The cause is a mismatch between the modem sending
user_action==QMI_VOICE_USER_ACTION_UNKNOWN while old ModemManager
expecting user_action==QMI_VOICE_USER_ACTION_NOT_REQUIRED.
2023-10-05 08:12:36 +00:00
Aleksander Morgado ed3871b394 AUTHORS: update 2023-09-29 11:32:16 +00:00
Dennis Gilmore 8061bcd9c0 fcc-unlock: add link for new T99W175 5G modem variant
Create link from existing unlock script for the modem in the Lenovo x13s.
IDs are documented at https://cateee.net/lkddb/web-lkddb/MHI_BUS.html

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2023-09-29 10:51:52 +00:00
Robert Marko 39eb3749be iface-modem: actually respect build options
iface-modem does not include config.h so it doesnt actually have the meson
generated build defines to check against.

I found this while trying to use AT commands over D-Bus by enabling
at_command_via_dbus, confirming that Meson sees it, defines it in config.h
but then I still got the:
"Cannot send AT command to modem: operation only allowed in debug mode".

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-09-27 13:25:36 +00:00
Aleksander Morgado aa7ab917f7 build: bump version to 1.21.900 (1.22-rc1) 2023-09-27 11:26:32 +00:00
Aleksander Morgado be640af246 NEWS: update for 1.22.0 2023-09-27 11:22:14 +00:00
Aleksander Morgado 9f4c738d1f test,mmsmspdu: add support for MSG log level 2023-09-27 11:21:26 +00:00
Aleksander Morgado 7990499602 base-modem: minor alignment fix 2023-09-27 10:24:58 +00:00
Aleksander Morgado 359b75bf9d device: plug leak of the physdev string 2023-09-27 10:08:59 +00:00
Aleksander Morgado d06a8cee25 api: add comment about "MSG" level being available only since 1.22 2023-09-27 09:07:24 +00:00
Nagi Marupaka 20a95cf428 mm-broadband-modem-mbim: treat "status error = `NotInitialized'" the same way as "ReadyState = 'sim-not-initialized'" 2023-09-18 16:52:24 +00:00
Lukas Voegl 8cd1c1bdb9 api,modem: new 'Physdev' property
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-09-18 10:53:12 +02:00