Commit Graph

2274 Commits

Author SHA1 Message Date
Carlo Lobrano
c208d33e5b telit: fix AT#BND parsing for LE910C1-EUX
Some modems, like LE910C1-EUX, express the LTE part of #BND output in
HEX format, but currently the MM parser for such case is limited to
modems that have "ext_4g_bands". This commits use the new MMTelitModel
info to decide how to parse #BND command output.

Fixes #487
2022-03-29 14:18:55 +00:00
Carlo Lobrano
30a35e6dc3 telit: detect modem model from revision
Telit revision string can be used to identify the specific model, which
in turn is useful to specialize the behavior of the plugin.

This change adds revision parsing to detect some telit modems. Initially
it adds the ones that have different behaviors in #BND output parsing
for example.
2022-03-29 14:18:55 +00:00
Carlo Lobrano
3df96a4255 telit: override load revision
Currently, firmware revision string is obtained via AT+CGMR or AT+GMR
commands from the default mm-broadband-modem. For a class of Telit
modems however this command does not return the actual Telit Software
Package version, but the "Modem FW Version", which is only a component
of the whole firmware. For this class of modems, the correct string is
obtained with "AT#SWPKGV" command.

This change overrides load_revision* functions to add the ability to
parse "AT#SWPKGV" command for the modems that support it, and falls back
to the same logic that was implemented in mm-broadband-modem otherwise.
2022-03-29 14:18:55 +00:00
Aleksander Morgado
ea247f7e69 foxconn: consolidate checks for T99W175 and T99W265
These two devices require QDU and MCFG+APPS version string
comparison. We now have a single place where we check for this
requirements.
2022-03-28 08:06:10 +00:00
Aleksander Morgado
cd2dd20b08 foxconn: consolidate logic deciding required update methods 2022-03-28 08:06:10 +00:00
Aleksander Morgado
b16b49f9d5 foxconn: consolidate logic deciding requested firmware version type
We don't want to have in two different places the vid:pid match list
when selecting the type of firmware version we ask for.
2022-03-28 08:06:10 +00:00
Aleksander Morgado
4efb5f61cf foxconn: switch to use autoptr() in firmware info loading 2022-03-28 08:06:10 +00:00
Aleksander Morgado
b81680a3fd foxconn: remove unneeded input bundle unref 2022-03-28 08:06:10 +00:00
Freedom Liu
a56f96f074 foxconn: use new qmi service(fox) to get firmware version
foxconn modules get firmware version:
Try with the new FOX service first. If FOX service failed, try with DMS service.
T99W175(vid:105b) ; T77W968(0489:e0b4 ; 0489:e0b5):
    qmi service: dms
T99W265(0489:e0da ; 0489:e0db):
    qmi service: fox
2022-03-28 08:06:10 +00:00
Iñigo Martínez
0bc0831b22 build,meson: Fix udev rules and keyfiles tests
The port to the meson build system a set of defines were lost, that
made the udev rules and the keyfiles tests to not run properly.

This has been changed so defines are now in their proper place and
tests are run properly.

Fixes #537
2022-03-27 00:02:23 +01:00
Aleksander Morgado
1fdc3ac703 linktop: new port type hints
Flag ttyACM0 as data port and ttyACM1 as primary port, as per
https://bugzilla.gnome.org/show_bug.cgi?id=637140#c10

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/14
2022-03-26 15:51:11 +01:00
Theodore A. Roth
e8bb90e006 cinterion: Add support for PLSx3w modems
Signed-off-by: Theodore A. Roth <theodore_roth@trimble.com>
2022-03-25 11:22:46 +00:00
Daniele Palmas
c447785fd8 telit: fix mode 'any' setting with AT commands
When setting mode 'any' with +WS46 command the supported modes
should be considered for choosing the at command correct argument.
2022-03-18 16:32:24 +01:00
Aleksander Morgado
2c8cfb4768 modem-helpers: improve and fix COPS=? numeric fields parsing
The numeric fields in the +COPS=? response were relying on a very weak
parsing logic, assuming that they were single-digit numeric values and
not using the common string to integer conversion utilities.

This commit improves the conversion from the 3GPP/ETSI defined network
availability and access technology values to the MM defined ones,
providing enum-based matches even if the numeric values are the same.

