Commit Graph

7939 Commits

Author SHA1 Message Date
Aleksander Morgado
0eaf42572b docs,libmm-glib: add missing reference for MMNr5gRegistrationSettings 2022-01-06 20:51:59 +01:00
Aleksander Morgado
bae2f3b204 api,modem: fix alignment in SetPrimarySimSlot() 2022-01-06 20:31:29 +01:00
Bruce A. Johnson
91ed72aa29 core: switch bash shell scripts to use /bin/sh for use w/Busybox.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/483
2022-01-05 10:26:16 +01:00
Aleksander Morgado
791fb38417 cli: fix 3GPP location mcc/mnc field names 2021-12-26 11:04:05 +01:00
Aleksander Morgado
3fac73a113 iface-modem-simple: explicit short wait after enabling
When we have just enabled, we want to give it some time before
starting the registration process, so that any pending registration
update that may have been scheduled during the enabling phase is
applied. We don't want to trigger a new automatic registration if
e.g. we're already registered.
2021-12-26 11:02:45 +01:00
Aleksander Morgado
1ffd693f54 iface-modem-simple: fix connection attempt start place
The 'ENABLE + 1' step is 'WAIT_FOR_ENABLED' really, and that should be
only used when the current state is not a final one. If we're already
enabled, or registered, or connected, then jump to 'REGISTER' right
away.
2021-12-26 11:02:45 +01:00
Aleksander Morgado
1199fa934d broadband-modem-mbim: schedule reg info updates as soon as enabled
During the enabling phase, the modem may receive a lot of asynchronous
updates reporting registration info changes, but we were fully
ignoring them because the modem was not yet enabled. The problem with
this is that as soon as we reach the enabled state, we may not receive
additional info, so we would be left in 'enabled' state until new
asynchronous updates are received or until we start a connection
attempt.

We can solve this by triggering an explicit update with the
registration information that we have cached as soon as we're enabled.
2021-12-26 11:02:45 +01:00
Aleksander Morgado
73eda8cdc8 broadband-modem-mbim: don't miss operator id/name on packet service updates 2021-12-26 11:01:50 +01:00
Aleksander Morgado
59c79b07ae iface-modem: minor coding style changes 2021-12-26 11:01:50 +01:00
Aleksander Morgado
f2f2dfec13 broadband-modem-mbim: reload ATDS location on reg state changes
Only if transitioning into a "registered" state ("home", "roaming",
"partner") or if "denied"; otherwise, assume LAC/TAC/CID are all
unknown.

This change makes the logic also reload the location info on
registration updates reported asynchronously via notifications.
2021-12-26 11:01:50 +01:00
Aleksander Morgado
f9487cf3d1 core: new '--test-mbimex-profile-management' option
The profile management APIs implemented by Microsoft in the MBIM
extensions provide certain features that are not available via other
means (e.g. ip type, access type preference, roaming allowance...).

Unfortunately, these APIs require the current list of profiles
installed in the modem to be a bit special; e.g. with one profile max
for each context/APN type. If this does not happen, the operations
will fail, or they will update contexts that should not be updated.

So, we disable for now the MBIM extension profile management support;
the logic is there, but not used by default.
2021-12-26 10:12:33 +01:00
Aleksander Morgado
2bfa6863c4 mmcli: new '--3gpp-profile-manager-status' operation
In order to show the properties of the profile management interface, e.g.:

  $ sudo mmcli -m a --3gpp-profile-manager-status
    -----------------------------------
    3GPP profile manager | index field: apn-type
2021-12-26 10:12:32 +01:00
Aleksander Morgado
80c4f49940 cli,modem-3gpp-profile-manager: delete should allow other index fields
Instead of expecting a specific profile id, allow the command to
support different index field types.
2021-12-26 10:12:31 +01:00
Aleksander Morgado
853aa29be8 iface-modem-3gpp-profile-manager: support 'apn-type' as index field
The modem may report the 'apn-type' field is the one to be used as
index; if that's the case, allow setting and deleting profiles based
on the given 'apn-type' field.

