Commit Graph
100 Commits
Author SHA1 Message Date
Dan Williams 4fead86d24 intel: XMM7360: better handling of silly ASN int sizes
xmm7360_byte_array_read_asn_int() would keep bit-shifting a gint into
oblivion if the int's size was > 32-bit. It also didn't handle size 0
ints at all, and while size 24 ints would get stuffed into a 32-bit
variable those probably aren't a thing and if they actually are they
should get specifically handled.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2026-05-24 08:33:48 -05:00
Dan Williams 3f7b39075c intel: XMM7360: move standalone protocol functions to their own file
So we can unit-test all the parsing and building code more easily
without having to link to a bunch of serial port stuff.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2026-05-24 08:33:48 -05:00
Dan Williams 07dc7e7304 intel: XMM7360: return a GError from parse_response_xmm7360()
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2026-05-24 08:33:48 -05:00
Dan Williams 1565e3ada7 intel: XMM7360: convert message parsing g_assert()s to GErrors (#1034)
We shouldn't be g_asserting (and thus crashing) on untrusted input code;
should instead check validity and return an error that upper layers
can reasonbly log and handle.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2026-05-24 08:33:48 -05:00
Dan Williams 174f17f6ea Merge request !1438 from 'mtk_legacy_fix_err_memleak'
broadband-modem-mtk-legacy: fix `GError` memory leak

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1438
2026-05-24 08:15:06 -05:00
Dan Williams a02355c5ce Merge request !1448 from 'qmi/handle-shuttingdown'
ModemManager: handle QMI_DMS_OPERATING_MODE_SHUTTING_DOWN similar as OFFLINE

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1448
2026-05-12 12:48:51 -05:00
Dan Williams 56f3ba761a Merge request !1449 from 'RW135'
plugin,rolling: Add udev rules for RW135R modules.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1449
2026-05-12 12:35:26 -05:00
Dan Williams 50759a2e52 Merge request !1440 from 'dco'
ci: Add build_container as a dependency of verify_dco job

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1440
2026-05-12 11:50:20 -05:00
Dan Williams e5ce798783 Merge request !1432 from 'cbm-pad'
mm-cbm-part: Try harder to convert message text

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

Closes #1042
2026-03-24 21:01:05 -05:00
Dan Williams eae9ed5485 Merge request !1435 from 'upstream-TX62-W-C-support'
plugins: cinterion: add new USB interface number for TX62-W-C modem

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1435
2026-03-24 12:59:08 -05:00
Dan Williams 089d0e3353 Merge request !1418 from 'feat/inject-time-position'
shared-qmi: handle inject time and inject position requests from the modem

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1418
2026-01-09 17:20:44 -06:00
Dan Williams 90e71e2817 Merge request !1420 from 'uml290-network-time-broken'
broadband-modem,pantech: network time broken on UML290

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1420
2026-01-09 06:04:21 -06:00
Dan Williams 061a9956d0 broadband-modem,pantech: network time broken on UML290
UML290 with firmware L0290VWBB12F.248 doesn't support QMI network
time and crashes when asked for AT network time too quickly after
being plugged in.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2026-01-09 05:59:17 -06:00
Dan Williams 314b6e7761 Merge request !1422 from 'ci-ubuntu-2204'
ci: bump Ubuntu version in CI image for meson >= 0.56 for libqmi

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1422
2026-01-05 22:39:00 -06:00
Dan Williams 0636260a39 ci: bump Ubuntu version in CI image for meson >= 0.56 for libqmi
Latest libqmi requires meson 0.56 or later, which 22.04 has.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2026-01-05 22:36:47 -06:00
Dan Williams 61e2f69d48 Merge request !1415 from 'release-1.25.95'
release: bump version to 1.25.95

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1415
2025-11-24 23:58:16 -06:00
Dan Williams e12e1f4183 release: bump version to 1.25.95
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-11-24 23:55:56 -06:00
Dan Williams 5ca95a64ab Merge request !1410 from 'dp/initial-qmap-mux-id'
port-qmi: allow setting initial mux-id value when using rmnet multiplexing

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1410
2025-11-24 23:53:56 -06:00
Dan Williams 0f19f10958 Merge request !1417 from 'libqmi-bump-1-37-95'
meson: bump libqmi requirement to 1.37.95

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1417
2025-11-24 23:43:23 -06:00
Dan Williams 3a2a33d3f0 meson: bump libqmi requirement to 1.37.95
Latest libqmi adds QMI_NAS_RADIO_INTERFACE_NO_CHANGE which will
cause failures when building with -Wall if NO_CHANGE isn't handled
in switch() statements. So we add that. But then of course you can't
build with older libqmi because it doesn't have NO_CHANGE.

So just bump the requirement.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-11-24 23:40:27 -06:00
Dan Williams a73b0675b5 Merge request !1413 from 'patch-3'
l10n: Update sl.po

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1413
2025-11-24 23:39:55 -06:00
Dan Williams d2b7453422 Merge request !1416 from 'qmi-QMI_NAS_RADIO_INTERFACE_NO_CHANGE'
modem-helpers-qmi: update for QMI_NAS_RADIO_INTERFACE_NO_CHANGE

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1416
2025-11-24 23:32:37 -06:00
Dan Williams c1112a2ee4 modem-helpers-qmi: update for QMI_NAS_RADIO_INTERFACE_NO_CHANGE
In latest libqmi.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-11-24 23:30:32 -06:00
Dan Williams ff6a1ec9e6 Merge request !1414 from 'fix/typo'
iface-modem-location: Fix typo in error message

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1414
2025-11-24 23:20:50 -06:00
Dan Williams 2a4c7e3a5b Merge request !1409 from 'fix/engine-unlock'
shared-qmi: unlock location engine at modem start

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1409
2025-10-20 15:33:28 -05:00
Dan Williams f2318ecc7b Merge request !1365 from 'fix-generic-virtual'
Fix generic driver not attaching to virtual ports

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1365
2025-10-20 15:18:57 -05:00
Dan Williams a2ed571ccf Merge request !1411 from 'main'
sim-mbim: fix `preload_cancellable` bug that causes a crash

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1411
2025-10-16 07:22:47 -05:00
Dan Williams a8280207fc Merge request !1408 from 'main'
fcc-unlock 105b: Add support for Foxconn SDX55 running in USB mode

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

Closes #984
2025-10-07 08:18:55 -05:00
Dan Williams 7b44ca740c Merge request !1407 from 'mhi-pci-generic-driver'
broadband-modem-mbim: handle mhi-pci-generic as a valid data port driver

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1407
2025-10-07 08:11:56 -05:00
Dan Williams c3ef78cc6c broadband-modem-mbim: handle mhi-pci-generic as a valid data port driver
mhi_wwan_mbim ends up being detected as mhi-pci-generic, so we need to
look for that in addition to cdc_wwan when doing MBIM data port stuff.
Otherwise devices (various Foxconn X55/X72, Cinterion MV3x, Quectel
EM1xx, Telit FN990) that expose the IP_HW0_MBIM MHI channel won't
correctly clean up data ports on startup, and may not correctly
handle bearer multiplexing.

mhi_net is only used for QMI devices with rmnet so it shouldn't
be involved in the MBIM data path at all.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-10-03 16:18:48 -05:00
Dan Williams 72dca00e69 Merge request !1401 from 'dp/fix-mux-bearer-cleanup-assert'
base-manager: fix cleanup of multiplexed bearers

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1401
2025-10-03 12:43:23 -05:00
Dan Williams 8d911cdd1a Merge request !1405 from 'main'
sim-mbim: continue preload retry if previous attempt(s) fails

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1405
2025-10-01 15:32:54 -05:00
Dan Williams c6740c0a7e Merge request !1406 from 'local_br'
plugin,rolling: Add udev rules for RW101R modules.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1406
2025-09-30 09:01:16 -05:00
Dan Williams 01e9b1ab48 Merge request !1404 from 'fix/whitespaces'
shared-qmi: replace tabs with whitespaces

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1404
2025-09-27 09:04:34 -05:00
Dan Williams af622ab19d Merge request !1403 from 'fix/supl-typo'
cli, location: Fix typo in error message

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1403
2025-09-27 09:01:02 -05:00
Dan Williams a1ef6a16c4 Merge request !1400 from 'lr/intel-fibocom-l850-gl'
fibocom: Fix support for Intel-branded Fibocom L850-GL

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1400
2025-09-19 09:50:15 -05:00
Dan Williams 186768a071 Merge request !1402 from 'piotrdrag/pl-update-250913'
Update Polish translation 250913

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1402
2025-09-19 09:20:28 -05:00
Dan Williams 6eaf45c194 Merge request !1399 from 'cesq-space'
modem-helpers: handle no space after "+CESQ:"

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1399
2025-09-11 08:27:15 -05:00
Dan Williams ee75d23f00 modem-helpers: handle no space after "+CESQ:"
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1277
for more details.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-09-11 08:24:42 -05:00
Dan Williams 672a1e29c8 Merge request !1398 from 'l10n-sv'
po: update Swedish translation

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1398
2025-09-05 19:13:35 -05:00
Dan Williams 4821968fb2 Merge request !1396 from 'primary-slot-polkit'
data, polkit: Add policy rule for setting primary sim slot

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1396
2025-09-05 11:34:55 -05:00
Dan Williams 2f6fc0d038 Merge request !1397 from 'piotrdrag/pl-update-250827'
Update Polish translation 250827

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1397
2025-09-05 11:23:36 -05:00
Dan Williams 9405ade83b Merge request !1395 from 'patch-2'
Add Slovenian (sl) to ModemManager

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1395
2025-08-28 09:25:46 -05:00
Dan Williams 9fced3767a Merge request !1389 from 'fix/set-supl-server'
shared-qmi: fix setting URL to supl server

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1389
2025-08-16 16:23:06 -05:00
Dan Williams 1547c4d812 Merge request !1340 from 'qmi-gps-sdm670'
GNSS support for SDM670 devices

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1340
2025-08-16 11:36:25 -05:00
Dan Williams 848c4a95ee Merge request !1393 from 'supl-ip-byte-order-doc'
modem-helpers: document mm_parse_supl_address()

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1393
2025-08-16 11:31:46 -05:00
Dan Williams aca647cf9d modem-helpers: document mm_parse_supl_address()
More specifically, that the returned IP address is in network
byte order.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-08-16 11:22:02 -05:00
Dan Williams c2a5b54f79 Merge request !1390 from 'fix/set-supl-server-ip'
shared-qmi: fix byteorder for supl server IP

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1390
2025-08-16 10:10:57 -05:00
Dan Williams 14031a4b1b Merge request !1391 from 'lang'
cbm-part: Use the correct codes for Czech and Danish

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1391
2025-08-08 21:48:29 -05:00
Dan Williams 5121a9413a Merge request !1382 from 'fix-port-array'
cli: free ignored ports

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1382
2025-08-04 09:51:52 -05:00
Dan Williams d9d1907157 Merge request !1367 from 'mr/20250530-cinterion'
cinterion: add MV32/MV31 udev rules and AT workarounds

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1367
2025-07-30 13:00:03 -05:00
Dan Williams 70ad037146 Merge request !1386 from 'feat/access-to-signal-threshold'
polkit,conf: give access to Signal.SetupThresholds() the same way as for Signal.Setup()

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1386
2025-07-30 12:18:11 -05:00
Dan Williams 41133db361 Merge request !1388 from 'fix/cell-info-docs'
libmm-glib,cell-info: fix documentation for some functions

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1388
2025-07-30 11:29:16 -05:00
Dan Williams ddea6c02d5 Merge request !1387 from 'fix/typos'
cli,signal: fix typo in debug message for async operations

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1387
2025-07-30 11:23:43 -05:00
Dan Williams d69dd96174 Merge request !1378 from 'suspend-bearer-timeout'
base-manager: increase suspend timeout for each active bearer

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1378
2025-07-28 09:20:50 -05:00
Dan Williams 01208cc6c0 base-manager: increase suspend timeout for each active bearer
Some modems can take a very long time (~20s) to reply to bearer
disconnect requests especially in marginal signal situations where
the modem must resend messages to the network after internal
timeouts. Give the modem a chance to suspend successfully if
there are active bearers.

Related: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1311#note_2938638

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-07-21 15:12:01 -05:00
Dan Williams 11489152d8 sleep-context: add ability to increase timeout
Track when the timeout was started, so that if it needs to be increased
we can calculate how long the new timeout should be. Then cancel the
original timeout and start a new one with.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-07-21 15:11:16 -05:00
Dan Williams f7897daeb5 broadband-modem,iface-modem: move bearer counting to interface and generalize
Allow counting more kinds of bearers than just multiplexed ones.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-07-21 15:11:16 -05:00
Dan Williams 6c75cbcf74 Merge request !1377 from 'dp/eutran-106-support'
add support for eutran band 106

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1377
2025-07-11 01:09:42 -05:00
Dan Williams 0ef7bf3fdb Merge request !1350 from 'local_br'
plugin,mtk: remove the relevant log prints of the device model.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1350
2025-07-04 12:18:31 -05:00
Dan Williams 1861ae1411 Merge request !1376 from 'main'
broadband-modem: exit with error if enable() is called in enabling state

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1376
2025-07-01 22:41:59 -05:00
Dan Williams 2529159cee Merge request !1374 from 'cinterion-add-tdd-lte-bands-disabled-flag'
cinterion: add tdd_lte_bands_disabled flag

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

Closes #977
2025-06-25 08:17:22 -05:00
Dan Williams 0b2d7d6388 Merge request !1362 from 'disable-unsolicited-3gpp-events'
Disable unsolicited 3gpp events

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1362
2025-06-16 08:45:50 -05:00
Dan Williams 45d817c50f Merge request !1370 from 'base-manager-shutdown-cleanup'
base-manager: rename manager/device shutdown to manager/device cleanup

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1370
2025-06-16 08:34:33 -05:00
Dan Williams 7029cdba3e base-manager: rename manager/device shutdown to manager/device cleanup
In preparation for a "terse" mode, but also because "shutdown" was
kind of weird since we're not always shutting the modem down; sometimes
we're just putting it in low-power mode.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-06-16 08:30:30 -05:00
Dan Williams 04c5c1c31f Merge request !1373 from 'asan-ci'
Fix some leaks and run daemon asan check in CI

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1373
2025-06-14 16:16:16 -05:00
Dan Williams 38417c6520 Merge request !1280 from 'intel-rpc-xmm7360'
intel: XMM7360: unlocking/enabling RPC timeout fix and location support

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1280
2025-06-14 16:09:43 -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
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
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
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
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
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
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
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
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
Dan Williams c6d1d020f7 Merge request !1360 from 'bind-to-vs-cbm-crash'
base-cbm: Install properties one by one

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1360
2025-05-22 08:16:58 -05:00
Dan Williams 7ae153880c Merge request !1356 from 'sierra-call-urc-fix'
serial-parsers: don't echo-remove strange call start/end URCs

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1356
2025-05-22 08:09:41 -05:00
Dan Williams c3c6fdc55e serial-parsers: don't echo-remove strange call start/end URCs
Some Sierra devices omit the leading <CR> from call start/end URCs
like NO CARRIER and CONNECT, which caused the echo-removal code to
remove from the response buffer because the leading <CR><LF> did
not exist. That can break call control and hangup handling on
those devices.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-22 08:05:58 -05:00
Dan Williams 24f9309d6e serial-parsers,port-serial-at: move echo removal into serial parser
Mainly because we need somewhere to stash the call end regex, and
it's silly to have a 3rd instance of that in MMPortSerialAt when
we already have one in the serial parsers that MMPortSerialAt
relies on pretty heavily.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-22 08:05:58 -05:00
Dan Williams 7f014add61 broadband-modem,modem-helpers: generalize call end regex creation
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-22 08:05:58 -05:00
Dan Williams 41ceaf6d5e Merge request !1359 from 'cpms-spaces'
modem-helpers: handle spaces in +CPMS query response

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

Closes #990
2025-05-22 08:05:28 -05:00
Dan Williams 5888949fa3 modem-helpers: handle spaces in +CPMS query response
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/990

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-20 09:56:49 -05:00