aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp.c
AgeCommit message (Collapse)Author
2021-05-26iface-modem-3gpp: fix double GError free on registration sync failureAleksander Morgado
2021-05-26iface-modem-3gpp: use g_autoptr() for the MMBearerProperties during syncAleksander Morgado
2021-05-26iface-modem-3gpp: synchronize state when resumingDylan Van Assche
On resume, refresh the EPS bearers and 3GPP registration as the registration and bearers may expired during suspend.
2021-05-22iface-modem-3gpp: skip initialization in LOCKED stateMichal Mazur
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-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-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-30iface-modem-3gpp: define new API to disable facility locksMichal Mazur
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.
2020-12-21iface-modem-3gpp: allow requesting the reload of the initial EPS bearerAleksander Morgado
2020-12-21libmm-glib,bearer-properties: allow loose comparisonsAleksander Morgado
When comparing bearer properties provided by the user versus loaded from the modem, we shouldn't be very strict, e.g.: * Password or other fields may not be readable from the device. * Some fields may not apply at all (e.g. RM protocol for EPS bearers) * NULL strings could be assumed equal to empty strings. * If no explicit IP type specified, an IPv4 default may be assumed. * If no explicit allowed auth specified, 'none' default may be assumed. These loose comparisons are applied when managing the initial EPS bearer settings and status, and we keep the strict comparison only during the connection attempt lookup of a bearer with certain settings, as those bearer objects are all created in the same place with the same rules.
2020-12-21iface-modem-3gpp: log requested/updates initial EPS bearer settingsAleksander Morgado
2020-10-10iface-modem-location: allow Cell ID only updatesAleksander Morgado
The "Serving System" indications reported via QMI when the device is moving may contain LAC/TAC+CID updates or just CID updates. E.g. this one has "CID 3GPP" (0x1e): Mon Aug 3 11:22:42 2020 daemon.debug [1567]: [/dev/cdc-wdm0] received generic indication (translated)... <<<<<< QMUX: <<<<<< length = 33 <<<<<< flags = 0x80 <<<<<< service = "nas" <<<<<< client = 3 <<<<<< QMI: <<<<<< flags = "indication" <<<<<< transaction = 4512 <<<<<< tlv_length = 21 <<<<<< message = "Serving System" (0x0024) <<<<<< TLV: <<<<<< type = "Serving System" (0x01) <<<<<< length = 6 <<<<<< value = 01:01:01:02:01:08 <<<<<< translated = [ registration_state = 'registered' cs_attach_state = 'attached' ps_attach_state = 'attached' selected_network = '3gpp' radio_interfaces = '{ [0] = 'lte '}' ] <<<<<< TLV: <<<<<< type = "Data Service Capability" (0x11) <<<<<< length = 2 <<<<<< value = 01:0B <<<<<< translated = { [0] = 'lte '} <<<<<< TLV: <<<<<< type = "CID 3GPP" (0x1e) <<<<<< length = 4 <<<<<< value = 14:C2:A8:00 <<<<<< translated = 11059732 And this one has both "CID 3GPP" (0x1e) and "LTE TAC" (0x25): Mon Aug 3 11:23:05 2020 daemon.debug [1567]: [/dev/cdc-wdm0] received generic indication (translated)... <<<<<< QMUX: <<<<<< length = 38 <<<<<< flags = 0x80 <<<<<< service = "nas" <<<<<< client = 3 <<<<<< QMI: <<<<<< flags = "indication" <<<<<< transaction = 4513 <<<<<< tlv_length = 26 <<<<<< message = "Serving System" (0x0024) <<<<<< TLV: <<<<<< type = "Serving System" (0x01) <<<<<< length = 6 <<<<<< value = 01:01:01:02:01:08 <<<<<< translated = [ registration_state = 'registered' cs_attach_state = 'attached' ps_attach_state = 'attached' selected_network = '3gpp' radio_interfaces = '{ [0] = 'lte '}' ] <<<<<< TLV: <<<<<< type = "Data Service Capability" (0x11) <<<<<< length = 2 <<<<<< value = 01:0B <<<<<< translated = { [0] = 'lte '} <<<<<< TLV: <<<<<< type = "CID 3GPP" (0x1e) <<<<<< length = 4 <<<<<< value = 32:36:BC:00 <<<<<< translated = 12334642 <<<<<< TLV: <<<<<< type = "LTE TAC" (0x25) <<<<<< length = 2 <<< We should therefore allow changes only in the CID, maintaining whatever LAC/TAC value we had before.
2020-10-10iface-modem-3gpp: print consolidated reg state info only when updatingAleksander Morgado
2020-04-09iface-modem-3gpp: don't fixup CS network supportAleksander Morgado
This is already done by the modem interface as soon as current capabilities are loaded.
2020-04-09iface-modem-3gpp: new 5GS network supportAleksander Morgado
2020-04-08error-helpers: port to use object loggingAleksander Morgado
2020-04-08iface-modem-3gpp: port to use object loggingAleksander Morgado
2020-01-30iface-modem-3gpp: fix warnings with -Wimplicit-fallthroughAleksander Morgado
mm-iface-modem-3gpp.c: In function ‘interface_disabling_step’: mm-iface-modem-3gpp.c:1797:18: error: this statement may fall through [-Werror=implicit-fallthrough=] 1797 | ctx->step++; | ~~~~~~~~~^~ ...
2020-01-30iface-modem-3gpp: fix warnings with -Wswitch-defaultAleksander Morgado
mm-iface-modem-3gpp.c: In function ‘handle_register_auth_ready’: mm-iface-modem-3gpp.c:550:5: error: switch missing default case [-Werror=switch-default] 550 | switch (modem_state) { | ^~~~~~ mm-iface-modem-3gpp.c: In function ‘handle_scan_auth_ready’: mm-iface-modem-3gpp.c:738:5: error: switch missing default case [-Werror=switch-default] 738 | switch (modem_state) { | ^~~~~~ mm-iface-modem-3gpp.c: In function ‘interface_disabling_step’: mm-iface-modem-3gpp.c:1788:5: error: switch missing default case [-Werror=switch-default] 1788 | switch (ctx->step) { | ^~~~~~ mm-iface-modem-3gpp.c: In function ‘interface_enabling_step’: mm-iface-modem-3gpp.c:2092:5: error: switch missing default case [-Werror=switch-default] 2092 | switch (ctx->step) { | ^~~~~~ mm-iface-modem-3gpp.c: In function ‘interface_initialization_step’: mm-iface-modem-3gpp.c:2394:5: error: switch missing default case [-Werror=switch-default] 2394 | switch (ctx->step) { | ^~~~~~
2020-01-06iface-modem-3gpp: forced registration is not stateAleksander Morgado
The request for forced registration is an implementation detail of mm_iface_modem_3gpp_register_in_network(), not part of any state to keep in the private info.
2020-01-06iface-modem-3gpp: allow re-registering in network with last settingsAleksander Morgado
This is going to be used by modems that require this operation e.g. after changing access technology or bands.
2020-01-06iface-modem-3gpp: fix manual re-registration to the same operatorAleksander Morgado
We should not assume that a manual registration request to a given operator is successful if the modem is already registered in that operator, because if the registration was due to an automatic process, we cannot make sure the modem won't roam to a different network. We should only assume that a manual registration is not needed to be relaunched if the modem is already registered in the requested network AND if the registration process was manual (i.e. we asked the modem to lock into a given network).
2020-01-06iface-modem-3gpp: refactor private data handlingAleksander Morgado
Instead of having separate contexts for different things, setup a interface-wide private struct.
2019-09-16iface-modem-3gpp: trivial macro rename to make it shorterAleksander Morgado
2019-09-16iface-modem-3gpp: fix reporting 'denied' registration stateAleksander Morgado
If all CS/PS/EPS report 'denied', we should not report 'unknown' as consolidated... <debug> [1568556573.833928] building consolidated registration state: cs 'denied', ps 'denied', eps 'denied' --> 'unknown'
2019-07-15iface-modem-3gpp: denied if all reg states idle except for oneAleksander Morgado
If there is one registration state which is denied and the remaining ones are either unknown or idle, then report denied.
2019-07-15iface-modem-3gpp: make registered state checking a macroAleksander Morgado
2019-07-15iface-modem-3gpp: log how the consolidated registration state is builtAleksander Morgado
2019-06-24iface-modem-3gpp: use correct finish() method to complete user registrationAleksander Morgado
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/131
2018-12-07broadband-modem-mbim: implement initial EPS bearer status supportAleksander Morgado
We use the "LTE attach status" extension defined by Microsoft to query and monitor the initial EPS bearer settings. https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations
2018-12-07api,modem-3gpp: new 'SetInitialEpsBearerSettings' methodAleksander Morgado
This method allows users to modify the settings used during the initial LTE attach procedure.
2018-12-07api,modem-3gpp: new 'InitialEpsBearerSettings' propertyAleksander Morgado
This property shows the settings stored in the device to be used during the initial LTE attach procedure.
2018-12-07api,modem-3gpp: new 'InitialEpsBearer' propertyAleksander Morgado
This property contains the DBus path of a Bearer object of type MM_BEARER_TYPE_DEFAULT_ATTACH, which is automatically exposed by the modem when registered in the LTE network. Unlike standard bearer objects created by the user, this bearer won't allow any connection/disconnection request, as its status is bound to the LTE registration exclusively. The bearer settings exposed by the object include the APN details that have been used during the initial packet network attach, which may be defined by modem settings (e.g. if previously configured in the firmware which APN to use for the given SIM card operator) or by the network itself (e.g. if none configured, or if a network override is required as when roaming). The bearer object will be created as soon as the LTE attach status details are known, and only while the modem is enabled. The implementation allows modems to update the LTE attach status details during runtime, so the bearer object with the settings may be recreated during runtime as well.
2018-10-26api: deprecate SubscriptionState propertyAleksander Morgado
2018-08-18modem-3gpp: add 'Pco' property to Modem3gpp interfaceBen Chan
This patch adds a 'Pco' property to the Modem3gpp interface for tracking PCOs that the modem has received from the network.
2018-08-09iface-modem-3gpp: fix location update when LAC=0 but TAC givenAleksander Morgado
2018-08-08api,location: give Tracking Area Code field in 3GPP location infoAleksander Morgado
The "location area code" field is given in GSM/UMTS networks exclusively. LTE networks use the concept of "tracking area code" instead. This patch updates the Location interface to Provide separate fields for LAC and TAC, instead of giving TAC values in the LAC field.
2018-05-18iface-modem-3gpp: ignore initial registration check result when enablingBen Chan
This patch extends commit c9e85b671 ("iface-modem-3gpp: ignore initial registration check result when appropriate") to handle the situation where a registration check update may prematurely transition the modem to the 'enabled' state while the modem is still being enabled. The issue is identified by Dan Williams <dcbw@redhat.com>. More details can be found in https://bugs.freedesktop.org/show_bug.cgi?id=106468
2018-02-08iface-modem-3gpp: don't force auto registration if already registeredDan Williams
In mm_iface_modem_3gpp_register_in_network() when deciding whether to force automatic registration or not, check whether the modem is already registered in a network. Just checking whether we have a valid operator code is not sufficient, as some modems (ublox Toby R2xx) don't always return an operator name/code even when registered.
2018-01-20modem-3gpp: allow loading and changing EPS UE mode of operationAleksander Morgado
The UE modes of operation for LTE are defined in 3GPP TS 24.301 (e.g. section 4.3 in v10.3.0): * PS mode 1: EPS only, 'voice centric' * PS mode 2: EPS only, 'data centric' * CS/PS mode 1: EPS and non-EPS, 'voice centric' * CS/PS mode 2: EPS and non-EPS, 'data centric' The mode specifies, among other things, how the UE should behave w.r.t CS fallback depending on the capabilities reported by the network.
2018-01-12iface-modem-3gpp: ignore initial registration check result when appropriateBen Chan
When a modem is being enabled, an initial registration check is scheduled to determine the current registration state and access technology. The initial registration check is performed asynchronously and may not complete before the modem state is transitioned to 'enabled'. When the modem is disabled shortly afterwards, the registration state is transitioned to 'unknown' and the modem state is transitioned to 'disabled'. But the completion of the initial registration check after that can transition the registration state and modem state to a wrong state. This patch addresses the issue by ignoring a registration state update if the modem isn't already enabled or being enabled.
2017-06-30iface-modem-3gpp: port mm_iface_modem_3gpp_register_in_network to use GTaskBen Chan
2017-06-30iface-modem-3gpp: port mm_iface_modem_3gpp_reload_current_registration_info ↵Ben Chan
to use GTask
2017-06-30iface-modem-3gpp: port mm_iface_modem_3gpp_disable to use GTaskBen Chan
2017-06-30iface-modem-3gpp: port mm_iface_modem_3gpp_enable to use GTaskBen Chan
2017-06-30iface-modem-3gpp: port mm_iface_modem_3gpp_initialize to use GTaskBen Chan
2017-06-06iface-modem: consolidate signal quality and access tech pollingAleksander Morgado
Plugins have two ways to update signal quality and access technology values: via unsolicited messages or via polling periodically. Instead of keeping separate contexts for polling signal quality and access technology values, we setup a common timeout to trigger both. This allows us to simplify in which case the explicit update is required, whenever one is needed to be explicitly updated, the other one should also be. The logic now also allows plugins to return an UNSUPPORTED error in either load_signal_quality() and/or load_access_technologies() to tell the interface logic that the polling of the specific item shouldn't be performed (e.g. if the updates are expected via unsolicited messages). If both signal quality and access technology polling is flagged as disabled, we totally disable the polling logic internally. The new SignalCheckContext is bound to the lifetime of the object so that we can keep the value of the supported flags until the object is destroyed.