This change also makes the internal profile management operations use
one index field or another, based on what the protocol implements.
2021-12-26 10:12:11 +01:00
Aleksander Morgado
0d0ad722d9 iface-modem-3gpp-profile-manager: initialize the 'IndexField' property 2021-12-26 10:12:05 +01:00
Aleksander Morgado
f97957046b libmm-glib,profile-manager: new getters for the 'IndexField' property 2021-12-24 14:06:13 +01:00
Aleksander Morgado
049ebb7084 api,profile-manager: new 'IndexField' property
For most protocols, the operations to manage profiles require a unique
'profile-id' as index. This applies to AT, QMI and generic MBIM.

But for MBIM using the Microsoft Extensions for profile management,
this is no longer true; the device expects the 'apn-type' to be the
index.

This new property lets the user know which is the expected index field
in the Delete() and Set() operations.
2021-12-24 14:06:13 +01:00
Aleksander Morgado
b90d64192a broadband-modem-mbim: support profile properties from MbimProvisionedContextElementV2
Microsoft defined a new extended version of the "provisioned contexts"
operation from the generic MBIM basic connect service. This extended
version adds several new settings that can be stored in the profile
(e.g. IP type, media type, roaming allowance...).

But this new version has a huge drawback; we cannot specify single
profiles via their unique id while we perform update/delete operations
in the modem. Instead, Microsoft explains that we should use the
context type to identify the target context; but this will ONLY work
if we have one context defined for each type. As soon as we have
multiple contexts of the same type, this operation may fail or
otherwise update multiple contexts at once.
2021-12-24 14:06:11 +01:00
Aleksander Morgado
6ba245cedc broadband-modem-mbim: new profile settings not available in MBIM protocol
At least not yet.
2021-12-24 14:05:35 +01:00
Aleksander Morgado
1b37ccc27a broadband-modem-qmi: new profile settings not available in QMI protocol
At least not yet.
2021-12-24 14:05:35 +01:00
Aleksander Morgado
ebe9a33411 broadband-modem: new profile settings not available in generic AT protocol 2021-12-24 14:05:35 +01:00
Aleksander Morgado
87eaac8f9d iface-modem-3gpp: don't compare new properties when matching initial EPS bearer 2021-12-24 14:05:35 +01:00
Aleksander Morgado
e7c55f5f70 cli: indent all profile property names to the same column 2021-12-24 14:05:35 +01:00
Aleksander Morgado
a896f88bf9 cli: don't use dashes in 3GPP profile human output 2021-12-24 14:05:35 +01:00
Aleksander Morgado
3c0d94ac03 cli: new 'profile-source' setting in 3GPP profile 2021-12-24 14:05:35 +01:00
Aleksander Morgado
fb0b00db16 cli: new 'roaming-allowance' in 3GPP profile and bearer properties 2021-12-24 14:05:35 +01:00
Aleksander Morgado
99ca2f5a1c cli: new 'profile enabled' setting in 3GPP profile 2021-12-24 14:05:35 +01:00
Aleksander Morgado
41887b3fb7 cli: new 'access-type-preference' in 3GPP profile and bearer properties 2021-12-24 14:05:32 +01:00
Aleksander Morgado
50fc0101f5 libmm-glib: new 'profile-source' in 3GPP profile
Not applicable to bearer properties, as this is exclusively a proflie
management setting, unrelated to connection attempts.
2021-12-24 14:03:15 +01:00
Aleksander Morgado
f6a91b2250 libmm-glib: new 'roaming-allowance' in 3GPP profile and bearer properties 2021-12-24 14:03:15 +01:00
Aleksander Morgado
24e634229d libmm-glib: new 'profile-enabled' in 3GPP profile
Not applicable to bearer properties, as this is exclusively a proflie
management setting, unrelated to connection attempts.
2021-12-24 14:03:15 +01:00
Aleksander Morgado
e61fd7ca58 libmm-glib: new 'access-type-preference' in 3GPP profile and bearer properties 2021-12-24 14:03:13 +01:00
Aleksander Morgado
fc6bc84d22 api,bearer: new 'profile-source' setting
Sometimes it's useful to know how a given stored profile was created,
so devices can store and report this kind of information.
2021-12-24 14:02:30 +01:00
Aleksander Morgado
73a29c3e33 api,bearer: new 'roaming-allowance' setting
The 'allow-roaming' setting should be considered deprecated for 3GPP
devices that support the new 'roaming-allowance' setting, which is
much more detailed (as it allows to differentiate between partner and
non-partner networks) and may also be stored as part of a profile.
2021-12-24 14:02:30 +01:00
Aleksander Morgado
52538defe1 api,bearer: specify how 'allow-roaming' works
This is never part of profile settings, it's a volatile configuration
applicable to the connection attempt ongoing with the given bearer
settings.
2021-12-24 14:02:30 +01:00
Aleksander Morgado
1010c3be4e api,bearer: new 'profile-enabled' setting
This setting is stored as part of the profile in the device, and
allows the user to specify that a given profile must not be used in
any way by the modem (if set to 'FALSE').
2021-12-24 14:02:30 +01:00
Aleksander Morgado
339b51652a api,bearer: new 'access-type-preference' setting
In 5G capable devices, which can support multiple types of access
types (either 3GPP or non-3GPP), the UE may request to use a 3GPP
access type exclusively, prefer a 3GPP access type, or just report no
preference.

