Commit Graph
8776 Commits
Author SHA1 Message Date
Lukas Voegl 030ec7c5bb cinterion: change secondary port to ppp on PLS8
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2024-01-25 15:02:59 +00:00
Aleksander Morgado 7ad85d2bff port-qmi: allow preallocated links when using rmnet multiplexing
A new ID_MM_QMI_PREALLOCATED_LINKS udev tag, set in the NET port of
the device, allows configuring the amount of preallocated multiplexed
links that need to be created upon the first connection attempt,
regardless of the multiplexing setup method used.

If not specified by the user, 4 preallocated links are created when
using the qmi_wwan multiplexing procedure, and none for rmnet.

Previously, using preallocated links was exclusive used with the
qmi_wwan multiplexing procedure. Using preallocated links may be
useful if you want to maintain the same links across multiple
connection and disconnection loops, e.g. if running a tcpdump on a
given link interface capturing all traffic (not using preallocated
links in this case would be problematic as tcpdump cannot be requested
to run on net interfaces that don't exist yet).
2024-01-25 13:45:14 +00:00
Aleksander Morgado 910e450ea7 port-qmi: use a single method to set all initial net port details 2024-01-25 13:45:14 +00:00
Aleksander Morgado 99f520269b port-qmi: fix double free when WDA Set Data Format fails
Thread 0(id: 4915) CRASHED [ SIGABRT@0x0000000000000000 ]
  0x00007b0f6732fa3f (libc.so.6 - pthread_kill.c: 44) __pthread_kill_implementation
  0x00007b0f672e4c6c (libc.so.6 - raise.c: 26) raise
  0x00007b0f672d0462 (libc.so.6 - abort.c: 79) abort
  0x00007b0f67323347 (libc.so.6 - libc_fatal.c: 155) __libc_message
  0x00007b0f67339929 (libc.so.6 - malloc.c: 5664) malloc_printerr
  0x00007b0f6733b5cb (libc.so.6 - malloc.c: 4439) _int_free
  0x00007b0f6733e279 (libc.so.6 - malloc.c: 3391) __libc_free
  0x00007b0f67abcabe (libglib-2.0.so.0 - gerror.c: 856) g_error_free
  0x000059fc4262623e (ModemManager - glib-autocleanups.h: 54) glib_autoptr_clear_GError
  0x000059fc4262623e (ModemManager - glib-autocleanups.h: 54) glib_autoptr_cleanup_GError
  0x000059fc4262623e (ModemManager - mm-port-qmi.c: 1501) set_data_format_ready
  0x00007b0f67985e57 (libgio-2.0.so.0 - gtask.c: 1309) g_task_return_now
  0x00007b0f67984e21 (libgio-2.0.so.0 - gtask.c: 1378) g_task_return
  0x00007b0f677f7107 (libqmi-glib.so.5 - qmi-wda.c: 4761) set_data_format_ready
  0x00007b0f67972329 (libgio-2.0.so.0 - gsimpleasyncresult.c: 804) g_simple_async_result_complete
  0x00007b0f6797240a (libgio-2.0.so.0 - gsimpleasyncresult.c: 816) complete_in_idle_cb
  0x00007b0f67ad17a4 (libglib-2.0.so.0 - gmain.c: 3460) g_main_dispatch
  0x00007b0f67ad17a4 (libglib-2.0.so.0 - gmain.c: 4200) g_main_context_dispatch
  0x00007b0f67ad1ac3 (libglib-2.0.so.0 - gmain.c: 4276) g_main_context_iterate
  0x00007b0f67ad1d41 (libglib-2.0.so.0 - gmain.c: 4479) g_main_loop_run
  0x000059fc425657df (ModemManager - main.c: 236) main
  0x00007b0f672d06c5 (libc.so.6 - libc_start_call_main.h: 58) __libc_start_call_main
  0x00007b0f672d0781 (libc.so.6 - libc-start.c: 389) __libc_start_main_impl
  0x000059fc42565130 (ModemManager) _start
  0x00007fffdea098c7
2024-01-25 11:25:11 +00:00
Lukas Voegl 4078d54ad5 cinterion: switch primary and secondary port for PLS8
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2024-01-19 13:41:57 +00:00
Yegor Yefremov a55ef5e939 build: fix ModemManager-names.h generation warning
Use configure_file() instead of custom_target(). This resolves the
following warning:

WARNING: Source item '/home/user/ModemManager/header-generator.xsl'
cannot be converted to File object, because it is a generated file. This
will become a hard error in the future.
2024-01-15 12:42:11 +01:00
Yegor Yefremov 7c23c3db2f build: resolve deprecated 'copy' key argument in configure_file warning
Resolves the following warning:

NOTICE: Future-deprecated features used:
 * 0.64.0: {'copy arg in configure_file'}

copy arg was deprecated in meson version 0.64. Hence, use
fs.copyfile() that is also introduced in 0.64, in versions
since 0.64 and use the old approach for older versions.
2024-01-15 09:40:40 +00:00
Aleksander Morgado 19b3e59151 iface-modem: ensure power state updates are spaced in time
This change is an attempt to behave a bit better with modems when
multiple consecutive enable/full-power/disable/low-power operations
are scheduled in a modem.

MM will automatically throttle these requests so that the power state
updates are spaced in time, with at least 2 full seconds between
them.
2024-01-11 11:13:12 +00:00
Aleksander Morgado 7f8b7adfde iface-modem: do not setup carrier config if eSIM without profiles
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/802
2024-01-11 10:47:02 +00:00
Michal Mazur 091fbe1212 broadband-modem-mbim: Fix detection of modem unlocking
When the modem is unlocked, the value of PIN type changes but the
PIN state is still LOCKED because PIN2 lock is always active.
(fixes commit 6359cc93fe)
2024-01-10 10:08:12 +00:00
Yegor Yefremov fdf1aead04 99-log-event: add double quote to silence SC2086 warning
SC2086 suggests using double quote to to prevent globbing and word
splitting.
2024-01-10 08:30:30 +01:00
Yegor Yefremov 3aef62c5f6 build: add EditorConfig configuration file
EditorConfig projects helps maintaining consistent coding styles
across various editors and IDEs.
2023-12-18 12:01:07 +00:00
Yegor Yefremov dc3171fae4 .gitignore: ignore ctags tags file 2023-12-18 11:40:21 +00:00
Michal Mazur 6359cc93fe broadband-modem-mbim: Detect change in carrier lock state
Detection of carrier lock change is required to notify upper layers when
the modem gets locked to specific network or unlocked. Previous
implementation was removed because it caused modem reprobe every time
the SIM card was unlocked (19fd9c634b).
2023-12-18 11:18:57 +00:00
Aleksander Morgado 88f9950182 build: unstable release version bump to 1.23.2 2023-12-13 10:55:29 +00:00
Nagi Marupaka 97ac3e8448 fibocom: re-enable the modem after an attempt to set initial EPS bearer irrespective of success or failure of the operation 2023-12-13 10:10:20 +00:00
Chris Talbot d84cc1a80a mm-sms-properties: document mm_sms_properties_set_validity_relative () 2023-12-12 11:39:45 +00:00
Aleksander Morgado 3cb94cb0ae api,introspection: added notes about ProfileManager.Updated() reliability 2023-12-12 11:31:06 +00:00
Aleksander Morgado f38159e5a3 Revert "broadband-modem-qmi: ignore our own profile changed indications"
This reverts commit cc78a6439f.

Ignoring profile updates for 100ms after our own updates is now
implemented in a generic way for all protocols, not just for QMI.
2023-12-12 11:31:06 +00:00
Aleksander Morgado d00bf8e15b Revert "broadband-modem-qmi: ignore profile updates during 100ms after our own updates"
This reverts commit f96664a159.

Ignoring profile updates for 100ms after our own updates is now
implemented in a generic way for all protocols, not just for QMI.
2023-12-12 11:31:06 +00:00
Aleksander Morgado 3125b43617 iface-modem-3gpp-profile-manager: support ignoring update requests during our own operations 2023-12-12 11:31:06 +00:00
Aleksander Morgado 5a57c07b21 iface-modem-3gpp-profile-manager: reorder code 2023-12-12 11:31:06 +00:00
Aleksander Morgado c592cde3f0 base-manager: allow using the low power modem setting with quick suspend/resume
Kind of defeats the purpose of the quick suspend/resume, but I can see
how this could be useful.

E.g. in ChromeOS the modems are put in low power mode during suspend
(triggered by the connection manager) and the quick suspend/resume is
also enabled by default for a quicker resume process that doesn't
involve full modem reprobe.
2023-12-12 11:22:30 +00:00
Aleksander Morgado bbd11cda4b base-manager: new '--test-low-power-suspend-resume' option
Will request to put the modems in low power mode upon system suspend.

Based on an earlier approach from Jack Song and Nero Zhang, see
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1050
2023-12-12 11:22:30 +00:00
Raphaël Jakse 63dd4ad263 iface-location: allow enabling without SIM
When the modem is in a failed state because of a SIM-related error,
like a missing SIM, or if the modem is SIM-locked, allow the
Location interface to initialize and be enabled anyway.

This allows someone without a SIM to use the GPS, which does not
particularly require a phone subscription. It also allows
someone with a SIM to use the GPS even if the SIM is still
locked.

This patch was reworked, while keeping the original idea, by:
Aleksander Morgado <aleksander@aleksander.es>

Fixes #183
2023-12-11 12:37:42 +00:00
Aleksander Morgado 224c04065d Revert "base-manager: add support to put modem in low power mode during suspend"
This reverts commit 23033217de.

This was mixed up in the wrong branch.
2023-12-01 13:24:17 +00:00
Aleksander Morgado 23033217de base-manager: add support to put modem in low power mode during suspend
Based on an earlier approach from Jack Song and Nero Zhang, see
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1050
2023-12-01 12:50:51 +00:00
Petr Krasnoshchekov 5056936b46 broadband-modem: set read sms timeout to 120s
A7600E-H prints read sms response very slow. Having a lot of SMS can lead to timeout expiration and errors during next requests
2023-12-01 12:50:51 +00:00
Petr Krasnoshchekov 59b82a2f97 simtech: add port type hints for A7600E-H, A7602E-H 2023-12-01 12:50:51 +00:00
Petr Krasnoshchekov d40d156081 simtech: ignore +CPIN: READY URC on startup
A7600E-H sends +CPIN: URC on startup.
The URC can be treated by ModemManager as a response to other command, what leads to errors during ModemManager initialization
2023-12-01 12:50:50 +00:00
Petr Krasnoshchekov a7ff7281af simtech: ignore PB DONE, SMS DONE, +NITZ: URCs 2023-12-01 12:49:45 +00:00
Petr Krasnoshchekov c871b1a514 simtech: implement reset for A7600E-H/A7602E-H 2023-12-01 12:49:45 +00:00
Petr Krasnoshchekov 7c4908184b base-sim: increase operator identifier loading timeout
SIMCOM A760xE-H modems can answer to AT+CRSM=176,28589,0,0,4 request in 10s or more, so use rather big timeout (20s)
2023-12-01 12:49:45 +00:00
Petr Krasnoshchekov 277d785735 modem-helpers: improve CGDCONT read response parsing
SIM A7600E-H sends only 3 parameters in CGDCONT read response (+CGDCONT: 1,"IP","nate.sktelecom.com").
The parsing regex requeres 4 parameters, so the response is not matched.
In addition fourth parameter is not used by parsing code.
2023-12-01 12:49:45 +00:00
Aleksander Morgado d6d9be125e broadband-modem-mbim: plug leak when facility pin query fails 2023-12-01 10:14:45 +00:00
Aleksander Morgado 5fb2856645 iface-modem: allow cancellability during unlock required checks
The process doing the unlock required checks may need a lot of retries
e.g. to decide whether a SIM card is available or not. If we do a
quick SIM eject, so the unlock required check starts looping, and then
insert the SIM again, we expect the loop to be cancelled right away,
so that the new modem object can be reprobed without any interference
from the old modem object.

We now take the modem-wide cancellable and bind it to the GTask in
mm_iface_modem_update_lock_info(), and we pass it down to every
sub-step of the async logic in the operation. We also plug the
cancellable to the delayed retries in the interface logic, to allow
aborting the checks right away
2023-12-01 10:14:45 +00:00
Michal Mazur dc4b1ec0f3 broadband-modem-mbim: fix detection of SIM hot swap
Previous patch for hotswap detection caused the modem to be reprobed
after unlocking or changing PIN for SIM card lock (commit 7b878765c6).
This change allows to differentiate between hotswap and PIN lock events.
2023-11-30 13:36:48 +00:00
Aleksander Morgado 3ccf847284 bearer-mbim: warn and workaround wrong link prefix length in static IPv6 config
Seems to happen with e.g. the Fibocom FM350:

  # mmcli -b 2
    ------------------------------------
    IPv6 configuration |         method: static
                       |        address: 2607:fb90:dd16:d38a:ac39:89f1:67a7:5a9d
                       |         prefix: 128
                       |        gateway: 2607:fb90:dd16:d38a:ac39:89f1:67a7:5a01
                       |            dns: fd00:976a::9, fd00:976a::10
                       |            mtu: 1436
2023-11-28 14:01:24 +00:00
Aleksander Morgado e35655b364 bearer-mbim: remove unused property name 2023-11-16 11:58:31 +00:00
Aleksander Morgado c6466b72ca broadband-modem-mbim: signal notification id is a gulong 2023-11-16 11:58:24 +00:00
Michal Mazur 19fd9c634b broadband-modem-mbim: skip modem reprobe when unlocking SIM card
Removed code was introduced as a part of carrier lock support but it
affects also unlocking SIM card locks which is incorrect.
(carrier lock support commit: e3a1206c57)
2023-11-08 13:27:12 +00:00
Thilo-Alexander Ginkel 738152176d fcc-unlock: add support for Lenovo-shipped FM350-GL FCC unlock 2023-11-07 14:37:24 +00:00
Aleksander Morgado 11a1720daf mtk: add FM350 specific MBIM implementation
Including logic to set low power mode during an EPS initial bearer
settings update.
2023-11-06 15:11:38 +00:00
Aleksander Morgado ddb2888d32 mtk: add MTK specific MBIM implementation
Basically to flag that we don't support QMI explicitly, so that it's
not even attempted.
2023-11-06 15:11:38 +00:00
Aleksander Morgado c814f3590a mtk: flag FM350 as not supporting multiplexing
There is no released firmware version with proper support for
multiplexing yet.
2023-11-06 15:11:38 +00:00
Aleksander Morgado 6457c644b5 mtk-legacy: rename label in udev rules 2023-11-06 13:02:22 +00:00
Aleksander Morgado 48e661579c build: remove multiline description from meson option 2023-10-31 14:12:12 +00:00
Aleksander Morgado c3597636ec build: fix single-plugin build for mtk 2023-10-31 14:11:20 +00:00
Aleksander Morgado 29f8154ef7 build: unstable release version bump to 1.23.1 2023-10-31 13:51:30 +00:00
Aleksander Morgado 48d9708e14 mtk: remove support for the udev rules tester
There are no udev rules in the new mtk plugin for now.
2023-10-30 10:06:37 +00:00