aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-05-19broadband-modem-telit: use +COPS to get AcT for LE910Q1/ELS63-IDaniele Palmas
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-19telit: add port hints for LE910Q1/ELS63-IDaniele Palmas
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19modem-helpers: remove unused variable in mm_3gpp_parse_cmer_test_responseDaniele Palmas
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-19broadband-modem: support +CGEREP values different than 2Daniele Palmas
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
2025-05-16Merge request !1346 from 'disconnect-request'Dan Williams
bearer: add new "disconnect-request" logic https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1346
2025-05-16base-bearer: set dbus disconnect_request on ignored disconnectionDominique Martinet
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-16api,bearer: new 'DisconnectRequest' propertyDominique Martinet
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-16dispatcher-connection: add new 'disconnect-request' eventDominique Martinet
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-16dispatcher-connection: replace 'connected' boolean with a new enumDominique Martinet
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-14Merge request !1353 from 'fix-creg-regex'Dan Williams
modem-helpers: support multi-digit "stat" values in CREG response https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1353 Closes #987
2025-05-14modem-helpers: fix method for distinguishing lac and stat valuesKirill Buksha
Stat value may be multidigit e.g. 10 or 11. Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
2025-05-14tests,modem-helpers: add cases for multidigit "stat" value in CREG responseKirill Buksha
Signed-off-by: Kirill Buksha <kirbuk200@gmail.com>
2025-05-14modem-helpers: support multi-digit "stat" values in CREG responseKirill Buksha
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-11Merge request !1352 from 'base-sim-auth-fix'Dan Williams
base-sim: Setup auth provider and its cancellable https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1352
2025-05-11base-sim: Setup auth provider and its cancellableMaciej S. Szmigiero
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: ef5cee3ab578 ("auth-provider: move auth provider logic into each class") Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2025-05-09Merge request !1235 from 'intel-rpc-xmm7360'Dan Williams
intel: implement support for RPC-powered xmm7360 https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1235
2025-05-09intel: implement support for RPC-powered xmm7360Thomas Vogt
Signed-off-by: Thomas Vogt <acc-github@tovotu.de>
2025-05-08Merge request !1266 from 'v6-cgcontrdp'Dan Williams
modem-helpers: add IPv6 support to +CGCONTRDP parsing https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1266
2025-05-08modem-helpers: add IPv6 support to +CGCONTRDP parsingDan Williams
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-08Merge request !1341 from 'mbim-multipart-fix'Dan Williams
sms: always use SMS_PART_INVALID_INDEX unstored parts https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1341 Closes #979
2025-05-08broadband-modem-qmi,broadband-modem-mbim: always use SMS_PART_INVALID_INDEX ↵Dan Williams
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-08sms-list: remove usage of MMBaseModemDan Williams
Not used for anything anymore so we can remove the property. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08base-sms: remove MODEM propertyDan Williams
No longer depend on MMBaseModem since everything that specifically uses it is now removed. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08base-sms,sms-list: use signals to set multipart referenceDan Williams
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-08base-sms: reduce possibility of leaking multipart referenceDan Williams
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-08base-sms: pass supported storages in at creation timeDan Williams
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-08base-sms: pass SMS default storage at creation time and update as neededDan Williams
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-08base-sms,sms-list,iface-messaging: move MMBaseSms creation to ↵Dan Williams
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-08base-sms,sms-at: split AT-specific SMS code into MMSmsAtDan Williams
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-08base-bearer: remove unused includeDan Williams
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08base-sms,iface-modem-messaging: move lock/unlock logic into the interfaceDan Williams
Allows us to test things that rely on MMBaseSms more easily.. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08base-sms: determine 3GPP vs. CDMA at creation timeDan Williams
It won't ever change over the lifetime of the BaseSMS. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08sms-mbim: remove unused codeDan Williams
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08Merge request !1344 from 'cbm-remove-modem'Dan Williams
Begin removing usage of MMBaseModem from leaf classes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1344
2025-05-08base-cbm,cbm-list,iface-cbm: remove usage of MMBaseModemDan Williams
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-08Move log parent and connection property binding to helperDan Williams
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-08auth-provider: move auth provider logic into each classDan Williams
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-08base-modem,auth-provider: move testcase auth bypass to auth providerDan Williams
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-08Merge request !1314 from 'quectel-power-down'Dan Williams
quectel: wait for POWERED DOWN URC and decrease other power operation timeouts https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1314
2025-05-08quectel: decrease low-power/power-on/reset wait times to 15 secondsDan Williams
AT docs for many (most?) device state a max timeout of 15 seconds. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-08quectel: ensure power down operation waits for POWERED DOWN URCDan Williams
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-08Merge request !1310 from 'disabled-profiles'Dan Williams
bearer: don't choose or activate disabled profiles https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1310
2025-05-08broadband-bearer,modem-helpers: don't use or match disabled profilesDan Williams
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-08broadband-modem-qmi: use correct profile index in error messageDan Williams
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-08broadband-modem-qmi: implement disabled 3GPP profilesDan Williams
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-08Merge request !1311 from 'sleep-wait'Dan Williams
Wait until device operations complete before dropping suspend inhibitor https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1311 Closes #966
2025-05-08broadband-modem: close serial ports in disposeDan Williams
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-08broadband-modem: remove invalid idle handler during disposeDan Williams
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-07broadband-modem-qmi,mbim: remove redundant port closesDan Williams
This will just be done immediately after by MMBaseModem's dispose() handler. Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-05-07base-manager: convert shutdown to stepsDan Williams
Make the call flow clearer. Signed-off-by: Dan Williams <dan@ioncontrol.co>