Commit Graph

8691 Commits

Author SHA1 Message Date
fe0fee7be4 polkit: annotate actions with an owner
this allows running modemmanager as non-root user
2024-06-03 18:06:40 +00:00
Aleksander Morgado
03f786ce66 release: bump version to 1.22.0
Require libmbim 1.30.0 and libqmi 1.34.0.
2023-10-11 12:32:44 +00:00
Aleksander Morgado
4605653c6f NEWS: add multi SIM support in cinterion 2023-10-11 12:31:17 +00:00
okaestne
23fc7871db iface-modem: fix error message for failed mode setting 2023-10-09 00:54:32 +02:00
Aleksander Morgado
8e81064020 core: use more inclusive words in logs 2023-10-06 08:57:32 +00:00
Lukas Voegl
fe0e6059ba cinterion: implement setting primary slot
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-10-05 11:36:08 +00:00
Lukas Voegl
1341c65b5c cinterion: implement loading multiple SIMs
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-10-05 11:36:08 +00:00
Daniel Hofmann
9da04f6158 broadband-modem-qmi: Treat QMI_VOICE_USER_ACTION_UNKNOWN as QMI_VOICE_USER_ACTION_NOT_REQUIRED.
This fixes a bug where network-initiated USSD-Notify messages were not
processed (and forwarded to higher-level applications) at all, while
they should have been processed (and forwareded to higher-level
applications). Previously, when there was a USSD conversation between
the user and the network, the last message from the network (which, by
definition, is not a message with
user_action==QMI_VOICE_USER_ACTION_REQUIRED) would be silently
dropped.

The cause is a mismatch between the modem sending
user_action==QMI_VOICE_USER_ACTION_UNKNOWN while old ModemManager
expecting user_action==QMI_VOICE_USER_ACTION_NOT_REQUIRED.
2023-10-05 08:12:36 +00:00
Aleksander Morgado
ed3871b394 AUTHORS: update 2023-09-29 11:32:16 +00:00
Dennis Gilmore
8061bcd9c0 fcc-unlock: add link for new T99W175 5G modem variant
Create link from existing unlock script for the modem in the Lenovo x13s.
IDs are documented at https://cateee.net/lkddb/web-lkddb/MHI_BUS.html

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2023-09-29 10:51:52 +00:00
Robert Marko
39eb3749be iface-modem: actually respect build options
iface-modem does not include config.h so it doesnt actually have the meson
generated build defines to check against.

I found this while trying to use AT commands over D-Bus by enabling
at_command_via_dbus, confirming that Meson sees it, defines it in config.h
but then I still got the:
"Cannot send AT command to modem: operation only allowed in debug mode".

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-09-27 13:25:36 +00:00
Aleksander Morgado
aa7ab917f7 build: bump version to 1.21.900 (1.22-rc1) 2023-09-27 11:26:32 +00:00
Aleksander Morgado
be640af246 NEWS: update for 1.22.0 2023-09-27 11:22:14 +00:00
Aleksander Morgado
9f4c738d1f test,mmsmspdu: add support for MSG log level 2023-09-27 11:21:26 +00:00
Aleksander Morgado
7990499602 base-modem: minor alignment fix 2023-09-27 10:24:58 +00:00
Aleksander Morgado
359b75bf9d device: plug leak of the physdev string 2023-09-27 10:08:59 +00:00
Aleksander Morgado
d06a8cee25 api: add comment about "MSG" level being available only since 1.22 2023-09-27 09:07:24 +00:00
Nagi Marupaka
20a95cf428 mm-broadband-modem-mbim: treat "status error = `NotInitialized'" the same way as "ReadyState = 'sim-not-initialized'" 2023-09-18 16:52:24 +00:00
Lukas Voegl
8cd1c1bdb9 api,modem: new 'Physdev' property
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-09-18 10:53:12 +02:00
QuectelDuke
1fc061b6a5 quectel: Add RM520 with firehose support
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-15 09:49:50 +00:00
QuectelDuke
bae7242af6 quectel: Add new EM160 product with firehose support
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-14 07:51:12 +00:00
Aleksander Morgado
1fc58d4749 broadband-modem: don't assert if no AT port in QMI modem enabling unsolicited messages
2023-09-11T20:23:49.294555Z <err> mm_port_get_device: assertion 'self != NULL' failed
  2023-09-11T20:23:49.294691Z <dbg> [modem0] enabling messaging unsolicited events on primary port (null)
  2023-09-11T20:23:49.294865Z <dbg> [modem0] enabling parent messaging unsolicited events failed: Cannot run sequence: port not given