The commit also fixes the parsing of access technology values > 10,
required to report 5G related values.
2022-03-16 11:04:06 +00:00
Aleksander Morgado
c74a377f98 fibocom: new shared interface for common logic
The set_initial_eps_bearer_settings() operation is the same in XMM
capable and generic MBIM modem objects. Place it in a common shared
interface so that we don't duplicate code.
2022-03-09 22:05:32 +00:00
Jack Song
5fc6b9ee1b fibocom: toggle modem power after attach APN on mbim 2022-03-09 22:05:32 +00:00
Sven Schwermer
318bac1186 fibocom: Add reset functionality
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-03-09 09:23:15 +00:00
Aleksander Morgado
84e22e9b98 intel: custom setup for all available AT ports
Fully disable send delay as we're using AT ports via the new WWAN subsystem.
2022-03-07 09:51:43 +00:00
Aleksander Morgado
671164a64f xmm: setup single GPS control port exclusively
Use the same logic always to decide which is the best GPS control/data
port, and then perform the initial port setup (GNSS engine off) only
that single port.
2022-03-07 09:51:43 +00:00
Aleksander Morgado
f3e885e067 xmm: prefer port flagged as AT_GPS_CONTROL to manage the GNSS engine
Use the new AT_GPS_CONTROL udev tag to decide which is the best port
to manage the GNSS engine.
2022-03-07 09:51:43 +00:00
Aleksander Morgado
deaf0646c4 intel: inherit GNSS location support from the shared XMM interface
We're not going to implement all XMM shared operations from the shared
utils, as the newer Intel modems support the new operations in the
Microsoft MBIM Extensions.

Just inherit the GNSS management capabilities.
2022-03-07 09:51:43 +00:00
Aleksander Morgado
c3c4cdde7a intel: periodic signal checks disabled by default
As we can rely on async MBIM notifications.
2022-03-07 09:51:43 +00:00
Aleksander Morgado
5d6b9c56cc intel: SIM hot swap supported by default 2022-03-07 09:51:43 +00:00
Aleksander Morgado
2da9ee5bd1 intel: avoid attempting QMI over MBIM in non-Qualcomm device 2022-03-07 09:51:43 +00:00
Aleksander Morgado
4a895b2820 intel: disable data over TTY by default
Only data over NET is expected
2022-03-07 09:51:43 +00:00
som
fcf5e3af0d intel: new MBIM capable device 2022-03-07 09:51:43 +00:00
som
40c791e293 intel: new plugin for PCI devices with vendor id 0x8086
For now, just detecting the device and creating generic MBIM or AT
based modems.
2022-03-07 09:51:43 +00:00
Iñigo Martínez
81c3b59f75 build,meson: Fix daemon enums dependencies
meson generates the `mm-daemon-enums-types` source and header files.
These are used when building `ModemManager` executable and different
plugins. However, these enums are only stated as dependencies on the
`ModemManager` executable build.

This has been fixed by also adding the generated files targets as
dependencies in the required plugins.
2022-03-01 09:27:08 +01:00
Iñigo Martínez
2bc697ce32 plugins: Fix port enums includes
The `broadmobi`, `dlink`, `telit` and `tplink` plugins include the
`mm-port-enums-types.h` header. However, they do not use any symbol
defined there.

The `huawei` plugin as includes the `mm-port-enums-types.h` header
but it does not include the build targets as dependencies.

These issues have been fixed by removing the unnecessary includes
from `broadmobi`, `dlink`, `telit` and `tplink` plugins and by
including the enums build target in the `huawei` target.
2022-03-01 09:24:37 +01:00
guihkx
c615be77fd fibocom: remove executable bit from rules file
This silents a warning given by udev:

Configuration file /usr/lib/udev/rules.d/77-mm-fibocom-port-types.rules is marked executable. Please remove executable permission bits. Proceeding anyway.
2022-02-19 00:01:05 -03:00
Aleksander Morgado
97c50e53af fibocom: detect ID_MM_FIBOCOM_INITIAL_EPS_OFF_ON on runtime
We won't create a full new different modem object based on whether the
ID_MM_FIBOCOM_INITIAL_EPS_OFF_ON tag is found or not. Instead, we
always will create the same object type, and detect whether the OFF/ON
cycle is required during runtime.
2022-02-16 13:04:45 +00:00
Aleksander Morgado
499cdf79dc fibocom: initial EPS settings update always available in parent
Assume that the method to change the initial EPS bearer settings is
always implemented in the parent, so that we can avoid the runtime
check.

This also fixes the codepath that would happen if the
iface_modem_3gpp_parent->set_initial_eps_bearer_settings == NULL
condition was valid, as that would end up with a GTask never completed.
2022-02-16 13:04:45 +00:00
Jack Song
d902ddfee5 fibocom: toggle modem power after attach APN
When the attach APN settings are changed, the device will go through a
radio on -> radio off -> radio on cycle so that the new changes are
taken into consideration.

