Commit Graph
8893 Commits
Author SHA1 Message Date
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
Aleksander Morgado 609ff75033 Revert ".gitlab-ci.yml: use meson instead of ninja where possible"
This reverts commit ad6772df34.

The 'compile' command in meson was included in v0.53.0. Let's keep on
recommending the use of ninja to build everywhere.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/844
2024-04-01 10:10:01 +00:00
Aleksander Morgado 3c4fa90c92 shared-quectel: don't assume that parent object supports location
The generic MBIM modem implementation does not have location
capabilities support, so the relevant function pointers in the
interface are NULL.

Fixes: 306566ad7e
2024-04-01 09:07:10 +00:00
Aleksander Morgado f08803e858 broadband-modem: coding style fixes in the 3GPP URC enabling/disabling logic 2024-03-27 12:09:32 +00:00
Aleksander Morgado 4ed45af376 broadband-modem: track primary/secondary ports while enabling/disabling 3GPP URCs
We should not blindly assume that peek_port_primary() always returns a
valid port, because the device may have been ejected while the AT
sequence is running.

Instead, keep a valid port object reference in the operation context,
and use it in all the AT command requests. The requests will fail if
the device has been ejected, but the port object reference will be
valid and the daemon won't crash.
2024-03-27 12:09:32 +00:00
Steve Leung 4ef5ab6db7 huawei: fix udevadm verify warning 2024-03-26 08:46:52 -06:00
Aleksander Morgado 6388b583c7 qmi: GetCellInfo: don't fetch unhandled GError 2024-03-26 10:19:47 +00:00
Oliver Kästner 9ad1ad0d31 qmi: implement GetCellInfo for GSM 2024-03-24 00:56:58 +01:00
Oliver Kästner 71f62ceaea qmi: GetCellInfo: don't fetch unhandled GError 2024-03-23 23:32:55 +01:00
Aleksander Morgado b909922e26 build: unstable release version bump to 1.23.5 2024-03-22 13:45:56 +00:00