aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
AgeCommit message (Collapse)Author
2020-05-19libmm-glib,helpers: use locale-independent strtod()Aleksander Morgado
Otherwise parsing may fail, e.g. as in this unit test: # Start of smoni tests # DEBUG: testing SMONI response: ^SMONI: 2G,71,-61,262,02,0143,83BA,33,33,3,6,G,NOCONN # DEBUG: testing SMONI response: ^SMONI: 2G,SEARCH,SEARCH # DEBUG: testing SMONI response: ^SMONI: 2G,673,-89,262,07,4EED,A500,16,16,7,4,G,5,-107,LIMSRV # DEBUG: testing SMONI response: ^SMONI: 2G,673,-80,262,07,4EED,A500,35,35,7,4,G,643,4,0,-80,0,S_FR # DEBUG: testing SMONI response: ^SMONI: 3G,10564,296,-7.5,-79,262,02,0143,00228FF,-92,-78,NOCONN ** ERROR:cinterion/tests/test-modem-helpers-cinterion.c:1036:test_smoni_response: assertion failed (fabs (ecn0 - smoni_response_tests[i].ecn0) < 0.1): (0,5 < 0,1) Bail out! ERROR:cinterion/tests/test-modem-helpers-cinterion.c:1036:test_smoni_response: assertion failed (fabs (ecn0 - smoni_response_tests[i].ecn0) < 0.1): (0,5 < 0,1) Aborted (core dumped)
2020-04-10api,bearer: add 'total-rx-bytes', 'total-tx-bytes' and 'total-duration' statsAleksander Morgado
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-10api,bearer: add 'attempts' and 'failed-attempts' statisticsAleksander Morgado
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-09libmm-glib,helpers: ignore all leading whitespaces when parsing numbersAleksander Morgado
2020-04-09libmm-glib,helpers: allow reading hex strings from match infoAleksander Morgado
2020-04-09libmm-glib,helpers: skip quotes when reading numbers from match infosAleksander Morgado
Useful when the regex applied to the parseable strings don't have an special ignore rule for the quotes.
2020-04-09api: new 5GNR capabilityAleksander Morgado
2020-04-09api: deprecate MM_MODEM_CAPABILITY_LTE_ADVANCEDAleksander Morgado
It's not used anywhere.
2020-04-09api,modem: improve capabilities related documentationAleksander Morgado
And remove the unused mm_common_build_capability_combinations_any() method in the common non-public library code.
2020-02-07iface-modem-location: plug memleaks when updating gps raw variantAleksander Morgado
The helper method returning a variant from a MMLocationGpsRaw would return already a full variant reference instead of a floating one, so we were really increasing the refcount when doing g_variant_ref_sink() in the location interface. Fix this by consolidating all helper methods in libmm-glib that return variants from the different MMLocationXX objects, so that they all return full variants instead of floating ones.
2020-01-31libmm-glib,helpers: allow \r\n in string to number conversionsAleksander Morgado
It's not uncommon that we may want to parse a simple AT response that contains a single number by doing mm_strip_tag() followed by mm_get_uint_from_str(). In order to do this, we need to have the helper methods that convert strings to numbers support \r\n characters at the end of the string, as we would have in AT responses.
2020-01-31libmm-glib,location-gps-nmea: avoid using deprecated build_full() methodAleksander Morgado
mm-location-gps-nmea.c: In function ‘mm_location_gps_nmea_get_string_variant’: mm-location-gps-nmea.c:245:5: warning: ‘mm_location_gps_nmea_build_full’ is deprecated: Use 'mm_location_gps_nmea_get_traces' instead [-Wdeprecated-declarations] 245 | built = mm_location_gps_nmea_build_full (self); | ^~~~~
2020-01-31libmm-glib,test: avoid using deprecated mm_pco_list_free()Aleksander Morgado
test-pco.c: In function ‘test_pco_list_add’: test-pco.c:82:5: warning: ‘mm_pco_list_free’ is deprecated [-Wdeprecated-declarations] 82 | mm_pco_list_free (list); | ^~~~~~~~~~~~~~~~ In file included from ../../libmm-glib/libmm-glib.h:82, from test-pco.c:17: ../../libmm-glib/mm-pco.h:67:6: note: declared here 67 | void mm_pco_list_free (GList *pco_list); | ^~~~~~~~~~~~~~~~
2020-01-30build: use AX_IS_RELEASE() and AX_COMPILER_FLAGS()Aleksander Morgado
The autoconf macros AX_COMPILER_FLAGS_{CFLAGS|GIR|LDFLAGS} test for compiler and linker support of various flags, and add the flags to the generated output. If the command-line option '--enable-compile-warnings' is specified to 'configure', a number of additional warning options is also added to the output. This is the default. This update requires the presence of the GNU autoconf-archive in the system.
2020-01-15libmm-glib: unconditionally define autoptr support for all typesAleksander Morgado
As we now depend on glib 2.48
2020-01-06libmm-glib,simple-connect-properties: cleaner error handlingAleksander Morgado
If processing a key-value pair as a bearer property fails, we need to know if it failed due to the key being unknown or due to some other reason (e.g. failure parsing value of a known key). We'll only try with the Simple.Connect properties if the key is reported as unknown in the bearer properties. This will help us better identify errors if e.g. an invalid value is given to a known key. E.g. "yes" was invalid for allow-roaming here: daemon.notice netifd: wan (30476): simple connect=apn=internet,ip-type=ipv4,allow-roaming=yes daemon.notice netifd: wan (30476): Error parsing connect string: 'Invalid properties string, unexpected key 'allow-roaming''
2020-01-06libmm-glib,common-helpers: allow yes/no as booleans in stringAleksander Morgado
E.g. so that the settings passed on Simple.Connect() or Bearer.Connect() are parsed correctly from the user string: daemon.notice netifd: wan (30476): simple connect=apn=internet,ip-type=ipv4,allow-roaming=yes daemon.notice netifd: wan (30476): Error parsing connect string: 'Invalid properties string, unexpected key 'allow-roaming'' This also goes inline with e.g. the --create-bearer help in the man page that suggests using yes/no for the allow-roaming setting.
2020-01-01libmm-glib,nmea: deprecate mm_location_gps_nmea_build_full()Aleksander Morgado
The new mm_location_gps_nmea_get_traces() is a much more generic way to retrieve the full list of traces and suits the libmm-glib API much better.
2019-12-31libmm-glib,nmea: new method to get list of tracesAleksander Morgado
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/120
2019-12-13libmm-glib,3gpp: make MMModem3gppNetwork a boxed typeAleksander Morgado
So that bindings know how to free the list of structs. This commit ends up triggering an API break in the bindings generated via GObject introspection, because the methods to access the items of a MMModem3gppNetwork are no longer treated as Modem3gpp class methods. E.g. instead of: ModemManager.Modem3gpp.network_get_operator_code(network) We should now do: network.get_operator_code() There is no API break in libmm-glib.
2019-12-03libmm-glib: SID value '0' is actually a good oneAleksander Morgado
2019-10-28libmm-glib,pco: deprecate mm_pco_list_free()Aleksander Morgado
Use g_list_free_full() using g_object_unref() as #GDestroyNotify function instead.
2019-10-28libmm-glib: flag as (skip) all non-API methodsAleksander Morgado
So that the GI scanner ignores them.
2019-10-28simple-status: deprecate 'subscription state' propertyAleksander Morgado
This property was already deprecated in libmm-glib and removed from the daemon in 1.10, so the counterpart property in MMSimpleStatus should also be deprecated.
2019-10-28libmm-glib: remove unused _dup() methodsAleksander Morgado
2019-10-28api,voice: CreateCall() expects only the 'number' propertyAleksander Morgado
There is absolutely no reason to provide any other property when the user creates a new call.
2019-10-28docs,libmm-glib: provide per-version indicesAleksander Morgado
2019-10-27libmm-glib,pco: mm_pco_list_add() is not part of the APIAleksander Morgado
This method is used by the daemon to modify the GList of MMPco objects, the client should not need to use this method for anything.
2019-10-27libmm-glib,location: fix 'unknown' lat/long/alt numeric valuesAleksander Morgado
G_MINDOUBLE is 0.0, which is a valid altitude, latitude, and longitude. Change the 'unknown' location values to -G_MAXDOUBLE instead, which is a completely invalid value in all cases. This is strictly an ABI break, but it's also true that until now the methods returning these 'unknown' values could also return valid 0.0 values that would have been detected as 'unknown' by the caller. So, just stop this madness and don't consider this any ABI break. This is the same thing we had to do with MM_SIGNAL_UNKNOWN in fe66bdf65e57fa7dee3dcb8dea068fb3fc7aec34.
2019-10-17api,sim: new 'Emergency Numbers' propertyAleksander Morgado
2019-10-17voice,api: new 'EmergencyOnly' boolean flagAleksander Morgado
This new flag allows users of the API to know whether general purpose voice calls are allowed or otherwise only voice calls to the registered emergency numbers should be performed. ModemManager won't really do any distinction between emergency and non-emergency calls at this point, this flag is just an early indication for the user of the API that no normal voice call should be attempted.
2019-10-02libmm-glib,oma: avoid plural in typeAleksander Morgado
2019-10-02libmm-glib,call: fix typo in documentationAleksander Morgado
2019-09-17plugins,telit: refactor #BND command supportAleksander Morgado
And added support for several new things, including: * Setting "any" band now attempts to set all supported bands. * Added new 2G band value '5' (egsm+dcs+pcs+g850). * Setup support for two different 3G band combinations, a default one plus an alternate one applicable to the LM940/960 models only. The alternate combination is selected via udev tags. During the refactor, the following Telit-specific helpers were also removed and exchanged with more generic counterparts. * mm_telit_bands_contains() -> mm_common_bands_garray_lookup() * mm_telit_get_band_flags_from_string() -> mm_parse_uint_list()
2019-08-03libmm-glib,firmware-update-settings: handle null self pointerBen Chan
mm_firmware_update_settings_get_variant() checks for a null `self' pointer when accessing `self->priv->method', but doesn't perform the null check when accessing other members of MMFirmwareUpdateSettingsPrivate. This patch fixes mm_firmware_update_settings_get_variant() to fully handle a null `self' pointer.
2019-07-19api,voice: new CallWaitingSetup() and CallWaitingQuery() methodsAleksander Morgado
These new methods allow querying and updating the status of the call waiting network service, as per 3GPP TS 22.083. The status of the service is not a property because we don't want to unconditionally load it on every boot, given that the process involves talking to the network (i.e. it is not a device setting).
2019-07-11api,call: new JoinMultiparty() and LeaveMultiparty() methodsAleksander Morgado
2019-07-11api,call: new Multiparty boolean propertyAleksander Morgado
It will be set to TRUE if this call is part of a multiparty call.
2019-07-11api,call: new Deflect() methodAleksander Morgado
This method allows deflecting an incoming or waiting call to a different number.
2019-07-11api,voice: new Transfer() methodAleksander Morgado
This method will join all active and held calls into a single multiparty call, and then request the network to terminate the call on the subscriber's end and transfer the control of the call to the parties that are still in the call.
2019-07-11api,voice: new HangupAll() methodAleksander Morgado
This method will terminate all ongoing calls.
2019-07-11api,voice: new HoldAndAccept() methodAleksander Morgado
This method will put the currently active call on hold, and right away accept the next available call. The user of the API does not need to specify explicitly which is the next call to accept, because that is decided automatically: * If there is any waiting call, it will accept it right away. * If there is no waiting call but there is a held call, it will make the held call active again.
2019-07-11api,voice: new HangupAndAccept() methodAleksander Morgado
This method will hangup the currently active call and right away accept the next available call. The user of the API does not need to specify explicitly which is the next call to accept, because that is decided automatically: * If there is any waiting call, it will accept it right away. * If there is no waiting call but there is a held call, it will make the held call active again.
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.
2019-03-29libmm-glib,common: new helper methods to read guint64 valuesAleksander Morgado
We use strtoull() to read a "unsigned long long" that is always at least 64bits, even in 32bit systems.
2019-01-16libmm-glib,firmware-update-settings: skip dictionary if method is NONEAleksander Morgado
No need to process the detailed dictionary if no explicit method is reported as supported. Avoids unnecessary warnings: $ mmcli -m 1 --firmware-status ** (mmcli:6887): WARNING **: 15:52:54.664: Invalid initial update settings: Missing required 'device-ids' setting error: firmware status unsupported
2019-01-13libmm-glib,manager: use g_async_initable_new_finish() explicitlyAleksander Morgado
We're running g_async_initable_new_async() ourselves in mm_manager_new(), so our finish() method should call g_async_initable_new_finish() explicitly. There's no change in the logic here, as the generated mm_gdbus_object_manager_client_new_finish() was already doing this implicitly.
2019-01-13libmm-glib,manager: simplify object creationAleksander Morgado
The G_OBJECT() casts accept NULL safely.
2019-01-13libmm-glib,manager: cleanup internal proxy on name owner updatesAleksander Morgado
The MMManager object keeps an internal proxy object for the Manager interface, and we must make sure we cleanup this object any time the MM daemon is restarted. Otherwise, the MMManager may end up trying to use a stale proxy associated to a previous run of the daemon, and e.g. not showing properly the runtime version info. E.g., in this sequence with the example python tester, the runtime version of the daemon was valid only for the first time the daemon runs, and if the daemon is restarted, mm_manager_get_version() would keep returning NULL. $ ./modem-watcher-python [ModemWatcher] ModemManager service not available in bus [ModemWatcher] ModemManager 1.9.990 service is available in bus [ModemWatcher] Dell Inc. (DW5821e Snapdragon X20 LTE) modem managed by ModemManager [None]: /org/freedesktop/ModemManager1/Modem/0 [ModemWatcher] ModemManager service not available in bus [ModemWatcher] ModemManager None service is available in bus [ModemWatcher] Dell Inc. (DW5821e Snapdragon X20 LTE) modem managed by ModemManager [None]: /org/freedesktop/ModemManager1/Modem/0 [ModemWatcher] ModemManager service not available in bus [ModemWatcher] ModemManager None service is available in bus [ModemWatcher] Dell Inc. (DW5821e Snapdragon X20 LTE) modem managed by ModemManager [None]: /org/freedesktop/ModemManager1/Modem/0