Commit Graph

7792 Commits

Author SHA1 Message Date
Aleksander Morgado
f27d7f9362 iface-modem-signal: bind together polling and threshold based setups
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.
2021-10-20 22:14:04 +02:00
Som_SP
92539fa71f iface-modem-signal: implement support for SetupThresholds()
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.
2021-10-20 22:09:57 +02:00
Som_SP
925f0bae11 libmm-glib,mmcli: add support for the new signal 'SetupThresholds()' API
Includes updates by Aleksander Morgado to fix mostly coding style issues.
2021-10-20 22:09:18 +02:00
Som_SP
9537261651 libmm-glib,mmcli: add support for 'error-rate' measurements in signal info
Includes updates by Aleksander Morgado to fix mostly coding style issues.
2021-10-20 22:07:24 +02:00
Som_SP
296b5185f5 api,signal: new signal threshold based setup
A new SetupThreshold() method is added to configure and control the
device signal notifications sent to the host. RSSI and error rate
based thresholds are initially assumed, but the interface allows
growing the method with additional threshold types.

Includes updates by Aleksander Morgado to improve documentation of the
new methods and properties.
2021-10-20 21:57:02 +02:00
Som_SP
86740082a2 api,signal: new 'error-rate' reporting per access technology
Includes updates by Aleksander Morgado to improve documentation.
2021-10-20 21:56:51 +02:00
Aleksander Morgado
d3b41f0b74 broadband-modem-mbim: early complete successful mode changes
When changing the allowed modes using the "Register State Set"
request, the response would arrive once we have been registered in the
network. This is obviously not ideal, as we just want to know if the
mode preference was changed, we don't care if we're registered or not.

Instead of waiting for the response to arrive or to timeout, we now
also process incoming indications that arrive during the wait time,
and if any of them shows the preferred modes to be the same ones as we
just requested, we complete the operation right away.
2021-10-19 08:27:23 +00:00
Aleksander Morgado
c091860618 broadband-modem-mbim: sync current modes and registration requests
In MBIM we use the same "Register State Set Request" for 2 different
things: configuring the allowed modes, and selecting the operator to
use (manual/automatic).

We need to keep track of which were the last things requested by the
user so that we don't overwrite previous user actions when we process
newer ones.
2021-10-19 08:27:23 +00:00
Aleksander Morgado
af7d488325 broadband-modem-mbim: fix MM_MODEM_MODE_ANY handling in set current modes 2021-10-19 08:27:23 +00:00
Aleksander Morgado
0fbcf8ddc1 broadband-modem-mbim: add 5G support to supported modes loading 2021-10-19 08:27:23 +00:00
Aleksander Morgado
316c91da0a helpers-mbim: add support for 3GPP2 data classes
Just for completeness.
2021-10-19 08:27:23 +00:00
Aleksander Morgado
27cc47f796 broadband-modem-mbim: flag 5G as supported based on data capabilities 2021-10-19 08:27:23 +00:00
Aleksander Morgado
db6f397e3e broadband-modem-mbim: implement current mode switching using 'Register State v2'
Use the new Preferred Data Classes field in the Register State v2
message in order to know if the modes requested in the Set message are
the expected ones or not.

Based on an initial implementation by Som_SP <somashekhar.puttagangaiah@intel.com>
2021-10-19 08:27:23 +00:00
Iñigo Martínez
7663a2e6c3 build,meson: Allow plugins to depend on build options
At the moment plugins might depend only on shared plugins. However,
plugins may depend also in different build options. For example,
`qcom-soc` plugin needs `qmi` option to be enabled.

Plugins build check has been changed to allow to depend on different
build options.

