Commit Graph

21 Commits

Author SHA1 Message Date
Akash Aggarwal
d008e437c3 broadband-modem-qmi,mm-shared-qmi: implement support for 'SetPacketServiceState()' 2022-08-04 14:26:33 +00:00
Aleksander Morgado
81302efa66 iface-modem: use external dispatcher to attempt FCC unlock
We remove the built-in FCC unlock procedures from the ModemManager, we
will no longer run them automatically, and instead rely on external
scripts/programs to do that.

Packages providing the external FCC unlock tools can install them in
${pkglibdir}/fcc-unlock.d.

Users manually enabling external FCC unlock tools can install them in
${pkgsysconfdir}/fcc-unlock.d.

The user-enabled path takes precedence over the package-enabled one.
2021-11-17 11:30:01 +01:00
Aleksander Morgado
b9596c8187 broadband-modem-qmi: setup FCC unlock step
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-23 00:23:17 +02:00
Aleksander Morgado
ec8bf7f0e3 shared-qmi: trivial coding style update 2021-05-23 00:23:17 +02:00
Freedom Liu
76e700f4fd broadband-modem-mbim: get model through QMI-over-MBIM
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-14 22:10:49 +02:00
Teijo Kinnunen
5285720c48 shared-qmi: implement SIM/profile change detection
Implement eUICC change detection for QMI based modems using one of the
following mechanisms (in order of preference):

1. If the modem supports "get slot status" operation, we monitor
   physical slot status indications from the modem for the active
   slot to detect when ICCID changes.
2. Use "refresh register all" to subscribe refresh indications when
   the eUICC triggers REFRESH operation following the enablement of
   a new profile.
3. Use "refresh register" to subscribe refresh indications (file
   path of EF_ICCID is used) in a similar way. This is used with
   older modems that do not support "refresh register all".

If ICCID change is detected, the already existing SIM hot swap
mechanism in MM is triggered.
2020-09-28 12:00:08 +02:00
Aleksander Morgado
0880bf3f9a Revert "shared-qmi: implement SIM/profile change detection"
This reverts commit e91f2ef315.

This was wrongly merged squashing multiple commits together. Reverting
to merge separate commits.
2020-09-28 11:57:55 +02:00
Teijo Kinnunen
e91f2ef315 shared-qmi: implement SIM/profile change detection
Implement eUICC change detection for QMI based modems using one of the
following mechanisms (in order of preference):

1. If the modem supports "get slot status" operation, we monitor
   physical slot status indications from the modem for the active
   slot to detect when ICCID changes.
2. Use "refresh register all" to subscribe refresh indications when
   the eUICC triggers REFRESH operation following the enablement of
   a new profile.
3. Use "refresh register" to subscribe refresh indications (file
   path of EF_ICCID is used) in a similar way. This is used with
   older modems that do not support "refresh register all".

If ICCID change is detected, the already existing SIM hot swap
mechanism in MM is triggered.
2020-09-28 09:29:09 +00:00
Aleksander Morgado
00949c4ad3 core: add autoptr cleanup methods to all internal types 2020-09-19 20:27:10 +02:00
Aleksander Morgado
e4fd17d8c3 shared-qmi: implement SIM slot switching
Using the 'UIM switch slot' operation, this commit introduces the
ability to change which SIM slot to be active at any given time in a
Multi-SIM Single-Standby setup.

There is no validation done on whether the selected SIM slot has a
valid SIM card inserted or not; if the user selects a slot without any
SIM card, the newly probed modem object will start in Failed state
right away.
2020-08-28 14:59:06 +00:00
Aleksander Morgado
7c76450c15 shared-qmi: implement SIM slots loading during initialization
This commit introduces Multi-SIM Single-Standby support in all QMI
capable devices that support multiple SIM slots.

The 'UIM Get Slot Status' method is used to list all available
physical slots as well as the availability of SIM cards in the
different slots. This method also provides UICC already, so the SIM
objects are created early and exposed early in DBus.

Once all slots are listed, the logic will briefly make each of the
available SIM cards active in order to read additional settings like
IMSI, MCCMNC or the Operator name. This brief switching is required
because in a Single-Standby setup only one SIM can be active at any
given time.

The last slot to probe is always the one that was active originally,
making sure that the modem initialization logic can go on with the
correct SIM slot.
2020-08-28 14:59:06 +00:00
Aleksander Morgado
52b67dc7c3 api,modem: new 'CarrierConfigurationRevision' property
Which reports the version of the currently active carrier
configuration.

