Commit Graph

50 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
Aleksander Morgado
dbeeb98745 libmm-glib,modem: new methods to get list of cell infos 2022-01-18 09:00:10 +00:00
Aleksander Morgado
21c775703c libmm-glib: fix license in sources
The libmm-glib library is LGPLv2+, not GPLv2+.
2021-11-16 17:54:26 +01:00
Aleksander Morgado
12613eac87 libmm-glib,modem: move deprecated methods to compat source 2021-06-25 19:01:06 +02: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
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
ddb7d915a7 libmm-glib: unconditionally define autoptr support for all types
As we now depend on glib 2.48
2020-01-15 18:56:21 +01: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
5dc79ce606 libmm-glib: add autoptr cleanup functions for all types
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/100
2019-01-03 16:40:47 +00:00
Ben Chan
9c6a1ebb1e libmm-glib: add helpers for loading hardware revision 2017-09-20 09:56:23 -07:00
Ben Chan
e438221258 libmm-glib: add methods to retrieve 'Bearers' property in Modem interface 2013-11-22 08:35:41 +01: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
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
bd360aa029 libmm-glib,modem: handle the new 'SupportedIpFamilies' property 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
091c47d695 libmm-glib,modem: new methods to handle the power state 2013-01-11 10:05:46 +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
433fdea6d4 libmm-glib: only allow including `libmm-glib.h' directly
Unless when compiling libmm-glib itself, of course.
2012-10-04 10:17:12 +02:00
Aleksander Morgado
c250fa3797 libmm-glib: remove the `libmm-common.h' header
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.

We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:

 * Don't include the libmm-glib high level API in the ModemManager daemon, as
   the object names would clash with those in the core.

 * Define some of the methods of helper objects to be included only if compiling
   ModemManager daemon or the mmcli.
2012-10-04 10:17:12 +02:00
Aleksander Morgado
8ae0c36ab9 libmm-glib,modem: `MMModem' is now a real object
Not just a typedef of the gdbus-codegen generated `MmGdbusModem'.
2012-10-01 23:44:48 +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
59d8110767 libmm-glib: add support to retrieve own numbers 2012-03-16 14:53:21 +01:00
Aleksander Morgado
d306bb082f libmm-common: `MMBearerProperties' won't be considered internal any more
Renamed `MMCommonBearerProperties' to `MMBearerProperties', and removed the
`MMBearerProperties' provided in libmm-glib. We'll just use the original one
from libmm-common always.
2012-03-16 14:53:19 +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
09d2f062c7 api,dbus: rename AllowedBands' to just Bands'
ModemManager will load:
  1) The list of supported bands. Note that this doesn't mean that any possible
     combination of bands is supported, as modems may support only specific
     combinations, but at least gives a rough idea of what the modem is capable
     of handling.

  2) The list of CURRENT bands. There is no such "Allowed" bands, as we do with
     modes, modems will have a specific set of bands being currently used, which
     will be reported in the `Bands' property.

If the modem allows modifying the list of bands to use, this can be done with
the `SetBands()' method. If the modem doesn't support using a specific
combination of bands, this method will report an error.
2012-03-16 14:28:13 +01:00
Nathan Williams
3c41ce5d8b api,dbus: new `Command' method in the API to send arbitrary AT commands
BUG=chromium-os:25348
TEST="mmcli -m 0 --command='E0'"
Change-Id: I320587560fde5780f9d5a4998e32364d36a71ed7
2012-03-15 14:15:06 +01:00
Aleksander Morgado
69e860329b libmm-glib: no need to expose custom flags string builders 2012-03-15 14:14:52 +01:00
Aleksander Morgado
fe7f71b677 libmm-common,libmm-glib: new object to handle bearer creation properties 2012-03-15 14:14:38 +01:00
Aleksander Morgado
6cfccb1452 libmm-common,libmm-glib: new modes string builder 2012-03-15 14:14:37 +01:00
Aleksander Morgado
5e0df90272 libmm-common, libmm-glib: new bands string builder 2012-03-15 14:14:37 +01:00
Aleksander Morgado
9d7e3de4cd api: MMModemBand is now an enum, not flags
We don't want to handle bands as flags, in order to avoid the need of 64-bits
for the enum. This change implies that setting allowed bands will be done by
giving an array of uint32 values, signature "au".
2012-03-15 14:14:37 +01:00
Aleksander Morgado
6f98da9310 libmm-glib: handle new 'allow-roaming' property when creating bearers 2012-03-15 14:14:36 +01:00
Aleksander Morgado
52c5f6051b libmm-glib: new helper method to build a string with access technologies 2012-03-15 14:14:35 +01:00
Aleksander Morgado
516b097331 api,enums: renamed MMModemAccessTech' to MMModemAccessTechnology'
This one was the last enum without full name.
2012-03-15 14:14:35 +01:00
Aleksander Morgado
e2e0812272 api,dbus: renamed AccessTechnology' to AccessTechnologies'
We are reporting a bitmask of flags, not just one value.
2012-03-15 14:14:35 +01:00
Aleksander Morgado
dae3f95704 libmm-glib: get a list of MMBearer objects when listing bearers in the MMModem 2012-03-15 14:14:34 +01:00
Aleksander Morgado
c6d7fb893a libmm-glib: get the MMBearer object when creating it in the MMModem 2012-03-15 14:14:34 +01:00
Aleksander Morgado
6a07753ba0 libmm-glib: handle bearer creation, deletion and listing 2012-03-15 14:14:33 +01:00
Aleksander Morgado
ec8da67921 libmm-glib: new API method to build a string of capabilities from a bitmask 2012-03-15 14:14:33 +01:00
Aleksander Morgado
7acacbbfd7 libmm-glib: simplify handling of interfaces
Avoid trying to merge all interfaces into the same set of APIs, and keep having
a specific object (proxy) for each interface handled by the GDBusObjects
reported listed by the GDBusObjectManager.
2012-03-15 14:14:33 +01:00
Aleksander Morgado
40b31d5a27 libmm-glib: get the MMSim object from the MMModem 2012-03-15 14:14:25 +01:00
Aleksander Morgado
72eef326b5 libmm-glib: new MMSim object 2012-03-15 14:14:25 +01:00
Aleksander Morgado
b4dd84c2c9 libmm-glib: new `MMModem' object, handling the Modem interface 2012-03-15 14:14:25 +01:00