Commit Graph
100 Commits
Author SHA1 Message Date
Dan Williams efcc960b13 Merge request !1344 from 'cbm-remove-modem'
Begin removing usage of MMBaseModem from leaf classes

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1344
2025-05-08 20:10:48 -05:00
Dan Williams 1fa21fcc48 base-cbm,cbm-list,iface-cbm: remove usage of MMBaseModem
CBM isn't as complicated as SMS, and the CBM class itself doesn't
need to be overridden by QMI/MBIM/etc. Now that the log parent
and connection binding no longer require MMBaseModem we can flatten
the CBM object creation and remove usage of MMBaseModem.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:08:06 -05:00
Dan Williams ec5104c9a8 Move log parent and connection property binding to helper
Continues removing usage of MMBaseModem in a bunch of files
by splitting out bits of its usage to separate interfaces.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:08:06 -05:00
Dan Williams ef5cee3ab5 auth-provider: move auth provider logic into each class
Rather than make all of them rely on MMBaseModem for it. This
lets us disentangle dependencies for easier unit testing.

For interfaces, rather than casting directly to MMBaseModem
use intermediate interfaces (MMIfaceAuth and MMIfaceOpLock)
that tests can fake out.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:08:06 -05:00
Dan Williams 7262b46a82 base-modem,auth-provider: move testcase auth bypass to auth provider
The bypass when in testcase mode has nothing to do with the base modem
class; so make it generic.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:08:06 -05:00
Dan Williams 02942a04f9 Merge request !1314 from 'quectel-power-down'
quectel: wait for POWERED DOWN URC and decrease other power operation timeouts

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1314
2025-05-08 20:06:24 -05:00
Dan Williams 0bfb11c62c quectel: decrease low-power/power-on/reset wait times to 15 seconds
AT docs for many (most?) device state a max timeout of 15 seconds.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 19:54:54 -05:00
Dan Williams e05af7442c quectel: ensure power down operation waits for POWERED DOWN URC
AT docs for many (most?) Quectel devices state that QPOWD=1 receives
the OK response very quickly but the caller must wait for the
POWERED DOWN URC to avoid data loss. Do that.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 19:54:54 -05:00
Dan Williams bf416a7462 Merge request !1310 from 'disabled-profiles'
bearer: don't choose or activate disabled profiles

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1310
2025-05-08 19:54:43 -05:00
Dan Williams 4d2d01b2c6 broadband-bearer,modem-helpers: don't use or match disabled profiles
When matching profiles ignore disabled ones. When activating a
specific profile index, return an error if that profile is marked
as disabled.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 18:14:24 -05:00
Dan Williams 4b0d3b7147 broadband-modem-qmi: use correct profile index in error message
Instead of using the loop index, use the actual profile index
because they aren't always the same.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 18:14:24 -05:00
Dan Williams 352b8ed53d broadband-modem-qmi: implement disabled 3GPP profiles
Previously, a disabled profile would cause Profile Manager interface
enabling to fail because get_profile_settings_ready() returned an
error for disabled profiles.

But 3GPP profile objects already have support for the enable/disabled
setting, so just hook that up and stop returning an error for disabled
ones.

This allows successful initialization of the 3GPP Profile Manager
on devices that contain disabled profiles.

While we're at it, allow creating disabled profiles, and changing
profiles back and forth from enabled<->disabled.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 18:14:24 -05:00
Dan Williams 27384681a7 Merge request !1311 from 'sleep-wait'
Wait until  device operations complete before dropping suspend inhibitor

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

