Commit Graph
9231 Commits
Author SHA1 Message Date
Dan Williams dc3a7f0d3b broadband-modem: detect old Mediatek 62xx chipsets as GSM-capable
They don't necessarily reply to +WS46 but like old Motorola ESX
devices they reply to +CGMM with a known string.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
(cherry picked from commit 8cf25a97a1)
2025-05-08 16:07:58 -05:00
Dan Williams 9f0db52ed0 iface-modem-voice: recheck call state polling when call is started
When an outgoing call is created and added to the call list its state
is UNKNOWN. The call list emits the ADDED signal which MMIfaceModemVoice
listens for to check whether to begin polling call state.

But since UNKNOWN is not an in-progress call state polling isn't started.
And nothing was rechecking whether to start polling when the call state
changed to something other than UNKNOWN.

Do that so that we can track call progress as it dials out and is
answered.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
(cherry picked from commit 92e666e1c9)
2025-05-08 16:07:39 -05:00
Dan Williams 240a9145ad modem-helpers-cinterion: allow spaces in ^SXRAT test response
^SXRAT: (0-6), (0,2,3), (0,2,3)

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
(cherry picked from commit 6b6997362b)
2025-05-08 16:07:33 -05:00
Dan Williams 018e440848 shared-fibocom: don't assume parent implements the firmware interface
MMBroadbandModemMbimMtkFibocom doesn't, so don't assert it.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
(cherry picked from commit 046b79a676)
2025-05-08 16:07:22 -05:00
Dan Williams 0c7d573969 modem-helpers: fix checking of CDMA/EVDO access technology
Missing ! for strncmp() meant the test was backwards and would
erroneously report 1xRTT and EVDOr0 when those access technologies
were not in use.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
(cherry picked from commit 9e205f4784)
2025-05-08 16:07:11 -05:00
Jan Alexander Steffens (heftig) 1ec2b86239 docs: Fix gtk-doc build
Fix a duplicate `id` and the inclusions of gdbus docs.

Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
(cherry picked from commit 078a92cd5c)
2025-05-08 16:07:02 -05:00
Dan Williams 4fa4084600 Merge request !1347 from 'sleep-wait-1.24'
[1.24] Wait until device operations complete before dropping suspend inhibitor

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1347
2025-05-08 16:04:02 -05:00
Dan Williams dae00a9f2f broadband-modem: close serial ports in dispose
We want ports to be closed as early as possible; so make sure they
are closed in dispose() which is run explicitly by MMDevice when
cleaning up and removing the modem. Otherwise they could stay
open longer than we want, causing problems for suspend/resume.

This caused problems with suspend because cancelling the
MMBaseModem's cancellable triggered an idle handler that held
a reference to the modem, preventing finalize() from running
until after the suspend code was finished, thus preventing
ports from being closed and cleaned up. Closing them in
dispose() handles this.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams 3157a90c5b broadband-modem: remove invalid idle handler during dispose
base_modem_invalid_idle() needs to keep a reference to the
MMBaseModem until its done. But if the modem is cancelled during
removal right before we're trying to forget about it, keeping
that reference can prevent everything getting cleaned up by
MMBaseModem's dispose() until after the mainloop has run again
and all our removal operations are supposedly complete.

