Commit Graph
9431 Commits
Author SHA1 Message Date
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
Guido Günther c04f178dda build: Allow to use libqmi as subproject
This makes it simpler to build ModemManager git

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-22 08:20:19 -05:00
Guido Günther 9cb5a2d090 build: Allow to use libmbim as subproject
This makes it simpler to build ModemManager git

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-22 08:20:19 -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
Guido Günther 382c3e114c base-cbm: Install properties one by one
`g_object_class_install_property` picks up `PROP_BIND_TO` resulting in a
crash on the first CBM received.

Fixes: ec5104c9a ("Move log parent and connection property binding to helper")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-22 08:09:56 -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
Dan Williams 847ce9ada5 Merge request !1358 from 'qmi-cbm-fixes'
broadband-modem-qmi: Cellbroadcast channel reading fixes

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1358
2025-05-20 09:18:30 -05:00
Guido Günther 0ccc3fbeec broadband-modem-qmi/cellbroadcast: Allow for G_MAXUINT16
It's a valid channel value. Since start and end are guint16 we can drop
the check altogether.

Fixes: e25dd7db9 ("broadband-modem-qmi: Add support for loading channels")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-20 13:51:54 +02:00
Guido Günther f17430b662 broadband-modem-qmi/cellbroadcast: Return on failure
Return after setting the error

Fixes: e25dd7db9 ("broadband-modem-qmi: Add support for loading channels")

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-05-20 10:39:15 +02:00
Dan Williams ba8633e48a Merge request !1354 from 'dp/le910q-ecm-upstream'
Add ECM support for Telit LE910Q1

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1354
2025-05-19 09:05:00 -05:00
Daniele Palmas 6a4fdbba42 telit: add ECM bearer for LE910Q1/ELS63-I
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Daniele Palmas e3acdd8743 broadband-modem-telit: use +COPS to get AcT for LE910Q1/ELS63-I
Use +COPS to retrieve AcT for LE910Q1/ELS63-I since they do not
support #PSNT and +SERVICE.

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Daniele Palmas e74a563f87 telit: add port hints for LE910Q1/ELS63-I
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Daniele Palmas 4da9a26d54 modem-helpers: remove unused variable in mm_3gpp_parse_cmer_test_response
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Daniele Palmas b0589932d7 broadband-modem: support +CGEREP values different than 2
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19 08:59:00 -05:00
Dan Williams ec218e7052 Merge request !1346 from 'disconnect-request'
bearer: add new "disconnect-request" logic

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1346
2025-05-16 09:52:04 -05:00
Dominique Martinet 0780526594 base-bearer: set dbus disconnect_request on ignored disconnection
When we get a disconnect event that we wanted to ignore, set the
DisconnectRequest property instead so clients on dbus can act on it.

Also upgrade the logs from dbg to msg (info) as there would be otherwise
no message indicating the disconnect request if it is not acted on.

This was checked with dbus-monitor:
```
$ dbus-monitor  --system "type='signal',sender='org.freedesktop.ModemManager1'"
signal time=1747362238.227804 sender=:1.73798 -> destination=(null destination) serial=741 path=/org/freedesktop/ModemManager1/Bearer/0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.freedesktop.ModemManager1.Bearer"
   array [
      dict entry(
         string "DisconnectRequest"
         variant             boolean true
      )
   ]
   array [
   ]
```

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
2025-05-16 22:06:24 +09:00
Dominique Martinet dea8f27464 api,bearer: new 'DisconnectRequest' property
To report that the bearer has been killed from the modem side and
the connection should be terminated.

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
2025-05-16 22:06:24 +09:00
Dominique Martinet 2d29832f89 dispatcher-connection: add new 'disconnect-request' event
When bearer gets an event that should trigger a disconnection but we
cannot disconnect (for example because we're waiting for pppd to close),
we now trigger a new 'disconnect-request' event instead

This was tested with the following hook:
```
$ cat /etc/ModemManager/connection.d/handle-disconnect-request.sh
#!/bin/sh

if [ "$4" != disconnect-request ]; then
	exit 0
fi

iface=$(mmcli -b "$2" -K | awk '/bearer.status.interface/ { print $3 }')

if pkill -f "pppd\>.*\<$iface\>"; then
	logger -t mm-disconnect-request "Killed $iface pppd"
else
	logger -t mm-disconnect-request "No pppd found for $iface"
fi
```

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
2025-05-16 22:06:10 +09:00
Dominique Martinet f3aaa113e0 dispatcher-connection: replace 'connected' boolean with a new enum
The next commit will introduce a new dispatcher event.
This commit should not change anything user-facing

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
2025-05-16 15:34:02 +09:00
Dan Williams a4421095f8 Merge request !1353 from 'fix-creg-regex'
modem-helpers: support multi-digit "stat" values in CREG response

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

Closes #987
2025-05-14 15:43:04 -05:00
Kirill Buksha 02131bf3bb modem-helpers: fix method for distinguishing lac and stat values
Stat value may be multidigit e.g. 10 or 11.

Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
2025-05-14 13:54:47 +02:00
Kirill Buksha e5c4cbc79a tests,modem-helpers: add cases for multidigit "stat" value in CREG response
Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
2025-05-14 13:21:01 +02:00
Kirill Buksha 51b14b8ef8 modem-helpers: support multi-digit "stat" values in CREG response
The 'stat' field in CREG responce may contain multi-digit numbers, such as "10"
meaning "registered for "CSFB not preferred", roaming". Furtermore, some modems
use value "11" to indicate that only emergency services are available.

Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
2025-05-14 12:45:45 +02:00
Dan Williams bee6bce2fa Merge request !1352 from 'base-sim-auth-fix'
base-sim: Setup auth provider and its cancellable

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1352
2025-05-11 16:21:30 -05:00
Maciej S. Szmigiero 2c66b5ee16 base-sim: Setup auth provider and its cancellable
Otherwise we'll get a NULL pointer dereference segfault in mm_auth when
sending SIM PIN.

Looks like MMBaseSim was accidentally missed during the conversion done
by the commit in the Fixes tag below.

Fixes: ef5cee3ab5 ("auth-provider: move auth provider logic into each class")
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-05-11 16:16:45 -05:00
Dan Williams c99c300ad5 Merge request !1235 from 'intel-rpc-xmm7360'
intel: implement support for RPC-powered xmm7360

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1235
2025-05-09 21:34:26 -05:00
Thomas Vogt 4cae040645 intel: implement support for RPC-powered xmm7360
Signed-off-by: Thomas Vogt <acc-github@tovotu.de>
2025-05-09 07:31:31 +02:00
Dan Williams d165d61a95 Merge request !1266 from 'v6-cgcontrdp'
modem-helpers: add IPv6 support to +CGCONTRDP parsing

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1266
2025-05-08 20:45:37 -05:00
Dan Williams d4c0bbc839 modem-helpers: add IPv6 support to +CGCONTRDP parsing
Add some test responses from the Quectel EG915Q and some other Quectel devices.
Then try to parse those responses.

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