Commit Graph

8177 Commits

Author SHA1 Message Date
Ulrich Mohr
249e46a70a mbim: Make use of uim qmi service if available 2022-07-14 13:16:09 +02:00
Ulrich Mohr
9f44dfa45e mm-sim-qmi: use shared qmi interface instead of using qmi modem class directly 2022-07-14 13:16:09 +02:00
Fanice Luo
c8a4a76630 foxconn: updating the T77W968 carrier mapping table
add new MCCMNC of EE UK(23430,23431,23432,23433,23434,23476,23501,23502,23577)
add new MCCMNC of ATT(310650,310980,90118)
add new MCCMNC of Verizon(312770)
add new MCCMNC of Vodafone(46601,46603)
add new MCCMNC of Orange(21409,23105,26005)
2022-07-14 14:18:16 +08:00
Fanice Luo
f2a3d836db dell: Add DW5829e(T77W968) modules
add new device(0x413c:0x81e4 0x413c:0x81e6)
2022-07-12 09:00:11 +00:00
Sven Schwermer
bbf1b272e6 fibocom: Ignore +SIM READY URC
This URC is emitted when the SIM phonebook is initialized. We don't care
about that but don't want this URC to mess with the initialization
sequence either.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-07-11 11:50:00 +00:00
Sven Schwermer
eebdbc45b5 fibocom: Add alternative MA510 USB config
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-07-08 08:26:33 +02:00
Sven Schwermer
38646bb68f fibocom: Add alternative L610 USB config
This is the factory-default setting. Make sure to support it as well as
the ECM/RNDIS settings. The L610 in GTUSBMODE=31 only enumerates with
serial USB interfaces using the option driver, so we need to allow that
driver too.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-07-08 08:25:40 +02:00
Jack Song
71a3942b3f mm-bearer-mbim: ignore mbim status error 'SIM not inserted' while disconnecting
Ignore the error SIM_NOT_INSERTED when ModemManager disable modem after SIM card removed

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/578
2022-07-06 11:07:06 +08:00
Aleksander Morgado
1f2bea9184 port-mbim: monitor consecutive timeouts 2022-06-30 11:15:04 +02:00
Aleksander Morgado
7a3cbfec64 port-qmi: monitor consecutive timeouts 2022-06-30 11:15:04 +02:00
Aleksander Morgado
b91823012a base-modem: setup timeout monitoring in all control ports
If any of the control ports ends up timing out 10 consecutive times,
the modem will be flagged as invalid and it will be reprobed from
scratch.

This allows us to detect modems that end up irresponsive in QMI or
MBIM while they're still exposed in e.g. the USB bus.
2022-06-30 11:15:04 +02:00
Aleksander Morgado
8387629a8c port: make 'timed-out' a signal for all port types, not just serial 2022-06-30 01:08:15 +02:00
Sven Schwermer
a2195babf2 fibocom: Fix GTRNDIS parsing function
This fixes a bug introduced in a2a0e2d754. Since the state pointer is
always non-NULL, the function will always fail if GTRNDIS is inactive,
i.e. the modem will return state=0 and no cid field.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-06-28 14:39:01 +02:00
Sven Schwermer
a2a0e2d754 fibocom: ensure RNDIS disconnected before a new connection attempt
The ECM dialling guide requires to check whether RNDIS is already active
before attempting to establish an ECM/RNDIS connection.

If it is active (regardless of its settings), we will disconnect it
first, before attempting the new connection with the user-provided
settings.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-06-27 19:15:31 +00:00
Dmitry Skorykh
a87a1f8ced mm-sms-part-3gpp: sms_decode_text: avoid decoding an empty text message
Fix segfault that can occur during message text decoding if there are no
elements in SMS text
2022-06-27 12:09:15 +03:00
Aleksander Morgado
db33a43b45 build,meson: require libqmi 1.31.7, in sync with autotools
The required libqmi version was updated in configure.ac to 1.31.7 in
commit ac06052b97, but we forgot to do
the same in the meson setup.
2022-06-24 12:25:51 +02:00
Carlo Lobrano
b9ca16486e telit:broadband-mbim: save MBIM originated revision into software_package_version
Currently, MBIM broadband Telit modem does not store firmware revision
into 'software_package_version', so it won't be possible to specialize
behavior based on modem model (using mm_telit_model_from_revision).

