Commit Graph

47 Commits

Author SHA1 Message Date
Lukas Voegl
8cd1c1bdb9 api,modem: new 'Physdev' property
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-09-18 10:53:12 +02:00
som
e8d63c1743 modem-cellinfo: adding bandwidth and serving cell type
adding bandwidth information in mm-dbus interface
for the serving cell. In serving cell, the details
on whether the pcell/scell are from MCS or SCG is
also updated.

Co-author: Shilpa Shivakumar
2023-02-17 10:43:20 +00:00
Aleksander Morgado
554faa855c api,modem: new 'GetCellInfo()' method
This new method allows querying the modem for information about the
current serving cell(s) as well as any other neighboring cell that may
be found.

The information for the cells is given in an array of dictionaries,
where each element of the dictionary is a new dictionary itself.

Each cell type has a different set of properties that may be given in
the dictionary, and some of those properties in each type are also
applicable under certain conditions (e.g. only applicable to the cell
if it's a 'serving' cell instead of 'neighboring').

The API documentation explains in detail what is expected in each
case.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
bae2f3b204 api,modem: fix alignment in SetPrimarySimSlot() 2022-01-06 20:31:29 +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
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
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
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
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
Aleksander Morgado
839e2ec7ab api,modem: reword the properties argument explanation in CreateBearer() 2020-04-09 06:46:02 +02:00
Aleksander Morgado
6de1363174 api,modem: improve capabilities related documentation
And remove the unused mm_common_build_capability_combinations_any()
method in the common non-public library code.
2020-04-09 06:46:02 +02:00
Ben Chan
6f0c72e4f2 introspection: untabify 2019-08-29 12:05:09 +00:00
Aleksander Morgado
52b67dc7c3 api,modem: new 'CarrierConfigurationRevision' property
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).
2019-04-02 12:14:03 +02:00
Aleksander Morgado
94cf7f0ceb iface-modem: new carrier config support
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.
2019-04-02 12:11:25 +02:00
Aleksander Morgado
5123add860 api,doc: add note about when each modem interface is available 2019-01-15 15:40:10 +01:00
Aleksander Morgado
9c3ac2fb60 api,modem-3gpp: new 'InitialEpsBearer' property
This property contains the DBus path of a Bearer object of type
MM_BEARER_TYPE_DEFAULT_ATTACH, which is automatically exposed by the
modem when registered in the LTE network.

Unlike standard bearer objects created by the user, this bearer won't
allow any connection/disconnection request, as its status is bound to
the LTE registration exclusively.

The bearer settings exposed by the object include the APN details that
have been used during the initial packet network attach, which may be
defined by modem settings (e.g. if previously configured in the
firmware which APN to use for the given SIM card operator) or by the
network itself (e.g. if none configured, or if a network override is
required as when roaming).

The bearer object will be created as soon as the LTE attach status
details are known, and only while the modem is enabled. The
implementation allows modems to update the LTE attach status details
during runtime, so the bearer object with the settings may be
recreated during runtime as well.
2018-12-07 16:20:53 +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
72674225ca api,modem: deprecate ListBearers() method
This method is completely unnecessary as we have the readable Bearers
property already in place, so let's deprecate it.

Worth noting that the mm_modem_list_bearers() async/sync methods in
libmm-glib were not really using the ListBearers() method anyway, they
are using the property directly. These methods are NOT deprecated,
because they allow us to get a list of MMBearer objects, instead of
just the list of DBus paths that we get when reading the Bearers
property directly.

We also remove --list-bearers from the mmcli operation list as we have
already the same information in the standard modem output.
2018-11-26 16:51:35 +00:00
Aleksander Morgado
b473db334e introspection: add reference to the MM_ID_PHYSDEV_UID udev tag in Device property 2018-01-21 08:36:49 +01:00
Ben Chan
e32510418a api,introspection: new 'HardwareRevision' property
This property will let the clients know the hardware revision reported
by the modem.
2017-09-20 09:56:23 -07:00
Aleksander Morgado
7f442b777c introspection,api: new 'Bearers' property in the Modem interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 10:50:49 +01:00
Aleksander Morgado
1e69874e59 api,introspection: update interface version number 2013-07-19 09:59:21 +02:00
Aleksander Morgado
3206e95663 api,introspection: new 'Ports' property in the Modem interface
We will expose a new 'Ports' property listing all ports currently known by a
given modem. Ports which are not used but are detected as being part of the
modem will be listed with an 'unknown' port type.

This change uses the new 'MMModemPortType' enum and the new 'MMModemPortInfo'
helper struct to handle these values in libmm-glib. The already available
'MMPortType' enum hasn't been re-used for the interface because it contains
values that we don't need (e.g. IGNORED).

The port list is now also included in the modem information command of mmcli:

$ sudo mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id '97b7b99e3e2bea103880545b619fb05a3cc81b26')
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4'
           |        drivers: 'qcserial, qmi_wwan'
           |         plugin: 'Gobi'
           |   primary port: 'cdc-wdm0'
           |          ports: 'ttyUSB0 (qcdm), ttyUSB1 (at), cdc-wdm0 (qmi), wwp0s29u1u4 (net)'

https://bugzilla.gnome.org/show_bug.cgi?id=702678
2013-06-24 19:44:57 +02:00
Aleksander Morgado
2be7adb5ea api,introspection: update copyright notices 2013-06-11 10:12:33 +02:00
Aleksander Morgado
a902e6859e api,introspection: new 'SetCurrentCapabilities' method
For those modems which expose a valid 'SupportedCapabilities' property with more
than one item in the list, we'll allow switching between them.
2013-06-05 19:15:15 +02:00
Aleksander Morgado
700ebc5c07 api,introspection: rename 'ModemCapabilities' to 'SupportedCapabilities'
And also make it a list of masks, specifying which are the specific combinations
supported, not just one mask with all.

