Commit Graph
8708 Commits
Author SHA1 Message Date
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
QuectelDuke 1fc061b6a5 quectel: Add RM520 with firehose support
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-15 09:49:50 +00:00
QuectelDuke bae7242af6 quectel: Add new EM160 product with firehose support
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-14 07:51:12 +00:00
Aleksander Morgado 1fc58d4749 broadband-modem: don't assert if no AT port in QMI modem enabling unsolicited messages
2023-09-11T20:23:49.294555Z <err> mm_port_get_device: assertion 'self != NULL' failed
  2023-09-11T20:23:49.294691Z <dbg> [modem0] enabling messaging unsolicited events on primary port (null)
  2023-09-11T20:23:49.294865Z <dbg> [modem0] enabling parent messaging unsolicited events failed: Cannot run sequence: port not given
2023-09-11 22:37:46 +00:00
Aleksander Morgado 36dc193b40 iface-modem-simple: ignore ps wait state result, only check error
As we do in the similar modem state wait operations in the modem
interface, the caller of the wait operation may ignore the state
result as it's really not required in this case. Only looking at
whether an error is set or not is enough.

This by itself fixes a crash where
mm_iface_modem_3gpp_wait_for_packet_service_state_finish() may have
returned UNKNOWN without error set.

  0x000079616c2564ed (libglib-2.0.so.0 - gtestutils.c: 3256)      g_assertion_message
  0x000079616c25654b (libglib-2.0.so.0 - gtestutils.c: 3282)      g_assertion_message_expr
  0x000057ba46231150 (ModemManager - mm-iface-modem-simple.c: 344)        packet_service_attach_in_3gpp_network_step
  0x000079616c0efb02 (libgio-2.0.so.0 - gtask.c: 1232)    g_task_return_now
  0x000079616c0eeb54 (libgio-2.0.so.0 - gtask.c: 1301)    g_task_return
  0x000057ba4620e5bd (ModemManager - mm-iface-modem-3gpp.c: 189)  wait_for_packet_service_state_context_complete
  0x000057ba4620b441 (ModemManager - mm-iface-modem-3gpp.c: 261)  packet_service_state_changed
2023-09-11 19:39:59 +00:00
Aleksander Morgado 47239b8499 iface-modem-3gpp: ensure error is set when UNKNOWN returned in ps state wait 2023-09-11 19:39:59 +00:00
Aleksander Morgado c1382b3255 iface-modem: ensure error is set when UNKNOWN returned in modem state wait 2023-09-11 19:39:59 +00:00
Aleksander Morgado 5adda62912 iface-modem-3gpp: ignore UNKNOWN ps state explicitly during wait operation 2023-09-11 19:39:59 +00:00
Aleksander Morgado fb66cc26be iface-modem: ignore UNKNOWN modem state explicitly during wait operation 2023-09-11 19:39:59 +00:00
QuectelDuke 0a87294725 quectel: add Sahara udev tag to EM061K-GL modems
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-08 08:35:48 +00:00
Eric Caruso 201c8533e0 mm-sms-part-3gpp: avoid buffer overflow if packed data is too large
With GSM7 encoding, packedlen is the length of the unpacked string
after expanding septets to octets so it will be ~14% bigger than
the original string length. This means we have to be careful not
to copy too much data into the PDU buffer.

Similar issues exist in other branches of the same function.

Thanks rhezashan@gmail.com for the report.
2023-08-30 12:42:15 -04:00
QuectelDuke 8fc9b77750 quectel: add support for EM060K-GL usb modules
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-08-14 12:03:02 +00:00
Daniele Palmas 490eeb0ade port-qmi: add QMAP support to mhi_net based setups 2023-08-07 10:52:55 +00:00
Daniele Palmas 65e2db75ed port-qmi: restore driver initial MTU for mhi-net when resetting link
Kernel driver mhi-net sets a custom MTU for the netdevice: use the
same value when resetting the netdevice to its initial state.

This is important especially when rmnet is used on top of mhi-net,
since rmnet netdevices get their initial MTU from the mhi-net one.
2023-08-07 10:52:55 +00:00
Aleksander Morgado 639900ed36 build: unstable release version bump to 1.21.8 2023-08-07 05:01:31 +00:00