Closes #966
2025-05-08 15:43:50 -05:00
Dan Williams b13bdacf38 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:41:10 -05:00
Dan Williams 0f97d90490 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:40:25 -05:00
Dan Williams 0cb1c1f157 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-07 22:59:51 -05:00
Dan Williams 564bdab99e base-manager: convert shutdown to steps
Make the call flow clearer.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07 22:59:51 -05:00
Dan Williams e0c0c68688 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-07 22:59:51 -05:00
Dan Williams f4cbca56d5 base-manager,sleep-monitor: wait for modem operations before sleeping
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07 22:59:51 -05:00
Dan Williams 6350b0a85f base-modem: clarify port cleanup/close behavior for serial ports
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07 22:59:25 -05:00
Dan Williams 6b25476dbb base-modem: allow port teardown operation to use callbacks if needed
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07 22:54:13 -05:00
Dan Williams c6d1a26a93 port-serial: don't log force-closes if not really being forced close
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07 22:54:13 -05:00
Dan Williams 6f942f5774 Merge request !1324 from 'nbiot-act'
modem-helpers: report C*REG=2 AcT 9 as NB-IOT access technology

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1324
2025-05-07 10:59:15 -05:00
Dan Williams 2e27b02004 modem-helpers: report C*REG=2 AcT 9 as NB-IOT access technology
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07 09:47:47 -05:00
Dan Williams 0ed5ce1ac3 Merge request !1345 from 'reload-reg-after-manual'
broadband-modem: reload registration info after manual registration

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

Closes #971
2025-05-01 15:37:10 -05:00
Dan Williams febab17f07 broadband-modem: reload registration info after manual registration
This refreshes operator information after manual registration. QMI and
MBIM implementations return operator info along with registration info
so they handle this easily, while with AT-based devices we must run
additional commands to retrieve that after the manual registration has
finished.

Suggested by: Kirill Buksha <kirill.buksha@axians.rs>
Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/971

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-01 15:15:29 -05:00
Dan Williams 8ef4ce4d61 Merge request !1343 from 'l10n-sv'
po: Update Swedish translation

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1343
2025-05-01 15:14:55 -05:00
Dan Williams cd898f4a4d Merge request !1250 from 'probe-allowed-qcdm'
api,modem: new 'IgnoredPorts' property

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1250
2025-04-25 07:39:07 -05:00
Dan Williams 39123f964b Merge request !1342 from 'mtk62xx-detect'
broadband-modem: detect old Mediatek 62xx chipsets as GSM-capable

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

Closes #980
2025-04-24 15:09:05 -05:00
Dan Williams 8cf25a97a1 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>
2025-04-23 10:11:22 -05:00
Dan Williams 02898fed11 Merge request !1335 from 'call-polling'
iface-modem-voice: recheck call state polling when call is started

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1335
2025-04-21 16:21:28 +00:00
Dan Williams 92e666e1c9 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>
2025-04-21 16:17:25 +00:00
Dan Williams 19b798fa99 Merge request !1338 from 'cinterion-sxrat-assert'
modem-helpers-cinterion: allow spaces in ^SXRAT test response

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

Closes #974
2025-04-16 13:43:32 +00:00
Dan Williams 6b6997362b 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>
2025-04-13 19:58:30 -05:00
Dan Williams 8fc3f44e76 Merge request !1304 from 'qmi-time-interface'
broadband-modem-qmi: implement Time interface

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1304
2025-04-14 00:48:19 +00:00
Dan Williams 361e9c58c0 broadband-modem-qmi: implement Time interface
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-13 19:26:30 -05:00
Dan Williams 95496539e9 Merge request !1337 from 'fibocom-handle-no-fw-parent'
shared-fibocom: don't assume parent implements the firmware interface

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

Closes #975
2025-04-13 13:50:41 +00:00
Dan Williams 046b79a676 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>
2025-04-13 13:47:57 +00:00
Dan Williams e3d7439551 Merge request !1325 from 'cbm/qmi'
broadband-modem-qmi: Add Cell Broadcast support

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

