Commit Graph

297 Commits

Author SHA1 Message Date
Aleksander Morgado
3ab765f11c api,3gpp: new 'SetPacketServiceState()' method 2021-11-02 09:50:17 +00:00
Aleksander Morgado
f55ea211a9 api,3gpp: new 'PacketServiceState' property
This property allows the user to know whether the device is attached
or detached from the packet domain service.
2021-11-02 09:50:17 +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
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
Andrew Lassalle
c355210f5d bearer-properties: Add profile-name to the bearer properties 2021-10-17 17:56:44 +02:00
Aleksander Morgado
5f043e47bf introspection,signal: minor doc fix in 5G RSRP 2021-10-16 00:02:26 +02:00
Aleksander Morgado
8fdaee63aa introspection,sar: new interface introduced for 1.20 2021-09-10 09:53:57 +00:00
Aleksander Morgado
7e1e2f44c3 build,meson: add Sar interface 2021-09-10 09:53:57 +00:00
Aleksander Morgado
a07a43366a Revert "api: remove Modem.Sar interface"
This reverts commit 686e37ff84.
2021-09-10 09:53:57 +00:00
Iñigo Martínez
77d1c24361 build: Port to meson
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
2021-09-07 10:55:43 +00:00
Aleksander Morgado
686e37ff84 api: remove Modem.Sar interface
There is no real implementation for it yet, so let's recover these
changes once 1.18 has been released.
2021-08-09 23:03:23 +02:00
Dylan Van Assche
0faf969e30 introspection: signal quality signature is (ub)
Signal quality property signature of the Modem Simple interface
is not an unsigned integer, but a struct containing
an unsigned integer indicating the strength and
a boolean to indicate if the value was recently taken.
2021-07-25 16:18:06 +02:00
Aleksander Morgado
bf9005df07 api,location: update TAC documentation to allow 3-byte values in 5GNR 2021-07-03 22:49:01 +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
d47babd5b7 api,introspection: fix DisableFacilityLock() documentation
make[4]: Entering directory '/home/aleksander/Development/foss/ModemManager/docs/reference/api'
    DOC   Preparing build
    DOC   Building XML
    DOC   Scanning header files
    DOC   Introspecting gobjects
    DOC   Building XML
    DOC   Building HTML
  ../../../../libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml:181: parser error : Opening and ending tag mismatch: variablelist line 165 and para
  </para>
         ^
2021-04-30 18:40:29 +00:00
Michal Mazur
25ffe4211a api,libmm-glib,cli: add command to disable facility lock 2021-04-30 18:40:29 +00: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
2d43ea48e1 api,modem: new Modem3gpp.ProfileManager interface
This new interface allows modems to expose the list of available
connection profiles stored in the device and edit or delete them; as
long as the underlying device/protocol allows it.
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
7ad2e3ce9c build: add support for the new SAR interface
Include the new SAR interface in the build so that gdbus-codegen
generates support for it in libmm-glib as well as proper documentation
in the API reference.
2021-03-23 08:49:30 +00:00
Aleksander Morgado
09cead8279 api,sar: improve documentation and add example of SAR mapping table 2021-03-23 08:49:30 +00:00
Madhav
6dd34b7965 api,sar: add D-Bus interface to support SAR
Add a new D-Bus interface to support dynamic SAR across multiple platforms.
The new interface exposes methods to configure sar power levels,
handle the communications with the modem, and let the platform
code be agnostic to modem type.
2021-03-23 08:49:30 +00: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
Teijo Kinnunen
74599e695b sim-qmi,libmm-glib: QMI implementation of get/set preferred networks 2021-03-12 10:42:37 +02: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
Aleksander Morgado
05b9ab7c25 api,modem: new 'MaxActiveMultiplexedBearers' property
In addition to the amount of bearers a user may connect without
multiplexing enabled (the default until now), we now also expose the
maximum number of bearers a user may connect after enabling
multiplexing over one single network interface (if supported).

The method responsible for creating the MMBearerList is now also
subclassable, so that implementations supporting multiplexing can
provide their own version with their own thresholds.
2021-03-10 10:59:22 +01:00
Aleksander Morgado
35e20a48c8 api,modem: deprecate the 'MaxBearers' property
This property was never initialized with a correct value, we would
always use the same value as used for MaxActiveBearers, which isn't
technically right. Just suggest to ignore this property, and flag
it as deprecated.

In addition to deprecating the API property, we will internally no
longer limit the amount of bearer objects that may be created with
different connection settings. The bearer object exposed in DBus is a
representation of the connection that may be setup, and so we can hold
as many representations as we want as long as the amount of connected
bearers doesn't exceed the maximum amount for each modem.

Leaving around the disconnected modems also serves another purpose.
Each bearer holds information about the amount of times a connection
with it has been attempted, and the amount of data transferred through
it. If we use the Simple.Connect() method to connect the modem using
different bearer settings, we won't lose the information of the past
connection attempts with different settings.
2021-03-10 10:59:22 +01:00
Aleksander Morgado
064e92e9b7 api,simple: new 'multiplex' setting in bearer properties
Both the Simple.Connect() and Modem.CreateBearer() are updated to
allow a new 'multiplex' setting in the properties provided by the user
in both of these methods.