2023-09-11 22:37:46 +00:00
Aleksander Morgado
36dc193b40 iface-modem-simple: ignore ps wait state result, only check error
As we do in the similar modem state wait operations in the modem
interface, the caller of the wait operation may ignore the state
result as it's really not required in this case. Only looking at
whether an error is set or not is enough.

This by itself fixes a crash where
mm_iface_modem_3gpp_wait_for_packet_service_state_finish() may have
returned UNKNOWN without error set.

  0x000079616c2564ed (libglib-2.0.so.0 - gtestutils.c: 3256)      g_assertion_message
  0x000079616c25654b (libglib-2.0.so.0 - gtestutils.c: 3282)      g_assertion_message_expr
  0x000057ba46231150 (ModemManager - mm-iface-modem-simple.c: 344)        packet_service_attach_in_3gpp_network_step
  0x000079616c0efb02 (libgio-2.0.so.0 - gtask.c: 1232)    g_task_return_now
  0x000079616c0eeb54 (libgio-2.0.so.0 - gtask.c: 1301)    g_task_return
  0x000057ba4620e5bd (ModemManager - mm-iface-modem-3gpp.c: 189)  wait_for_packet_service_state_context_complete
  0x000057ba4620b441 (ModemManager - mm-iface-modem-3gpp.c: 261)  packet_service_state_changed
2023-09-11 19:39:59 +00:00
Aleksander Morgado
47239b8499 iface-modem-3gpp: ensure error is set when UNKNOWN returned in ps state wait 2023-09-11 19:39:59 +00:00
Aleksander Morgado
c1382b3255 iface-modem: ensure error is set when UNKNOWN returned in modem state wait 2023-09-11 19:39:59 +00:00
Aleksander Morgado
5adda62912 iface-modem-3gpp: ignore UNKNOWN ps state explicitly during wait operation 2023-09-11 19:39:59 +00:00
Aleksander Morgado
fb66cc26be iface-modem: ignore UNKNOWN modem state explicitly during wait operation 2023-09-11 19:39:59 +00:00
QuectelDuke
0a87294725 quectel: add Sahara udev tag to EM061K-GL modems
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-09-08 08:35:48 +00:00
Eric Caruso
201c8533e0 mm-sms-part-3gpp: avoid buffer overflow if packed data is too large
With GSM7 encoding, packedlen is the length of the unpacked string
after expanding septets to octets so it will be ~14% bigger than
the original string length. This means we have to be careful not
to copy too much data into the PDU buffer.

Similar issues exist in other branches of the same function.

Thanks rhezashan@gmail.com for the report.
2023-08-30 12:42:15 -04:00
QuectelDuke
8fc9b77750 quectel: add support for EM060K-GL usb modules
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-08-14 12:03:02 +00:00
Daniele Palmas
490eeb0ade port-qmi: add QMAP support to mhi_net based setups 2023-08-07 10:52:55 +00:00
Daniele Palmas
65e2db75ed port-qmi: restore driver initial MTU for mhi-net when resetting link
Kernel driver mhi-net sets a custom MTU for the netdevice: use the
same value when resetting the netdevice to its initial state.

This is important especially when rmnet is used on top of mhi-net,
since rmnet netdevices get their initial MTU from the mhi-net one.
2023-08-07 10:52:55 +00:00
Aleksander Morgado
639900ed36 build: unstable release version bump to 1.21.8 2023-08-07 05:01:31 +00:00
Aleksander Morgado
50caac4bdd fibocom: disable multiplexing support in NL668
The NL668 doesn't seem to support multiplexing, as it fails to
transfer data even in the one multiplexed PDN case.
2023-08-05 22:08:01 +00:00
Aleksander Morgado
3008012adc bearer-mbim: simplify the logic to require static IPv6 addressing
Rely exclusively on whether a global IPv6 was given or not, regardless
of what the DNS or gateway settings are, same as we do for IPv4.

Also, assume we only get 1 single IPv6 address. No need to have a
FIXME to add support for more addresses.
2023-08-04 11:57:52 +02:00
Aleksander Morgado
c1fc816d0c plugin-manager: increase probing timeouts
This will make device probing slower unconditionally, but it should
also ensure newer more complex devices that take longer to boot are
handled properly.
2023-07-28 08:57:22 +00:00
Daniele Palmas
df61559511 port-qmi: set qmi_wwan requested dl dap max size to 16384 for rmnet
The current requested downlink data aggregation protocol maximum size is
set to 32768, but this is not accordingly set as the MTU of the main
qmi_wwan interface, that is instead set to RMNET_MAX_PACKET_SIZE that is
16384.

