If the modem is disabled:
* Polling is completely halted.
* Thresholds are disabled.
* The user is allowed to call Setup() or SetupThresholds() to change
the settings, even if the actual polling or thresholds setup isn't
in effect.
When the modem is enabled:
* Polling will be started if there is a existing polling rate.
* Thresholds will be setup based on the existing threshold settings.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/504
The values exposed in the Signal interface must not be cleared every
time polling is disabled, because the user may have also enabled
threshold based loading. And viceversa; if the user disables threshold
based polling, we should not unconditionally clear the values as
polling may still be enabled.
We setup a common Private context associated to the interface, and we
keep the current state there, which is also in sync with the DBus
interface.
We will only clear the signal values if both polling-based and
threshold-based setups are disabled.
Following the same reasoning, the mm_iface_modem_signal_update()
method used by implementations to report new signal quality details
is updated so that it's a no-op if no polling-based or threshold-based
setup has been enabled.
Also allow updating the per-access technology signal quality
information via indications.
Includes updates by Aleksander Morgado to fix coding style issues and
some other GTask related problems.
Extended the ModemManager Signal interface to include 5G signal
information for RSRP, RSRQ and SINR via libqmi. Also extended mmci
to print 5G signal info.
mm-iface-modem-signal.c:447:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
447 | ctx->step++;
| ~~~~~~~~~^~
mm-iface-modem-signal.c:449:5: note: here
449 | case INITIALIZATION_STEP_CHECK_SUPPORT:
| ^~~~
...
E.g. if the modem switches from 4G to 3G while the extended signal
information is enabled, we should no longer expose LTE specific signal
quality values, only the UMTS specific ones.
E.g. to avoid this:
$ mmcli -m 1 --signal-get
-------------------------
UMTS | RSSI: '0,00' dBm
| RSCP: '-92,00' dBm
| EcIo: '-13,00' dB
-------------------------
LTE | RSSI: '0,00' dBm
| RSRQ: '-6,50' dB
| RSRP: '-96,00' dBm
| SNR: '0,00' dB
When the GCancellable is added to the GTask, we can use a single
method call to check for the task being cancelled, and complete it
right away if so.
This patch also clears up the logic in the Novatel plugin, where the
code was trying to return "TRUE" when the task was cancelled, but
wouldn't work as the check-cancellable flag in the GTask is TRUE by
default (i.e. when completing the GTask, if it was cancelled, a
G_IO_ERROR_CANCELLED would be returned by default, regardless of any
other return value set).
This patch also introduces a small variation of the logic in the
Cinterion plugin: instead of running SWWAN=0 before completing the
async action, the command is now sent just after completion of the
async action. This shouldn't be an issue, as the SWWAN result itself
is ignored.