Commit Graph

8154 Commits

Author SHA1 Message Date
Prakash Pabba
2d96df774a broadband-modem-qmi: Handle DMS operating mode indications
If Mode online is triggered just after Mode LPM and Mode LPM
processing is not complete in modem, modem will not process the next
request and the device will be stuck in an unwanted modem power
state. Thus, wait for a mode change indication from the modem before
declaring that a power on/off has been successful.
2022-01-11 11:30:19 +01:00
Sven Schwermer
300e1023ef fibocom: Double-check connection after dialing
Fibocom's documentation states that we must double-check the connection
is established when setting up an ECM connection. The possible replies -
according to the documentation - are:

  +GTRNDIS: <state>,<cid>,<ip>,<prim. dns>,<sec. dns>
  OK

or

  +GTRNDIS: 0

We just care about the state value which is 1 if everything worked.
2022-01-11 09:31:32 +00:00
Sven Schwermer
382a7c2425 fibocom: Use ECM bearer if +GTRNDIS is available
Some modems might have a net port but don't support +GTRNDIS which is
used by the ECM bearer. That case will be caught by this additional
check.
2022-01-11 09:31:32 +00:00
Sven Schwermer
c174fd29dc fibocom: Add L610 support 2022-01-11 09:31:32 +00:00
Sven Schwermer
2830cb3273 fibocom: Add udev port rules for MA510-GL 2022-01-11 09:31:32 +00:00
Sven Schwermer
c21bcb5526 fibocom: Add bearer for ECM-based connections 2022-01-11 09:31:32 +00:00
Sven Schwermer
6ad17fb22e fibocom: Subclass broadband modem
This is required in order to be able to use a custom bearer which in
turn is necessary for establishing ECM connections.
2022-01-11 09:31:32 +00:00
Dylan Van Assche
07d7f596d3 plugins/quectel/mm-shared-quectel: use QGMR to set version
Quectel modems report only their major firmware version through
AT+GMR, use AT+QGMR instead to report the full firmware version.
2022-01-11 08:42:53 +00:00
Dylan Van Assche
3f76b3b7d1 plugins/quectel/mm-broadband-modem-qmi-quectel: ignore carrier revision
Quectel EG25-G QMI modem firmware revisions are not matched with carrier configs.
Different VoLTE profiles might be selected by the user causing
the carrier config revision to change.

Since fwupd uses this string for firmware updates, it gets confused and
thinks the user has an update available.
2022-01-11 08:41:37 +00:00
Aleksander Morgado
fb0dfb8751 iface-modem-3gpp: fix variant ref handling in scan output 2022-01-07 21:35:43 +01:00
Aleksander Morgado
4515b00020 libmm-glib,modem-3gpp: fix leak when processing scan results 2022-01-07 21:35:43 +01:00
Aleksander Morgado
d30ad946d0 build: ignore test-kernel-device-helpers 2022-01-07 12:38:52 +01:00
Aleksander Morgado
1c1ba66d5e docs,libmm-glib: add missing references to reload stats supported related methods 2022-01-06 20:51:59 +01:00
Aleksander Morgado
cf210e3916 docs,libmm-glib: add missing reference to index field related methods 2022-01-06 20:51:59 +01:00
Aleksander Morgado
6449828535 docs,libmm-glib: fix references to new SIM property methods and types 2022-01-06 20:51:59 +01:00
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