This change overloads load-revision in MBIM broadband Telit in order to
call parent's loading and store the returned 'caps_firmware_info' into
'software_package_version' via mm_shared_telit_store_revision.
2022-06-22 08:37:34 +02:00
Carlo Lobrano
50f20163d4 telit: add function to store revision 2022-06-22 08:37:21 +02:00
Daniele Palmas
9d10dd8aab telit: add support for QCDM ports
The new QCDM probing mechanism does not probe and grab QCDM ports
if the plugin is not allowed, so QCDM ports currently ignored in
compositions can be safely marked as ID_MM_PORT_TYPE_QCDM.
2022-06-19 13:40:48 +00:00
Daniele Palmas
473c41dc63 plugins: add MM_PLUGIN_REQUIRED_QCDM to plugins requiring QCDM
The new QCDM port probing and grabbing mechanism implements a new
property for detecting the plugins which require the QCDM port to
be probed and grabbed.

Add the property to the affected plugins.
2022-06-19 13:40:48 +00:00
Daniele Palmas
d6203265c2 port-probe: avoid QCDM port probing if not for specific plugins
The QCDM/DIAG port is usually nowadays exclusively used by applications
gathering traces from the modem, so avoid port probing and grabbing
when plugins set the property MM_PLUGIN_ALLOWED_QCDM.

A new property MM_PLUGIN_REQUIRED_QCDM is created for those plugins
requiring the QCDM port for properly using a modem.
2022-06-19 13:40:48 +00:00
Sven Schwermer
661a63b37b broadband-bearer: Save profile ID upon successful connection
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-06-19 15:11:10 +02:00
Prakash Pabba
8934ce865c mm-broadband-modem-qmi: set endc_available as false by default 2022-06-09 09:25:47 +00:00
Carlo Lobrano
19a0ea6cf9 plugins,telit: do not crash if revision is not set
In mm_telit_model_from_revision there is nothing that prevents to use
the input revision string if it is NULL, which currently happens if
the modem is pure MBIM (i.e. LE910-V2 pid:0x0032).

Fix the above error returning a default safe value and not using the
NULL variable.
2022-06-09 08:50:29 +00:00
Rukun Mao
3da84c2079 suspend: add suspend/resume support with powerd on ChromeOS
ModemManager handles suspend and resume signals sent from powerd

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
2022-06-09 08:32:13 +00:00
Thilo-Alexander Ginkel
ac06052b97 fcc-unlock: add support for new Lenovo T99W175 SDX55 FCC unlock method
Tested w/ Lenovo firmware T99W175.F0.1.0.0.9.DT.003.055 (old unlock method) and
T99W175.F0.1.0.0.9.DT.003.079 (new unlock method)
2022-05-30 23:29:36 +02:00
Aleksander Morgado
9fa1b32e34 cli: don't print signal quality unless modem is enabled
We don't have a clear way to report "unknown" signal quality, so for
now just skip printing it altogether in the mmcli human output if the
modem is not yet enabled.
2022-05-25 11:15:29 +02:00
Aleksander Morgado
63d02f9da2 iface-modem: allow state updates without bearer list
E.g. if we reach the failed state before the bearer list is created.
2022-05-25 11:15:27 +02:00
Aleksander Morgado
9c773fcad4 iface-modem: report failed modems with unknown capabilities
Instead of not creating a modem object, create it in failed state with
the "unknown capabilities" failed state reason.
2022-05-25 11:15:06 +02:00
Aleksander Morgado
e90a7410b4 iface-modem: minor coding style fix 2022-05-25 11:15:05 +02:00
Aleksander Morgado
234f185c3a iface-modem: fail initialization if eSIM without profiles
A modem using an eSIM without profiles should not be allowed to get
enabled, it should be really treated as a modem without a physical
SIM.
2022-05-25 11:14:45 +02:00
Aleksander Morgado
0123030136 iface-modem: skip setting up carrier config on esim without profiles 2022-05-25 11:14:40 +02:00
Aleksander Morgado
fe91a3044d iface-modem: load current modes and current bands even without SIM
These are current settings in the modem, they don't really depend on
whether there is a SIM or not.
2022-05-25 11:14:39 +02:00
Aleksander Morgado
061f9a275a iface-modem: move helper method out of the initialization logic 2022-05-25 11:14:38 +02:00
Aleksander Morgado
a535b2fddc base-sim: skip loading SIM identifier in eSIM without profiles 2022-05-25 11:14:37 +02:00
Aleksander Morgado
38f631e00e broadband-modem: rework checking for SIM swap
Avoid calling the MMBaseSim class method directly, and use the helper
mm_base_sim_load_sim_identifier() instead.