The new setting expects a MMBearerMultiplexSupport enum indicating
what kind of multiplex needs the user has:
 * none: if multiplex must not be used.
 * requested: if multiplex should be used if available.
 * required: if multiplex must be used.

The underlying implementations will take care of accepting or
rejecting the setting depending on the system and modem capabilities.
2021-03-10 10:59:19 +01:00
Teijo Kinnunen
66e93751b8 api,sim: add new Sim.SetPreferredNetworks method
This commit includes D-Bus processing and documentation, but not any
modem access implementation.
2021-03-09 08:52:55 +02:00
Teijo Kinnunen
816beeffcb libmm-glib,modem-helpers,mm-base-sim: implement Sim.PreferredNetworks
The ModemManager1.Sim.PreferredNetworks property contains the preferred
networks (and access technologies, if available) configured to the
SIM card.

This commit implements preferred networks reading with AT+CPOL.
2021-02-26 12:28:01 +01:00
Aleksander Morgado
29d9dc7e0c api,introspection: flag as DEPRECATED the 'number' bearer setting
This setting is unused since some releases ago, and the corresponding
libmm-glib methods were already flagged as deprecated. Let's add an
explicit mention to this deprecation on the DBus API itself.
2021-02-17 23:53:51 +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
Eric Caruso
9fca046780 mm-base-sim: add EID D-Bus property
This provides a new D-Bus property on the Sim object that
exposes the EID of the SIM, if available.
2020-10-19 20:38:43 +00:00
Aleksander Morgado
924cf1af3c api,modem: new 'SetPrimarySimSlot' method
This new method allows changing the SIM slot considered as primary,
when the modem supports multiple SIM slots.

The generic handling of this method will make sure that the modem
object and all its SIM objects are re-probed from scratch as soon as a
successful SIM slot switch happens.

Implementations may report MM_CORE_ERROR_EXISTS when the switch
doesn't need to happen (e.g. if the requested SIM slot is already the
active one).
2020-08-28 14:59:06 +00:00
Aleksander Morgado
e7409b6898 api,modem: new 'SimSlots' and 'PrimarySimSlot' properties
The 'SimSlots' property exposes an array of SIM object paths, with one
array item for each available SIM slot in the system. If a valid SIM
card is found in a given slot, the path of the SIM object will be
exposed in the array item; if no valid SIM card is found, the empty
object path ("/") will be exposed instead.

The 'PrimarySimSlot' property exposes which of the SIM slots available
in the system is the one configured as being primary. In a Multi-SIM
Single-Standby setup, the primary slot will be the one corresponding
to the single active SIM in the system. In a Multi-SIM Multi-Standby
setup, the primary slot will be the one configured to act as primary
(e.g. the one that will be used for the data connection) among all the
active SIM cards found.
2020-08-28 14:59:06 +00:00
Aleksander Morgado
86a183778b api,sim: new 'Active' property
In preparation for the multi-SIM setup, we need a way to tell whether
a given SIM card is active or not in the system.

On systems with one single SIM slot, the available SIM card will
always be active.

On Multi-SIM Single-Standby setups we may have multiple SIM slots with
multiple SIM cards, but only one of them will be active at any given
time.

On Multi-SIM Multi-Standby setups we may have multiple SIM slots with
multiple SIM cards that may be active at the same time. E.g. the QMI
protocol allows up to 5 different active SIM cards (primary,
secondary, tertiary...).
2020-08-28 14:59:06 +00:00
Walter Hagstrom
88923ffe39 iface-modem-signal: added 5G signal information
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.
2020-07-04 05:50:41 +02:00
Eric Caruso
dfc2c51b9c introspection: use correct node name for ModemManager1 object
In the D-Bus specification it is stated that the root node of
an introspection file should have an absolute path[1]. This path
should not be the root path in D-Bus as putting objects there is
considered incorrect, and also because the MM1 object does not
actually sit at the root path (instead, it uses MM_DBUS_PATH, which
is /org/freedesktop/ModemManager1). Fix this in the introspection
file.

[1] https://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format
2020-05-01 14:12:43 -07:00
Aleksander Morgado
b95bcfe6e3 api,location: improve InjectAssistanceData() method docs
Explain when this method should be used instead of A-GPS.
2020-04-12 17:49:36 +02:00
Aleksander Morgado
ef56114244 api,location: improve Setup() method docs
Explicitly state that the signals_location argument affects the
behavior of the Location property.
2020-04-12 17:40:52 +02:00
Aleksander Morgado
d93526a114 api,location: improve Location property docs
Clearly specify that GetLocation() is another way to retrieve the
location information instead of the Location property.
2020-04-12 17:15:58 +02: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
b3ec30403f doc,api: add reference to --with-at-command-via-dbus in Command() info 2020-04-10 11:38:47 +02:00
Aleksander Morgado
868d0dbf3f api,doc: fix missing Command() doc output in html 2020-04-10 11:38:47 +02:00
Aleksander Morgado
797f2a5a2e api,doc: fix some property gtk-doc links 2020-04-10 11:38:47 +02:00