MMDevice uses an explicit dispose() trigger that mitigates
most of this (and requires it for other reasons, like breaking
reference cycles between the modem and it's various child
classes) but it's somewhat error-prone to keep the modem
around if we don't really need to.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams 34148f8e8b broadband-modem-qmi,mbim: remove redundant port closes
This will just be done immediately after by MMBaseModem's
dispose() handler.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams c146dd6094 base-manager: convert shutdown to steps
Make the call flow clearer.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams d80f98da01 base-manager,device: consolidate modem cancelling into mm_device_remove_modem()
Every use of mm_device_remove_modem() was already trying to cancel the
modem's canellable, so let's just put it there and simplify the callers.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams b97f864acd base-manager,sleep-monitor: wait for modem operations before sleeping
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams 5e29ece5ec base-modem: clarify port cleanup/close behavior for serial ports
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams e12b3adb35 base-modem: allow port teardown operation to use callbacks if needed
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams 649350dfff port-serial: don't log force-closes if not really being forced close
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 15:44:36 -05:00
Dan Williams 18521b6882 Merge request !1332 from 'bump-1-24-1'
build: unstable release version bump to 1.24.1

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1332
2025-04-10 01:57:37 +00:00
Dan Williams 7fc6788737 build: unstable release version bump to 1.24.1
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-09 20:43:22 -05:00
Dan Williams dfa41adf39 Merge request !1330 from 'release-1-24-0'
release: bump version to 1.24.0

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1330
2025-04-10 01:30:25 +00:00
Dan Williams 5fadfdbd1e release: bump version to 1.24.0
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-09 18:33:14 -05:00
Dan Williams b64e60dc03 Merge request !1329 from '1-24-qmi-mbim-bump'
build: bump libmbim requirement to >= 1.32 and libqmi to >= 1.36

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1329
2025-04-09 14:19:40 +00:00
Dan Williams b3b986c79e build: bump libmbim requirement to >= 1.32 and libqmi to >= 1.36
ModemManager uses some of the new symbols in libqmi.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-09 08:31:24 -05:00
Dan Williams c575f5d518 Merge request !1322 from 'qmi-no-supported-modes'
modem-helpers-qmi: better handle no supported modes

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1322
2025-04-09 13:26:59 +00:00
Dan Williams f5ae14d0b2 modem-helpers-qmi: better handle no supported modes
Dell Snapdragon X62 before FCC Unlock reports no radio interfaces
from QMI and no device capabilities from MBIM. Instead of asserting
in mm_filter_supported_modes() when called from
mm_supported_modes_from_qmi_supported_modes_context() gracefully
handle the lack of supported modes.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-09 13:19:50 +00:00
Dan Williams 467a53f189 Merge request !1326 from 'fix-dco-again'
ci: fix DCO check yet again

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1326
2025-04-09 01:58:17 +00:00
Dan Williams be3c28f1a4 ci: fix DCO check yet again
The script was combining all commit messages into one due to the quoting
of "${COMMIT}", rather than leaving unquoted and picking each individual
commit from the space separated string.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-08 20:52:56 -05:00
Dan Williams bd9b98e2f1 Merge request !1327 from 'nas-service-domain-deprecated'
modem-helpers-qmi: fix deprecated usage of QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1327
2025-04-09 01:51:39 +00:00
Dan Williams 2246e9c0a0 modem-helpers-qmi: fix deprecated usage of QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-08 20:48:18 -05:00
Dan Williams 3a2a7897d1 Merge request !1323 from 'mbim-data-class-unknown'
broadband-modem-mbim: consistently handle custom data classes

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1323
2025-04-03 20:58:04 +00:00
Dan Williams 1eb177dd0e cli: report 5GNR RSSI in extended signal info
MBIM modems report RSSI and sometimes don't report more detailed RSRP
and SNR info their MBIMex v2 signal-state replies. RSSI gets reported
for every other access technology, and while it's not as good a signal
indicator as the others, we might as well show something.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-03 15:33:45 -05:00
Dan Williams ceb1cd9a99 tests: add tests for mm_signal_from_mbim_signal_state()
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-03 15:33:45 -05:00
Dan Williams a420972e9b broadband-modem-mbim: consolidate determination of data class
Do it in a function instead of the same thing in a bunch of places.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-01 10:25:43 -05:00
Dan Williams 19c817cfe9 broadband-modem-mbim: consistently handle custom data classes
Consistently interpret the modem's reported custom data class when
loading current mode, supported mode, supported capabilities,
setting current mode, and current access technology.

