Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
Fixes 3238ccdbb29e86acd2b3e5c0e45bee84f9da94b4
|
|
|
|
|
|
|
|
|
|
|
|
MNC PCS digit status is now available from mm_3gpp_parse_operator_id(),
so use it.
|
|
MNC digit count information is lost on conversion to integers. Make it
possible for the caller to get this information through a separate
boolean.
|
|
|
|
Move the logic out of the base modem, and make it applicable only for
QMI modems.
|
|
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).
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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...).
|
|
|
|
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 (
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
We bump libqmi requiremetn to 1.13.5, which is the one with support for the new TLV.
|
|
For now, use 2 digits for MNC if < 100 and 3 digits otherwise.
|
|
|
|
Just so that we don't have same header names in src/ and /libmm-glib.
|
|
|
|
|
|
Upper layers expect Mobile Equipment errors, so try to translate known QMI
protocol errors.
|
|
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>
|
|
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.
|
|
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.
|
|
|
|
|
|
Not yet implemented in libqmi-glib.
|
|
|
|
|
|
|
|
|
|
|