So, the modem is able to send QMAP aggregated blocks larger than 16384,
but the driver is not able to properly collect them, since the URB size
is 16384.

It is not simply possible to set qmi_wwan main interface MTU to the
returned dl max aggregated size, since when creating the rmnet netdevice
the rmnet kernel module automatically set the mtu as the size of the
parent netdevice MTU - the qmap header size (4), but this won't work
because the rmnet kernel module does not support MTU > 16384.

As an immediate fix, set the requested dl dap max size to 16384, while
thinking about how to refactor the logic for supporting higher values.

qmi_wwan inbox qmap management is not affected by this issue.
2023-07-17 13:47:19 +02:00
Daniele Palmas
3082d5d37b port-qmi: fix rmnet setup when QMAP is configured in the modem at MM startup
It could happen that when MM starts the aggregation protocol is already
configured on the modem side (e.g. if MM is stopped and restarted): this
prevents the links to be properly configured, resulting in using the qmimux
multiplex implementation even if rmnet is available.

Fix the issue by always performing the first time the links reset procedure,
even if the data format on the modem side is the expected one.
2023-07-17 13:47:19 +02:00
Daniele Palmas
16f9ff68fb port-qmi: fix rmnet checksum flag with qmi_wwan
When using QMAPv5 and QMAPv4 the checksum is enabled by default
at the modem level, so it should be also enabled when creating the
rmnet netdevices: add the required flags also when rmnet is used
through qmi_wwan.
2023-07-17 13:47:19 +02:00
Aleksander Morgado
b75198d9f9 broadband-modem-mbim: only update bearer speeds if connected
We should not update speeds on already disconnected bearers.
2023-07-14 13:02:39 +00:00
Aleksander Morgado
32b3aee8f0 broadband-modem-mbim: reset packet service state if unregistered 2023-07-14 13:02:39 +00:00
Aleksander Morgado
22d06d6b53 broadband-modem-mbim: propagate packet service state to 3GPP iface unconditionally 2023-07-14 10:33:06 +00:00
Aleksander Morgado
0724f45731 build: require udevdir if udev support is disabled
We cannot guess the udevdir path from the pkgconfig variable if there
is no udev support in the system, so explicitly fail.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/750
2023-07-13 10:22:05 +00:00
okaestne
aaacc8120a huawei: don't add DST to TZ offset
DST is already included in TZ offset. Adjust tests accordingly.
2023-07-13 10:00:24 +00:00
okaestne
d856cae75b huawei: check ^NWTIME not ^NTCT for time support
^NTCT seems to be used to enable or disable ^NWTIME messages.
2023-07-13 10:00:24 +00:00
diekleinekuh
4d02e9d463 ci: support overriding branch of dependency libs
(cherry picked from commit b3e1edaf1afc28a92dfcc52ab0fb1e8a97b446bb)
2023-07-13 08:28:14 +00:00
Andrey Skvortsov
4174575d5d quectel: fix debug output if QGPS isn't supported
FEATURE_NOT_SUPPORTED is equal 1 in the enum FeatureSupport, as a
result even if QGPS isn't supported by modem debug message printed
available support.
2023-07-13 08:15:10 +00:00
Daniele Palmas
187bccf0af port-qmi: fix qmi_device_list_links usage
qmi_device_list_links can return TRUE, but with a NULL value for
the links list: check for validity before using the list.
2023-07-12 12:27:14 +02:00
Aleksander Morgado
53f063b851 quectel: avoid assuming modem is MBIM capable in shared utils
(ModemManager:10426): GLib-GObject-WARNING **: 09:44:23.142: invalid cast from 'MMBroadbandModemQmiQuectel' to 'MMBroadbandModemMbim'
  **
  ERROR:../git/src/mm-broadband-modem-mbim.c:284:mm_broadband_modem_mbim_peek_port_mbim: assertion failed: (MM_IS_BROADBAND_MODEM_MBIM (self))
  Bail out! ERROR:../git/src/mm-broadband-modem-mbim.c:284:mm_broadband_modem_mbim_peek_port_mbim: assertion failed: (MM_IS_BROADBAND_MODEM_MBIM (self))

See https://lists.freedesktop.org/archives/modemmanager-devel/2023-July/009729.html
2023-07-07 05:50:12 +00:00
diekleinekuh
3c2849d722 fibocom: allow qmi over mbim 2023-06-24 22:52:43 +00:00