aboutsummaryrefslogtreecommitdiff
path: root/src/mm-sim-qmi.c
AgeCommit message (Collapse)Author
2022-11-28mm-sim-qmi: use UIM service for loading operator identifier and nameAkash Aggarwal
Output of NAS Get Home Network depends on network state, and we may fail to read SIM card info if device is not attached. Load card operator name and identifier using UIM Read Transparent.
2022-08-25sim-qmi: rework Read Transparent processing to use g_autoptr()Aleksander Morgado
2022-08-25sim-qmi: fix leak of the GArray containing the GIDAleksander Morgado
Fixes 3238ccdbb29e86acd2b3e5c0e45bee84f9da94b4
2022-08-19sim-qmi: implement loading GID1 and GID2Aleksander Morgado
2022-08-19sim-qmi: define common SIM file paths for MF and ADFAleksander Morgado
2022-07-14mm-sim-qmi: use shared qmi interface instead of using qmi modem class directlyUlrich Mohr
2021-09-21modem-qmi,sim-qmi: read personalization retries from Card StatusMichal Mazur
2021-06-10mm-sim-qmi: parse ICCID as hex instead of BCDEric Caruso
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-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-03-12sim-qmi,libmm-glib: QMI implementation of get/set preferred networksTeijo Kinnunen
2020-11-09broadband-modem-qmi: peeking QMI port only in QMI modemsAleksander Morgado
Move the logic out of the base modem, and make it applicable only for QMI modems.
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-16mm-modem-helpers: add low_nybble_first argument to mm_bcd_to_stringEric Caruso
All BCD-encoded strings used by MM currently have the low nybble of each byte come before the high nybble, but some strings (such as the EID string returned by QMI Get Slot Status) are meant to be read in order with the high nybble before the low one. As such, extend mm_bcd_to_string to decode both.
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-28sim-qmi: implement explicit wait for SIM readinessAleksander Morgado
During the base SIM initialization process, where we ask the modem for the properties of the currently primary active SIM, we need to make sure that the SIM is ready before attempting to query this information. This explicit wait is required when loading properties for non active SIMs during the short period of time when they're made active.
2020-08-28sim-qmi: allow creating preinitialized SIM objectsAleksander Morgado
The default SIM creation method will attempt to initialize the SIM properties during the object creation. This new method allows creating SIM objects with already known property values, and therefore not explicitly running the asynchronous initialization process. Completely equivalent to mm_base_sim_new_initialized() but creating a subclassed MMSimQmi instead of the generic MMBaseSim.
2020-08-28api,sim: new 'Active' propertyAleksander Morgado
In preparation for the multi-SIM setup, we need a way to tell whether a given SIM card is active or not in the system. On systems with one single SIM slot, the available SIM card will always be active. On Multi-SIM Single-Standby setups we may have multiple SIM slots with multiple SIM cards, but only one of them will be active at any given time. On Multi-SIM Multi-Standby setups we may have multiple SIM slots with multiple SIM cards that may be active at the same time. E.g. the QMI protocol allows up to 5 different active SIM cards (primary, secondary, tertiary...).
2020-04-08sim-qmi: port to use object loggingAleksander Morgado
2020-01-31sim-qmi: avoid using deprecated libqmi declarationsAleksander Morgado
Let's use the suggested compat symbols instead, provided in libqmi 1.22. mm-sim-qmi.c: In function ‘uim_read’: mm-sim-qmi.c:170:5: error: ‘qmi_message_uim_read_transparent_input_set_session_information’ is deprecated: Use 'qmi_message_uim_read_transparent_input_set_session' instead [-Werror=deprecated-declarations] 170 | qmi_message_uim_read_transparent_input_set_session_information ( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/libqmi-glib/libqmi-glib.h:40, from mm-port-qmi.h:23, from mm-base-modem.h:39, from mm-base-sim.h:25, from mm-sim-qmi.h:22, from mm-sim-qmi.c:29: /usr/include/libqmi-glib/qmi-compat.h:1154:10: note: declared here 1154 | gboolean qmi_message_uim_read_transparent_input_set_session_information ( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
2018-10-26sim-qmi: use QMI UIM service to read IMSI if neededBen Chan
If a QMI modem doesn't support the deprecated DMS_UIM_GET_IMSI command, use the UIM_READ_TRANSPARENT command to read EFimsi on the SIM to determine the IMSI.
2018-10-26sim-qmi: use QMI UIM service to read ICCID if neededBen Chan
If a QMI modem doesn't support the deprecated DMS_UIM_GET_ICCID command, use the UIM_READ_TRANSPARENT command to read EFiccid on the SIM to determine the ICCID.
2018-10-16sim-qmi: avoid unnecessary MM_SIM_QMI() call on MMSimQmi objectBen Chan
2017-08-04sim-qmi: remove unused variablesBen Chan
2017-03-29core: remove explicit GDestroyNotify cast on g_free / g_object_unrefBen Chan
g_free and g_object_unref are in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_free and g_object_unref is thus not needed.
2016-02-11qmi: just one InvalidCommand error is enough to avoid all DMS UIM commandsAleksander Morgado
The MMBroadbandModemQmi will not create a MMSimQmi until the unlock status has been checked, and therefore this means that when the SIM object is being created we already know whether the modem supports DMS UIM commands or not, so avoid further fallbacks in the SIM object.
2016-02-11sim-qmi: implement SIM verify/unblock/change/enable with UIM serviceAleksander Morgado
Newer modems like the MC7455 don't implement the "DMS UIM" commands in the DMS service, and therefore these modems need to use the UIM service directly. We include a new flag to detect whether any of the DMS UIM commands is flagged as invalid, and if so, we'll fallback to the UIM specific implementations for all. libqmi version bump to 1.13.7, which includes the new required methods.
2016-01-30sim-qmi: port to GTaskAleksander Morgado
2015-10-25sim-qmi: try to gather from the optional TLV whether MNC is 2 or 3 digitsAleksander Morgado
We bump libqmi requiremetn to 1.13.5, which is the one with support for the new TLV.
2015-10-25sim-qmi: fix building MCCMNC stringAleksander Morgado
For now, use 2 digits for MNC if < 100 and 3 digits otherwise.
2015-10-25sim-qmi: load operator identifier and name from NAS home networkDan Williams
2014-07-06sim: rename 'MMSim' to 'MMBaseSim'Aleksander Morgado
Just so that we don't have same header names in src/ and /libmm-glib.
2014-02-13ports: rename 'MMQmiPort' to 'MMPortQmi'Aleksander Morgado
2013-01-10sim-qmi: fix trivial GError literal issues/format string warningsDan Williams
2013-01-08sim-qmi: translate common SIM-related QMI errors into ME errorsAleksander Morgado
Upper layers expect Mobile Equipment errors, so try to translate known QMI protocol errors.
2012-10-11core,qmi: don't assume QMI port is always availableAleksander Morgado
When the modem gets unplugged all ports disappear from the modem, so don't assume the port is always given. E.g. if the unplug happens in the middle of the initialization sequence we may end up with nasty segfaults: Crash reason: SIGSEGV Crash address: 0x0 Thread 0 (crashed) 0 ModemManager!mm_qmi_port_peek_client [mm-qmi-port.c : 50 + 0x0] rbx = 0x00007fbb5c1d8010 r12 = 0x0000000000000003 r13 = 0x00007fbb5c1f9880 r14 = 0x00007fbb59a30980 r15 = 0x00007fbb5c187a60 rip = 0x00007fbb5a1a54c0 rsp = 0x00007fffc6c0f628 rbp = 0x00007fffc6c0f650 Found by: given as instruction pointer in context 1 ModemManager!peek_qmi_client [mm-broadband-modem-qmi.c : 109 + 0x24] rbx = 0x00007fbb5c1d8010 r12 = 0x0000000000000003 r13 = 0x00007fbb5c1f9880 r14 = 0x00007fbb59a30980 r15 = 0x00007fbb5c187a60 rip = 0x00007fbb5a193851 rsp = 0x00007fffc6c0f630 rbp = 0x00007fffc6c0f650 Found by: call frame info 2 ModemManager!ensure_qmi_client [mm-broadband-modem-qmi.c : 132 + 0x4] rbx = 0x00007fbb5c1d8010 r12 = 0x00007fbb5a165140 r13 = 0x00007fbb5c1f9880 r14 = 0x00007fbb59a30980 r15 = 0x00007fbb5c187a60 rip = 0x00007fbb5a1938e4 rsp = 0x00007fffc6c0f650 rbp = 0x00007fffc6c0f690 Found by: call frame info ... Reported by: Ben Chan <benchan@chromium.org>
2012-10-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
2012-08-29qmi-port: allow allocating more than one client of a given serviceAleksander Morgado
We'll uniquely identify each client generated by the service ID and a user defined flag, so that we then allow to peek/get the specific client.
2012-08-29sim-qmi: enable/disable PIN using QMIAleksander Morgado
2012-08-29sim-qmi: change PIN using QMIAleksander Morgado
2012-08-29sim-qmi: skip loading operator identifier/nameAleksander Morgado
Not yet implemented in libqmi-glib.
2012-08-29sim-qmi: send PUK using QMIAleksander Morgado
2012-08-29sim-qmi: send PIN using QMIAleksander Morgado
2012-08-29sim-qmi: update IMSI using QMIAleksander Morgado
2012-08-29sim-qmi: update SIM ID (ICCID) using QMIAleksander Morgado
2012-08-29sim-qmi: new `MMSimQmi' objectAleksander Morgado