Age | Commit message (Collapse) | Author |
|
Allow the generic command API while in FAILED state, in case the modem
integrator has some special commands to recover the device.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/163
|
|
Same as with the signal quality polling, we may want to disable
explicitly the access technology polling if we can rely on plugin
specific URCs for this purpose.
|
|
E.g. if we have a specific command to enable the signal quality URCs,
we should only disable polling if the command is supported by the
specific modem and the command succeeds. If unsupported or fails, we
shouldn't disable the polling.
|
|
If we're loading signal quality or access technology, skip reporting
any error message if the specific error received is 'in-progress'.
Plugins will use this error when they cannot process the response to
the operation, e.g. if it was already consumed by a URC handler.
|
|
|
|
The load_unlock_required() step will be automatically retried by the
generic interface logic unless some specific errors happen (e.g. it
won't be retried if a SIM missing error is received).
This patch allows telling the implementation of the method whether
this time being run is the last one before reporting a hard error or
not.
|
|
The modem may take the request to set modes and reply right away with
a success before actually changing the current modes in use.
Therefore, If we reload modes right after we receive the set response,
we may still see the old modes instead of the new ones. Try to avoid
this, by reloading current modes a couple of times after we have set
them if they are not yet the expected ones.
|
|
The modem may take the request to set bands and reply right away with
a success before actually changing the current bands in use.
Therefore, If we reload bands right after we receive the set response,
we may still see the old band mask instead of the new one. Try to
avoid this, by reloading current bands a couple of times after we have
set them if the band mask is not the expected one.
|
|
If ModemManager is being used in a custom system, make it easy to
unconditionally enable the Modem.Command() method, in case the modem
needs to be configured in some way that is not supported via standard
modem interfaces.
|
|
When registration is denied, we should be reporting the modem with
'enabled' state instead of 'registered'. This was not happening
because the logic to build the consolidated state (for 3GPP+3GPP2
modems) was using as default initial state the current old state, and
so if the old one was 'registered' it never allowed getting a
consolidated state of 'enabled', because 'registered' > 'enabled'.
Instead of using the old initial state, the consolidated modem state
should use 'enabled' as default initial value, which is the lowest
among 'enabled, 'searching' and 'registered'.
|
|
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).
|
|
In order to support different per-carrier upgrade paths in fwupd.
|
|
During initialization phase we will allow querying the modem for the
details of which carrier-specific configuration is being used, and
will expose a description string in the API.
In addition to showing the current configuration, we will also allow
automatically switching the configuration based on the SIM card
detected in the device. In order to allow this, plugins/modems will
need to provide the expected mapping between carrier config
description and MCCMNC. This mapping cannot be generic, because
different manufacturers may use different description strings.
|
|
|
|
So that the returned error is much more descriptive.
E.g. instead of this:
$ sudo mmcli -m 0 -e
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Enable is not implemented on interface org.freedesktop.ModemManager1.Modem'
We'll get this:
$ sudo mmcli -m 0 -e
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: modem in failed state'
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/96
|
|
When the MMIfaceModem initialization returns with the SIM_NOT_INSERTED
error, the base logic is already updating the modem failed reason to
SIM_MISSING. There is no need to do that explicitly for the case where
SIM hot swap is supported.
|
|
Setting bands is a very device-specific operation. Sometimes the
device requires specific band combinations, or sometimes the 'any'
specific logic doesn't apply to all supported bands (e.g. may apply
only to the currently selected modes, as in XMM based devices).
So, don't assume that if the set command succeeds we have set all
expected bands. Instead, do an explicit loading of the current bands
after the set operation, same thing as we do when setting modes.
|
|
Commit 708b00ae3 "modem: allow periodic signal check to be disabled"
added a "iface-modem-periodic-signal-check-disabled" property in
MMIfaceModem/MMBroadbandModem to indicate if the periodic signal check
should be disabled. If the property is set to TRUE, the
signal_quality_polling_supported field of SignalCheckContext is set to
FALSE, which is sticky across modem disable/enable operations. However,
that is undesirable as we would like to issue an initial signal check to
refresh the signal quality value after the modem is re-enabled from a
state when the RF may have been previously turned off.
|
|
ModemManager decides to disable periodic signal check if either
load_signal_quality is not implemented or load_signal_quality returns an
unsupported error. However, in some cases, we want to use
load_signal_quality to query the initial signal quality but rely on
unsolicited signal quality updates from the modem afterwards without
periodically polling for signal quality. To support that, this patch
introduces a property in MMIfaceModem/MMBroadbandModem to indicate if
the periodic signal check should be disabled.
|
|
|
|
When in low-power mode, some modems will not dispatch unsolicited
notifications, such as for SIM hot swapping. There is code in
MMBroadbandModemTelit to handle this by checking the SIM identifier
during modem power up against the identifier cached in the SIM
D-Bus object. If they're different, the SIM has likely been
swapped while we were powered down.
We can move this code out to MMBroadbandModem because it doesn't
actually rely on any Telit-specific details, and invoke it from
MMIfaceModem via a new method.
|
|
The modem object is being explicitly referenced and stored in the
Context, but then never unref-ed, completely leaking a modem reference
forever.
Fixes: 4df545884733bbc5a851ab86e0983dec057d5482
|
|
|
|
This patch adds a mm_iface_modem_get_unlock_retries helper for getting
the current MMUnlockRetries value of a MMIfaceModem object, which later
allows us to partially update (e.g. a specific MMModemLock) the
MMUnlockRetries value of a MMIfaceModem object.
|
|
This patch exports the internal function update_unlock_retries() in
MMIfaceModem as mm_iface_modem_update_unlock_retries(), which later
allows us to call it from other classes.
|
|
This patch removes an unnecessary error check in the
update_unlock_retries() where the error is never set.
|
|
Currently, when SIM hot swap fails in either mm-iface or plugin, the
ModemManager still opens ports context and prints a message saying that
SIM hot swap is supported and that it's waiting for SIM insertion,
instead of clearly saying that SIM hot swap is not working.
This patch:
1. introduces a new property MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED
which is FALSE by default and set to TRUE only when
setup_sim_hot_swap_finish() succeded.
2. subordinates the completion of SIM hot swap setup (in
mm-broadband-modem) and the related messages to the the value of
MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED
Finally, this patch replaces the MBIM's sim_hot_swap_on private property
with the new property MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, since they have the
same meaning.
|
|
|
|
This fixes commit 66f10d61a20e6c661cb04225835ec7a343f4fe36
("iface-modem: port mm_iface_modem_initialize to use GTask"), which
didn't update mm_iface_modem_initialize_finish to use
g_task_propagate_boolean.
|
|
When returning an enum value via g_task_return_int, some code assumes
the enum value is always non-negative and thus considers that a negative
value implies an error. This assumption could be invalidated if a
negative value is later added to the enum. To make it less error prone
to future changes, this patch modifies the code to check if the GError
argument to g_task_propagate_error is populated instead.
|
|
By using g_new0 instead of g_slice_new0 to allocate certain context
structs, we can simply use g_free as GDestroyNotify in
g_task_set_task_data and get rid of those functions that solely wrap the
g_slice_free call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We also remove the explicit refresh request from the Cinterion plugin,
as this is a generic action applicable to all modems that require
polling for signal quality and/or access technology.
|
|
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.
|
|
Just for consistency, this is not a bug per se.
|
|
If going directly e.g. from "Searching" to "Connecting", just setup
the signal quality retrieval logic right away, don't assume we always
go through "Registered" state before starting a connection.
Reported-by: <colin.helliwell@ln-systems.com>
|
|
If a device reports "LTE" in the list of current capabilities, we'll
set EPS network supported by default. This will enable CEREG
registration checks for AT based devices.
If a device reports only "LTE" in the list of current capabilities, we
disable all the other network support flags (e.g. will disable CREG
and CGREG checks among others).
https://bugs.freedesktop.org/show_bug.cgi?id=100170
|
|
|
|
|
|
|
|
BaseModem
added reprobe property.
MMDevice
added logic to recreate the modem if it is set invalid and "to reprobe"
MMBroadbandModem
* added initialization step for SIM hot swap:
1. keep dedicated ports open to listen to modem's unsolicited
2. dedicated error management in case of initialization failure due to SIM missing
* added function to be called in order to act upon SIM insertion/removal:
1. close dedicated ports
2. set the modem to be reprobed
3. disable modem
* added SIM HOT SWAP boolean property
MMIfaceModem
* added initialization step for SIM hot swap, if supported by the plugin
* dedicated error management in case of initialization failure due to SIM missing
|