Fixes #447
2021-10-18 07:47:25 +00:00
Aleksander Morgado
d6aa727366 broadband-modem-mbim: fix signal quality reporting with MBIMEx v2.0
When we enable MBIMEx v2.0, the "Signal State" responses and
indications no longer report a valid RSSI value; and instead, they
report per access technology RSRP/RSRQ values.

  >>>>>> Header:
  >>>>>>   length      = 116
  >>>>>>   type        = indicate-status (0x80000007)
  >>>>>>   transaction = 0
  >>>>>> Fragment header:
  >>>>>>   total   = 1
  >>>>>>   current = 0
  >>>>>> Contents:
  >>>>>>   service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
  >>>>>>   cid     = 'signal-state' (0x0000000b)
  >>>>>> Fields:
  >>>>>>   Rssi = '99'
  >>>>>>   ErrorRate = '99'
  >>>>>>   SignalStrengthInterval = '5'
  >>>>>>   RssiThreshold = '2'
  >>>>>>   ErrorRateThreshold = '4294967295'
  >>>>>>   RsrpSnr = '{
  >>>>>>     [0] = {
  >>>>>>           Rsrp = '0'
  >>>>>>           Snr = '0'
  >>>>>>           RsrpThreshold = '4294967295'
  >>>>>>           SnrThreshold = '4294967295'
  >>>>>>           SystemType = '5g-nsa'
  >>>>>>     },
  >>>>>>     [1] = {
  >>>>>>           Rsrp = '49'
  >>>>>>           Snr = '45'
  >>>>>>           RsrpThreshold = '4294967295'
  >>>>>>           SnrThreshold = '4294967295'
  >>>>>>           SystemType = 'lte'
  >>>>>>     },
  >>>>>>   }'
2021-10-18 00:04:59 +02:00
Aleksander Morgado
c01f22804e modem-helpers: setup common RSSI to signal quality converter 2021-10-18 00:04:09 +02:00
Aleksander Morgado
e1bc4b0999 modem-helpers: remove unexistent method header 2021-10-18 00:04:01 +02:00
Andrew Lassalle
c355210f5d bearer-properties: Add profile-name to the bearer properties 2021-10-17 17:56:44 +02:00
Andrew Lassalle
b2a7591bcf broadband-modem-qmi: Add the profile name to profiles 2021-10-17 17:56:44 +02:00
Andrew Lassalle
8ecf7fc83e 3gpp-profile: Add profile name
QMI modems also report a profile name, and that value can be used to
select and update a specific profile.
2021-10-17 17:56:44 +02:00
Aleksander Morgado
c3fe738e7d port-mbim: request MBIMEx v2.0
The ModemManager codebase has been ported to support Basic Connect v2
messages as defined in MBIMEx v2.0, so at this point we can now switch
to use it by default whenever possible.
2021-10-16 22:28:29 +02:00
Aleksander Morgado
d8137789ed broadband-modem-mbim: support 'Signal State' from MBIMEx v2.0 2021-10-16 22:03:39 +02:00
Aleksander Morgado
b32d85b1bf bearer-mbim: support 'Packet Service' from MBIMEx v2.0 2021-10-16 22:03:39 +02:00
Aleksander Morgado
aca14b92c6 broadband-modem-mbim: support 'Packet Service' from MBIMEx v2.0 2021-10-16 22:03:39 +02:00
Aleksander Morgado
6b4a79f8ae broadband-modem-mbim: support 'Register State' from MBIMEx v2.0 2021-10-16 22:03:39 +02:00
Aleksander Morgado
f7b595d066 broadband-modem-mbim: pass MbimDevice to notification parsers
We're going to enable the Microsoft extensions by default, and in
order to properly parse the notification messages, we'll need to know
which is the currently agreed MBIMEx version.

So, pass down the MbimDevice to every notification parser. Not all of
them will need it, so just for completeness.
2021-10-16 22:03:39 +02:00
Aleksander Morgado
5f043e47bf introspection,signal: minor doc fix in 5G RSRP 2021-10-16 00:02:26 +02:00
Daniele Palmas
6c574ce3d6 telit: remove prefix mm_shared in static function names 2021-10-15 15:23:59 +02:00
Daniele Palmas
f8c1e84939 telit: prefer qmi for set_current_bands if available 2021-10-15 15:22:02 +02:00
Daniele Palmas
266043255f telit: prefer qmi for load_current_bands if available 2021-10-15 15:21:57 +02:00
Daniele Palmas
91e16ca282 telit: prefer qmi for load_supported_bands if available 2021-10-15 15:18:14 +02:00
Carlo Lobrano
3522a11578 telit: Detect 4G BND format from BND test reply
Telit modems that require hexadecimal number when specifying 4G bands
also reply to #BND=? command with a 4th parameter <LTE_band_ext>
(e.g. LM940, LM960, LN920, FN980).
On the other hand, modems that require decimal number when specifying 4G
bands only return 3 parameters to the same command.