Normalize the data class to include any custom data class immediately
after reading it from any MBIM message. De-normalize it when sending
back to the modem when setting current modes so the modem receives
MBIM_DATA_CLASS_CUSTOM for the custom mode.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-01 10:25:43 -05:00
Dan Williams 45313ebef8 Merge request !1321 from 'cbm/channels-mmcli'
CellBroadcast: Add libmm-glib and mmcli support for setting channels

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

Closes #934
2025-03-29 22:22:13 +00:00
Guido Günther 51dd726018 man: Add cell broadcast options
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29 22:19:17 +00:00
Guido Günther 32e5693e75 mmcli/cell-broadcast: Allow to set channel list
Allows to set the channel list like:

   mmcli -m any  --cell-broadcast-set-channels=0-9999,4353

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29 22:19:17 +00:00
Guido Günther 2364a02d72 mmcli/cell-broadcast: Add status output
This allows to get the current channel list:

$ mmcli -m any  --cell-broadcast-status
  --------------------------
  Cell Broadcast | channels: 0-9999,4353
2025-03-29 22:19:17 +00:00
Guido Günther 577639659c libmm-glib,cell-broadcast: Add setters for channel list
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29 22:19:17 +00:00
Guido Günther d6367c76c0 libmm-glib,cell-broadcast: Support channels property
Support reading channels in the API too

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29 22:19:17 +00:00
Guido Günther 4414344d82 libmm-glib,helpers: Add helpers to parse CB channels in and out of strings
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29 22:19:17 +00:00
Guido Günther d00ff2d0a1 libmm-glib,test: Remove trailing whitespace
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-29 22:19:17 +00:00
Dan Williams ab8c9b3418 Merge request !1313 from 'fcc-unlock-14c3-sh'
fcc-unlock: Transition the 14c3 FCC unlock script to use sh

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1313
2025-03-29 22:18:46 +00:00
Jongmin Kim 54bbad9fcc fcc-unlock: Disable execute bit from 14c3
Signed-off-by: Jongmin Kim <jmkim@debian.org>
2025-03-29 22:25:31 +09:00
Jongmin Kim 2836eab097 fcc-unlock: Transition the 14c3 FCC unlock script to use sh
This enables the usage with busybox and strict environments.

This is related to #483 and the previous commit 91ed72aa, 02baf283.

Signed-off-by: Jongmin Kim <jmkim@debian.org>
2025-03-29 22:24:48 +09:00
Dan Williams f9e63c7940 Merge request !1294 from 'cbm/channels'
cellbroadcast: Allow to set channel list

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

Closes #934
2025-03-28 20:59:20 +00:00
Guido Günther b83df955fa modem: Load current channels on startup
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-28 20:53:52 +00:00
Guido Günther 2878833f5c modem: Allow to set current channel list
This adds support for setting the channels to override the boot up modem
defaults:

```
  busctl --system call org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modem/0 org.freedesktop.ModemManager1.Modem.CellBroadcast SetChannels 'a(uu)' 1 0 9999
  busctl --system get-property org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modem/0 org.freedesktop.ModemManager1.Modem.CellBroadcast Channels
  a(uu) 1 0 9999
```

Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/934

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-28 20:53:52 +00:00
Guido Günther d8135be6e2 modem-helpers: Add helpers to parse channel lists
`CSCB` has the form

```
CSCB: [0|1],"<channel-list>","<data-coding-scheme>"
```

If the first parameter is `0` this specifies the accepted types if `1`
it specifies rejected.

So far seen in the wild were CSCB strings with accepted types only and a
coding scheme of "" so this is what we handle for the moment.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-28 20:53:52 +00:00
Guido Günther 0c20d13b30 libmm-glib,helpers: Add helpers for CellBroadcast channel lists
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-28 20:53:52 +00:00
Dan Williams 61656dcb3d Merge request !1301 from 'mode-detect-4g-5g'
broadband-modem: detect modem modes with +CEREG and +C5GREG

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

Closes #786
2025-03-27 23:54:34 +00:00