Commit Graph

32 Commits

Author SHA1 Message Date
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
029ea68ce4 base-bearer: make sure 'ReloadStatsSupported' is set before transitioning to 'Connected'
By the time we report the bearer as 'Connected', the DBus client
should also be able to know right away the value of
'ReloadStatsSupported', instead of needing to wait for it to be
updated asynchronously.

This logic adds one additional step in the generic connection
sequence for this purpose, which is run after the modem is connected
but before we report the state change via DBus.
2021-12-13 09:35:28 +00:00
Frederic Martinsons
9fc3d15d29 api, dbus, bearer: Add ReloadStatsSupported bearer dbus property
This property means that the current bearer can reload stats and read TX
and RX bytes transmitted.

The property is initiliazed as soon as the bearer is connected.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-12-13 09:35:28 +00:00
Aleksander Morgado
eae2e28577 api,bearer: specify that 'profile-name' is part of profile management
The setting does not make much sense in an explicit connection attempt.
2021-11-04 21:21:57 +01:00
Aleksander Morgado
797cc6828a api,bearer: minor indentation fixes 2021-11-04 21:21:57 +01:00
Som_SP
511859ef0a api,bearer: add 'uplink-speed' and 'downlink-speed' stats
These values show the rates that have been negotiated with the network
during the PS domain attach.

These are not the current ongoing data rates associated to the network
usage at some given moment.

Includes updates by Aleksander Morgado to fix coding style issues and
add missing documentation items.
2021-11-03 12:41:51 +01:00
Som_SP
d71a0bcf8e api,bearer: add reference to 5G DNN in the "apn" property
It's just a new name for the same thing really.
2021-11-03 10:38:40 +00:00
Frederic Martinsons
0510e9aef8 api,bearer: new 'start-date' field in bearer statistics
It stores the epoch timestamp of the current bearer session start.
If there is no connected bearer, it is set to 0 and not displayed
in mmcli output.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>

Includes updates by Aleksander Morgado to fix coding style issues.
2021-10-22 13:48:13 +02:00
Andrew Lassalle
c355210f5d bearer-properties: Add profile-name to the bearer properties 2021-10-17 17:56:44 +02:00
Aleksander Morgado
de6b1324cb api,bearer: new 'ConnectionError' property
This new property will provide detailed information about the failed
connection attempt, or about the network initiated disconnection. The
property will be cleared only if a new connection attempt is
triggered, and so it can be used to investigate why a given attempt
failed without needing to be the one who triggered the attempt (e.g.
so that failures in NetworkManager-triggered connection attempts can
be investigated looking at the DBus API).

The property is built as a (ss) tuple, but the libmm-glib interface
provides methods to read this property as a GError.
2021-05-23 01:22:07 +02:00
Aleksander Morgado
9fd5aced67 api,bearer: new 'ProfileId' property
To report which is the currently active profile with this bearer, if
known. If the modem doesn't support profiles, or if the bearer is
disconnected, -1 (MM_3GPP_PROFILE_ID_UNKNOWN) will be reported.

It is guaranteed that no two connected bearers will have the same
ProfileId property value.
2021-04-29 10:13:22 +00:00
Aleksander Morgado
793370f2f8 api,bearer: new 'profile-id' setting
We define a new 'profile-id' setting in the bearer properties that
users will use to specify which connection profile of the ones
available in the device should be connected.

When the 'profile-id' is given, the associated bearer object will be
bound to the 'profile-id', and the user is able to provide additional
settings to apply on top (e.g. if the profile storage doesn't allow
some of the settings we support, like 'apn-type', or if the setting is
completely unrelated to profiles, like 'multiplex').

After introducing the 'profile-id' as a valid setting in the bearer
properties, we also reimplement the properties object internals to
make use a 3GPP profile for the subset of common settings between both
objects.
2021-04-29 10:13:22 +00:00
Aleksander Morgado
ff8e21b535 api,bearer: new 'apn-type' setting
This new setting allows the user setting up the connection to specify
the purpose of the connection being brought up.

Until now, we would always assume that connections are exclusively
brought up for connecting to the Internet, also limited by the
inability to connect to multiple different APNs at the same time.

But that may really not be true as there may be additional services
that may be accessed through other APNs, like MMS services or even
private networks for companies that have their own APNs on a given
operator (e.g. not that uncommon with banks and connected cars).

The new APN type setting will not change the way the bearer is
connected, but will allow the connection manager to decide what kind
of networking setup the specific connection needs.