When supported, this field may also be part of the settings that can
be stored as part of a profile.
2021-12-24 14:02:28 +01:00
Aleksander Morgado
93709f8dc2 broadband-modem-mbim: implement 5GNR registration settings update 2021-12-24 12:41:27 +00:00
Aleksander Morgado
296cce0bbb broadband-modem-mbim: implement 5GNR registration settings loading 2021-12-24 12:41:27 +00:00
Aleksander Morgado
61675e1555 iface-modem-3gpp: implement support for updating 5GNR registration settings 2021-12-24 12:41:27 +00:00
Aleksander Morgado
396f9c533a iface-modem-3gpp: minor coding style change 2021-12-24 12:41:27 +00:00
Aleksander Morgado
60fe68f609 iface-modem-3gpp: implement loading 5GNR registration settings during init 2021-12-24 12:41:27 +00:00
Aleksander Morgado
a6dd7ac60f cli,modem: add 5GNR registration settings in modem info output 2021-12-24 12:41:27 +00:00
Aleksander Morgado
dcf9bb4ee8 cli,modem-3gpp: new '--3gpp-set-nr5g-registration-settings' action 2021-12-24 12:41:27 +00:00
Aleksander Morgado
5395a85443 libmm-glib,modem-3gpp: add support to get/set 5GNR registration settings 2021-12-24 12:41:27 +00:00
Aleksander Morgado
22657021fb libmm-glib: new helper to handle the 5GNR registration settings 2021-12-24 12:41:27 +00:00
Aleksander Morgado
724342deac api,modem3gpp: add DRX cycle in 5G registration settings 2021-12-24 12:41:27 +00:00
Som_SP
e951008ae8 api,modem3gpp: new 5G registration settings support and MICO mode
A new set of property+method is added to be able to configure the 5G
specific registration settings, initially defining the support for the
MICO mode.

The property name starts with "Nr5g" instead of "5gNr" because of the
limitations imposed by the GObject type system on how properties with
numbers can be named.
2021-12-24 12:41:27 +00:00
Xeonacid
922bc2df5f build,meson: Remove incorrect args for i18n.merge_file
`i18n.merge_file` has been ignoring positional arguments for a time and explicitly rejects with error since meson 0.60.0.
2021-12-23 09:14:02 +08:00
Jakob Hauser
db228b2859 broadband-modem-qmi: Introduce udev flag for reduced facility lock query
The udev flag "ID_MM_QMI_FACILITY_LOCK_QUERY_REDUCED" allows to skip
facility lock state query "get_ck_status" on the DMS path for devices
where this isn't implemented properly.

On devices that have enabled "device locks", this flag won't work well.
Skipping the query doesn't disable the locks.

Fixes #448
2021-12-20 05:10:14 +01:00