We also update the firmware 'version' reported in the firmware
settings so that carrier-specific upgrades can be performed (e.g. when
the firmware stays the same but the MCFG is updated).
2019-04-02 12:14:03 +02:00
Aleksander Morgado
b4b6dc9e65 shared-qmi: implement QMI PDC based carrier config support
We implement both loading the current configuration in use, as well as
automatically switching to a different one if a mapping file is
available.
2019-04-02 12:14:03 +02:00
Aleksander Morgado
d1744c7663 shared-qmi: reuse band management logic in MBIM whenever possible 2018-09-12 17:25:19 +00:00
Aleksander Morgado
ac69466c9d shared-qmi: implement 3GPP network registration logic
Ported from the broadband modem QMI implementation, keeping the logic
in place. We will need this to integrate mode/capability switching in
MBIM devices, for nothing else really (as MBIM already supports this
operation).
2018-09-12 17:25:19 +00:00
Aleksander Morgado
692d076ba6 shared-qmi: implement reworked mode and capabilities management
This commit introduces several improvements and changes in the way
modes and capabilities are managed in QMI capable devices. It is
organized into a single commit, as all changes in all 6 operations
(load current capabilities, load supported capabilities, set current
capabilities, load supported modes, load current modes, set current
modes) are related one to the other (given that the same QMI commands
are used for both capabilities and mode management).

The primary change is related to which capabilities are reported as
supported for a given device. In the previous implementation we
allowed switching between every combination possible for GSM/UMTS+LTE,
CDMA/EVDO+LTE or GSM/UMTS+CDMA/EVDO+LTE devices. E.g. we would allow
"LTE only" and "GSM/UMTS only" capabilities for GSM/UMTS+LTE devices,
even if they would both be managed in exactly the same way. That setup
wasn't ideal, because it meant that switching to a "LTE only"
configuration would require a power cycle, as capability switching
requires a power cycle, even if no change was expected in the exposed
DBus interfaces (which is why we require the power cycle). So, instead
of allowing every possible capability combination, we use capability
switching logic exclusively for configuring GSM/UMTS+CDMA/EVDO devices
(regardless of whether it has LTE or not) to add or remove the
GSM/UMTS and CDMA/EVDO capabilities. E.g. for a GSM/UMTS+CDMA/EVDO+LTE
device we would allow 3 combinatios: "GSM/UMTS+LTE", "CDMA/EVDO+LTE"
and "GSM/UMTS+CDMA/EVDO+LTE".

The "GSM/UMTS+CDMA/EVDO+LTE" is a special case because for this one we
allow switching to "LTE only" capabilities while we forbid switching
to "4G only" mode. As the same commands are used for mode and
capability switching, if we didn't have "LTE only" and we allowed "4G
only" mode instead and rebooted the device, we would end up not being
able to know which other capabilities (GSM/UMTS or CDMA/EVDO or both)
were also enabled.

Now that we have capability switching confined to a very subset of
combinations, we can use the mode switching logic to e.g. allow "4G
only" configurations in all non multimode devices, as well as masks of
allowed modes with one being preferred, which we didn't allow before.
In the previous implementation all mode switching logic was disabled
for LTE capable QMI devices. In the new implementation, we use the
"Acquisition Order Preference" TLV in NAS Set System Selection
Preference to define the full list of mode preferences for all
supported modes.

We also no longer just assume that NAS Technology Preference is always
available and NAS System Selection Preference only after NAS >= 1.1.
This logic is flawed, instead we're going to probe for those features
once when loading current capabilities, and we then just implement the
capabilities/mode switching logic based on that.
2018-09-12 17:25:19 +00:00
Aleksander Morgado
6026c99f2e shared-qmi: reuse device factory reset logic in MBIM whenever possible 2018-09-12 17:25:19 +00:00
Aleksander Morgado
9dc26cc44d shared-qmi: reuse device reset logic in MBIM whenever possible 2018-09-12 17:25:19 +00:00
Aleksander Morgado
d3b43bd0a6 shared-qmi: support for Qualcomm gpsOneXTRA assistance data
The gpsOneXTRA assistance data provides a convenient way to inject
predicted orbit information into the module, without requiring to have
an Internet connection in the module itself.
2018-08-21 13:26:08 +00:00
Aleksander Morgado
098897778b shared-qmi: import PDS-based GPS location support 2018-08-21 13:26:08 +00:00
Aleksander Morgado
811a80e5ea shared-qmi: new interface to handle common QMI implementations
This new interface will include implementations that are shared
between the MMBroadbandModemQmi and the MMBroadbandModemMbim.

For now, it just provides a way to implement the common client
allocation methods.
2018-08-21 13:26:08 +00:00