9615 Commits
Author SHA1 Message Date
Maciej S. Szmigiero f9146378b8 .gitignore: ignore clangd cache directory
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-06-14 16:02:23 -05:00
Dan Williams 93a63c85ea Merge request !1368 from 'simtech-audio-format-dbus'
Fix setting call audio format and add Simtech audio properties support

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1368

Closes #996
2025-06-14 15:51:50 -05:00
Dan Williams ad23d5f22c simtech: report call audio properties if audio settings are supported
Suggested by David Timber.

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/996

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-06-14 15:39:43 -05:00
Dan Williams 5d663976ea voice: fix setting call audio format
MM should be updating the call audio format and port on ongoing/active
calls, not terminated ones.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-06-14 15:39:43 -05:00
Dan Williams e55dde034b Merge request !1372 from '32bit'
Fix 32bit format specifiers and don't run tests on free'd cbm part

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1372
2025-06-14 15:31:19 -05:00
Guido Günther 5ecf00aaf0 cbm: Don't leak cbm-part in tests
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-06-14 15:27:08 -05:00
Guido Günther c89266facb cbm: Don't check language past free
Fixes: 3559f606d ("cbm-part: Fix parsing of language encodings")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-06-14 15:27:08 -05:00
Guido Günther 061bc1ff2d intel: Use correct format specifier
The arguments are `gsize` and otherwise emit warnings on e.g. i386

Fixes 4cae04064 ("intel: implement support for RPC-powered xmm7360")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-06-14 15:27:08 -05:00
Dan Williams 1bc3db766b Merge request !1369 from 'main'
foxconn: add subsystem ID support for T99W696

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1369
2025-06-14 15:26:43 -05:00
Slark Xiao 41f82a4d33 dell: update the foxconn mbim interface
Keep the mm_broadband_modem_mbim_foxconn_new() align with the
new changes in src/plugins/foxconn.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
2025-06-14 15:23:33 -05:00
Slark Xiao bf5458acdd foxconn: add subsystem ID support for T99W696
T99W696 is the first Foxconn PCIE modem whick uses Qualcomm's VID/
PID. Driver ref: https://lore.kernel.org/mhi/20250528092232.16111-1-slark_xiao@163.com

This changes include 2 parts:
i:  Add device for foxconn plugin
ii: Show SSVID/SSPID for parameter "--firmware-status". This helps
    the fwupd get the right firmware upgrade method.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
2025-06-14 15:23:33 -05:00
Guido Günther 8486641f92 Merge request !1371 from 'rel-1.25.1'
build: Bump minimum libqmi dependency and release 1.25.1

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1371
2025-06-04 09:26:37 +00:00
Guido Günther e88e481ca3 build: Bump version to 1.25.1
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-06-04 10:01:08 +02:00
Guido Günther 32f7e3ec09 build: Bump minimum libqmi dependency to 1.37.1
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-06-04 10:01:08 +02:00
Dan Williams cf7d037ed3 Merge request !1366 from 'mr/20250530-timeout'
mm-port-serial: add new MM_SERIAL_ERROR_SEND_TIMEOUT

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1366
2025-06-02 08:46:40 -05:00
Florian Eckert 6a2cb8dd8e mm-port-probe-at: also check for MM_SERIAL_ERROR_SEND_TIMEOUT
Check here for the new error 'MM_SERIAL_ERROR_SEND_TIMEOUT'.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-06-02 08:43:45 -05:00
Florian Eckert 44b9f74301 mm-port-serial: add new MM_SERIAL_ERROR_SEND_TIMEOUT
This new error code 'MM_SERIAL_ERROR_SEND_TIMEOUT' is used to make it easier
to distinguish why the transmission failed. Until now,
'MM_SERIAL_ERROR_SEND_FAILED' was always returned. This new error code is now
returned for an 'EAGAIN', as this is more likely to be a TIMEOUT.

This makes debugging easier, as a better error analysis is now possible.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-06-02 08:43:45 -05:00
Dan Williams 37f17d4b58 Merge request !1336 from 'dtmf-serialize'
Serialize DTMF requests and allow setting DTMF duration at call creation time

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1336

