aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp.c
AgeCommit message (Collapse)Author
2023-10-27core: ensure all errors returned in DBus operations are normalizedAleksander Morgado
We want to ensure that all errors reported via DBus operations are normalized to MM-specific errors. We don't want to return QMI or MBIM specific errors, as those are protocol specific and we don't want DBus clients to need to rely on knowing which is the protocol in use by the device.
2023-10-11ModemManager: Add force option to set initial EPS bearer settingsUjjwal Pande
Adding a new force option to force send initial EPS bearer settings to modem even if they match the existing ones. Currently settings are not sent to the modem if they match old settings
2023-09-11iface-modem-3gpp: ensure error is set when UNKNOWN returned in ps state waitAleksander Morgado
2023-09-11iface-modem-3gpp: ignore UNKNOWN ps state explicitly during wait operationAleksander Morgado
2023-06-08api: new carrier lock supportUjjwal Pande
Adding support for carrier lock for MBIM modems using google simlock mechanism.
2023-05-25iface-modem-3gpp: cleanup packet service state on disablingAleksander Morgado
Otherwise the state cached by the protocol implementation will be different to the one exposed in the 3GPP interface.
2023-05-03iface-modem-3gpp: skip interface updates if it's disabledAleksander Morgado
E.g. we don't want to update the 3GPP registration state to "idle" if the interface has already been disabled: <msg> [1681814812.903723] [modem0] 3GPP registration state changed (idle -> unknown) <inf> [1681814812.903842] [modem0] consolidated registration state: cs 'idle', ps 'idle', eps 'idle', 5gs 'unknown' --> 'unknown' <dbg> [1681814812.906194] [modem0] disabling the Modem interface... <inf> [1681814812.911148] [modem0] disabled modem <dbg> [1681814812.913453] [ttyACM0/at] device open count is 0 (close) <dbg> [1681814812.913629] [ttyACM0/at] closing serial port... <dbg> [1681814812.915559] [ttyACM0/at] serial port closed <msg> [1681814812.916569] [modem0] state changed (disabling -> disabled) <dbg> [1681814868.945069] [/dev/cdc-wdm4] number of consecutive timeouts: 1 <msg> [1681814868.950724] [modem0] 3GPP registration state changed (unknown -> idle) <inf> [1681814868.950885] [modem0] consolidated registration state: cs 'idle', ps 'idle', eps 'idle', 5gs 'unknown' --> 'idle' <msg> [1681814868.951797] [modem0] state changed (disabled -> enabled) <dbg> [1681814868.955740] [modem0] registration in network: cancelled <wrn> [1681814868.958562] [modem0] registration in network failed: Operation was cancelled
2023-05-03iface-modem-3gpp: coding style updates in initialization sequenceAleksander Morgado
2023-05-03iface-modem-3gpp: coding style changes in initial EPS bearer update logicAleksander Morgado
2023-05-03iface-modem-3gpp: coding style updates in enabling/disabling sequencesAleksander Morgado
2023-05-03iface-modem-3gpp: allow cancelling the wait for packet service stateAleksander Morgado
When a request to disable the modem arrives while the packet service state wait is ongoing we were not correctly cancelling the operation. The main reason for this is that this operation does not change the modem state, and so the "wait for final state" logic in the disabling sequence was not being considered. We solve this by plugging in the Simple.Connect() operation cancellable in the wait for packet service state operation. The connection attempt will be cancelled during the disabling sequence as well, and when that happens we will explicitly halt the packet service state wait as well.
2023-05-03iface-modem-3gpp: minor rename of variablesAleksander Morgado
2023-05-03iface-modem-3gpp: don't guess packet service state if modem can report itAleksander Morgado
In certain protocols like QMI or MBIM we may be able to report an exact packet service state, so there is no need to guess it, as the guess may not always be right. The logic will track automatically whether modem-reported packet service states are available, and use them if so. Otherwise, it'll try to guess as we were doing before (e.g. if registered in EPS, packet service is considered attached).
2023-04-19iface-modem-3gpp: don't compare profile-name on attach APNsAndrew Lassalle
When a request to set a new eps bearer settings is received, ignore the profile-name when comparing the previous configuration with the new one, since the modem's profile might already have a name that won't match the settings provided by the user. Profile names are used in QMI modems. If the profile name does not match the existing one, the modem will detach and reattach to the network.
2023-03-27iface-modem-3gpp: avoid to connect signal on NULL SIM objectAleksander Morgado
Happens when we boot without a SIM card inserted: ModemManager[12065]: <dbg> [1679912011.887410] [ttyACM2/at] --> 'AT+CLCK="PC",2<CR>' ModemManager[12065]: <dbg> [1679912011.905401] [ttyACM2/at] <-- '<CR><LF>+CLCK: 0<CR><LF><CR><LF>OK<CR><LF>' (ModemManager:12065): GLib-GObject-CRITICAL **: 12:13:31.905: invalid (NULL) pointer instance
2023-02-15iface-modem-3gpp: enable reading of IMEI in FAILED stateMichal Mazur
It was not possible to read IMEI of modem when SIM was not inserted or initialization failed due to modem facility locks. To load IMEI, the 3gpp interface need to be initialized before going to FALLBACK_LIMITED.
2023-02-03mm-iface-modem-3gpp: reject unspecified values for 5G reg settingsEric Caruso
It seems like users can put the "unsupported" value for both DRX cycle and MICO mode, so we should reject that.
2022-12-06iface-modem-3gpp: Check before registeringSven Schwermer
If the modem is already registered when ModemManager probes the modem, it will ignore the registration state since the modem is not enabled yet. Always querying the registration state before starting the registration procedure makes sure to catch such cases and not perform unnecessary registration steps. Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-11-10modem-helpers: new method to check if reg state is registeredAleksander Morgado
2022-11-08iface-modem-3gpp: fix memory leak when processing PCOsAleksander Morgado
==109786== 2,798 (96 direct, 2,702 indirect) bytes in 2 blocks are definitely lost in loss record 5,882 of 5,903 ==109786== at 0x4841888: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==109786== by 0x4A01329: g_malloc (gmem.c:130) ==109786== by 0x4A23F17: g_slice_alloc (gslice.c:1074) ==109786== by 0x4A4B8F8: UnknownInlinedFun (gvariant-core.c:488) ==109786== by 0x4A4B8F8: UnknownInlinedFun (gvariant-core.c:626) ==109786== by 0x4A4B8F8: g_variant_builder_end (gvariant.c:3756) ==109786== by 0x48FD6DC: mm_pco_to_variant (mm-pco.c:251) ==109786== by 0x1AB397: mm_iface_modem_3gpp_update_pco_list (mm-iface-modem-3gpp.c:2274) ==109786== by 0x2306DF: ms_basic_connect_extensions_notification_pco (mm-broadband-modem-mbim.c:5101) ==109786== by 0x2306DF: ms_basic_connect_extensions_notification (mm-broadband-modem-mbim.c:5280) ==109786== by 0x2306DF: device_notification_cb (mm-broadband-modem-mbim.c:5332) ==109786== by 0x4CD3BD6: g_cclosure_marshal_VOID__BOXEDv (gmarshal.c:1686) ==109786== by 0x4CED11B: UnknownInlinedFun (gclosure.c:895) ==109786== by 0x4CED11B: g_signal_emit_valist (gsignal.c:3456) ==109786== by 0x4CED203: g_signal_emit (gsignal.c:3606) ==109786== by 0x50ADA0F: indication_ready (mbim-device.c:870) ==109786== by 0x4B92DD3: g_task_return_now (gtask.c:1232)
2022-11-08iface-modem-3gpp: allow internal request to set packet serviceAleksander Morgado
Provide a new internal method in the 3GPP interface to request an explicit packet service state update.
2022-11-04iface-modem-3gpp: decrease severity of logs that don't affect functionalityAleksander Morgado
Instead of warning about various unimportant things failing that don't affect functionality, just print the logs in debug level and go on.
2022-11-04iface-modem-3gpp: improve logging of user request to disable facility locksAleksander Morgado
2022-11-04iface-modem-3gpp: improve logging of user request to set packet service stateAleksander Morgado
2022-11-04iface-modem-3gpp: improve logging of user request to scan networksAleksander Morgado
2022-11-04iface-modem-3gpp: improve logging of user request to set EPS UE mode of ↵Aleksander Morgado
operation
2022-11-04iface-modem-3gpp: improve logging of user request to set 5GNR registration ↵Aleksander Morgado
settings
2022-11-04iface-modem-3gpp: improve logging of user request to set initial EPS bearer ↵Aleksander Morgado
settings
2022-11-04iface-modem-3gpp: improve logging of user request to register in networkAleksander Morgado
2022-11-04iface-modem-3gpp: log registration check results in INFO levelAleksander Morgado
2022-11-04core,log: new 'MSG' log level between 'INFO' and 'WARN'Aleksander Morgado
We're bumping the current "INFO" level messages to the new "MSG" level, also making the new level the default. The old "INFO" level will be used to setup an intermediate level of logging which is not as verbose as "DEBUG" but still provides some capabilities to analyze the behavior of a modem.
2022-10-05iface-modem-3gpp: disallow Scan() or Register() if LockedAleksander Morgado
We are exporting the 3GPP interface even when locked, so we should cleanly disallow the Scan() and Register() operations on that state, instead of wrongly assuming they may never happen. 0x00007c192134944a (libc.so.6 + 0x0003744a) gsignal 0x00007c19213344e8 (libc.so.6 + 0x000224e8) abort 0x00007c19215c4221 (libglib-2.0.so.0 - gtestutils.c: 3253) g_assertion_message 0x00007c19215c4284 (libglib-2.0.so.0 - gtestutils.c: 3279) g_assertion_message_expr 0x00005b3eec9c9fbc (ModemManager - mm-iface-modem-3gpp.c) handle_scan_auth_ready 0x00007c19216ef75b (libgio-2.0.so.0 - gtask.c: 1230) g_task_return_now 0x00007c19216ee7b9 (libgio-2.0.so.0 - gtask.c: 1300) g_task_return 0x00005b3eec99a5ef (ModemManager - mm-dispatcher-fcc-unlock.c: 69) dispatcher_run_ready 0x00007c19216ef75b (libgio-2.0.so.0 - gtask.c: 1230) g_task_return_now 0x00007c19216ef78e (libgio-2.0.so.0 - gtask.c: 1244) complete_in_idle_cb 0x00007c19215a2486 (libglib-2.0.so.0 - gmain.c: 3417) g_main_context_dispatch 0x00007c19215a2791 (libglib-2.0.so.0 - gmain.c: 4211) g_main_context_iterate 0x00007c19215a2a05 (libglib-2.0.so.0 - gmain.c: 4411) g_main_loop_run 0x00005b3eec998451 (ModemManager - main.c: 217) main 0x00007c19213347a7 (libc.so.6 + 0x000227a7) __libc_start_main 0x00005b3eec998259 (ModemManager + 0x00060259) _start Fixes 83e7600a67d1c5952d0fada07ebe70dfef3492f6
2022-09-20iface-modem-3gpp: helpers to check if specific domains are supportedAleksander Morgado
2022-09-20iface-modem-3gpp: allow applying domain registration updates altogetherAleksander Morgado
When processing QMI and MBIM messages to report domain registration updates, we should do that altogether so that we don't report bogus transitions to idle if the registration state switches from one domain to another. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/629
2022-09-20iface-modem-3gpp: fix clearing 5GS reg status if explicit registration failsAleksander Morgado
2022-08-26mm-iface-modem-3gpp: fix packet service state updationAkash Aggarwal
Modem could be in 'registered' state if CS is 'attached', but packet service state might be 'detached'. Check if packet service state needs to be updated in update_registration_state(), even if registration state is same. Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/618
2022-08-04iface-modem-3gpp: update packet service state in the interfaceAleksander Morgado
The skeleton property will be update automatically as they're bound.
2022-08-04iface-modem-simple: wait for packet service 'attach' state in ConnectionStepAkash Aggarwal
2022-06-09suspend: add suspend/resume support with powerd on ChromeOSRukun Mao
ModemManager handles suspend and resume signals sent from powerd Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
2022-01-07iface-modem-3gpp: fix variant ref handling in scan outputAleksander Morgado
2021-12-24iface-modem-3gpp: don't compare new properties when matching initial EPS bearerAleksander Morgado
2021-12-24iface-modem-3gpp: implement support for updating 5GNR registration settingsAleksander Morgado
2021-12-24iface-modem-3gpp: minor coding style changeAleksander Morgado
2021-12-24iface-modem-3gpp: implement loading 5GNR registration settings during initAleksander Morgado
2021-11-02iface-modem-3gpp: implement handling of 'SetPacketServiceState()'Som_SP
Includes updates by Aleksander Morgado to fix coding style issues and to place this logic in the correct interface.
2021-11-02iface-modem-3gpp: implicitly update packet service state based on reg domainsAleksander Morgado
If we're registered in either PS, EPS or 5GS, we can assume packet domain service is attached. If we're only registered in CS, packet domain is detached. This change relies on protocol implementations to properly report separate CS/PS/EPS/5GS domain registration states.
2021-05-26iface-modem: remove the signal quality enforced refresh during sync()Aleksander Morgado
when mm_iface_modem_refresh_signal() is called, we'll restart the signal quality refresh logic already, there is no need to request an enforced start. The enforced start was also modifying ctx->enabled unconditionally, which is really not ok. This logic would be enabled only when we're registered, and that logic is fine, no need to change that.
2021-05-26iface-modem: synchronize state when resumingDylan Van Assche
Refresh signal strength and access technologies, check for SIM swaps, and check if the SIM is locked. The modem may have switched to a different access technologies or have a different signal strength when resuming. Moreover, the user may swap or remove the SIM when suspended.
2021-05-26iface-modem-3gpp: ignore cancellation during sync()Aleksander Morgado
There is no input cancellable in the method, so the GTask will never get cancelled from the outside.
2021-05-26iface-modem-3gpp: remove redundant log messageAleksander Morgado
It doesn't give us any valuable information, so just remove it.