Closes #935
2025-04-13 05:05:44 +00:00
Dan Williams b9e9a71dc3 Merge request !1334 from 'modem-helpers-act-fix'
modem-helpers: fix checking of CDMA/EVDO access technology

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1334
2025-04-13 04:41:51 +00:00
Dan Williams 9e205f4784 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>
2025-04-12 23:37:00 -05:00
Dan Williams 66c3631a2f Merge request !1333 from 'fix-gtk-doc'
Fix gtk-doc build

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1333
2025-04-11 23:13:36 +00:00
Dan Williams 67a9e58f30 Merge request !1331 from 'bump-1-25-0'
build: unstable release version bump to 1.25.0

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1331
2025-04-10 01:57:38 +00:00
Dan Williams 8174be2aec build: unstable release version bump to 1.25.0
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-09 20:42:06 -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
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
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
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
Dan Williams bad4765581 broadband-modem: detect modem modes with +CEREG and +C5GREG
Some AT-based modems like the Quectel Unisoc-based RM500U don't
support the older AT commands we used to detect modes like
AT*CNTI=2 and AT+WS46. Add support for detecting 4G and 5G
with generic commands too.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-27 23:51:17 +00:00
Dan Williams 8d2a91c920 Merge request !1240 from 'port-delay'
port-probe: allow per-port ID_MM_TTY_AT_PROBE_TRIES tag for custom number of AT probes

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1240
2025-03-27 23:44:23 +00:00
Dan Williams cc93b11db7 telit: use generic early AT port probe logic
Use the new early port probe logic to do AT probes before the custom
init hook actually starts.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-27 18:40:38 -05:00
Dan Williams 7d75a897a8 port-probe: allow per-port ID_MM_TTY_AT_PROBE_TRIES tag for custom number of AT probes
For modems that need more time to respond to AT port probes (like some Telit devices,
and Cinterion-based Telit MV31/MV32) allow a custom number of AT probe tries on a
per-port basis for generic probing, or plugins that opt into this functionality.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-27 18:40:38 -05:00
Dan Williams b04ca79392 Merge request !1318 from 'pin-unlock-swap-fix'
broadband-modem,iface-modem: don't treat SIM unlocks as hot-swaps

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1318
2025-03-25 13:31:58 +00:00
Dan Williams 57d1f21b36 broadband-modem,iface-modem: don't treat SIM unlocks as hot-swaps
If the old IMSI was unavailable because the SIM was locked, but now
is available because the SIM was unlocked, don't treat the SIM
properties change as a hotswap that may trigger dropping and re-probing
the modem.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-23 09:04:42 -05:00
Dan Williams 3b4bb45442 Merge request !1317 from 'clarify-licensing'
api: fix license headers in MM API

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1317
2025-03-13 20:53:18 +00:00
Dan Williams e95336d106 Merge request !1316 from 'typos'
treewide: Fix typos

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1316
2025-03-12 00:52:49 +00:00
Dan Williams a19fd85884 Merge request !1315 from 'release-1-23-95'
release: bump version to 1.23.95

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1315
2025-03-11 03:46:10 +00:00
Dan Williams c6dcab6161 release: bump version to 1.23.95
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-10 22:42:42 -05:00
Dan Williams 4c1be4923a NEWS: update for 1.24
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-10 22:42:42 -05:00
Dan Williams 53383757c8 Merge request !1305 from 'port-open-at-probes'
port-probe: ensure port is open for all plugin AT probes

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1305
2025-03-09 14:47:19 +00:00
Dan Williams 89466b583b port-probe: ensure port is open for all plugin AT probes
If multiple plugins are selected for probing a modem with AT probes,
earlier plugins may only request some probes but not all.  When
those probes complete successfully, subsequent plugins won't re-do
the probes that were already completed, but jump to ones that
haven't yet been done.

For example, plugin A may request only AT probes but plugin B
may request AT, AT_PRODUCT, and AT_VENDOR. Plugin B will start
with AT_PRODUCT probes because plugin A already completed the AT
probe.

The code in probe_step() only opened the serial port for the
AT probe, I guess assuming that all AT-type probes would be
done in sequence. But in the above scenario they are not.

Instead, make sure the port is opened for all AT style probes
that have not yet been executed.

Fixes: 7937a89a37 port-probe: rework and consolidate port probe flow for AT/QCDM/QMI/MBIM

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-09 14:44:23 +00:00
Dan Williams e6a7be2e4c Merge request !1312 from 'fcc-unlock-grep-qi'
fcc-unlock: Case-insensitive grep for for 105b (MBIM) and 14c3 (AT)

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1312
2025-03-09 02:57:05 +00:00
Dan Williams 0ce457ba71 Merge request !1308 from 'fcc-unlock-quectel'
fcc-unlock: combine Quectel FCC unlock scripts and add support for RM520N

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1308
2025-03-08 16:10:22 +00:00
Dan Williams 9ab4b7de58 Merge request !1307 from 'scan-cli-timeouts'
broadband-modem,cli: slightly bump 3GPP scan timeout; add some cli dbus timeout slack

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1307
2025-03-06 15:11:00 +00:00
Dan Williams f014f3843e broadband-modem,cli: slightly bump 3GPP scan timeout; add some cli dbus timeout slack
Add some mmcli D-Bus timeout slack, making them slightly higher than the
ModemManager internal timeout, to ensure the cli doesn't time out the
D-Bus call when MM succeeds.