E.g.:
  -------------------------
  Hardware |   manufacturer: 'Sierra Wireless, Incorporated'
           |          model: 'MC7710'
           |       revision: 'SWI9200X_03.05.19.04ap r5475 carmd-en-10527 2012/09/17 17:57:14'
           |      supported: 'gsm-umts
           |                  gsm-umts, lte'
           |        current: 'gsm-umts, lte'
           |   equipment id: '358178040668164'
2013-06-05 19:15:15 +02:00
Aleksander Morgado
1c67d050cb api,introspection: merge 'AllowedModes' and 'SupportedMode' into 'CurrentModes'
We now have a single 'CurrentModes' property which contains both values in a
tuple with signature "(uu)".

Also, rename 'SetAllowedModes()' to 'SetCurrentModes()', and update the list of
arguments expected to have a single "(uu)" tuple.
2013-06-05 19:15:14 +02:00
Aleksander Morgado
45ceba7692 api,introspection: 'SupportedModes' is now a list of possible combinations
Instead of just a mask of MMModemMode values, we now provide a list of the
allowed and preferred mode combinations supported by the modem. E.g.:

$> sudo mmcli -m 0
  -------------------------
  Modes    |      supported: 'allowed: 2g; preferred: none
           |                  allowed: 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: none
           |                  allowed: 2g, 3g; preferred: 2g
           |                  allowed: 2g, 3g; preferred: 3g
           |                  allowed: 4g; preferred: none
           |                  allowed: 2g, 3g, 4g; preferred: none'
2013-06-05 19:15:14 +02:00
Aleksander Morgado
212d00c529 api,instrospection: rename 'Bands' to 'CurrentBands'
... and 'SetBands()' to 'SetCurrentBands()'.

We'll keep the 'Current' keyword in those properties which also have
'Supported' values.
2013-06-05 19:15:14 +02:00
Aleksander Morgado
b3222202bd api,introspection: new 'SupportedIpFamilies' property
This property will let the clients know which are the IP families supported by
the modem.
2013-06-05 19:15:13 +02:00
Aleksander Morgado
75d20c15d4 api: notify in the interface about the reason why the modem is FAILED
We currently implement 'SIM missing' and 'SIM error', which are probably the
most common ones.
2013-02-22 16:35:56 +01:00
Aleksander Morgado
49aecb57dc api,modem: new 'SetPowerState()' method and 'PowerState' property
Going into/outof low-power state is now a user-requested action.
2013-01-11 10:05:45 +01:00
Aleksander Morgado
79fdddccbf api,modem: new 'PrimaryPort' property
We do need to specify which is the primary port being used for controlling the
modem. This allows us to match the device with an already existing bluetooth
device in NetworkManager.
2012-10-19 00:58:36 +02:00
Aleksander Morgado
ebd792d2aa api,libmm-glib: new `allowed-auth' configuration for bearers
For bearers using STATIC or DHCP IP method, the modem itself is the one
negotiating authentication with the network. The new `allowed-auth' property
allows users to specify which authentication method(s) are allowed to be used.

See the following NetworkManager commit for more reference:
    commit 34aef8aaaa09b7473b9496aa49e550bd2def03f8
    Author: Andrew Bird <ajb@spheresystems.co.uk>
    Date:   Thu Mar 15 16:19:43 2012 -0500
2012-10-07 21:12:00 +02:00
Aleksander Morgado
0436b3e457 api,introspection: report list of drivers, not just one
Different ports of the same modem may get handled by different drivers. We
therefore need to provide a list of drivers (new `Modem.Drivers' property with
signature 'as') instead of just one (removed `Modem.Driver' property with
signature 's').

$ sudo mmcli -m 0 | grep drivers
           |        drivers: 'qcserial, qmi_wwan'
2012-08-24 13:34:51 +02:00
Aleksander Morgado
1ac18a06bb api,dbus: 'ip-type' property now given as a MMBearerIpFamily (u)
Instead of using a predefined set of string values for 'ip-type' in
Modem.CreateBearer() and Simple.Connect(), we'll use an enumeration. The
implementation will then need to convert the requested IP family type to e.g.
the correct PDP type in 3GPP modems.

This change also consolidates the use of enums in dictionary properties when
possible to do so, as with the Rm Protocol.
2012-08-22 09:38:21 +02:00
Aleksander Morgado
7518772d4b core: fatal errors in iface initializations force the modem into a FAILED state
Modems which end up being found unusable (e.g. no SIM, fatal SIM error, no
capabilities) will be exposed in DBus, but just with the Modem interface and
in a FAILED state which allows no actions.
2012-03-30 13:47:00 +02:00
Aleksander Morgado
238e2a5341 api,dbus: new `OwnNumbers' property in the Modem interface 2012-03-16 14:53:21 +01:00
Aleksander Morgado
3ccc78e858 api: `UnlockRetries' will reply a list of per-lock retry counts
Equivalent to `PinRetryCount' in the previous API. We don't have an additional
property for the retry count of the current lock, as it really is duplicating
information.
2012-03-16 14:53:19 +01:00
Aleksander Morgado
64f49c0c72 iface-modem: the Command() method is only allowed when running in debug mode 2012-03-16 14:53:18 +01:00
Aleksander Morgado
e68db23a97 introspection: setup all new files and remove old ones 2012-03-16 14:53:17 +01:00