The foxconn shared utils are only built when MBIM is enabled, and
therefore the dell and foxconn plugins should only expect those shared
utils to be present if MBIM is enabled. The foxconn plugin will be
fully disabled when MBIM is disabled.
The fibocom shared utils are only built when MBIM is enabled, and
therefore the fibocom plugin should not expect them built
unconditionally, they will only be present if MBIM is enabled
We're bumping the current "INFO" level messages to the new "MSG"
level, also making the new level the default.
The old "INFO" level will be used to setup an intermediate level of
logging which is not as verbose as "DEBUG" but still provides some
capabilities to analyze the behavior of a modem.
During profile setup, the profile manager normally disconnects a profile
before re-using it. We do not want to do this for the initial EPS bearer
because that would trigger de-registration.
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
Also bump the timeout for the +CFUN operations as they may take up to
10s according to the AT command manual (e.g. MA510).
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
In situations where the configured APN for the initial EPS bearer
(cid=1) does not match the APN for the actual connection, ModemManager
sets up a context (cid!=1) with the proper APN when connecting. If the
APN for the initial EPS bearer was not valid, the SIM may fall back to a
default one. If that default matches the APN for the proper connection,
the initial EPS bearer is re-used for the actual connection. In that
scenario, +CGACT? will report deactivated for the actual connection
context (cid!=1). ModemManager subsequently reports the connection as
disconnected.
+GTRNDIS? will always reflect the correct state for the context ID we
used to set up the ECM connection. Hence, it makes sense to use this
command to assess the connection status.
This has been tested with the MA510-GL modem module.
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
Currently, LM940 is expected to have not LTE band extended, however they
have been introduced since version 24.01.516.
This change adds a software revision compare function for Telit modem
limited to LM9x0 modems (LM940 and LM960 share the same revision format
string) to verify if the current LM940 software revision is equal or
newer than 24.01.516 and enable/disable LTE band extended accordingly.
Currently, mm-shared-telit:Private:alternate_3g_bands value provided via
ID_MM_TELIT_BND_ALTERNATE tag.
This commit maps the value of alternate_3g_bands to the modem model,
detected via software version string.
Currently, mm-shared-telit:Private:ext_4g_bands value is inferred from
the #BND? response, based on the convention that the #BND? response has
4 tokens only if the modem has LTE extended bands.
This commit maps the value of ext_4g_bands to the modem model, detected
via software version string, which is a more reliable source.
Currently functions dealing with #BND request
- mm_telit_parse_bnd_query_response
- mm_telit_parse_bnd_test_response
- mm_telit_build_bnd_request
have all a long list of arguments configuring how to deal with the BND
string.
This commit reworks this list of arguments into a single new structure
"MMTelitBNDParseConfig" with the following advantages
- shorter list of arguments for the above functions
- future changes to this arguments will be transparent for the functions
above that only pass the values
- one single point where the structure is created: a new function
mm_shared_telit_get_bnd_parse_config.
When the data connection is started with AT^SWWAN, the modem expects
the DHCP discover packet from the TE while the command is running,
i.e. while the modem has not replied yet. In order to achieve that,
the bearer is marked as connected as soon as the command is
issued. This makes the NetworkManager start the DHCP process.
If the modem replies with an error, the bearer will be marked
disconnected later on.
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/50
for a similar functionality in the ublox driver.
Includes minor coding style fixes from Aleksander Morgado
<aleksandermj@chromium.org>.
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
The previously used COPS command to set to LTE-only mode did not work
for an ELS81 modem.
Now ^SXRAT is used to switch modes instead of COPS, if SXRAT is
supported by the modem.
EM120/160 uses QCDM port for firmware updates. fwupd lists all known
ports from ModemManager and uses QCDM port to reboot the modem into
the firmware download mode.
The behavior of GRegex changed in 2.73.2 once it was ported from pcre1
to pcre2. In some cases it was made more strict, which is fine, in
other cases it exposed some change in how it behaves on certain
matches that is not extremely clear whether it's ok or not.
See https://gitlab.gnome.org/GNOME/glib/-/issues/2729
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621
Either way, one thing that was assumed was that initializing all
GRegex/GMatchInfo variables to NULL and making sure they're NULL
before they're initialized by glib (especially the GMatchInfo) was a
good and safer approach.
So, whenever possible, g_autoptr() is used to cleanup the allocated
GMatchInfo/GRegex variables, and otherwise, g_clear_pointer() is used
to ensure that no free/unref is attempted unless the given variable is
not NULL, and also so that the variable is reseted to NULL after being
disposed.
Currently, supported band AT query #BND=? is failing with LM9x0 because
it expects BND 4G decimal format instead than hexadecimal.
Adding also LN920 and FN980 for completeness. They do not fail right now
because they have also "4g band extended" which format is always
hexadecimal.
At the moment the endpoint type/number is chosen based on the QMI
control port. The assumption is that multiplexing is implemented using
an additional protocol layer (e.g. QMAP) or that each network interface
has its own QMI control port.
This is not necessarily the case for BAM-DMUX. To use the built-in
multiplexing the WDS client must be bound to the correct data port.
This works already for older firmware versions using "Bind Data Port"
(SIO port numbers), but not for newer ones using "Bind Mux Data Port"
(endpoint type/interface numbers).
Make it work for newer firmware versions as well by choosing the
endpoint type/number based on the data port similar to the existing
implementation for SIO port numbers.
Note: The correct endpoint interface number is currently only used for
the steps in mm-bearer-qmi. Ideally more refactoring should be done in
mm-port-qmi to call WDA Set Data Format for each of the endpoints.
In practice it usually works fine without because the data format is
set correctly by default.
mm_broadband_modem_qmi_peek_port_qmi() already looks up a QMI port
exactly the same way it is implemented in the BAM-DMUX variant of
peek_port_qmi_for_data(), so we can just reuse it to simplify the code.
No functional change.
It is possible that SIM IMSI might change in roaming conditions for a sim.
Register for UIM refresh indication always and reprobe if ICCID or IMSI changes for QMI modem.
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)
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>
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>
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>
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>
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.
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.
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.
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.