It is then possible replace the detection of ext_4g_bands via UDEV tags
with an inspection of BND=? reply.
2021-10-15 11:39:33 +00:00
Amol Lad
650cdc5a32 telit: LN920 bands support 2021-10-15 11:39:33 +00:00
Freedom Liu
f5ab3c4678 foxconn: add T99W265 modules, support for QDU. 2021-10-15 14:05:27 +08:00
Aleksander Morgado
a1e6f911dd cli,signal: fix error message without EOL 2021-10-14 16:10:13 +02:00
Aleksander Morgado
c06ca6df3f qcom-soc: require udev tag for ports
Since the 'wwan' subsystem addition to the qcom-soc plugin, the rules
to say a modem is handled by this plugin are too broad, and the plugin
attempts to support any kind of device exposed by the WWAN subsystem,
not just those from Qualcomm SoCs.

Update the plugin to require a new ID_MM_QCOM_SOC udev tag that is set
in the plugin udev rules, given that these rules already check for the
expected SoC drivers (bam-dmux, ipa, qcom-q6v5-mss).
2021-10-14 12:54:21 +00:00
Aleksander Morgado
f9645c30b7 Revert "ci: temporarily build single plugins on merge requests"
This reverts commit 18b8a3c784.

We no longer need this, back to only on schedules.
2021-10-14 10:56:36 +02:00
Aleksander Morgado
18b8a3c784 ci: temporarily build single plugins on merge requests 2021-10-14 10:34:40 +02:00
Aleksander Morgado
a5f2f84f44 ci: switch single plugins build to use meson 2021-10-14 10:34:30 +02:00
Iñigo Martínez
86fcf2592f build,meson: Add an empty line to split includes and dependencies 2021-10-14 07:57:55 +00:00
Iñigo Martínez
803ce03d6a build,meson: Remove unnecessary empty line 2021-10-14 07:57:55 +00:00
Iñigo Martínez
7c4f8f6cc5 build,meson: Make use of _opt suffix for option variables
To make option names consistent, an `_opt` suffix has been added.

This was not applied to `polkit` option at the time and this is
fixed now.
2021-10-14 07:57:55 +00:00
Iñigo Martínez
b3b16b3dc2 build,meson: Make use of partial_dependency for generated dependency
The generated objects in `libmm-glib` are include in
`libmm_glib_dep` one by one to avoid the link to the generated
library that is included as a whole in `libmm-glib`.

meson includes a way to include partial objects of a dependency by
using the `partial_dependency` method, so by taking advantage of it
almost all objects are included.
2021-10-14 07:57:55 +00:00
Iñigo Martínez
3974b8b98f build,meson: Sort files alphabetically 2021-10-14 07:57:55 +00:00
Iñigo Martínez
c3b6a2876e build,meson: Remove unused option 2021-10-14 07:57:55 +00:00
Iñigo Martínez
bbc157688d build,meson: Improve plugins option set
Improved the way the plugins are set to allow a smaller summary.
2021-10-14 07:57:55 +00:00
Aleksander Morgado
85a99ae028 broadband-modem-qmi: fix non-initialized GError 2021-10-13 22:06:31 +02:00
Aleksander Morgado
8852cef817 quectel: fix non-initialized GError
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/442
2021-10-13 22:06:31 +02:00
Aleksander Morgado
2b742d99d5 broadband-modem-mbim: coding style fixes in the SAR implementation 2021-10-13 13:14:10 +02:00
Aleksander Morgado
708bde6b9c broadband-modem-mbim: use a dynamically allocated MbimSarConfigState
It makes reading the code a bit easier.
2021-10-13 13:14:10 +02:00