Closes #970
2025-05-30 18:54:05 -05:00
Dan Williams dad2d49b69 tests: test call DTMF functionality
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 08:06:11 -05:00
Dan Williams ae3d37030a base-call: handle multiple DTMF characters
Send each character through the state machine one at a time. Some
modems (various Quectel ones for example) can process multiple at
the same time, and while that should be easily implemented using
the new changes to send_dtmf() it's not done in any plugin yet.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 08:02:48 -05:00
Dan Williams 56fe8e7d31 modem-helpers: add utility function to split DTMF runs
Split into groups of non-pause characters and single pause characters
by themselves and return as an array of strings.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 08:02:47 -05:00
Dan Williams 957a141e57 base-call: interpret DTMF character ',' as two-second pause
Do what other dialers do and interpret ',' as a short pause, which
helps handle automated menus.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:59:59 -05:00
Dan Williams 2726f8e8a2 base-call: convert DTMF tone handling to a state machine
Generalize the timeout/stop logic that QMI requires into the
base call. We'll use this to implement the pause character (,)
generically.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:59:59 -05:00
Dan Williams 5448a85a2b call: allow setting DTMF tone duration at call creation time
Instead of hard-coding a 500ms DTMF tone duration, let applications
use a specific duration at call setup time.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:59:58 -05:00
Dan Williams 28b1954654 call-list: remove unused modem property
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:57:50 -05:00
Dan Williams b9c49c7b4d base-call: remove usage of MMBaseModem
Split out the things we actually use from MMBaseModem into
separate properties that can be independently implemented
(or just left NULL) for unit tests.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:57:50 -05:00
Dan Williams 8392f30388 base-call: split AT-specific call code into MMCallAt
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-30 07:57:50 -05:00
Dan Williams 3ed7f37876 Merge request !1290 from 'port-scheduler'
port-serial: add command scheduler infrastructure and use it

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1290
2025-05-23 18:58:30 -05:00
Maciej S. Szmigiero 7d410387cf port-scheduler: implement LOG_OBJECT interface and add scheduler logging
Otherwise log functions crash.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-05-23 18:46:53 -05:00
Dan Williams a769bbed6d port-serial: add serial port command scheduler
Add an interface and implementation for a port scheduler that round-
robins between ports the scheduler is attached to, serializing command
execution among one or more MMPortSerial instances.

Theory of operation:

Sources (e.g. MMPort subclasses) register themselves with the scheduler.

Each source notifies the scheduler whenever its command queue depth changes,
for example when new commands are submitted, when commands are completed,
or when commands are canceled.

The scheduler will round-robin between all sources with pending commands,
sleeping when there are no pending commands from any source.

For each source with a pending command the scheduler will emit the
'send-command' signal with that source's ID. The given source should
send the next command in its queue to the modem.

When that command is finished (either successfully or with an error/timeout)
the source must call mm_port_scheduler_notify_command_done() to notify the
scheduler that it may advance to the next source with a pending command, if
any. If the 'send-command' signal and the notify_command_done() call are not
balanced the scheduler may stall.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-23 18:46:53 -05:00
Dan Williams b24615d801 log-object: don't construct log ID with NULL self_id
If the object has an owner ID already but doesn't yet have enough
information to build its log ID, don't cache a less-than-useful
log ID string for it.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-23 18:46:32 -05:00
Maciej S. Szmigiero 42ead88266 log-object: Add possibility to reset logger id
Logger id (the one generated from build_id interface method and owner_id
property) is generated and cached the first time it is required, further
uses just return the cached value.

