Commit Graph
126 Commits
Author SHA1 Message Date
Aleksander Morgado bec62a406c iface-modem-signal: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:38 +00:00
Aleksander Morgado 070975736f iface-modem-messaging: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:38 +00:00
Aleksander Morgado aa94b21e0a iface-modem-location: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:45:38 +00:00
Aleksander Morgado e535c90f5f iface-modem-firmware: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:27:05 +00:00
Aleksander Morgado 2b7e738b9b iface-modem-3gpp-ussd: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:27:04 +00:00
Aleksander Morgado f033a0a9f2 iface-modem-3gpp-profile-manager: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:27:04 +00:00
Aleksander Morgado ab6e4bf391 iface-modem-3gpp: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:27:04 +00:00
Aleksander Morgado 35c0a6905b iface-modem: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:27:04 +00:00
Aleksander Morgado 9aab129759 iface-port-at: use G_DECLARE|DEFINE_INTERFACE() macros 2024-05-06 13:27:04 +00:00
Aleksander Morgado 1e26e16168 broadband-modem-qmi-quectel: fix task completion when not enabling profile manager events
Fixes e3024ec620
2024-05-06 13:24:22 +00:00
Lukas Voegl e3024ec620 quectel: disable qmi unsolicited profile manager events
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2024-05-02 20:38:02 +00:00
Aleksander Morgado c66a6b89ec fibocom: create custom MBIM port object with potential AT support 2024-04-23 07:25:12 +00:00
Aleksander Morgado 586f98f71d fibocom: change parent class peeker method
Use the more generic MMBaseModemClass instead of MMBroadbandModemClass.
2024-04-23 07:25:12 +00:00
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
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 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 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 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 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
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 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
Aleksander Morgado 852bf39c4f mtk: add missing initialization of shared fibocom utils
Fixes 4b0b9dde02
2024-04-01 13:57:08 +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
Steve Leung 4ef5ab6db7 huawei: fix udevadm verify warning 2024-03-26 08:46:52 -06:00
bolan wang 532472f686 plugins,fibocom: Add the udev rules for FM135 modules
This patch add fibocom FM135 to 77-mm-fibocom-port-types.rules file. The vid and pid of the module is "2cb7 0115".
2024-03-13 10:56:16 +00:00
Aleksander Morgado 306566ad7e quectel: implement shared quectel logic in MBIM modem 2024-03-13 03:57:57 +00:00
Aleksander Morgado 87fb47b9ab quectel: minor code reordering 2024-03-13 03:57:57 +00:00
Aleksander Morgado 8c208f7bcf xmm: ignore +XBIPI URCs 2024-03-13 03:52:35 +00:00
Aleksander Morgado 4b0b9dde02 fibocom: setup common shared setup ports in all modems
Make sure all Fibocom modem implementations use the shared port setup
logic that adds the SIM READY URC ignore rule.
2024-03-13 03:52:35 +00:00
Aleksander Morgado 8512ff4442 fibocom: setup shared fibocom management on AT-only modem
The generic MMBroadbandModemFibocom object uses the shared Fibocom
settings to load the update settings. This logic does not use the
Private info right now, but there is no reason why it wouldn't do it
in the future. Also, for consistency, it makes sense to ensure the
shared interface setup is the same in all implementations, we should
not have only some allowing to initialize the Private info.
2024-03-13 03:52:35 +00:00
Kamesh Relangi 2dac0a9e4f build: fix dependencies in huawei plugin helpers
Compilation errors due to generated files is observed when
compiling in multi threaded environment, as the generated files
getting generated after they have been referred.

Fix: Added dependency in meson so that it will ensure that the
header is generated.

Ref fail log:
../mobile-broadband/ModemManager/src/plugins/huawei/mm-modem-helpers-huawei.c:29:10:
fatal error: mm-huawei-enums-types.h: No such file or directory
   29 | #include "mm-huawei-enums-types.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Signed-off-by: Kamesh Relangi <quic_krelangi@quicinc.com>
2024-03-12 12:06:42 +00:00
Aleksander Morgado 07f1f58642 modem-helpers: rework AT string quote operation and add unit tests
Rework the AT string quote operation to build the output with the
GString helper, instead of manually calculating how many bytes we'll
need in the output. It just makes it clearer.
2024-03-12 10:15:59 +00:00
Aleksander Morgado b99757a1f4 fibocom: don't be strict on required drivers
Requiring an explicit set of drivers should only be done when we have
different plugins supporting different types of devices of the same
manufacturer based on the drivers in use (e.g. as in the Sierra case).

When the plugin includes a list of required drivers, the plugin filter
will only assume the plugin can be used if at least one of the
available ports is exposed with one of the drivers in the list.

Because of this, if we start probing some ports before all the
expected ports are reported, we may end up not selecting a given
plugin just because the driver match should have been done in a
not-yet-notified port.

E.g. on system boot:
 * ttyACM0 is notified.
 * min probing time elapses so ttyACM0 probing starts
 * Fibocom plugin is not selected for ttyACM0 as no matched
   driver ("cdc_acm") is given in the the list of drivers of the
   plugin.
 * cdc-wdm0 and wwan0 drivers are notified.
 * MM creates generic MBIM modem with the Fibocom plugin, but without
   XMM features support, because the ttyACM0 port probing was not done
   by the Fibocom plugin.

And if we reset the modem after that:
 * ttyACM0 is notified.
 * cdc-wdm0 and wwan0 drivers are notified.
 * min probing time elapses so probing starts for all ports
 * Fibocom plugin is selected for all port probings as "cdc_mbim" is
   listed in the list of drivers of the plugin.
 * MM creates XMM-capable MBIM modem with the Fibocom plugin.
2024-03-11 12:36:15 +00:00