This new setting can be provided by the user itself, or implicitly
read from the device if the device stores this information.
2021-04-29 10:13:22 +00:00
Aleksander Morgado
42fbcb0b7d api,bearer: minor alignment fix 2021-03-23 15:10:52 +01:00
Aleksander Morgado
97ae345d9e api: add 'Since' tags
These are not actively used by gdbus-codegen or gtk-doc, but they're
helpful anyway so that users know when a given API method was
introduced.
2021-03-23 12:50:17 +01:00
Aleksander Morgado
a21233c7ab api: define bearer settings only in the 'Properties' property
Avoid defining them multiple times in the Modem.CreateBearer(),
Simple.Connect() and Modem3gpp.SetInitialEpsBearerSettings() methods.
2021-03-22 15:31:50 +01:00
Aleksander Morgado
73db7f205c api,bearer: new 'Multiplexed' property
This property will be TRUE if the bearer has the data session
connected through a multiplexed interface.

If the bearer is disconnected, or connected without multiplexing, the
property will report FALSE.
2021-03-10 10:59:22 +01:00
Eric Caruso
446d497040 introspection: fix Bearer documentation
If e.g. a bearer with IPv6 configuration has DNS servers but exports
its link-local address, MM will avoid giving it the "static" method
type, and instead fall back to the "dhcp" type. However, it may
still have DNS information. Therefore, the comment that "method" is
the only property on configuration with type DHCP is misleading.
2020-11-30 09:25:10 -08:00
Aleksander Morgado
79daa3099e api,bearer: add 'total-rx-bytes', 'total-tx-bytes' and 'total-duration' stats
Compiling the amount of bytes transferred and received during all
tracked connection attempts, as well as the total duration of all the
connections.
2020-04-10 11:45:03 +00:00
Aleksander Morgado
f325ef5902 api,bearer: add 'attempts' and 'failed-attempts' statistics
When we're reusing over and over the same bearer object, we can
provide statistical information about the number of connection
attempts that have been done and how many of them failed.
2020-04-10 11:45:03 +00:00
Aleksander Morgado
dc154cf005 api,bearer: new 'BearerType' property
Until now we have only allowed to use and setup 'default bearers' (in
4G) or 'primary contexts' (in 2G/3G).

We can define a couple of additional bearer types, though:

* The 'dedicated bearers' (in 4G) or 'secondary contexts' (in 2G/3G),
  which are associated to a specific default/primary one, but which
  provide specific QoS settings configured via traffic flow templates.

* The 'initial default EPS bearer', which is a special case of default
  bearer in LTE, which is automatically created and connected when the
  modem is registered in the LTE network.

This commit introduces a new 'MMBearerType' enumeration that will be
associated to each bearer through a 'BearerType' property in the
org.freedesktop.ModemManager1.Bearer interface, showing what kind of
bearer/context this is.

By default, right now, all bearer objects created are 'default'
bearers.
2018-12-07 16:20:53 +00:00
Aleksander Morgado
03ead02686 introspection: new 'Stats' property in the bearer object
The new property is a dictionary which may include different parameters,
depending on what is actually supported by the underlying modem. For now,
just bytes RX/TX.

Note that this object will expose the stats *as reported by the modem*. These
values may differ from e.g. what is seen in the network interface stats.
2015-12-07 14:20:54 +01:00
Dan Williams
33eba0393d api: update documentation about IPv6 bearer methods
Even if the IPv6 bearer method is DHCP, the client should use SLAAC
(eg, IPv6 Router Solicitations, Router Adverisements, and possibly
DHCPv6) to determine the correct prefix and DNS information.  In
some cases, even with the DHCP method, and IPv6 "address" will be
given which should be assigned to the data port before beginning
an IP addressing as the mobile network may expect this address
to be used.
2014-06-13 11:30:49 -05:00
Ben Chan
e4db8c5302 api: add MTU to bearer IP config properties
This patch adds a 'mtu' value to the Ip4Config and Ip6Config property of
a Bearer object, which indicates the value of the maximum transmission
unit for the established connection when such information is available
(e.g. via QMI_WDS_GET_RUNTIME_SETTINGS on a QMI modem or
MBIM_CID_IP_CONFIGURATION on a MBIM modem).
2014-03-25 17:10:13 +01:00
Ben Chan
aa9af0ba68 introspection: fix typos 2014-03-25 12:13:36 +01:00
Aleksander Morgado
1e69874e59 api,introspection: update interface version number 2013-07-19 09:59:21 +02:00
Aleksander Morgado
2be7adb5ea api,introspection: update copyright notices 2013-06-11 10:12:33 +02:00
Aleksander Morgado
e68db23a97 introspection: setup all new files and remove old ones 2012-03-16 14:53:17 +01:00