Also, rework a bit the logic to have a single completion method once
we know the current ICCID.
2022-05-25 11:14:35 +02:00
Aleksander Morgado
638841281e base-sim: disallow SIM user operations in eSIM without profiles 2022-05-25 11:14:34 +02:00
Aleksander Morgado
38a69011bd base-sim: skip loading SIM properties based on SIM type
If the reported eSIM doesn't have profiles, there is no point in
trying to load properties like ICCID, IMSI or operator name/id.

If the reported SIM is a physical SIM, there is no point in trying
to load properties like EID or eSIM status.
2022-05-25 11:14:03 +02:00
Aleksander Morgado
073404313e broadband-modem-mbim: improve logging of found SIM slots 2022-05-25 10:59:17 +02:00
Aleksander Morgado
f593421d8d iface-modem: minor coding style fix 2022-05-25 10:59:17 +02:00
Aleksander Morgado
1b30d10ad1 base-sim: don't reload properties that may have been already initialized
If we created the SIM objects during the SIM slots processing, we
should not attempt to reload the settings that were already set during
the re-initialization, as that may end up clearing the initial
properties.
2022-05-25 10:59:17 +02:00
Aleksander Morgado
ac3f9be3d3 base-sim: remove bogus comments in initialization
All properties loaded during initialization are meant to be loaded
only once, no point in saying that for each property.
2022-05-25 10:59:17 +02:00
Aleksander Morgado
eee6e46d4e broadband-modem-mbim: assume no lock is required in eSIM without profiles 2022-05-25 10:59:17 +02:00
Aleksander Morgado
1ad5526972 bearer-mbim: plug user cancellable to all MBIM operations 2022-05-24 08:44:22 +00:00
Aleksander Morgado
0cfe498354 bearer-mbim: if connection attempt fails, trigger an explicit disconnection
E.g. if the error reported by the MbimDevice is a timeout error, it
means the connection attempt is still ongoing in the device, we need
to ask it to stop.
2022-05-24 08:44:22 +00:00
Aleksander Morgado
8679396d99 bearer-mbim: use common helper to build disconnection message 2022-05-24 08:44:22 +00:00
Daniele Palmas
0f1cd36e65 telit: add LE910Cx MBIM composition port hints 2022-05-24 09:22:06 +02:00
Daniele Palmas
1642c5e00f telit: add wwan support 2022-05-24 09:22:06 +02:00
Daniele Palmas
ce71b580fc filter: add vendor id/subsystem vendor id filter
Some PCI modems prefer customizing the subsytem vendor ID,
instead of the vendor ID.

Add a filter for the couple vendor/subsystem vendor IDs.
2022-05-24 09:22:06 +02:00
Daniele Palmas
654c5f5014 base-modem: add subsystem vendor ID property
Subsystem vendor ID can be used for identifying PCI modems,
so expose the property.
2022-05-24 09:22:06 +02:00