Add a cache reset method so if the interface implementer knows that its
logger id could have changed it could force its re-generation.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-05-23 18:46:32 -05:00
Dan Williams 39f4cf77f2 Merge request !1361 from 'cbm-lang'
Parse CBM's language when available and export it on DBus

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1361
2025-05-23 14:22:50 -05:00
Guido Günther 87aaebcec0 cli/cbm: Show CBMs language when available
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 68d241b5aa mmcbmmonitor: Print language when available
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 9625c81d39 mm-glib/cbm: Allow to get language
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 95d65ecd8d base-cbm: Export the lang property on DBus
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 0bd0cad705 cbm-part: Handle additional coding schemes and parse languages
We store the language as iso639 as this is what the what TS 23.038
references.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 3559f606d2 cbm-part: Fix parsing of language encodings
According to TS 23.038 the language is stored at the beginning of the
information page not in the "header".

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther cdc6bf9529 cbm-part: Use automatic cleanup
Safer than freeing the the struct in multiple places

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 857efa1fba polkit,conf: Add missing Cell Broadcast SetChannel method
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Guido Günther 5a3b810bc9 polkit,conf: Add missing Cell Broadcast methods
Fixes 62f7b76e8 ("cbm: Add CellBroadcast interface")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-23 14:15:14 -05:00
Dan Williams 9cc5582bf2 Merge request !1355 from 'mtk-unlock-required'
mtk-legacy: read IMSI if CPIN response is an error

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1355

Closes #980
2025-05-23 14:11:58 -05:00
Dan Williams 5c1fcbfe4a mtk-legacy: read IMSI if CPIN response is an error
Some older MTK-based phones (Tecno T528 NEW) reply to +CPIN with
an error but are (obviously) unlocked, otherwise they wouldn't
be able to boot up to the point of talking to a computer. Since
they are actually unlocked they will happily give out the IMSI
even if +CPIN errors.

To work around the +CPIN issue treat the device as unlocked if we
can successfully read the IMSI.

Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/980

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-23 08:31:04 -05:00
Dan Williams 757df26b29 broadband-modem,modem-helpers: move +CPIN response parsing to modem helpers
Unit test it better, plus remove code duplication in various plugins.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-23 08:31:04 -05:00
Dan Williams c5a2cd3157 Merge request !1364 from 'cbs-policy'
pollkit,cell-broadcast: Use more specific error message

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1364
2025-05-22 19:12:07 -05:00
Guido Günther 3d3182534e pollkit,cell-broadcast: Use more specific error message
Text messages could also be SMS

Fixes 1fb74f266 ("data: Add a policy rule to access the cellbroadcast API")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-22 23:17:47 +02:00
Dan Williams 1192f49868 Merge request !1363 from 'pr/20250521-mbim-qdu'
broadband-modem-mbim: add qdu firmware update check

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1363
2025-05-22 09:10:42 -05:00
Florian Eckert d058dd0775 broadband-modem-mbim: add qdu firmware update check
The manufacturers can offer a firmware update file 'ota.bin' with which
the firmware can be updated in the modem via a manufacturer tool using
windows. The tool is only available for Windows and can therefore not be used
for embedded devices.

A investigation has shown that this tool updates the firmware via 'mbim-qdu'.
The update service 'fwupd' which has a 'modemmanager' plugin can install the
firmware via 'mbim-qdu'. For this to work, the ModemManager must export this
update method via the firmware interface.

As the 'mbim-qdu' is a generic update method, the check is integrated into the
'mm-broadband-modem-mbim' class. If 'mbim-qdu' update method is supported by
the mbim interface and the udev env variable 'ID_MM_MBIM_QDU' is set for this
modem, then the 'mbim-qdu' update is exported via dbus.

The following line must be added to the '77-mm-cinterion-port-types.rules'
udev rules file, for example, so that the mbim-qdu update for the 'MV31' can
be used.

ATTRS{vendor}=="0x1e2d", ATTRS{device}=="0x00b3", ENV{ID_MM_MBIM_QDU}="1"

This is the corresponding output of the 'mmcli' command to show the supported
update method for the 'MV31'.

root@G3-10940 ~ # mmcli -m Modem1 --firmware-status
  Firmware |     method: mbim-qdu
           | device ids: USB\VID_1E2D&PID_00B3&REV_0414&CARRIER_GCF
           |             USB\VID_1E2D&PID_00B3&REV_0414
           |             USB\VID_1E2D&PID_00B3
           |             USB\VID_1E2D
           |    version: T99W175.F0.1.0.0.9.GC.004.063 - 0A000804

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-05-22 09:04:40 -05:00
Dan Williams 680aed6acf Merge request !1044 from 'submodule'
Allow to use libqmi and libmbim as meson subprojects

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1044
2025-05-22 08:28:51 -05:00