Commit Graph
8902 Commits
Author SHA1 Message Date
Aleksander Morgado 939be0fbf8 base-modem: support non-serial ports when peeking the best AT port
When we don't care about the type of AT port to use, prefer the QMI or
MBIM based ones if any available.
2024-04-23 07:25:12 +00:00
Aleksander Morgado 480e12c34e base-modem-at: switch to use the MMIfacePortAt by default
The whole codebase is updated to assume the MMBaseModem AT operations
require an object implementing the MMIfacePortAt interface, instead of
a MMPortSerialAt object.

In the places where we know the port is a MMPortSerialAt, e.g. when we
query explicitly for the primary or secondary serial AT port, we will
use an explicit MM_IFACE_PORT_AT() cast when calling the AT command
method.

In the places where we get_best_at_port() we're going to assume that
we don't know the port type. This method will be updated in a follow
up commit to support the MMIfacePortAt interface as well.
2024-04-23 07:25:12 +00:00
Aleksander Morgado 67a0af3575 base-modem-at: switch internals to use MMIfacePortAt 2024-04-23 07:25:12 +00:00
Aleksander Morgado fcfa917740 iface-port-at: new interface exposing AT command/response support
For now implemented in a generic way by the MMPortSerialAt object.
2024-04-23 07:25:12 +00:00
Aleksander Morgado 11c2f7c068 base-modem-at: refactor implementation
No functional changes should happen.

The purpose of this change is to align coding style with the rest of
the project and also simplify the implementation of the different AT
command handling methods, e.g. to avoid needing so many internal
helper methods.
2024-04-23 07:25:12 +00:00
Lukas Voegl 537aca802f huawei: fix guint64 string formatting
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2024-04-22 16:22:27 +02:00
Aleksander Morgado c169b397cd build: unstable release version bump to 1.23.6 2024-04-22 08:09:52 +00:00
Aleksander Morgado 200ff43a07 dispatcher-modem-setup: update example test script with more details 2024-04-16 13:00:12 +02:00
Aleksander Morgado e2ae9946ce base-manager: launch modem initialization also in unit tests
The new modem_initialize() method is run for both real devices (after
the modem setup phase) and also for virtual devices in unit
tests (where no modem setup phase exists).
2024-04-16 12:53:49 +02:00
Nero 04d826f563 dispatcher-modem-setup: new modem setup dispatcher
There are cases where the user wants to configure some actions
to be run on a modem before ModemManager takes over full control.

The new "modem setup" dispatcher scripts allow running operations
in the modem after the port probing has happened and we know which
ports are usable in the device.

