aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-modem.c
AgeCommit message (Collapse)Author
2023-09-18api,modem: new 'Physdev' propertyLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2022-01-18libmm-glib,modem: new methods to get list of cell infosAleksander Morgado
2021-11-22libmm-glib,modem: fix warning when loading SIM slotsAleksander Morgado
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/465
2021-11-16libmm-glib: fix license in sourcesAleksander Morgado
The libmm-glib library is LGPLv2+, not GPLv2+.
2021-07-01libmm-glib,modem: use helper macros to manage the monitored propertiesAleksander Morgado
2021-07-01libmm-glib: use single mutex in each type to sync accessAleksander Morgado
There is truly no need for a per-property mutex, using a global one for the whole object is equally fine.
2021-06-25libmm-glib,modem: move deprecated methods to compat sourceAleksander Morgado
2021-06-24libmm-glib,modem: add missing input argument checksAleksander Morgado
2021-05-18libmm-glib: drop default timeout checks in Command()Aleksander Morgado
The g_dbus_proxy_get_default_timeout() is by default -1 unless explicitly updated, so the check doesn't make any sense really. We didn't see any warning produced because mmcli provides an explicit timeout of 30s, so it was never the default -1.
2021-03-10api,modem: new 'MaxActiveMultiplexedBearers' propertyAleksander Morgado
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-10api,modem: deprecate the 'MaxBearers' propertyAleksander Morgado
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.
2020-08-28api,modem: new 'SetPrimarySimSlot' methodAleksander Morgado
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-28api,modem: new 'SimSlots' and 'PrimarySimSlot' propertiesAleksander Morgado
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.
2019-10-28docs,libmm-glib: provide per-version indicesAleksander Morgado
2019-04-02api,modem: new 'CarrierConfigurationRevision' propertyAleksander Morgado
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-02iface-modem: new carrier config supportAleksander Morgado
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.
2018-08-27docs: mm_modem_get_sim is asyncGuido Günther
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
2018-06-29libmm-glib: reference dup_equipment_identifier instead of dup_pluginEnrico Mioso
Fix the comment.
2018-03-13libmm-glib,modem: fix introspection annotation for bearer listAleksander Morgado
2017-09-20libmm-glib: add helpers for loading hardware revisionBen Chan
2017-06-25libmm-glib,modem: port mm_modem_list_bearers to use GTaskBen Chan
2017-06-23libmm-glib,modem: port mm_modem_create_bearer to use GTaskBen Chan
2017-06-23libmm-glib,modem: port mm_modem_get_sim to use GTaskBen Chan
2017-06-23libmm-glib: use g_list_copy_deep for deep copying a GListBen Chan
2017-06-23libmm-glib,modem: fix object unref in list_bearers_context_complete_and_freeBen Chan
2017-03-29libmm-glib: remove explicit GDestroyNotify cast on g_object_unrefBen Chan
g_object_unref is in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_object_unref is thus not needed.
2017-01-04libmm-glib,modem: init/clear ports mutexAleksander Morgado
2017-01-04libmm-glib: fix memleak of MMModem's portsThomas Haller
Fixes: 3206e9566392e8a9678bbd49e0de9bb21ed75291
2015-09-24libmm-glib: don't create a SIM object if empty path (/) givenAleksander Morgado
Instead, we'll return NULL and an error set.
2015-08-02libmm-glib,docs: fix missing documentationsAleksander Morgado
2014-06-03libmm-glib: fix a memory leak of GMutexBen Chan
2014-02-27libmm-glib: deep-copy ports array in ensure_internal_ports() (bgo #724900)Dan Williams
ensure_internal_ports() didn't deep-copy the ports array, which meant that anything calling mm_modem_port_info_array_free() was freeing the internal memory owned by MMModem if it retrieved the array with mm_modem_get_ports(). https://bugzilla.gnome.org/show_bug.cgi?id=724900
2013-11-22libmm-glib: add methods to retrieve 'Bearers' property in Modem interfaceBen Chan
2013-11-21introspection,api: new 'Bearers' property in the Modem interfaceAleksander Morgado
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-10-24libmm-glib: fix some more introspection annotationsAleksander Morgado
2013-10-24libmm-glib: fix several introspection annotationsAleksander Morgado
2013-08-14libmm-glib: Fix and add introspection annotationsChristian Persch
Bug #705641.
2013-06-24api,introspection: new 'Ports' property in the Modem interfaceAleksander Morgado
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-05api,introspection: new 'SetCurrentCapabilities' methodAleksander Morgado
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-05api,introspection: rename 'ModemCapabilities' to 'SupportedCapabilities'Aleksander Morgado
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-05api,introspection: merge 'AllowedModes' and 'SupportedMode' into 'CurrentModes'Aleksander Morgado
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-05api,introspection: 'SupportedModes' is now a list of possible combinationsAleksander Morgado
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-05api,instrospection: rename 'Bands' to 'CurrentBands'Aleksander Morgado
... and 'SetBands()' to 'SetCurrentBands()'. We'll keep the 'Current' keyword in those properties which also have 'Supported' values.
2013-06-05libmm-glib,modem: handle the new 'SupportedIpFamilies' propertyAleksander Morgado
2013-05-23libmm-glib,modem: avoid accessing an already freed GArrayAleksander Morgado
We cannot g_array_unref() the GArray when get()-ing bands as that will clear the contents of the GArray, even if there are references around. Instead, just dup the array contents when returning.
2013-02-22api: notify in the interface about the reason why the modem is FAILEDAleksander Morgado
We currently implement 'SIM missing' and 'SIM error', which are probably the most common ones.
2013-01-11libmm-glib,modem: new methods to handle the power stateAleksander Morgado
2012-10-19api,modem: new 'PrimaryPort' propertyAleksander Morgado
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-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
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-03libmm-glib,sim: `MMSim' is now a real objectAleksander Morgado
Not just a typedef of the gdbus-codegen generated `MmGdbusSim'.