Commit Graph
9315 Commits
Author SHA1 Message Date
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
Dan Williams 4bb6026e37 Merge request !1341 from 'mbim-multipart-fix'
sms: always use SMS_PART_INVALID_INDEX unstored parts

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

Closes #979
2025-05-08 20:36:44 -05:00
Dan Williams 1d5cc0addb broadband-modem-qmi,broadband-modem-mbim: always use SMS_PART_INVALID_INDEX unstored parts
MMSmsList has logic to allow multiple unstored messages as long as
they use SMS_PART_INVALID_INDEX. These messages aren't stored so
they don't have an index.

But the MBIM and QMI modems used index 0 for unstored messages,
meaning there could only ever be one and also that multipart
messages would fail to be combined.

Let's fix that by just using SMS_PART_INVALID_INDEX for every
scenario where an unstored message comes in.

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

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:25:22 -05:00
Dan Williams 51ff44f1f5 sms-list: remove usage of MMBaseModem
Not used for anything anymore so we can remove the property.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:38 -05:00
Dan Williams 03027b5ec2 base-sms: remove MODEM property
No longer depend on MMBaseModem since everything that specifically
uses it is now removed.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:38 -05:00
Dan Williams 97c189910b base-sms,sms-list: use signals to set multipart reference
Instead of going through the messaging interface, which just asks
the MMSmsList anyway, just go straight to the list.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:38 -05:00
Dan Williams c6af442053 base-sms: reduce possibility of leaking multipart reference
Move error paths after getting a multipart reference to before getting
one, to reduce the possiblity that we get a reference from the MMSmsList
that ultimately doesn't end up getting used.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:38 -05:00
Dan Williams 1781ffaad4 base-sms: pass supported storages in at creation time
They won't change, and this lets us get rid of one more usage of
MMIfaceModemMessaging.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams 9c8ec57c24 base-sms: pass SMS default storage at creation time and update as needed
Instead of getting it from the MMIfaceModemMessaging when the
SMS is stored. This flattens dependencies between MMBaseSms and
MMIfaceModemMessaging.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams b81f23e24a base-sms,sms-list,iface-messaging: move MMBaseSms creation to MMBroadbandModem class
This commit moves creation of the MMBaseSms objects out of MMSmsList and up
into MMIfaceModemMessaging (which is already a MMBroadbandModem) and
the MMBroadbandModem subclasses themselves.

This flattens the creation of MMBaseSms objects by passing them down
from the object that creates the SMS parts, rather than having a
convoluted callback scheme relying on MMSmsList and MMBaseSms having
direct knowledge of their owning modem.

The goal is to eventually remove usage of MMBaseModem from MMBaseSms
and MMSmsList so that we can test them more easily.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams 9830e3955a base-sms,sms-at: split AT-specific SMS code into MMSmsAt
Simplify MMBaseSms (making it easier to use from testcases) by
splitting the AT-specific code into MMSmsAt rather than keeping
it in the base class.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams 6d0e4daf87 base-bearer: remove unused include
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams 1283ee8c2a base-sms,iface-modem-messaging: move lock/unlock logic into the interface
Allows us to test things that rely on MMBaseSms more easily..

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams 683a33b303 base-sms: determine 3GPP vs. CDMA at creation time
It won't ever change over the lifetime of the BaseSMS.

Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
Dan Williams 08a65a0bed sms-mbim: remove unused code
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08 20:24:37 -05:00
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