summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* broadband-modem-mbim: skip switch() when selecting MBIM servicesAleksander Morgado2021-06-021-30/+4
| | | | | | | | | | | | | | | Having a switch() for the MBIM services when processing indications forces us to update it on every new MBIM service added to libmbim, because we build with -Wswitch-enum by default. This warning type is extremely useful, and we should not stop using it, so let's simplify a bit the indication handling code and skip using a switch(). There are right now only 4 different service indications expected, so it shouldn't be a big deal. (cherry picked from commit e25a585c9fd8c3f58ec01723843fe3c08c30c1ad)
* quectel: ignore QLWURCDylan Van Assche2021-06-021-0/+9
| | | | | | QLWURCs are not ignored and causes calls to be rejected in some cases (cherry picked from commit c00eff43ac6eda070645d77edc8da71facd972a3)
* api: QDU update method defined in MM 1.16.6 alreadyAleksander Morgado2021-05-211-1/+1
|
* foxconn: add new MBIM QDU firmware update method supportFreedom Liu2021-05-212-4/+15
| | | | | | | Based on the QDU service newly added in libmbim, T99W175 module (vid: 0x105b) supports MBIM QDU based update. (cherry picked from commit 35b1672b85d23e0961c33fc7aebc17d0e2d26c81)
* foxconn: add support for the T99W175 moduleFreedom Liu2021-05-212-22/+22
| | | | | | | | | | | | | | 0x0489 is the vendor ID of T77W968, 0x105b is the vendor ID of T99W175. {0x105b, 0xe0b0},{0x105b, 0xe0b1} is T99W175 PCI device, used by Dell. {0x105b, 0xe0ab} is T99W175 PCI device, used by Lenovo. If the modem has an mbim port, create a MbimFoxconn object, regardless of what the product ID is. The firmware version format in the T99W175 was selected to have firmware version + carrier config version + apps version. (cherry picked from commit 47ea5c98f4d05a2113b7533fec86ac6003171c85)
* foxconn: change modem-foxconn-t77w968 to modem-mbim-foxconnFreedom Liu2021-05-218-90/+90
| | | | | | Named the object in a more generic way. (cherry picked from commit c31488608a331f4d16dacb923a5611c52f57f1cb)
* qmi: Increase qmi_device_open timeoutLoic Poulain2021-05-211-1/+1
| | | | | | | | | | SDX55 modem can take slighlty more than 25 seconds to start all its services from cold boot/reset (including QMI services), causing QMI port opening timeout error. This patch increases the qmi_device_open timeout from 25 seconds to 45 seconds to prevent such issue. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> (cherry picked from commit e57c59bf88615129efc0241957749102ea8af90d)
* plugins: generic: Add 'wwan' subsystem supportLoic Poulain2021-05-211-1/+1
| | | | | | | | | | | | | | | | | wwan is a new subsystem for WWAN devices, allowing to expose the WWAN device and its ports in a generic way. The sysfs hierarchy for such device is /sys/class/wwanX /sys/class/wwanX/wwanXpYP Where X is the WWAN device index, Y the port index and P the control protocol name (QMI, MBIM...). A control port is also exposed as character device in /dev. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> (cherry picked from commit fefbf4d3029ce8e1f2ed9db2bc8288e13989b05a)
* broadband-modem-qmi: Add MHI QMI port peek supportLoic Poulain2021-05-211-1/+4
| | | | | | | For MHI data port (mhi-net), simply return the primary QMI port. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> (cherry picked from commit 6895ca836b29dba55f5afd46925967e7795fd43b)
* base: Add support for wwan subsystemLoic Poulain2021-05-214-2/+45
| | | | | | | | Add support for the Linux wwan subsystem that started to expose control channel as character devices (e.g. /dev/wwan0p1MBIM...). Signed-off-by: Loic Poulain <loic.poulain@linaro.org> (cherry picked from commit 6db2e8f04da458488c374f1a6f6979ce7fe9b67d)
* filter: Add wwan port devicesLoic Poulain2021-05-212-4/+17
| | | | | | | Allow WWAN control ports. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> (cherry picked from commit b1db6527cf9d4801e48dfe6e9fe8124532269159)
* udev: add wwan port devices as valid candidatesLoic Poulain2021-05-211-1/+5
| | | | | | | | | | The new Linux WWAN subsystem exposes the various WWAN control ports as character devices. WWAN port device naming follows the following convention: wwanXpYP, where X is the wwan device index, Y the port index and P the port type/protocol. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> (cherry picked from commit aaf8c17e3592cf401913543452002e1e227a8d05)
* libmm-glib,common-helpers: avoid signed vs unsigned comparisonsAleksander Morgado2021-05-181-5/+6
| | | | | | | | | | | | | 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) { ^ (cherry picked from commit d661d822f7fc2b31884eb10a586501765250ec2e)
* libmm-glib: drop default timeout checks in Command()Aleksander Morgado2021-05-181-5/+0
| | | | | | | | | 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. (cherry picked from commit 21ff48ed7d56837567aff3e396acf3bfd24cbc02)
* libmm-glib: remove unused cmp_allow_roaming() methodAleksander Morgado2021-05-181-19/+0
| | | | | | | | mm-bearer-properties.c:725:1: warning: 'cmp_allow_roaming' defined but not used [-Wunused-function] cmp_allow_roaming (gboolean a, ^~~~~~~~~~~~~~~~~ (cherry picked from commit a325acd6b1ae3376bb0f9f3eb83ce44617115a55)
* core: drop "volatile" for g_once_init_enter locationsAleksander Morgado2021-05-184-33/+33
| | | | | | | | This fixes a few (fatal in gcc 11) warnings. See https://gitlab.gnome.org/GNOME/glib/-/issues/600 (cherry picked from commit 268cab885b62526bb97794cb6b9e8b0f97084841)
* sms-part-3gpp: add flag for indicating PDU is transfer-route messageClayton Craft2021-05-144-19/+30
| | | | | | | When the message is a transfer-route MT, there is no SMSC address to parse out. This flag allows indicating when the PDU is one such message. (cherry picked from commit 43c39d5226484eba99211b2fa1add2ae5b398ebf)
* broadband-modem-qmi: Handle transfer-route MT messagesClayton Craft2021-05-141-1/+73
| | | | | | | | | This handles transfer-route MT messages, automatically ACKing any that need to be ACKed. Based on work by Angus Ainslie and Elias Rudberg (cherry picked from commit 205e9edf3edddfa73b1a9b8ddaff4e3779a20e61)
* build: require libqmi 1.28.4Aleksander Morgado2021-05-151-1/+1
| | | | | | | We're going to use add support for the transfer-route MT messages in the stable MM 1.16 branch, so we should make sure the related QMI messages have been added to the basic collection, as already done in libqmi 1.28.4.
* ci: stable 1.16 branch relies on libqmi 1.28 and libmbim 1.24Aleksander Morgado2021-05-041-7/+7
| | | | | So make all CI pipelines on the stable branch run with those specific libqmi and libmbim branches.
* tools: disable stub tester if no introspection enabledAleksander Morgado2021-05-031-0/+3
| | | | | | | | | | | | | | TEST: test-stub... /MM/stub/modem/interface: dbus-daemon[48020]: [session uid=0 pid=48020] Activating service name='org.freedesktop.ModemManager1' requested by ':1.0' (uid=0 pid=48005 comm="/builds/mobile-broadband/ModemManager/tools/tests/") Traceback (most recent call last): File "/builds/mobile-broadband/ModemManager/tools/test-modemmanager-service.py", line 7, in <module> gi.require_version('ModemManager', '1.0') File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace ModemManager not available dbus-daemon[48020]: [session uid=0 pid=48020] Activated service 'org.freedesktop.ModemManager1' failed: Process org.freedesktop.ModemManager1 exited with status 1 (cherry picked from commit 7b7bbdd999d00446966f100212bc469970e769a3)
* ci: disable introspection and gtk-doc in all tests that don't need itAleksander Morgado2021-05-031-10/+10
| | | | | | | | | The template image we're using already contains all the necessary build deps to enable introspection and gtk-doc, so we need to explicitly disable them where we don't need them, or otherwise they'll be automatically enabled as the deps are found. (cherry picked from commit 4593eec17385c190747df48155f95d71c591102e)
* ci: use latest ubuntu LTS by defaultAleksander Morgado2021-05-031-12/+16
| | | | (cherry picked from commit d9072562cd8d03dc72f072a78e73c24fe4193b8a)
* CI: make use of ci-templatesBenjamin Tissoires2021-05-031-5/+43
| | | | | | | | | | | | | full list of benefits at: https://freedesktop.pages.freedesktop.org/ci-templates/templates.html#why-use-the-ci-templates But the main ones are: - reproducible (just download the container and run the `script` part to be in the same environment the CI was running) - no more before script that pulls hundreds of MB and spend useless time. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (cherry picked from commit 01f2109ae0bb8ac9a966f69f88ec2b526b68269b)
* foxconn: don't assume parent location is availableAleksander Morgado2021-05-031-34/+79
| | | | | | | | | | | | 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 (cherry picked from commit e1567c30df5a0bf320b654cd85942bdff5db6144)
* broadband-modem-mbim: fix build with libmbim >= 1.25.3Aleksander Morgado2021-04-281-0/+3
|
* build: post-release version bump to 1.16.5Aleksander Morgado2021-04-211-1/+1
|
* release: bump version to 1.16.41.16.4Aleksander Morgado2021-04-211-1/+1
|
* NEWS: update for 1.16.4Aleksander Morgado2021-04-211-0/+50
|
* build: disable gtkdocize in autoreconfAleksander Morgado2021-04-211-1/+1
| | | | | | | | We have a custom modified gtk-doc.make file in our sources, which disables the gtkdoc-rebase on local install step, so we don't want autoreconf to copy a different one when we're bootstrapping. (cherry picked from commit 4ae623c37b5eb395c79b49a044958c09fd6d23a7)
* cli: avoid attempting to setup timeout on NULL proxyAleksander Morgado2021-04-121-1/+2
| | | | | | | mm_manager_get_proxy() may actually return NULL if creating the internal GDBusProxy for the Manager interface fails. (cherry picked from commit 5a735317f7c0c42b2ddce52dbf1fa1edfc1c41f4)
* kerneldevice: fix segfault when processing event for non-existing portAleksander Morgado2021-04-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | ModemManager[6954]: <warn> [1618260091.319919] [br0] invalid sysfs path read for net/br0 ** ERROR:kerneldevice/mm-kernel-device-generic.c:235:ptr_array_add_sysfs_attribute_link_basename: assertion failed: (array && sysfs_path && attribute) Bail out! ERROR:kerneldevice/mm-kernel-device-generic.c:235:ptr_array_add_sysfs_attribute_link_basename: assertion failed: (array && sysfs_path && attribute) Thread 1 "ModemManager" received signal SIGABRT, Aborted. (gdb) bt #0 0x00007ffff7438ef5 in raise () at /usr/lib/libc.so.6 #1 0x00007ffff7422862 in abort () at /usr/lib/libc.so.6 #2 0x00007ffff76c2084 in () at /usr/lib/libglib-2.0.so.0 #3 0x00007ffff771d85d in g_assertion_message_expr () at /usr/lib/libglib-2.0.so.0 #4 0x00005555556a5337 in ptr_array_add_sysfs_attribute_link_basename (array=0x5555557de520, sysfs_path=0x0, attribute=0x555555703bd8 "driver", out_value=0x0) at kerneldevice/mm-kernel-device-generic.c:235 #5 0x00005555556a542b in preload_contents_other (self=0x5555557a6c60) at kerneldevice/mm-kernel-device-generic.c:255 #6 0x00005555556a6485 in preload_contents (self=0x5555557a6c60) at kerneldevice/mm-kernel-device-generic.c:517 #7 0x00005555556a7fb6 in check_preload (self=0x5555557a6c60) at kerneldevice/mm-kernel-device-generic.c:980 #8 0x00005555556a855f in initable_init (initable=0x5555557a6c60, cancellable=0x0, error=0x7fffffffe5c8) at kerneldevice/mm-kernel-device-generic.c:1127 #9 0x00007ffff78a2f41 in g_initable_new_valist () at /usr/lib/libgio-2.0.so.0 #10 0x00007ffff78a2ffa in g_initable_new () at /usr/lib/libgio-2.0.so.0 #11 0x00005555556a8205 in mm_kernel_device_generic_new_with_rules (props=0x5555557a5fa0, rules=0x7fffec001e30, error=0x7fffffffe5c8) at kerneldevice/mm-kernel-device-generic.c:1042 #12 0x00005555556a827d in mm_kernel_device_generic_new (props=0x5555557a5fa0, error=0x7fffffffe5c8) at kerneldevice/mm-kernel-device-generic.c:1063 #13 0x00005555555aba9c in handle_kernel_event (self=0x555555793220, properties=0x5555557a5fa0, error=0x7fffffffe5c8) at mm-base-manager.c:414 (cherry picked from commit 3d5a994ca8d8e766fd87a85d346c5b21f5e6c53e)
* iface-modem-time: fix invalid read when loading network timezone failsAleksander Morgado2021-04-091-2/+1
| | | | | | | | | | | | | | | | | | ==226546== Invalid read of size 4 ==226546== at 0x5068CB7: g_error_matches (in /usr/lib/libglib-2.0.so.0.6600.7) ==226546== by 0x1BAC86: load_network_timezone_ready (mm-iface-modem-time.c:218) ==226546== by 0x4EA827E: g_simple_async_result_complete (in /usr/lib/libgio-2.0.so.0.6600.7) ==226546== by 0x17AE2C: at_command_ready (mm-base-modem-at.c:538) ==226546== by 0x4EA827E: g_simple_async_result_complete (in /usr/lib/libgio-2.0.so.0.6600.7) ==226546== by 0x24B475: serial_command_ready (mm-port-serial-at.c:378) ==226546== by 0x4EA827E: g_simple_async_result_complete (in /usr/lib/libgio-2.0.so.0.6600.7) ==226546== by 0x244F94: command_context_complete_and_free (mm-port-serial.c:141) ==226546== by 0x246861: port_serial_got_response (mm-port-serial.c:755) ==226546== by 0x246923: port_serial_timed_out (mm-port-serial.c:785) ==226546== by 0x50863C3: ??? (in /usr/lib/libglib-2.0.so.0.6600.7) ==226546== by 0x5085B83: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6600.7) (cherry picked from commit b766ded3ca58cee202bd4567dd5530f04dc2290d)
* libmm-glib,bearer-properties: fix usage of CMP_FLAGS_NO_RM_PROTOCOLAleksander Morgado2021-04-091-2/+4
| | | | (cherry picked from commit 3d665d22093b985f6860170bca8d33a5562056d1)
* iface-modem: avoid check for SIM swap if no interface skeleton availableAleksander Morgado2021-03-241-1/+8
| | | | (cherry picked from commit 9f7bbf28d210a4986f2d0d353e4e37024bc91c4a)
* iface-modem: avoid lock info update if no interface skeleton availableAleksander Morgado2021-03-241-3/+13
| | | | | | Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/351 (cherry picked from commit 96d83392a850b84888661f68cb170dd87fcd3c85)
* quectel: ignore QGPSURCDylan Van Assche2021-03-244-3/+72
| | | | | | QGPSURCs are not ignored and causes calls to be rejected in some cases (cherry picked from commit 192e067f97153125fe9d3362c750146a5a7215cf)
* libmm-glib,bearer-properties: fix 'allowed-auth' comparisonAleksander Morgado2021-03-241-1/+1
| | | | (cherry picked from commit 4b19b9693f03ab48c6707508d27b24e38294e022)
* base-bearer: ignore forced disconnectionsAleksander Morgado2021-03-241-0/+5
| | | | | | | | | | | | | | If using PPP, ModemManager is never in charge of deciding when the connection is finished, because that would end up making ModemManager try to use the TTY port while pppd is still using it. When the modem goes unregistered for some time, we should not force the disconnection of the bearer object, we still need to wait for pppd to tell us the modem is disconnected. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/331 (cherry picked from commit 3e58fbe547115bd875754806340b3bb39cc7b053)
* cinterion: make sure FALSE sets GError in parse_smong_response()Aleksander Morgado2021-03-242-29/+48
| | | | | | | | | | | | The g_regex_match_full() method may return FALSE without setting the GError, so that case needs to be considered. In addition to that, the following g_assert() was not doing what it should have been, as it was comparing the address of the variable and not the variable itself; rework the code to avoid that as well: g_assert (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); (cherry picked from commit 634682b602dd51efbda42a8b2e8764b9bb0024e2)
* cinterion: make sure FALSE sets GError in provcfg_response_to_cid()Aleksander Morgado2021-03-242-6/+35
| | | | | | | | | | | The g_regex_match_full() method may return FALSE without setting the GError, so that case needs to be considered. Reported by Jan Mazura. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347 (cherry picked from commit d01bca493dad933b9df51bec1254c79089ffa1c7)
* cinterion: allow '*' in Prov/Cfg responseAleksander Morgado2021-03-242-1/+6
| | | | | | | | | | | | | E.g. in a Cinterion PLS8-E (REVISION 04.004) to match the following line: ^SCFG: "MEopMode/Prov/Cfg","fallback*" Fix suggested by Jan Mazura. See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347 (cherry picked from commit 5285e958abcd734de73a13011b5243bcfdf4d20c)
* kerneldevice,udev: don't use autoptr in GUdev typesAleksander Morgado2021-03-231-9/+21
| | | | | | | | | | The autoptr support in all GUdev types was introduced in commit 272533131c6ed38479a88805, included in libgudev 232. In the MM 1.16 branch we depend on libgudev 147, so avoid implicitly bumping the required version. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/349
* base-modem: plug leaks when organizing portsAleksander Morgado2021-03-181-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | The GLists maintained in the logic need to be explicitly freed (just the lists, not the list contents) if we exit early on error or if we end up deciding that the specific ports are available but unsupported by the plugin (e.g. if a plugin that doesn't support net ports finds net ports in the modem). ==225333== 24 bytes in 1 blocks are definitely lost in loss record 2,024 of 5,525 ==225333== at 0x483E77F: malloc (vg_replace_malloc.c:307) ==225333== by 0x506C539: g_malloc (in /usr/lib/libglib-2.0.so.0.6600.7) ==225333== by 0x508DC8F: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.6600.7) ==225333== by 0x50636B4: g_list_append (in /usr/lib/libglib-2.0.so.0.6600.7) ==225333== by 0x17E671: mm_base_modem_organize_ports (mm-base-modem.c:1298) ==225333== by 0x1E4409: mm_plugin_create_modem (mm-plugin.c:1094) ==225333== by 0x162C81: mm_device_create_modem (mm-device.c:481) ==225333== by 0x15DE60: device_support_check_ready (mm-base-manager.c:218) ==225333== by 0x4EA8173: ??? (in /usr/lib/libgio-2.0.so.0.6600.7) ==225333== by 0x4EAC6E8: ??? (in /usr/lib/libgio-2.0.so.0.6600.7) ==225333== by 0x16730F: device_context_run_ready (mm-plugin-manager.c:1533) ==225333== by 0x4EA8173: ??? (in /usr/lib/libgio-2.0.so.0.6600.7) (cherry picked from commit ab007a449638eeacaf6f626b707842af5274db95)
* charsets: define common translit fallback characterAleksander Morgado2021-03-181-7/+9
| | | | (cherry picked from commit 8a8e00168b02c5064f01d5da20a97c7268ba1e2b)
* charsets: remove charset_hex_to_utf8()Aleksander Morgado2021-03-182-47/+0
| | | | | | No longer used, replaced by the new common conversion methods. (cherry picked from commit c84454c1b00da7d33cc4fd917be4be6756317488)
* charsets: remove take_and_convert methodsAleksander Morgado2021-03-182-213/+0
| | | | | | | | | | | | | | These methods worked in a very strict way for some encodings, and in a very very loose way for others. E.g. when converting from hex-encoded UCS-2, we would attempt to convert as much text as we could even if the input string was truly not even close to UCS-2. This kind of "do our best" could make sense when processing e.g. the operator name reported by the modem, as that is some string to show to the user and there may be no strict requirement to have it perfectly fine. But the kind of loose comparison done for UCS-2 doesn't make sense e.g. when converting USSD responses or SMS messages. (cherry picked from commit 0ff3eb7ee0106423519152a68de1621cedf567c8)
* cinterion: rework mno decoding to use str_to_utf8()Aleksander Morgado2021-03-181-2/+8
| | | | (cherry picked from commit ab4c31ec0b2c79285e24b9a117ff5e5c21f8fd71)
* cinterion: rework band encoding to use str_to_utf8()Aleksander Morgado2021-03-181-21/+67
| | | | | | | Also providing support to report errors when attempting to decode the strings. (cherry picked from commit 6bc07b4b1487cfc6e171ec1f2c34958f17202a8b)
* helpers: rework normalize_operator() to use str_to_utf8()Aleksander Morgado2021-03-185-23/+36
| | | | | | | | | | | | | | | Instead of blindly assuming that we can take whatever string given as valid UTF-8, we'll always attempt to convert from the current modem charset into UTF-8. Before we were doing this for hex-encoded UCS2, but not for example for GSM-7. And due to the now applied GSM-7 conversion, the mf627a/mf627b +COPS parsing unit tests are updated accordingly, because when converting from an input string that contains byte 0x40 ('@' in UTF-8) as if it were GSM-7, the 0x40 is taken as character 'ยก', encoded as 0xc2,0xa1 in UTF-8). (cherry picked from commit 16df1e17e6e96f8dd0ba67003c6abb7083b9d7ec)