aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-05-23broadband-modem-mbim: setup FCC unlock stepAleksander Morgado
Use the new generic FCC unlock step instead of implementing it within the power up setup logic.
2021-05-23broadband-modem-qmi: setup FCC unlock stepAleksander Morgado
Use the new generic FCC unlock step instead of implementing it within the operating mode setup logic. The operation is implemented in the MMSharedQmi interface as it will also be used by the MBIM modem object.
2021-05-23iface-modem: new optional FCC unlock step in the power state updateAleksander Morgado
There are devices that come locked before they can be put online. Until now we had a specific implementation for this in the generic QMI modem, but we should have it in a more generic way for any kind of modem.
2021-05-23shared-qmi: trivial coding style updateAleksander Morgado
2021-05-18base-bearer: trivial fix printing stats reportsAleksander Morgado
2021-05-18core: drop "volatile" for g_once_init_enter locationsAleksander Morgado
This fixes a few (fatal in gcc 11) warnings. See https://gitlab.gnome.org/GNOME/glib/-/issues/600
2021-05-17broadband-modem-qmi: set MNC PCS digit in modem_3gpp_load_operator_name()Teijo Kinnunen
If the network has three digit MNC and MNC < 100, set the PCS digit status field in the QMI request.
2021-05-17shared-qmi: set MNC PCS digit for manual network registrationTeijo Kinnunen
Set the MNC PCS digit status when attempting to register to a network with 3 digit MNC and MNC < 100.
2021-05-17sim-qmi: use mm_3gpp_parse_operator_id() for preferred PLMN MNC digitsTeijo Kinnunen
MNC PCS digit status is now available from mm_3gpp_parse_operator_id(), so use it.
2021-05-17libmm-glib,iface-modem-location: add MMLocation3gpp 3 digit MNC supportTeijo Kinnunen
MMLocation3gpp provides MCC/MNC information as integers, so it can not make distinction between operator codes such as XXX01 and XXX001. This commit deprecates mm_location_3gpp_get_mobile_network_code() and implements a new function mm_location_3gpp_get_operator_code() which provides the MCC+MNC in string format. The mm_location_3gpp_get_mobile_country_code() is still available as returning the MCC as an integer does not have ambiguity issues.
2021-05-17modem-helpers: add 3 digit MNC output to mm_3gpp_parse_operator_id()Teijo Kinnunen
MNC digit count information is lost on conversion to integers. Make it possible for the caller to get this information through a separate boolean.
2021-05-15iface-modem-3gpp: don't assume operator code implies we're registeredAleksander Morgado
The modem may be camping in a forbidden network just for emergency services, and we'll be able to have a MCCMNC reported in that case, but this does not mean the modem is registered. So, don't consider that a valid registration flag during the new network registration request.
2021-05-15port-qmi: avoid running install_properties() without properties definedAleksander Morgado
We'll setup the properties only if QRTR support is being built, otherwise we fully skip all property related setup. (ModemManager:480463): GLib-GObject-CRITICAL **: 22:48:14.264: g_object_class_install_properties: assertion 'n_pspecs > 1' failed Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff76e3295 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 (gdb) bt #0 0x00007ffff76e3295 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #1 0x00007ffff76e4579 in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007ffff76e4743 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00005555556af70c in mm_port_qmi_class_init (klass=0x5555557fae20) at mm-port-qmi.c:2619 #4 0x00005555556a94c3 in mm_port_qmi_class_intern_init (klass=0x5555557fae20) at mm-port-qmi.c:34 #5 0x00007ffff77ed1d1 in g_type_class_ref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #6 0x00007ffff77d05e1 in g_object_new_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #7 0x00007ffff77d06cd in g_object_new () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #8 0x00005555556af25a in mm_port_qmi_new (name=0x5555557e54e0 "cdc-wdm0", subsys=MM_PORT_SUBSYS_USBMISC) at mm-port-qmi.c:2481 #9 0x000055555563c8d7 in wdm_probe_qmi (self=0x5555557de1b0) at mm-port-probe.c:517 #10 0x000055555563cc70 in wdm_probe (self=0x5555557de1b0) at mm-port-probe.c:623 #11 0x00007ffff76dd04e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #12 0x00007ffff76dd400 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #13 0x00007ffff76dd6f3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #14 0x00005555555b1ae4 in main (argc=1, argv=0x7fffffffe558) at main.c:213
2021-05-15iface-modem-3gpp: Add verbose logging for initial eps bearerAndrew Lassalle
Print a debug message when the user provides initial eps bearer settings that match the ones being used. This will save time to whomever is experimenting with initial eps bearer settings.
2021-05-14udev: Do not consider USB WWAN ports as valid candidatesLoic Poulain
For now WWAN subsystem support has only been validated for PCI/MHI based devices and extra patches for USB based devices (qmi_wwan, cdc-mbim...) may be required, so do not consider WWAN ports being on USB bus. Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2021-05-14broadband-modem-mbim: get model through QMI-over-MBIMFreedom Liu
move the modem_load_model() async method from mm-broadband-modem-qmi.c to mm-shared-qmi.c, and then make use of the method from both the QMI and MBIM implementations.
2021-05-12iface-modem: fix segfault if attempting to switch slot and slots unsupportedAleksander Morgado
Reported and fix suggested by Maxim Anisimov Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/368
2021-05-09modem-helpers-qmi: fix auth validation always returning errorgoapunk
2021-05-05mm-shared-qmi: parse ICCID as hex instead of BCDEric Caruso
Fixes issue 364.
2021-05-04bearer-mbim: Fix double free in ip_configuration_query_readyAndrew Lassalle
2021-05-03broadband-modem-mbim: use the new 'LTE attach info' message nameAleksander Morgado
The older 'LTE attach status' message name is deprecated.
2021-04-30iface-modem-3gpp: delete unused mm_iface_modem_3gpp_disable_facility_lock()Aleksander Morgado
The action of disabling facility locks is user-triggered, so there is no need to have an internal method to run the logic without user interaction.
2021-04-30modem-helpers: improve logging on unhandled features when parsing UIM Get ↵Aleksander Morgado
Configuration
2021-04-30broadband-modem: support disabling facility lock on MBIM and QMI modemsMichal Mazur
2021-04-30modem-helpers: introduce functions to convert MMModem3gppFacilityMichal Mazur
2021-04-30iface-modem-3gpp: define new API to disable facility locksMichal Mazur
2021-04-30broadband-modem-qmi: use UIM Get Configuration to probe all facility locksMichal Mazur
2021-04-30modem-helpers-qmi: introduce parser for Get Configuration messageMichal Mazur
2021-04-30core: strict return type in g_object_ref()Aleksander Morgado
This is now a requirement when using glib 2.56.
2021-04-30broadband-modem-qmi: ensure we do not re-use old EPS registration stateVincent Palatin
When updating the registration state, in the case where LTE is not ready, ensure we reset the EPS registration state rather than leaving its old value. Else when the consolidated registration is built, it can wrongly think we are registered, e.g. the following case was happening: [modem0] consolidated registration state: cs 'home', ps 'home', eps 'home', 5gs 'unknown' --> 'home' a bit later [modem0] consolidated registration state: cs 'unknown', ps 'unknown', eps 'home', 5gs 'unknown' --> 'home' then it wrongly tries immediatly to connect and fails due to 'no-service' On Qualcomm SC7180, running the following sequence would often reproduce it: <stop higher level network manager> mmcli -m 0 -d mmcli -m 0 --set-power-state-low sleep 10 mmcli -m 0 -e mmcli -m 0 --simple-connect="apn=broadband"
2021-04-29iface-modem-3gpp: ignore 'profile-id' and 'apn-type' matching initial EPS ↵Aleksander Morgado
settings We should not try to match the 'profile-id', as that setting is not available in the input bearer settings provided by the user. And we should not try to match the 'apn-type', as not all implementations support it and it's not really necessary for this purpose anyway.
2021-04-29broadband-modem-qmi: switch initial EPS bearer settings to use profile ↵Aleksander Morgado
management The operation required to load/update the initial EPS bearer settings are completely the same as for profile management, because at the end the settings are bound to a specific profile id.
2021-04-29bearer-qmi: implement connection logic using existing profilesAleksander Morgado
2021-04-29bearer-qmi: refactor connection context setup logicAleksander Morgado
Place all the logic in a separate load_settings_from_bearer() method that takes care of propagating all bearer settings to the connect context.
2021-04-29modem-helpers-qmi: perform validation in allowed_auth_to_qmi_authentication()Aleksander Morgado
If we find that none of the requested auth settings are supported, we should fail and return an error. Also, make sure we set the CHAP fallback default only if either user or password are given.
2021-04-29broadband-modem-qmi: implement profile management supportAleksander Morgado
2021-04-29bearer-mbim: implement connection logic using existing profilesAleksander Morgado
Unlike other implementations, with MBIM we cannot tell the modem to connect a given profile by its profile number, which is a bit strange, but it looks like there is no way to do that. So, if the user requests to connect a given profile, what we do is load the profile settings by querying the modem, and use those settings in the connect request.
2021-04-29broadband-modem-mbim: implement profile management supportAleksander Morgado
We use the "Provisioned Contexts" message support to add and edit profiles. We also use the same message, with context-type set to "none" to attempt deleting it, although that doesn't seem to be fully supported by all modems. E.g. the EM7345 (FIH7160_V1.1_MODEM_01.1349.12) will still report contexts 'deleted' in this way, with the context-type set to "none".º
2021-04-29broadband-bearer: rely on profile management for the cid selectionAleksander Morgado
There is no longer need to perform all the CID selection logic in the broadband bearer connection procedure, we can rely on the new profile management operations to do the same thing. We can do this because we're sure that all the MMBroadbandModem objects implement the MMModem3gppProfileManager interface. Additionally, given that we now provide the profile ID value as part of the MMBearerConnectResult, we no longer need a custom mm_broadband_bearer_get_3gpp_cid() as we can use the generic mm_base_bearer_get_profile_id() for the same purpose.
2021-04-29broadband-modem: implement profile management supportAleksander Morgado
Using AT+CGDCONT for profile settings management (querying, updating, reseting), AT+CGDEL for profile deletion, and AT+CGACT for activation status management (check, deactivate).
2021-04-29iface-modem-3gpp-profile-manager: new interface for profile managementAleksander Morgado
This interface will provide support for the profile management operations in different modem types. This initial commit introduces support for the interface and provides handlers for the methods that may be called in the interface.
2021-04-29modem-helpers: new profile list helpersAleksander Morgado
The new helpers allow converting a PDP context list returned from the +CGDCONT? parser to a list of 3GPP profile objects. The new mm_3gpp_profile_list_find_best() method is equivalent to the mm_3gpp_select_best_cid() one, but using profile objects as input/output instead of specific settings. The unit tests that were testing mm_3gpp_select_best_cid() are also converted to use mm_3gpp_profile_list_find_best().
2021-04-29bearer-list: allow lookup by connected profile idAleksander Morgado
Some of the operations performed by the profile management interface will require checking whether the operation is attempted on a profile for which there is a known connected bearer object. We introduce a new method to lookup a bearer in the bearer list by its connected profile id.
2021-04-29base-bearer: propagate connected profile id value in the connect resultAleksander Morgado
Implementations that support profile management will provide the connected profile id value in the MMBearerConnectResult returned to the base bearer object during the connection attempt.
2021-04-29api,bearer: new 'profile-id' settingAleksander Morgado
We define a new 'profile-id' setting in the bearer properties that users will use to specify which connection profile of the ones available in the device should be connected. When the 'profile-id' is given, the associated bearer object will be bound to the 'profile-id', and the user is able to provide additional settings to apply on top (e.g. if the profile storage doesn't allow some of the settings we support, like 'apn-type', or if the setting is completely unrelated to profiles, like 'multiplex'). After introducing the 'profile-id' as a valid setting in the bearer properties, we also reimplement the properties object internals to make use a 3GPP profile for the subset of common settings between both objects.
2021-04-29api,bearer: new 'apn-type' settingAleksander Morgado
This new setting allows the user setting up the connection to specify the purpose of the connection being brought up. Until now, we would always assume that connections are exclusively brought up for connecting to the Internet, also limited by the inability to connect to multiple different APNs at the same time. But that may really not be true as there may be additional services that may be accessed through other APNs, like MMS services or even private networks for companies that have their own APNs on a given operator (e.g. not that uncommon with banks and connected cars). The new APN type setting will not change the way the bearer is connected, but will allow the connection manager to decide what kind of networking setup the specific connection needs. This new setting can be provided by the user itself, or implicitly read from the device if the device stores this information.
2021-04-28build: require libmbim 1.25.3Aleksander Morgado
Including the latest QDU service enum value.
2021-04-23bearer-qmi: reorder methods in connection state machineAleksander Morgado
The "ready" methods for each step in the state machine must be ordered from bottom to top, so that the readers can read the methods in that order when following the logic.
2021-04-23port-qmi: WDS clients also mux-id specificAleksander Morgado
In addition to differentiating between IPv4 and IPv6 clients, we also need to explicitly allocate different clients in different bearer objects when in multiplexing.
2021-04-23bearer-qmi: fix dual-stack connectionsBjørn Mork
Connecting the second family of a dual stack connections fails with 'PolicyMismatch' when muxing is setup after family selection. Switching the order of the family selection and muxing setup to fix the problem. Looks like family selection must be the very last WDS request before connecting the client. Signed-off-by: Bjørn Mork <bjorn@mork.no>