aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-23docs,libmm-glib: add missing reference for DisableFacilityLock() supportAleksander Morgado
2021-05-23docs,libmm-glib: add missing non-API methods to Private sectionsAleksander Morgado
2021-05-23bearer-mbim: network error 0 is actually a valid error (unknown)Aleksander Morgado
2021-05-23broadband-modem-mbim: detailed connection error on disconnection reportsAleksander Morgado
When we receive an indication reporting a network-initiated disconnection, convert the MBIM network error into a MMMobileEquipmentError, and publish it in the new 'ConnectionError' property.
2021-05-23bearer-qmi: detailed connection error on disconnection reportsAleksander Morgado
When we receive an indication reporting a network-initiated disconnection, convert the QMI call end reason into a MMMobileEquipmentError, and publish it in the new 'ConnectionError' property.
2021-05-23base-bearer: never overwrite a connection error that is already setAleksander Morgado
2021-05-23base-bearer: limit the type of errors we can set as 'ConnectionError'Aleksander Morgado
2021-05-23base-bearer: clear connection error on every new attemptAleksander Morgado
2021-05-23base-bearer: report connection error on network initiated disconnectionsAleksander Morgado
By default, fallback to "unknown" mobile equipment error when the modem gets disconnected by the network and we don't have any way to know a more detailed reason.
2021-05-23base-bearer: report connection error on failed connection attemptsAleksander Morgado
When a user-requested connection attempt fails, we not only return the connection error to the user that requested it, we also publish the specific connection error in DBus for others to check why the failure happened.
2021-05-23api,bearer: new 'ConnectionError' propertyAleksander Morgado
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-22libmm-glib: setup common helper to register DBus errorsAleksander Morgado
2021-05-22api,errors: document all DBus error name prefixesAleksander Morgado
Since ModemManager 1.0 we were publishing symbols to identify all the possible DBus error name prefixes, but these were never documented, they were explicitly ignored in gtk-doc. Let's provide proper documentation for them and make them first-class API symbols.
2021-05-22docs,api: add index for 1.14Aleksander Morgado
Some of the newly deprecated enum values were introduced in 1.14.
2021-05-22bearer-qmi: rework connection failure error reportingAleksander Morgado
On a failed QMI modem connection, we won't return the generic "CallFailed" error, we'll try to convert the 3GPP verbose call end reason to a MMMobileEquipmentError. And if we cannot find a mapping, or if the reported error is not a 3GPP verbose call end reason, we'll return a Unknown MMMobileEquipmentError with a string message providing detailed error information.
2021-05-22modem-helpers-mbim: rework nw error code mappingAleksander Morgado
Instead of having a switch with a lot of cases, provide a one to one mapping for the MbimNwError and MMMobileEquipmentError codes in an array, and make use of the mm_mobile_equipment_error_for_code() helper to build the actual GError.
2021-05-22api: update MMMobileEquipmentError enum valuesAleksander Morgado
Update the list of mobile equipment error codes according to v17.1.0 of 3GPP TS 27.007 (March 2021). A lot of the enum values that were prefixed with the 'GPRS_' keyword have now been flagged as deprecated, and a new enum name given to the corresponding value. The deprecated symbol names are kept in the compat support to avoid breaking API/ABI.
2021-05-22core: improve error helpersAleksander Morgado
First, simplify the logic that attempts to find the correct error code associated to an error text string. This logic is very flaky, as it relies on knowing what the modems report as text string for the different error codes, and obviously that is not always the same. Instead of supporting all error codes in this logic, we now limit them to a small subset with common error codes and hopefully common error strings. Second, in order to quickly get the error description string for a given error code, we rework the array of supported errors so that the index of the array is the error code itself. For mobile equipment errors the logic is straightforward, as they're always in the [0,255] range, but for the message errors we create an array where the index of the array is equal to the code plus 300 as they're always in the [300,500] range. By doing this, we avoid having an array with 300 NULL items before the actual values we want to support.
2021-05-23foxconn: setup FCC unlock stepAleksander Morgado
Use the new "DMS Foxconn Set FCC authentication" command to request the modem unlock during a power up operation. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/373
2021-05-23broadband-modem-mbim: setup FCC unlock stepAleksander Morgado
Use the new generic FCC unlock step instead of implementing it within the power up setup logic.
2021-05-23broadband-modem-qmi: setup FCC unlock stepAleksander Morgado
Use the new generic FCC unlock step instead of implementing it within the operating mode setup logic. The operation is implemented in the MMSharedQmi interface as it will also be used by the MBIM modem object.
2021-05-23iface-modem: new optional FCC unlock step in the power state updateAleksander Morgado
There are devices that come locked before they can be put online. Until now we had a specific implementation for this in the generic QMI modem, but we should have it in a more generic way for any kind of modem.
2021-05-23shared-qmi: trivial coding style updateAleksander Morgado
2021-05-22api: QDU update method defined in MM 1.16.6 alreadyAleksander Morgado
(cherry picked from commit 2cb38c568ff1fb26b23bad5e8a2851547448c30e)
2021-05-21service: add QIPCRTR address familyArnaud Ferraris
With the recently added support for modems using QRTR, ModemManager needs to have access to the corresponding address family so it can interact with the modem. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2021-05-20service: Fix Mobile Data on EG25Undef
This allows mobile data to work on the EG25 (and probably other modems).
2021-05-18base-bearer: trivial fix printing stats reportsAleksander Morgado
2021-05-18libmm-glib,common-helpers: avoid signed vs unsigned comparisonsAleksander Morgado
mm-common-helpers.c: In function 'mm_get_int_from_str': mm-common-helpers.c:1349:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (eol == num) ^~ mm-common-helpers.c: In function 'mm_utils_hexstr2bin': mm-common-helpers.c:1718:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < len; i += 2) { ^
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-05-18libmm-glib: remove unused cmp_allow_roaming() methodAleksander Morgado
mm-bearer-properties.c:725:1: warning: 'cmp_allow_roaming' defined but not used [-Wunused-function] cmp_allow_roaming (gboolean a, ^~~~~~~~~~~~~~~~~
2021-05-18core: drop "volatile" for g_once_init_enter locationsAleksander Morgado
This fixes a few (fatal in gcc 11) warnings. See https://gitlab.gnome.org/GNOME/glib/-/issues/600
2021-05-17libmm-glib,location-3gpp: fix string overflowAleksander Morgado
mm-location-3gpp.c: In function ‘mm_location_3gpp_get_mobile_country_code’: mm-location-3gpp.c:139:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 139 | mcc[4] = '\0'; | ~~~~~~~^~~~~~ mm-location-3gpp.c:132:11: note: at offset 4 to object ‘mcc’ with size 4 declared here 132 | gchar mcc[4]; | ^~~
2021-05-17broadband-modem-qmi: set MNC PCS digit in modem_3gpp_load_operator_name()Teijo Kinnunen
If the network has three digit MNC and MNC < 100, set the PCS digit status field in the QMI request.
2021-05-17shared-qmi: set MNC PCS digit for manual network registrationTeijo Kinnunen
Set the MNC PCS digit status when attempting to register to a network with 3 digit MNC and MNC < 100.
2021-05-17sim-qmi: use mm_3gpp_parse_operator_id() for preferred PLMN MNC digitsTeijo Kinnunen
MNC PCS digit status is now available from mm_3gpp_parse_operator_id(), so use it.
2021-05-17cli,location: use mm_location_3gpp_get_operator_code() in location outputTeijo Kinnunen
2021-05-17libmm-glib,iface-modem-location: add MMLocation3gpp 3 digit MNC supportTeijo Kinnunen
MMLocation3gpp provides MCC/MNC information as integers, so it can not make distinction between operator codes such as XXX01 and XXX001. This commit deprecates mm_location_3gpp_get_mobile_network_code() and implements a new function mm_location_3gpp_get_operator_code() which provides the MCC+MNC in string format. The mm_location_3gpp_get_mobile_country_code() is still available as returning the MCC as an integer does not have ambiguity issues.
2021-05-17modem-helpers: add 3 digit MNC output to mm_3gpp_parse_operator_id()Teijo Kinnunen
MNC digit count information is lost on conversion to integers. Make it possible for the caller to get this information through a separate boolean.
2021-05-15iface-modem-3gpp: don't assume operator code implies we're registeredAleksander Morgado
The modem may be camping in a forbidden network just for emergency services, and we'll be able to have a MCCMNC reported in that case, but this does not mean the modem is registered. So, don't consider that a valid registration flag during the new network registration request.
2021-05-15port-qmi: avoid running install_properties() without properties definedAleksander Morgado
We'll setup the properties only if QRTR support is being built, otherwise we fully skip all property related setup. (ModemManager:480463): GLib-GObject-CRITICAL **: 22:48:14.264: g_object_class_install_properties: assertion 'n_pspecs > 1' failed Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff76e3295 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 (gdb) bt #0 0x00007ffff76e3295 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #1 0x00007ffff76e4579 in g_logv () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007ffff76e4743 in g_log () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00005555556af70c in mm_port_qmi_class_init (klass=0x5555557fae20) at mm-port-qmi.c:2619 #4 0x00005555556a94c3 in mm_port_qmi_class_intern_init (klass=0x5555557fae20) at mm-port-qmi.c:34 #5 0x00007ffff77ed1d1 in g_type_class_ref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #6 0x00007ffff77d05e1 in g_object_new_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #7 0x00007ffff77d06cd in g_object_new () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #8 0x00005555556af25a in mm_port_qmi_new (name=0x5555557e54e0 "cdc-wdm0", subsys=MM_PORT_SUBSYS_USBMISC) at mm-port-qmi.c:2481 #9 0x000055555563c8d7 in wdm_probe_qmi (self=0x5555557de1b0) at mm-port-probe.c:517 #10 0x000055555563cc70 in wdm_probe (self=0x5555557de1b0) at mm-port-probe.c:623 #11 0x00007ffff76dd04e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #12 0x00007ffff76dd400 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #13 0x00007ffff76dd6f3 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #14 0x00005555555b1ae4 in main (argc=1, argv=0x7fffffffe558) at main.c:213
2021-05-15iface-modem-3gpp: Add verbose logging for initial eps bearerAndrew Lassalle
Print a debug message when the user provides initial eps bearer settings that match the ones being used. This will save time to whomever is experimenting with initial eps bearer settings.
2021-05-14udev: Do not consider USB WWAN ports as valid candidatesLoic Poulain
For now WWAN subsystem support has only been validated for PCI/MHI based devices and extra patches for USB based devices (qmi_wwan, cdc-mbim...) may be required, so do not consider WWAN ports being on USB bus. Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2021-05-14broadband-modem-mbim: get model through QMI-over-MBIMFreedom Liu
move the modem_load_model() async method from mm-broadband-modem-qmi.c to mm-shared-qmi.c, and then make use of the method from both the QMI and MBIM implementations.
2021-05-12iface-modem: fix segfault if attempting to switch slot and slots unsupportedAleksander Morgado
Reported and fix suggested by Maxim Anisimov Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/368
2021-05-09modem-helpers-qmi: fix auth validation always returning errorgoapunk
2021-05-05mm-shared-qmi: parse ICCID as hex instead of BCDEric Caruso
Fixes issue 364.
2021-05-04bearer-mbim: Fix double free in ip_configuration_query_readyAndrew Lassalle
2021-05-04libmm-glib,simple: fix docs: g_object_ref -> g_object_unrefTeijo Kinnunen
2021-05-03broadband-modem-mbim: use the new 'LTE attach info' message nameAleksander Morgado
The older 'LTE attach status' message name is deprecated.
2021-05-03foxconn: don't assume parent location is availableAleksander Morgado
If ModemManager is not built with QMI support, the generic MBIM modem object will not have any location support, so we cannot assume that iface_modem_location_parent will be valid and that it will have all load_location_capabilities(), enable_location_gathering() and disable_location_gathering() implemented. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/362