aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-19xmm: wait for +XLSRSTOP URC before starting next sessionAleksander Morgado
It is important to gracefully stop the session before starting the next session, making sure the engine is completely stopped. This can be ensured by waiting for the +XLSRSTOP URC just after having received the +XLSRSTOP command response. We'll do an explicit wait for that URC with a 10s timeout, in order to avoid waiting forever if the URC is never received. It will be assumed that the engine is off if the 10s timeout happens, in the same way as we were doing until now. During the wait time for the URC, the operation task ownership is shared among the response processor, the URC handler and the timeout source. Once any of them decides to complete the task, the others will automatically avoid attempting to complete the same task. Based on a patch originally developed by: Som_SP <somashekhar.puttagangaiah@intel.com>
2022-05-19broadband-modem-mbim: plug memleak when MBIMEx v2 not supportedAleksander Morgado
==11025== 40 bytes in 1 blocks are definitely lost in loss record 3,313 of 5,483 ==11025== at 0x483E7C5: malloc (vg_replace_malloc.c:380) ==11025== by 0x4A32CA9: g_malloc (in /usr/lib/libglib-2.0.so.0.7000.2) ==11025== by 0x4A4A082: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.7000.2) ==11025== by 0x49F8574: g_array_sized_new (in /usr/lib/libglib-2.0.so.0.7000.2) ==11025== by 0x24DEB1: load_supported_modes_mbim (mm-broadband-modem-mbim.c:958) ==11025== by 0x24E2D5: modem_load_supported_modes (mm-broadband-modem-mbim.c:1042) ==11025== by 0x1D4DC5: interface_initialization_step (mm-iface-modem.c:5718) ==11025== by 0x1D26D6: load_device_identifier_ready (mm-iface-modem.c:4903) ==11025== by 0x4BACB83: ??? (in /usr/lib/libgio-2.0.so.0.7000.2) ==11025== by 0x4BACBB8: ??? (in /usr/lib/libgio-2.0.so.0.7000.2) ==11025== by 0x4A2A434: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.7000.2) ==11025== by 0x4A7E7B8: ??? (in /usr/lib/libglib-2.0.so.0.7000.2)
2022-05-18mm-broadband-modem-qmi: Update access technology based on "NAS system info" ↵Prakash Pabba
or "NAS serving system" For NR5G NSA, both LTE and NR5G should be set in access technology. Use NAS "system info" or "serving system", instead of NAS "signal info" or "signal strength", for deciding access technology based on current registration state.
2022-05-13broadband-modem-mbim: fix additional double GError freeAleksander Morgado
We're returning the GError as GTask result, we should not explicitly free it ourselves. Same as the previous fix, should solve the crash sometimes seen in https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/550
2022-05-13broadband-modem-mbim: fix double GError freeAleksander Morgado
We're returning the GError as GTask result, we should not explicitly free it ourselves. Fixes the crash sometimes seen in https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/550 ==15994== Invalid free() / delete / delete[] / realloc() ==15994== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==15994== by 0x4F9A8A0: g_error_free (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x2251CC: ??? (in /usr/sbin/ModemManager) ==15994== by 0x4DD2B48: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7102.0) ==15994== by 0x4DD2D4A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7102.0) ==15994== by 0x4CA9049: ??? (in /usr/lib/x86_64-linux-gnu/libmbim-glib.so.4.6.0) ==15994== by 0x4CB0367: ??? (in /usr/lib/x86_64-linux-gnu/libmbim-glib.so.4.6.0) ==15994== by 0x4FAF287: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FAEC03: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x5003497: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FAE282: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x16916F: main (in /usr/sbin/ModemManager) ==15994== Address 0x80db490 is 0 bytes inside a block of size 16 free'd ==15994== at 0x484B27F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==15994== by 0x4F9A8A0: g_error_free (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x1984FA: ??? (in /usr/sbin/ModemManager) ==15994== by 0x4DD2B48: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7102.0) ==15994== by 0x4DD2D4A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7102.0) ==15994== by 0x2251A6: ??? (in /usr/sbin/ModemManager) ==15994== by 0x4DD2B48: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7102.0) ==15994== by 0x4DD2D4A: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7102.0) ==15994== by 0x4CA9049: ??? (in /usr/lib/x86_64-linux-gnu/libmbim-glib.so.4.6.0) ==15994== by 0x4CB0367: ??? (in /usr/lib/x86_64-linux-gnu/libmbim-glib.so.4.6.0) ==15994== by 0x4FAF287: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FAEC03: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== Block was alloc'd at ==15994== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==15994== by 0x4FB76F8: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FCF1A4: g_slice_alloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FCF80D: g_slice_alloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4F9A3A6: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4F9A5A3: g_error_copy (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4CA903E: ??? (in /usr/lib/x86_64-linux-gnu/libmbim-glib.so.4.6.0) ==15994== by 0x4CB0367: ??? (in /usr/lib/x86_64-linux-gnu/libmbim-glib.so.4.6.0) ==15994== by 0x4FAF287: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FAEC03: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x5003497: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0) ==15994== by 0x4FAE282: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7102.0)
2022-05-11broadband-modem-mbim: fix task completion when peeking device failsAleksander Morgado
We cannot call peek_device() when we have already created a GTask for the async operation, because if the operation failed we would be completing the async operation with a totally different GTask than the one we had created ourselves, triggering memory leaks and leaving modem references around that should not exist (as the GTask we create holds a modem reference). Issue found in the context of debugging this, may actually be fully related: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/550
2022-05-11broadband-modem-mbim: minor coding style changesAleksander Morgado
2022-05-09Revert "plugins,fibocom: Add udev filter for pci wwan"Andrew Lassalle
This reverts commit 115a5d876ee57943f1ec6d8ebcb3328d821ec80a.
2022-05-05plugins,fibocom: Add udev filter for pci wwanAndrew Lassalle
Add a udev filter to identify pci wwan ports from fibocom modems.
2022-05-03mm-iface-modem: mark signal strength as recent on initDylan Van Assche
When initializing the Modem interface, we set the signal strength to the default value (0%) and we are certain this is the recent value until the modem reports the actual signal strength if available. Therefore, mark the signal strength as recent instead of cached.
2022-04-29mm-iface-modem: set signal quality to 0% on shutdownDylan Van Assche
If a modem is disabled, the signal quality is still set to the cached value, even though the modem is not connected to any network anymore. Set the signal quality to 0% when the interface is removed from DBus. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/558
2022-04-28mmcli: correctly set key_lengthAmol Lad
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/559
2022-04-27bearer-qmi: fix QmiWdRequestedSettings->QmiWdsRequestedSettings typoAleksander Morgado
2022-04-27bearer-qmi: use the new QmiWdRequestedSettings enum typeAleksander Morgado
And bump libqmi to 1.31.5, which is the version introducing the rename.
2022-04-22iface-modem-3gpp-profile-manager: fix copy-paste error on tags for quarksMaxim Anisimov
Ussd module initialization does not work correctly because the tags match. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2022-04-21introspection: add Modem SimpleDylan Van Assche
2022-04-20mm-log: hiding personal info while loggingsom
During mm logging, some of the information like simIccId, Telephone numbers need to be hidden from displaying in the logs to protect some of the user information. Implemented for MBIM requiring libmbim 1.27.6, which is the development version that includes the needed API.
2022-04-15huawei: disable +CPOL based features in Huawei E226Aleksander Morgado
Issue and bugfix suggestion by Alex Leopoldo Villacís Lasso. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/552
2022-04-13cinterion: add PLS63 port type hintsKonrad Zapałowicz
The PLS63 is a drop-in replacement for PLS62 model, however it uses different USB SoC and enumerates differently on the USB bus. This commit adds relevant type hints with a correct Vendor and Product IDs so that the device is correctly discovered. Without these type hints the modem would not work correctly as it uses wrong port for PPP.
2022-04-12plugins,telit: SWPKGV parsing needs more permissive regexCarlo Lobrano
In some cases the "base" software package string does not have the currently expected format of \d{2}.\d{2}.\d{3}. Specifically the last triplet of characters might not be digits. For example a valid version string might be 25.20.-04, which the current regex is unable to parse. This change replace the previous regex with one less restrictive, checking only the first part of the version's format.
2022-04-11test,modem-helpers-telit: fix test inputsCarlo Lobrano
test input strings for test_telit_parse_swpkgv_response invert <CR> and <LF>. The correct match is \r for <CR> and \n for <LF>.
2022-04-08sms: prevent crash if date is out of rangeCarlo Lobrano
g_date_time_new, and g_date_time_new_utc return NULL if inputs are out of range, and currently mm_new_iso8601_time passes the GDateTime created by those two functions to date_time_format_iso8601 without checking for NULL values, causing a g_date_time_format_iso8601 crash if PDU data is corrupted with wrong date. To prevent this, mm_new_iso8601_time now can return NULL and set a new GError if GDateTime created by g_date_time_new is NULL. Fixes #546
2022-04-07modem-mbim: update default error when network error is out of rangesom
When the modem sends an error which is outside the range defined in MBIM_NW_ERROR list then MM should use a default error(MBIM_NW_ERROR_NONE) instead of crash.
2022-04-07plugins,telit: remove unnecessary after sim unlock 1s delayCarlo Lobrano
Currently the Telit modem implements modem_after_sim_unlock() with 1s timeout, however the #QSS URC management (introduced later) waits for QSS=1 URC in csim_unlock_periodic_check up to 3s, which makes this 1s delay not necessary anymore. see also: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/3
2022-04-05data: add example connection dispatcherAleksander Morgado
Just a minimal example that prints the events in syslog
2022-04-05build: rename directory where fcc unlocks are keptAleksander Morgado
2022-04-05base-bearer: integrate connection status dispatcher scriptsAleksander Morgado
2022-04-05dispatcher-connection: new dispatcher for connection status scriptsAleksander Morgado
The user or the packages can install custom dispatcher scripts that will be run by the ModemManaer daemon itself upon bearer connection status updates. Scripts installed by users should go into the /etc/ModemManager/connection.d directory. Scripts installed by packages should go into the /usr/lib/ModemManager/connection.d directory. The name of the script will specify the order how it's run, so it's suggested to name them with a numeric prefix, e.g. "99-something".
2022-04-05dispatcher-fcc-unlock: inherit from the base dispatcher objectAleksander Morgado
2022-04-05dispatcher: new generic object to handle script dispatchersAleksander Morgado
Based on the FCC unlock specific one, but without any FCC unlock specific constraint.
2022-04-05profile-manager: profile-id and apn-type check not required for user settingssom
When the user provides the profile parameter, as per the MM documentation profile-id is an optional parameter. So with the fix the profile-id check in input is removed. apn-type is also optional when the user provides the settings. This check is also removed as part of the fix.
2022-04-04port-serial: ensure the port object is valid after BUFFER_FULL handlingAleksander Morgado
The BUFFER_FULL signal handler is effectively working in the same way as the response buffer processor, in both cases we may have scheduled the completion of the serial command, and that in turn may end up fully disposing the port object. We must make sure the port object is valid for as long as we need it in this function, so we take a reference while processing the response buffer. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/535
2022-03-30qmi: Fall back to NAS SSP/NAS TP capabilitiesSven Schwermer
If no DMS capabilities are reported, we fall back to the capabilities reported by NAS SSP or NAS TP. Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-03-29broadband-modem-mbim: Set InitialEPSBearer's authentication to CHAP when is ↵Andrew Lassalle
UNKNOWN This is the same behavior that is used when creating the bearer in mm-bearer-mbim.
2022-03-29bearer-properties: Match UNKNOWN auth to CHAP for loose comparisonAndrew Lassalle
MBIM and QMI fallback to CHAP when a username or password is present but no authentication type was provided. Consider CHAP==UNKNOWN when using loose comparison.
2022-03-29core: remove "all rights reserved" from copyright linesAleksander Morgado
The rights each contributor has are the ones stated by the GPL/LGPL, not more and not less.
2022-03-29telit: reorganize common_parse_bnd_response for readabilityCarlo Lobrano
2022-03-29telit: fix AT#BND parsing for LE910C1-EUXCarlo Lobrano
Some modems, like LE910C1-EUX, express the LTE part of #BND output in HEX format, but currently the MM parser for such case is limited to modems that have "ext_4g_bands". This commits use the new MMTelitModel info to decide how to parse #BND command output. Fixes #487
2022-03-29telit: detect modem model from revisionCarlo Lobrano
Telit revision string can be used to identify the specific model, which in turn is useful to specialize the behavior of the plugin. This change adds revision parsing to detect some telit modems. Initially it adds the ones that have different behaviors in #BND output parsing for example.
2022-03-29telit: override load revisionCarlo Lobrano
Currently, firmware revision string is obtained via AT+CGMR or AT+GMR commands from the default mm-broadband-modem. For a class of Telit modems however this command does not return the actual Telit Software Package version, but the "Modem FW Version", which is only a component of the whole firmware. For this class of modems, the correct string is obtained with "AT#SWPKGV" command. This change overrides load_revision* functions to add the ability to parse "AT#SWPKGV" command for the modems that support it, and falls back to the same logic that was implemented in mm-broadband-modem otherwise.
2022-03-28mm-netlink: use unaligned netlink attribute lengthBjørn Mork
Alignment padding is not accounted for in the netlink attribute length. Fix to avoid warnings later if we add shorter fixed length attributes, even though it currently makes no difference since we only add a 4 byte attribute Signed-off-by: Bjørn Mork <bjorn@mork.no>
2022-03-28mm-netlink: only change IFF_UP flagBjørn Mork
This fixes the missing NOARP flag on the second and following VLAN sub-interfaces when multiplexing over the cdc_mbim driver. ifi_change specifies all the flags we want to change. Any listed flag which isn't set in ifi_flags will be cleared by the kernel: if (ifm->ifi_change) flags = (flags & ifm->ifi_change) | (rtnl_dev_get_flags(dev) & ~ifm->ifi_change); Drivers like cdc_mbim set some netdev flags by default, indicating supported or unsupported features. The driver emulates an ethernet netdev but it doesn't implement ARP. Clearing NOARP on cdc_mbim netdevs will block IP transmissions, waiting for an ARP reply we never will receive. Signed-off-by: Bjørn Mork <bjorn@mork.no>
2022-03-28po add Dutch translationNathan Follens
2022-03-28foxconn: consolidate checks for T99W175 and T99W265Aleksander Morgado
These two devices require QDU and MCFG+APPS version string comparison. We now have a single place where we check for this requirements.
2022-03-28foxconn: consolidate logic deciding required update methodsAleksander Morgado
2022-03-28foxconn: consolidate logic deciding requested firmware version typeAleksander Morgado
We don't want to have in two different places the vid:pid match list when selecting the type of firmware version we ask for.
2022-03-28foxconn: switch to use autoptr() in firmware info loadingAleksander Morgado
2022-03-28foxconn: remove unneeded input bundle unrefAleksander Morgado
2022-03-28foxconn: use new qmi service(fox) to get firmware versionFreedom Liu
foxconn modules get firmware version: Try with the new FOX service first. If FOX service failed, try with DMS service. T99W175(vid:105b) ; T77W968(0489:e0b4 ; 0489:e0b5): qmi service: dms T99W265(0489:e0da ; 0489:e0db): qmi service: fox
2022-03-28build: require libqmi 1.31.4 for FOX service supportAleksander Morgado