aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-04-13broadband-modem-qmi: implement Time interfaceDan Williams
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-13shared-fibocom: don't assume parent implements the firmware interfaceDan Williams
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-13broadband-modem-qmi: Enable Cell BroadcastGuido Günther
For QMI we have an extra QMI request so use that to make sure receiving messages is actually enabled. Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325 Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-04-13broadband-modem-qmi: Add support for loading channelsGuido Günther
This allows to retrive the list of configured Cell Broadcast channels. Closes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325 Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-04-13broadband-modem-qmi: Add support for setting channelsGuido Günther
This allows to receive Cell Broadcast messages in the specified channel range on SDM670 based devices (X12 modem) and SDM845 (X20 modem) without any AT ports (like the OnePlus 6/6T and Google Pixel 3a). Helps: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325 Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-04-13broadband-modem-qmi: Add initial interface bitsGuido Günther
This allows to receive Cell Broadcast messages. Tested with single part CBMs only as my setup currently only allows for these. Helps: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1325 Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-04-12modem-helpers: fix checking of CDMA/EVDO access technologyDan Williams
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-09modem-helpers-qmi: better handle no supported modesDan Williams
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-08modem-helpers-qmi: fix deprecated usage of ↵Dan Williams
QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-03tests: add tests for mm_signal_from_mbim_signal_state()Dan Williams
Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-04-01broadband-modem-mbim: consolidate determination of data classDan Williams
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-01broadband-modem-mbim: consistently handle custom data classesDan Williams
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-03-28modem: Load current channels on startupGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-28modem: Allow to set current channel listGuido Günther
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-28modem-helpers: Add helpers to parse channel listsGuido Günther
`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-27broadband-modem: detect modem modes with +CEREG and +C5GREGDan Williams
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-27telit: use generic early AT port probe logicDan Williams
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-27port-probe: allow per-port ID_MM_TTY_AT_PROBE_TRIES tag for custom number of ↵Dan Williams
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-23broadband-modem,iface-modem: don't treat SIM unlocks as hot-swapsDan Williams
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-11treewide: Fix typosGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-09port-probe: ensure port is open for all plugin AT probesDan Williams
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: 7937a89a37e941e9a77cddcce8226c316fe70821 port-probe: rework and consolidate port probe flow for AT/QCDM/QMI/MBIM Signed-off-by: Dan Williams <dan@ioncontrol.co>
2025-03-06broadband-modem,cli: slightly bump 3GPP scan timeout; add some cli dbus ↵Dan Williams
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-05treewide: Fix some spelling errorsGuido Günther
All in debug messages or code comments so not user / client visible. Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-05mbim: Fix typo in error messageGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-03-03broadband-modem-qmi: implement UE mode get/setRobert Marko
Instead of relying on getting/setting the UE mode via AT +CEMODE command which on Quectel RM520N (And I assume other QMI based modems) only allows getting the value and not setting one it has special AT commands for CS/PS and voice/data centric values. So lets instead use the QMI Get/Set System Selection Preference TLV which offers service domain and usage domain preference info so we can use those to get/set the 3GPP TS 24.301 UE mode values. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2025-02-27messaging: load default storage from modem during initializationAkula Susmitha
Signed-off-by: Akula Susmitha <quic_asusmith@quicinc.com>
2025-02-25iface-modem-firmware: report new ID's based on PCI SSVID/SSPIDSushrut Shree Trivedi
Add new device ID based on PCI SSVID/SSPID to enable FW download based on the same. Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
2025-02-24Fixed code formattingMichał Sułek
2025-02-24Setup variable declared after function call, fixed.Michał Sułek
2025-02-24Was not compiling due to setup being undefined in call_audio_channel_setMichał Sułek
2025-02-24Dan Williams changed g_usleep to g_timeout_addMichał Sułek
2025-02-24Fixed the bug regarding SIM7600 modem family that made USB audio to not turn on.Michał Sułek
Added the support for 16kHz sample rate for simtech modems and set it as default if available.
2025-02-24iface-modem-messaging: Validate supported storagesAkula Susmitha
Check for supported storages before setting default storage. Signed-off-by: Akula Susmitha <quic_asusmith@quicinc.com>
2025-02-21iface-modem-firmware: common logic to check for sahara/firehose tagsAleksander Morgado
The logic will exclusively look for the udev tags reporting sahara/firehose support in the primary control port of each modem type.
2025-02-21fibocom: add Sahara/Firehose support for NL668-EAUAleksander Morgado
Signed-off-by: default avatarLukas Voegl <lvoegl@tdt.de>
2025-02-21broadband-modem: generic Firehose and Sahara supportLukas Voegl
Allows setting the renamed `ID_MM_QUALCOMM_FIREHOSE` and `ID_MM_QUALCOMM_SAHARA` environment variables for all devices. Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2025-02-21base-modem: add subsystem device ID propertySushrut Shree Trivedi
Subsystem device ID can be used for identifying PCI modems, so expose the property. Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
2025-02-21kernel-device, generic: add subsystem device ID supportSushrut Shree Trivedi
Add subsystem device ID support, that can be used in pci devices instead of vendor/device ID customization. Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
2025-02-19src: plugins: quectel: add DTMF dbus notification supportKévin L'hôpital
The quectel modems that are not using QMI could receive DTMF events but no dbus notification was sent to the user space. This patch adds the DTMF notification support to the quectel plugin. Signed-off-by: Kévin L'hôpital <kevin.lhopital@savoirfairelinux.com>
2025-02-18netlink: add RTM_GETLINK support to read MAC addressDan Williams
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-03broadband-modem: prefer explicit return to breakAleksander Morgado
Just to make it explicit that there is no more logic running afterwards.
2025-02-03broadband-modem: exit with error if enable() while in unknown stateAleksander Morgado
We should not assert if the modem is flagged as invalid but an outstanding enabling request is processed. Let's exit gracefully and let the object get properly disposed afterwards. (libc.so.6 - pthread_kill.c: 44) __pthread_kill_implementation (libc.so.6 - raise.c: 26) raise (libc.so.6 - abort.c: 79) abort (libglib-2.0.so.0 - gtestutils.c: 3450) g_assertion_message (libglib-2.0.so.0 - gtestutils.c: 3476) g_assertion_message_expr (ModemManager - mm-broadband-modem.c) enable (ModemManager - mm-iface-modem.c: 2340) handle_enable_auth_ready (libgio-2.0.so.0 - gtask.c: 1309) g_task_return_now (libgio-2.0.so.0 - gtask.c: 1378) g_task_return (ModemManager - mm-base-modem.c: 2011) lock_after_authorize_ready (libgio-2.0.so.0 - gtask.c: 1309) g_task_return_now (libgio-2.0.so.0 - gtask.c: 1378) g_task_return (ModemManager - mm-base-modem.c: 1841) base_modem_operation_run (ModemManager - mm-base-modem.c: 764) state_operation_ready (libgio-2.0.so.0 - gtask.c: 1309) g_task_return_now (libgio-2.0.so.0 - gtask.c: 1323) complete_in_idle_cb (libglib-2.0.so.0 - gmain.c: 3460) g_main_dispatch (libglib-2.0.so.0 - gmain.c: 4200) g_main_context_dispatch (libglib-2.0.so.0 - gmain.c: 4276) g_main_context_iterate (libglib-2.0.so.0 - gmain.c: 4479) g_main_loop_run (ModemManager - main.c: 236) main (libc.so.6 - libc_start_call_main.h: 58) __libc_start_call_main (libc.so.6 - libc-start.c: 360) __libc_start_main_impl (ModemManager + 0x000b8850) _start
2025-01-31shared-telit: fix missing error initialization in load_revision_readyDaniele Palmas
Closes #953
2025-01-23broadband-modem-qmi: separate "system info" and "serving system" indications ↵Valentin Blot
registration Some modems succeed on enabling "system info" and disabling "serving system" in one transaction, even though they don't support "system info". This commit separates the two: first, try to enable "system info", and if it succeeds then disable "serving system".
2025-01-22suspend: support logind not sending PrepareForSleep(true)Arnav Singh
elogind sends PrepareForSleep(false) when resuming but doesn't necessarily send PrepareForSleep(true) when sleeping. This means we didn't necessarily drop our previous inhibitor when it's time to take a new one. So instead of asserting that we dropped our previous inhibitor, just reuse it.
2025-01-17modem-helpers: fix gsize formatLukas Voegl
2024-12-27port-probe: add some QCDM/DIAG response bytes to non-AT responsesDan Williams
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-27port-probe: explicit close port stepsAleksander Morgado
If by any chance the same ports needs to go through AT and QMI/MBIM probing, make sure the serial port created during AT probing is closed before starting the QMI/MBIM probing.
2024-12-27port-probe: only run custom init on ports that will go through AT probingAleksander Morgado
2024-12-27port-probe: rename serial_probe->probeAleksander Morgado