aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-qmi.c
AgeCommit message (Collapse)Author
2023-10-27modem-helpers-qmi: avoid "ip-version-mismatch" error if possibleAleksander Morgado
Based on the WDS client being connected, we'll convert this error into "IPv4 only allowed" or "IPv6 only allowed".
2023-10-27modem-helpers-qmi: translate QMI internal verbose call reason into MM errorsAleksander Morgado
Just a few key translations for now.
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-04-27libmm-glib: separate files for flags and enums typesAleksander Morgado
This allows us to skip needing to include the non-existent build_string_from_mask() or get_string() counterparts in the documentation index.
2023-04-11helpers-qmi: support new personalization feature status typeAleksander Morgado
The personalization feature enum used in "card status" is different to the one used in other UIM operations like "depersonalization". libqmi dependency updated to 1.33.6 to ensure we can use the new types.
2022-11-10modem-helpers-qmi: new helper to process System Info messagesAleksander Morgado
2022-09-16enum, bearer: added non-ip bearerAlexey Orishko
2022-08-18port-qmi: Detect endpoint type based on net driverStephan Gerhold
At the moment the endpoint type and number for the QMI WDA calls are chosen based on the subsystem of the QMI control port. This does not work correctly for some configurations: - SUBSYS_QRTR currently implies ENDPOINT_TYPE_EMBEDDED, but this is only valid for QRTR+IPA configurations. For QRTR+BAM-DMUX the correct type is ENDPOINT_TYPE_BAM_DMUX. - SUBSYS_WWAN currently implies ENDPOINT_TYPE_PCIE, but there is already a comment that mentions that this selection works only for MHI/PCIe modems. SUBSYS_WWAN is also used by RPMSG+BAM-DMUX configurations in which case the correct type is also ENDPOINT_TYPE_BAM_DMUX. Looking closer at these cases suggests that the endpoint type actually refers to the data/net port and not the control port. It is more reliable choose it based on the network driver and not the subsystem of the control port. Address this partially by choosing the endpoint type based on the net_driver. Choosing the endpoint interface number correctly requires more refactoring since most of the logic is currently handled globally for a QMI control port, while it's actually specific to the chosen data/net port in some cases (e.g. multiple BAM-DMUX network interfaces).
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-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-01-31modem-helpers-qmi: multimode devices shouldn't always have 4G/5G only modesAleksander Morgado
In GSM/UMTS+CDMA/EVDO multimode devices, the 4G and 5G mode switching operations are exclusively limited to the capability selection that has LTE+5GNR exclusively. We cannot allow switching to 4G-only, 5G-only or 4G+5G if the current capabilities have GSM/UMTS or CDMA/EVDO. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/503
2022-01-31modem-helpers-qmi: new helper to build array of supported modesAleksander Morgado
2022-01-31modem-helpers-qmi: new helper to build array of supported capabilitiesAleksander Morgado
2022-01-31modem-helpers-qmi: refer explicitly to current capabilities in helper methodAleksander Morgado
The helper method for which we have unit tests available refers exclusively to the current capabilities loading, so rename it to clarify that.
2022-01-30mm-modem-helpers-qmi: Fix current capabilities for multimode devicePrakash Pabba
Keep LTE or 5GNR always in current capabilities if supported by device. Since capability switching logic is exclusively used for configuring GSM/UMTS+CDMA/EVDO devices, decide if to have GSM/UMTS or CDMA/EVDO or both or none when loading current capabilities.
2021-11-14shared-qmi,modem-helpers-qmi: Add support for NR5G band preferencePrakash Pabba
Implement support for the NR5G band list to get current NR5G bands. This will also allow us to configure supported NR5G bands via mmcli.
2021-11-14shared-qmi,modem-helpers-qmi: Add support for NR5G band capabilityPrakash Pabba
Implement support for the NR5G band list to get supported NR5G band capabilities. localhost ~ # qmicli -d qrtr://0 --dms-get-band-capabilities [qrtr://0] Device band capabilities retrieved: Bands: 'bc-0-a-system, bc-0-b-system, bc-1-all-blocks, gsm-dcs-1800, gsm-900-extended, bc-10, gsm-850, gsm-pcs-1900, wcdma-2100, wcdma-pcs-1900, wcdma-1700-us, wcdma-850-us, wcdma-800, wcdma-900, wcdma-850-japan' LTE bands: '1, 2, 3, 4, 5, 7, 8, 11, 12, 13, 14, 17, 18, 19, 20, 21, 25, 26, 28, 29, 30, 32, 34, 38, 39, 40, 41, 42, 43' LTE bands (extended): '1, 2, 3, 4, 5, 7, 8, 11, 12, 13, 14, 17, 18, 19, 20, 21, 25, 26, 28, 29, 30, 32, 34, 38, 39, 40, 41, 42, 43, 46, 48, 66, 68, 71' NR5G bands: '1, 2, 3, 5, 7, 8, 12, 13, 14, 18, 20, 25, 26, 28, 29, 30, 38, 40, 41, 48, 66, 70, 71, 77, 78, 79'
2021-10-11api: new TDS capabilityDaniele Palmas
2021-09-21modem-qmi,sim-qmi: read personalization retries from Card StatusMichal Mazur
2021-09-19sim-mbim: add support for loading eid via mbim protocolSom_SP
Support is added to set eid dbus interface property using MBIM protocol when the inserted sim is esim.
2021-05-22modem-qmi: detect personalization locks in LOCKED stateMichal Mazur
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-09modem-helpers-qmi: fix auth validation always returning errorgoapunk
2021-04-30modem-helpers: improve logging on unhandled features when parsing UIM Get ↵Aleksander Morgado
Configuration
2021-04-30modem-helpers: introduce functions to convert MMModem3gppFacilityMichal Mazur
2021-04-30modem-helpers-qmi: introduce parser for Get Configuration messageMichal Mazur
2021-04-29modem-helpers-qmi: perform validation in allowed_auth_to_qmi_authentication()Aleksander Morgado
If we find that none of the requested auth settings are supported, we should fail and return an error. Also, make sure we set the CHAP fallback default only if either user or password are given.
2021-04-29broadband-modem-qmi: implement profile management supportAleksander Morgado
2021-04-21base: Add support for wwan subsystemLoic Poulain
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>
2021-04-14port-qmi: add support for QRTRAndrew Lassalle
Extend mm-port-qmi to accept a QRTR node to work with modems using the QRTR protocol.
2021-04-08modem-helpers-qmi: match QMI_WDS_AUTHENTICATION_NONE with ↵Aleksander Morgado
MM_BEARER_ALLOWED_AUTH_NONE There is no point in returning UNKNOWN when the WDS auth value is NONE.
2021-03-15shared-qmi: acquisition order preference TLV always same itemsAleksander Morgado
The acquisition order preference TLV must always have the same number of elements, just the order of the elements should be different. Also, always prefer the acquisition order preference TLV to the GSM+WCDMA specific one, which is the same logic the modem applies. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/340
2021-03-10port-qmi: keep track of the endpoint infoAleksander Morgado
The endpoint info of a given MMPortQmi is immutable (it's associated to the specific kernel driver in use and to the specific physical interface number of the device). We'll load it as soon as the kernel device object is set in the port, and we'll keep it in the private struct so that it can be used at any time, e.g. by the WDA Get/Set Data Format operations on newest devices, where the endpoint info TLV is mandatory.
2021-02-23libmm-glib,common-helpers: make hexstr2bin() return a guint8 arrayAleksander Morgado
It makes much more sense than returning a gchar array, as gchar is signed.
2021-02-23libmm-glib,common-helpers: make hexstr2bin() accept input string lengthAleksander Morgado
Optionally given explicitly, and -1 can be used to assume it's NUL-terminated.
2021-02-23libmm-glib,common-helpers: make hexstr2bin() return a GErrorAleksander Morgado
This util method checks whether the input string is a valid hex string, so make sure we return a GError on failure.
2020-12-21broadband-modem-qmi: implement initial EPS bearer settings loading and settingAleksander Morgado
2020-12-21broadband-modem-qmi: implement initial EPS bearer info loadingAleksander Morgado
2020-11-06modem-helpers-qmi: don't check result when parsing UIM Get Card Status OutputAleksander Morgado
Do it earlier, before running the parser.
2020-10-29helpers-qmi: 'illegal' card application state is fatalAleksander Morgado
No need to retry checking card status when the application state is illegal, just treat the SIM card as unusable right away. https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842
2020-10-19mm-shared-qmi: load EID during SIM slot loadingEric Caruso
SIMs can be created with an EID fetched during load_sim_slots while initializing the modem, if present. Since load_eid would be implemented with the same mechanism we avoid using it here (if Get Slot Status fails once, it probably doesn't make a lot of sense to try it again).
2020-10-03broadband-modem-qmi: Use UIM service for querying facility locksPavan Holla
DMS_UIM messages have been deprecated, and have been replaced by equivalent UIM messages. Use UIM_GET_CARD_STATUS while querying for facility locks if dms_uim messages were found to be deprecated.
2020-08-28helpers-qmi: fix detection of primary active SIM statusAleksander Morgado
The original logic that parsed the 'UIM Get Card Status Output' did a bit of guessing to decide what was the current lock status to consider in the modem. This guessing was fine on systems with a single SIM slot, but it was very wrong as soon as multiple SIMs had to be considered. In a Multi-SIM Multi-Standby setup, with multiple SIMs reported as active, we should look for the one flagged as "GW primary" to consider it the primary SIM card of the system,the one required to start a data connection. We explicitly ignore the ones flagged as "1X primary", as we don't consider a SIM card required in CDMA/EVDO setups.
2020-08-28helpers-qmi: move 'UIM Get Card Status Output' parsing to helpersAleksander Morgado
This is going to be used in handling the multi-SIM setup, so make it a common helper.
2020-04-09helpers-qmi: always log all queried capabilities when building currentAleksander Morgado
2020-04-09helpers-qmi: support 5G capabilities and modesAleksander Morgado
2020-04-09api: new 5G modeAleksander Morgado
2020-04-09api: new 5GNR capabilityAleksander Morgado