The scripts may e.g. change device configuration, enable modem
logging infrastructure, or any other process that would otherwise
conflict with MM's own modem management operations.
2024-04-16 12:14:45 +02:00
Aleksander Morgado 941461a2c5 huawei: plugin sources depend on enums types 2024-04-16 11:45:51 +02:00
Oliver Kästner 2e4dc6911f huawei: handle IPv6 connection status changes 2024-04-12 11:17:18 +00:00
Oliver Kästner 4f1864921a huawei: implement loading supported IP families
This uses the proprietary `^NDISSTATQRY` instead of the default
`+CGDCONT` command, as the latter might return diffrent results
(i.e. reporting v6 support, that can't be used via NDIS).

Also add a fallback to `+CGDCONT?` for older modems that don't
support ^NDISSTATQRY.
2024-04-12 11:17:18 +00:00
Oliver Kästner 3adbcfb789 huawei: enable support for IPv6 2024-04-12 11:17:18 +00:00
Aleksander Morgado 9cb709b87e base-modem-at: remove unused at_command_raw() method 2024-04-12 11:02:20 +00:00
Aleksander Morgado 3fe9bd183b broadband-modem-hso: don't assume GPS control port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 79b5b480ba broadband-modem-telit: configure +CIEV in both primary and secondary ports
And also avoid assuming that the secondary port always exists.
2024-04-12 01:17:14 +00:00
Aleksander Morgado b158c2e92a broadband-modem: don't assume an AT port always exists in explicit registration 2024-04-12 01:17:14 +00:00
Aleksander Morgado ec8bbeeafc broadband-bearer: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado f786e41635 broadband-modem-cinterion: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado c344e5a286 broadband-modem-ublox: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 19aebae1da broadband-modem-nokia: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado f23a4b09b4 broadband-modem-option: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 21f4147298 broadband-modem-hso: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 588d36be91 broadband-modem-fibocom: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado d6f8e86ba3 broadband-modem-mbm: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 44adf5cd40 broadband-modem-mtk-legacy: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 62a81425ec broadband-modem-huawei: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado f1fb3d1145 broadband-modem: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 83d5556f70 iface-modem: don't assume primary port always exists 2024-04-12 01:17:14 +00:00
Aleksander Morgado 04e59852a9 broadband-modem: remove unnecessary early check for AT ports
There is no need for an explicit early check, the at_command()
operation will do that implicitly.
2024-04-12 01:17:14 +00:00
Aleksander Morgado a18d9d621b broadband-modem: use primary port to get flow control settings 2024-04-12 01:17:14 +00:00
Aleksander Morgado 1af88ed950 quectel: always report primary port in the firmware interface 2024-04-12 01:17:14 +00:00
Aleksander Morgado 98b99bdafb fibocom: always report primary port in the firmware interface 2024-04-12 01:17:14 +00:00
Oliver Kästner 469d310397 huawei: refactor mode and band related methods
Refactor the loading/setting of supported/current modes/bands,
mostly to enable LTE support via ^SYSCFGEX.

This unfortunately requires many changes at once, as these methods
use the same AT commands and their fallbacks.
2024-04-11 19:36:01 +00:00
Aleksander Morgado 338b299fe2 base-sms: ensure send/store always uses the same port
When sending or storing an SMS, the per-part operation is itself split
into two steps: first we send the AT command specifying the index, and
then we send the actual PDU data with a raw command. We must ensure
that the raw command is sent exactly in the same port as the AT
command.
2024-04-10 08:41:31 +00:00
Aleksander Morgado b855dca7f7 base-sms: refactor send/store/delete implementations
No functional change.
2024-04-10 08:41:31 +00:00
Maciej S. Szmigiero d3a2aebf16 mbm: don't stop GPS interface on reinitialization if it should be running
Since commit 63dd4ad2 it is possible that the GPS interface is in use at
the time of modem reinitialization so it should not be stopped in such
case.

Otherwise "mmcli --location-status" will still say that GPS is enabled but
no GPS traces are going to be coming.
2024-04-09 15:00:52 +00:00
Aleksander Morgado 19da7559c0 base-manager: start device support check on first port addition
This avoids the "port in device added after device probing has already
finished" warning, and also the creation of modem objects for single
port devices.
2024-04-09 10:25:59 +02:00
Aleksander Morgado 9302fbbccb port-mbim: fix progress state when MBIM device open fails 2024-04-09 07:30:19 +00:00
Aleksander Morgado 3870f774bf base-modem: remove unused has_at_port() method 2024-04-09 07:28:57 +00:00
Aleksander Morgado 661be56920 broadband-bearer: minor coding style fix 2024-04-09 07:28:19 +00:00
Florian Eckert 07526df59b mm-broadband-modem-qmi: always trigger an operator description update
Currently, the operator description update is only triggered once in the
entire update process. But this can lead to a operator description
updated at the wrong time. And is therefore possibly wrong.

The deprecated API call 'qmi_client_nas_get_serving_system' always triggers
an update of the operator description in there subfunction of the callback.

This is missing for the API call 'qmi_client_nas_get_system_info'. To solve
this, an update is now also triggered in the subfunction callback if there
is new system info available.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-07 01:43:34 +00:00
Florian Eckert b1aaa4c6b9 mm-broadband-modem-qmi: always reload current operator description
When using a modem with the qmi plugin, the operator description is only
set once for the current modem object. This is the operator description
of the mobile network to which the modem has first established a connection.

The operator description will no longer be updated even though on a
reconnection with a different mobile network.

Normally this is not a problem, as the SIM card usually dials into the
home network and stays there. But if an IoT SIM card is used, then this
is a problem because the operator description is no longer updated.

To fix this, the 'current_operator_description' is always loaded on
'modem_3gpp_load_operator_name' regardless of whether an operator
description has ever been set.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-07 01:43:34 +00:00
Aleksander Morgado 17ab07c05a broadband-modem-option: fix task completion on parent URC setup error 2024-04-04 09:29:45 +00:00
Aleksander Morgado b5ca95e153 broadband-modem-mtk-legacy: fix task completion on parent URC setup error 2024-04-04 09:29:45 +00:00
Aleksander Morgado f1c270a648 broadband-modem-huawei: fix task completion on parent URC setup error 2024-04-04 09:29:45 +00:00
Maciej S. Szmigiero c56e1f4739 iface-modem-location: fix zeroing capabilities on reinitialization
The modem location interface loads modem location capabilities only during
the very first initialization of this interface.

On each later reinitialization it skips loading these capabilities from
modem, however it still goes through the whole interface initialization
state machine.

This state machine uses its own "ctx->capabilities" field for temporary
capabilities storage, which is set to MM_MODEM_LOCATION_SOURCE_NONE at the
start of the initialization process.

However, if we aren't actually loading modem location capabilities because
we're only reinitializing the interface we still need to set this
"ctx->capabilities" field to the existing (previously loaded) modem
location capabilities.

Otherwise the next interface initialization step (validation) will
permanently disable the whole location interface.
2024-04-01 18:40:15 +02:00
Aleksander Morgado 852bf39c4f mtk: add missing initialization of shared fibocom utils
Fixes 4b0b9dde02
2024-04-01 13:57:08 +00:00
Dan Williams 57518950ea README.md: add a short "Getting Started" section for how-to-build
Help out people that may never have used Meson or built ModemManager
before.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2024-04-01 10:14:43 +00:00