aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-10-27core: ensure all errors returned in DBus operations are normalizedAleksander Morgado
We want to ensure that all errors reported via DBus operations are normalized to MM-specific errors. We don't want to return QMI or MBIM specific errors, as those are protocol specific and we don't want DBus clients to need to rely on knowing which is the protocol in use by the device.
2023-10-27base-bearer: normalize connection error exposed in DBusAleksander Morgado
The connection error exposed in the DBus interface should be an error defined in the ModemManager API, and therefore it should be normalized before being exposed. This was already being done by limiting the exposure to MM specific errors, but now we also try to normalize QMI or MBIM errors into MM specific ones.
2023-10-27api,errors: new MMCarrierLockError typeAleksander Morgado
This new error type will be used to report errors in the carrier lock operations performed through ModemManager. They have a one to one mapping to the MBIM status specific errors.
2023-10-26modem-helpers-qmi: register QMI error translationsAleksander Morgado
We register translations for QMI core and QMI protocol errors. These translations are a best-effort, and they are not meant to be exhaustive. The original error description is included in the translated GError, so that the details of the issue are not lost.
2023-10-26modem-helpers-qmi: group error translation methods togetherAleksander Morgado
2023-10-26modem-helpers-qmi: minor method renameAleksander Morgado
2023-10-26modem-helpers-mbim: register MBIM error translationsAleksander Morgado
We register translations for MBIM core, MBIM protocol and MBIM status errors. These translations are a best-effort, and they are not meant to be exhaustive. The original error description is included in the translated GError, so that the details of the issue are not lost.
2023-10-26modem-helpers-mbim: move error translation methodAleksander Morgado
Moved to the end of the file, we'll add all new error translations together.
2023-10-26modem-helpers-mbim: minor method renameAleksander Morgado
2023-10-26error-helpers: allow registering error mappingsAleksander Morgado
E.g. from QMI/MBIM errors into MM errors.
2023-10-26core,error-helpers: new method to normalize GErrorsAleksander Morgado
The ModemManager API should not expose or return error types out of the error domains it supports. Default to a generic core error "Failed", while keeping the original error description.
2023-10-25core,error-helpers: fix formatting in ME error stringsAleksander Morgado
2023-10-19mm-port-probe: Invoke the mm_port_mbim_open function with a GCancellable objectMadhav
After the modem recovers, the ports are up but not yet responsive. When MM tries to probe the ports, they do not respond. As a result, the probing tasks are left ongoing, waiting for a response from the modem. If the modem drops off the bus for any reason, the cdc-wdm port probing task is not immediately canceled. This patch fixes this issue by passing a cancellable object to mm_port_mbim_open(). In other words, the patch ensures that the cdc-wdm port probing task is canceled if the modem drops off the bus before the task completes. This prevents the task from preventing other port probing tasks from starting.
2023-10-18quectel: coding style fixesAleksander Morgado
2023-10-18quectel: avoid incorrect module version report after the upgrademank.wang
After LVFS upgrade, the module needs to be restarted. ModemManager queries the module information, sometimes the module is not ready, and the information queried by "mmcli -m any --firmware-status" is incomplete, It is now modified to re query once per second when obtaining incomplete versions, up to a maximum of 16 times. Signed-off-by: mank.wang <mank.wang@quectel.com>
2023-10-18broadband-modem-mbim: reprobe modem and update SIM info after ↵Rukun Mao
"nonInitialized" error When the subscriber ready status notification's ready state becomes "initialized" from "nonInitialized", it indicates a new SIM is inserted, for which a modem reprobe is needed.
2023-10-18fibocom: Added support for firmware objectsPuliang Lu
Added load_update_settings, load_update_settings_finish Add support for fastboot flash
2023-10-18iface-modem-3gpp-profile-manager: throttle emission of the "updated" signalAleksander Morgado
Emit the "Updated" signal max one time per 2 seconds, even if we get many more notifications from the modem during that time.
2023-10-18mm-broadband-modem-mbim: Enable PROCESS_NOTIFICATION_FLAG_SLOT_INFO_STATUS ↵Madhav
during sim hot swap setup Add PROCESS_NOTIFICATION_FLAG_SLOT_INFO_STATUS to enable and setup flags, this should help SIM detection on inactive slots when the modem is in a failed state. This helps fix the following scenario, If a physical SIM card (pSIM) is inserted into a device that is currently using its eSIM slot, but does not have any eSIM profiles installed, the pSIM will not be detected.
2023-10-17ublox: remove ID_MM_PROCESS tagsAleksander Morgado
The ID_MM_PROCESS tag should be set by the user when using the allowlist filter, we must not ship any device flagged by default with that tag. Moreover, the two ENV actions in a single rule is something not currently supported by the builtin udev rule parser that is used in systems without udev (e.g. openwrt). Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/779
2023-10-12quectel: add support for RM520NRobert Marko
RM520N in USB mode exposes the following: ttyUSB0 (if #0): QCDM/DIAG port ttyUSB1 (if #1): GPS data port ttyUSB2 (if #2): AT primary port ttyUSB3 (if #3): AT secondary port So, lets mark them so ModemManager can properly manage them. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-10-11ModemManager: Add force option to set initial EPS bearer settingsUjjwal Pande
Adding a new force option to force send initial EPS bearer settings to modem even if they match the existing ones. Currently settings are not sent to the modem if they match old settings
2023-10-11iface-modem: new logic to detect SIM swap with explicit IMSI/ICCID queryRukun Mao
This improves SIM hot swap check process, and it can help avoid unnecessary modem reprobe during suspend-resume without SIM inserted. The changes in this CL implemented the new logic ONLY for MBIM, and the new logic has not been implemented for QMI and AT yet. Thus, we keep the legacy `mm_iface_modem_check_for_sim_swap()' till the new logic for QMI and AT has been implemented.
2023-10-11mtk: rename for old mtk pluginming-pei.hsu
Use mtk-legacy to instead mtk plugin.
2023-10-11udev: always ignore the Qualcomm recovery layout (05c6:9008)Aleksander Morgado
2023-10-09iface-modem: fix error message for failed mode settingokaestne
2023-10-06core: use more inclusive words in logsAleksander Morgado
2023-10-05cinterion: implement setting primary slotLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-10-05cinterion: implement loading multiple SIMsLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-10-05broadband-modem-qmi: Treat QMI_VOICE_USER_ACTION_UNKNOWN as ↵Daniel Hofmann
QMI_VOICE_USER_ACTION_NOT_REQUIRED. This fixes a bug where network-initiated USSD-Notify messages were not processed (and forwarded to higher-level applications) at all, while they should have been processed (and forwareded to higher-level applications). Previously, when there was a USSD conversation between the user and the network, the last message from the network (which, by definition, is not a message with user_action==QMI_VOICE_USER_ACTION_REQUIRED) would be silently dropped. The cause is a mismatch between the modem sending user_action==QMI_VOICE_USER_ACTION_UNKNOWN while old ModemManager expecting user_action==QMI_VOICE_USER_ACTION_NOT_REQUIRED.
2023-09-27iface-modem: actually respect build optionsRobert Marko
iface-modem does not include config.h so it doesnt actually have the meson generated build defines to check against. I found this while trying to use AT commands over D-Bus by enabling at_command_via_dbus, confirming that Meson sees it, defines it in config.h but then I still got the: "Cannot send AT command to modem: operation only allowed in debug mode". Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-09-27base-modem: minor alignment fixAleksander Morgado
2023-09-27device: plug leak of the physdev stringAleksander Morgado
2023-09-18mm-broadband-modem-mbim: treat "status error = `NotInitialized'" the same ↵Nagi Marupaka
way as "ReadyState = 'sim-not-initialized'"
2023-09-18api,modem: new 'Physdev' propertyLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-09-15quectel: Add RM520 with firehose supportQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-14quectel: Add new EM160 product with firehose supportQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-11broadband-modem: don't assert if no AT port in QMI modem enabling ↵Aleksander Morgado
unsolicited messages 2023-09-11T20:23:49.294555Z <err> mm_port_get_device: assertion 'self != NULL' failed 2023-09-11T20:23:49.294691Z <dbg> [modem0] enabling messaging unsolicited events on primary port (null) 2023-09-11T20:23:49.294865Z <dbg> [modem0] enabling parent messaging unsolicited events failed: Cannot run sequence: port not given
2023-09-11iface-modem-simple: ignore ps wait state result, only check errorAleksander Morgado
As we do in the similar modem state wait operations in the modem interface, the caller of the wait operation may ignore the state result as it's really not required in this case. Only looking at whether an error is set or not is enough. This by itself fixes a crash where mm_iface_modem_3gpp_wait_for_packet_service_state_finish() may have returned UNKNOWN without error set. 0x000079616c2564ed (libglib-2.0.so.0 - gtestutils.c: 3256) g_assertion_message 0x000079616c25654b (libglib-2.0.so.0 - gtestutils.c: 3282) g_assertion_message_expr 0x000057ba46231150 (ModemManager - mm-iface-modem-simple.c: 344) packet_service_attach_in_3gpp_network_step 0x000079616c0efb02 (libgio-2.0.so.0 - gtask.c: 1232) g_task_return_now 0x000079616c0eeb54 (libgio-2.0.so.0 - gtask.c: 1301) g_task_return 0x000057ba4620e5bd (ModemManager - mm-iface-modem-3gpp.c: 189) wait_for_packet_service_state_context_complete 0x000057ba4620b441 (ModemManager - mm-iface-modem-3gpp.c: 261) packet_service_state_changed
2023-09-11iface-modem-3gpp: ensure error is set when UNKNOWN returned in ps state waitAleksander Morgado
2023-09-11iface-modem: ensure error is set when UNKNOWN returned in modem state waitAleksander Morgado
2023-09-11iface-modem-3gpp: ignore UNKNOWN ps state explicitly during wait operationAleksander Morgado
2023-09-11iface-modem: ignore UNKNOWN modem state explicitly during wait operationAleksander Morgado
2023-09-08quectel: add Sahara udev tag to EM061K-GL modemsQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-08-30mm-sms-part-3gpp: avoid buffer overflow if packed data is too largeEric Caruso
With GSM7 encoding, packedlen is the length of the unpacked string after expanding septets to octets so it will be ~14% bigger than the original string length. This means we have to be careful not to copy too much data into the PDU buffer. Similar issues exist in other branches of the same function. Thanks rhezashan@gmail.com for the report.
2023-08-14quectel: add support for EM060K-GL usb modulesQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-08-07port-qmi: add QMAP support to mhi_net based setupsDaniele Palmas
2023-08-07port-qmi: restore driver initial MTU for mhi-net when resetting linkDaniele Palmas
Kernel driver mhi-net sets a custom MTU for the netdevice: use the same value when resetting the netdevice to its initial state. This is important especially when rmnet is used on top of mhi-net, since rmnet netdevices get their initial MTU from the mhi-net one.
2023-08-05fibocom: disable multiplexing support in NL668Aleksander Morgado
The NL668 doesn't seem to support multiplexing, as it fails to transfer data even in the one multiplexed PDN case.
2023-08-04bearer-mbim: simplify the logic to require static IPv6 addressingAleksander Morgado
Rely exclusively on whether a global IPv6 was given or not, regardless of what the DNS or gateway settings are, same as we do for IPv4. Also, assume we only get 1 single IPv6 address. No need to have a FIXME to add support for more addresses.