For 3GPP scan, some modems appear to have internal 5 minute timeouts,
so ensure MM doesn't time out right before the modem returns results:

ModemManager[282578]: <dbg> [1741054422.321400] [ttyUSB2/at] --> 'AT+COPS=?<CR>'
ModemManager[282578]: <wrn> [1741054722.247806] [modem1] failed scanning networks: Serial command timed out
ModemManager[282578]: <dbg> [1741054724.119770] [ttyUSB2/at] <-- '<CR><LF>+COPS: (1,"T-Mobile","T-Mobile","310260",0),,(0,1,2,3,4),(0,1,2)<CR><LF><CR><LF>OK<CR><LF>'

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-06 04:52:50 +00:00
Dan Williams c393a917c1 Merge request !1309 from 'codespell'
Fix some typos on the source code

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1309
2025-03-05 17:00:59 +00:00
Dan Williams ead9951ea6 Merge request !1279 from 'my-branch'
cli: Added bearer path print after successful modem connect

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1279
2025-03-05 16:52:47 +00:00
Dan Williams a9122abec6 Merge request !1306 from 'dco4'
ci: ensure DCO check exits with correct error code on failure

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1306
2025-03-03 17:19:28 +00:00
Dan Williams ad841cc92b ci: ensure DCO check exits with correct error code on failure
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-03 11:15:54 -06:00
Dan Williams c6fb16a0f5 Merge request !1302 from 'qmi-uemode'
broadband-modem-qmi: implement UE mode get/set

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1302
2025-03-03 17:10:01 +00:00
Dan Williams 0bf02c88cb ci: fix job image ordering
With the FDO CI templates, the first container used must
be .fdo.container-build@ubuntu which builds the actual
container the rest of the pipeline can use with
.fdo.distribution-image@ubuntu.

.fdo.container-build@ubuntu uses a static 'image:' tag for
its job base image and then pushes to the project registry.
If the first job incorrectly uses .fdo.distribution-image@ubuntu
instead, it appears to fail for MR branches because that target
uses CI_REGISTRY_USER as part of the 'image:' tag which gitlab
sets to the username of the submitter. Which of course fails
because that user has never built the image before...

Using Docker executor with image registry.freedesktop.org/<username>/modemmanager/ubuntu/20.04:2023-01-03.1 ...
Authenticating with credentials from job payload (GitLab Registry)
Pulling docker image registry.freedesktop.org/<username>/modemmanager/ubuntu/20.04:2023-01-03.1 ...

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-27 08:06:10 -06:00
Dan Williams 2a65ca978d ci: de-verbosify DCO check
Only print out the specific commits that fail DCO.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-27 08:06:01 -06:00
Dan Williams 654c59edc0 cli: fix Cell Broadcast Message short-path conflict with Call
They both used 'o', but Call had it first. Change CBM to 'c'.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-25 18:29:49 +00:00
Dan Williams 41b1923d71 ci: only run DCO check on merge requests
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-25 10:56:36 -06:00
Dan Williams ca6a68a280 ci: add DCO check action
Check each commit in an MR for Signed-off-by: Name <email>

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-25 10:19:21 -06:00
Dan Williams 0a94b0138d netlink: add RTM_GETLINK support to read MAC address
Since we're also now reading responses we need to check sender
credentials to make sure we're talking to the kernel, and not
some other process spoofing netlink.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-18 21:06:19 +00:00
Dan Williams c320e50753 examples: add sms-watch-python
Add an example that watches for and prints all SMS messages of
all modems.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-02-17 21:57:33 +00:00
Dan Williams b178d46265 cli: set higher 3GPP Scan(), Register(), and Connect() method timeouts
Similar to voice call mmcli timeouts, set larger proxy-wide timeouts for
long-running operations. Match these timeouts with the internal ModemManager
timeouts for the AT/MBIM/QMI operation timeouts.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-01-11 20:53:15 -06:00
Dan Williams 60de5751b4 port-probe: add some QCDM/DIAG response bytes to non-AT responses
Seen on a Qualcomm-based Quectel EG915Q on the diag port:

ModemManager[34547]: <dbg> [1732077670.330527] [ttyUSB0/at] <-- ' \0\0\0\8\0\0\0\2\0\0\0\0`%\160$"\6\169\128\200\1\30\197\142\0G\184\225\128\0\1+\127\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254\255\255\255\255\255\255\255\254'

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-12-27 23:42:09 -06:00
Dan Williams 72e8ac2e80 port-serial: clean up whitespace formatting
Remove stray tabs.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-12-23 01:06:53 -06:00
Dan Williams ed13e053cd port-probe: fix custom init probing not having open AT port
Referenced commit broke custom init flows because the AT port
was not opened when custom inits were run, which was the case
before the commit landed.

Rework probing flow to follow a step model like much of our
other code, and ensure that the AT port is opened as part
of the custom init flow.

Fixes: 7937a89a37 port-probe: rework and consolidate port probe flow for AT/QCDM/QMI/MBIM

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-11-20 11:50:43 +00:00
Dan Williams 64646b98cd plugins/quectel: support modem power operations for AT-based devices
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-09-24 23:52:13 -05:00
Dan Williams f19f20c008 helpers: consolidate some uses of mm_kernel_device_get_subsystem()
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-09-17 12:20:46 -05:00
Dan Williams 0b5f2adb4b port-probe: restart AT probing if "NO CARRIER" is received during QCDM probing
If the system and modem are independently powered, a system restart may
leave one of the modem's AT ports in PPP mode. On restart this may cause
AT probing to fail. The modem may terminate PPP after receiving bogus
HDLC frames from QCDM probing (since PPP also uses HDLC framing), and
return "NO CARRIER". We can use this to restart AT probing now that
PPP is down and auto-detect the expected additional AT ports.

Feb 08 20:22:53 ModemManager[385]: <debug> [1675887773.887574] [ttyUSB2/at] <-- '\8\158\239~'
Feb 08 20:22:54 ModemManager[385]: <debug> [1675887774.215054] [ttyUSB2/at] <-- '\8\214\137~'
Feb 08 20:22:54 ModemManager[385]: <debug> [1675887774.851349] [ttyUSB2/at] <-- '\8\250\177~'
Feb 08 20:22:55 ModemManager[385]: <debug> [1675887775.576776] [ttyUSB2/at] <-- '\8\168u~'
Feb 08 20:22:55 ModemManager[385]: <debug> [1675887775.612694] [ttyUSB2/at] <-- '\8w\25~'
Feb 08 20:22:55 ModemManager[385]: <debug> [1675887775.862886] [ttyUSB2/at] <-- '\8!&~'
Feb 08 20:22:56 ModemManager[385]: <debug> [1675887776.614747] [ttyUSB2/at] <-- '\8%\254~'
Feb 08 20:22:56 ModemManager[385]: <debug> [1675887776.686207] [ttyUSB2/probe] port is not AT-capable
Feb 08 20:22:56 ModemManager[385]: <debug> [1675887776.686447] [ttyUSB2/probe] probing QCDM...
Feb 08 20:22:56 ModemManager[385]: <debug> [1675887776.725483] [ttyUSB2/qcdm] --> 7e 00 78 f0 7e
Feb 08 20:22:56 ModemManager[385]: <debug> [1675887776.880941] [ttyUSB2/qcdm] <-- 0d 0a 4e 4f 20 43 41 52 52 49 45 52 0d 0a

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-09-17 11:26:06 -05:00
Dan Williams 7937a89a37 port-probe: rework and consolidate port probe flow for AT/QCDM/QMI/MBIM
Open the AT port from the regular port probe flow rather than doing
that one-off at the beginning of probing. That lets us re-open the AT
port later if needed, based on QCDM/QMI/MBIM probing results.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2024-09-17 11:23:01 -05:00