This change is done in a Fibocom-specific MBIM modem implementation
because it's working around a firmware bug that would prevent for the
attach settings to be considered automatically.
2022-02-16 13:04:45 +00:00
Aleksander Morgado
78cbd44146 meson,tests: fix DBus service lookup in test-plugin-generic 2022-02-16 00:12:32 +01:00
Dylan Van Assche
b70fd64417 quectel: add name to device IDs
fwupd expects device IDs which are unique for each device and its
variants. However, Quectel re-uses the same USB VID & PID among
different variants such as EG25, EC25, EC20, etc. Moreover, each
variant may have subvariants such as EG25GGB, EG25GGC, EG25AFF,
EG25AFX, etc.

Add the name of the modem to the device IDs to build more unique device
IDs such as USB\VID_2C7C&PID_0125&REV_0001&NAME_EC25GGB.
2022-02-09 11:07:49 +01:00
Ivan Mikhanchuk
789ff2d822 quectel: add Sahara udev tag to EM05 modems 2022-01-26 10:58:24 -08:00
Daniele
9bc084c94a telit: add port hints for Telit LE910C1-EUX 2022-01-21 17:52:38 +01:00
Aleksander Morgado
6ec97a29ae foxconn: firmware info loading only if MBIM-QMUX enabled in libqmi
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/477
2022-01-20 13:46:23 +01:00
Aleksander Morgado
bb256b0cec quectel: new ID_MM_QUECTEL_FIREHOSE udev tag
To identify which devices support the firehose update protocol.
2022-01-18 11:15:14 +01:00
Ivan Mikhanchuk
22e38199a9 quectel: combine firmware functions in mm-shared-quectel 2022-01-18 10:36:15 +01:00
Aleksander Morgado
c9ffa2c9e5 quectel: fix reference cycle
The 'update_settings' object must be referenced before the task is completed.
2022-01-18 10:29:45 +01:00
Sven Schwermer
300e1023ef fibocom: Double-check connection after dialing
Fibocom's documentation states that we must double-check the connection
is established when setting up an ECM connection. The possible replies -
according to the documentation - are:

  +GTRNDIS: <state>,<cid>,<ip>,<prim. dns>,<sec. dns>
  OK

or

  +GTRNDIS: 0

We just care about the state value which is 1 if everything worked.
2022-01-11 09:31:32 +00:00
Sven Schwermer
382a7c2425 fibocom: Use ECM bearer if +GTRNDIS is available
Some modems might have a net port but don't support +GTRNDIS which is
used by the ECM bearer. That case will be caught by this additional
check.
2022-01-11 09:31:32 +00:00
Sven Schwermer
c174fd29dc fibocom: Add L610 support 2022-01-11 09:31:32 +00:00
Sven Schwermer
2830cb3273 fibocom: Add udev port rules for MA510-GL 2022-01-11 09:31:32 +00:00
Sven Schwermer
c21bcb5526 fibocom: Add bearer for ECM-based connections 2022-01-11 09:31:32 +00:00
Sven Schwermer
6ad17fb22e fibocom: Subclass broadband modem
This is required in order to be able to use a custom bearer which in
turn is necessary for establishing ECM connections.
2022-01-11 09:31:32 +00:00
Dylan Van Assche
07d7f596d3 plugins/quectel/mm-shared-quectel: use QGMR to set version
Quectel modems report only their major firmware version through
AT+GMR, use AT+QGMR instead to report the full firmware version.
2022-01-11 08:42:53 +00:00
Dylan Van Assche
3f76b3b7d1 plugins/quectel/mm-broadband-modem-qmi-quectel: ignore carrier revision
Quectel EG25-G QMI modem firmware revisions are not matched with carrier configs.
Different VoLTE profiles might be selected by the user causing
the carrier config revision to change.

Since fwupd uses this string for firmware updates, it gets confused and
thinks the user has an update available.
2022-01-11 08:41:37 +00:00
Aleksander Morgado
853aa29be8 iface-modem-3gpp-profile-manager: support 'apn-type' as index field
The modem may report the 'apn-type' field is the one to be used as
index; if that's the case, allow setting and deleting profiles based
on the given 'apn-type' field.

This change also makes the internal profile management operations use
one index field or another, based on what the protocol implements.
2021-12-26 10:12:11 +01:00