Age | Commit message (Collapse) | Author |
|
The call to g_task_return_error() takes ownership of the GError passed
to it; we must not free it ourselves upon automatic pointer cleanup.
Otherwise a crash can be triggered in the error handling path:
ModemManager[259816]: <debug> [1633088468.157848] [modem0/modemu/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[259816]: <debug> [1633088468.159832] [modem0] stored profile with id '1'
ModemManager[259816]: <debug> [1633088468.160501] [modem0] set profile state (7/8): list after
ModemManager[259816]: <debug> [1633088468.161686] [modem0/modemu/at] device open count is 3 (open)
ModemManager[259816]: <debug> [1633088468.162320] [modem0/modemu/at] device open count is 2 (close)
ModemManager[259816]: <debug> [1633088468.162746] [modem0/modemu/at] --> 'AT+CGDCONT?<CR>'
ModemManager[259816]: <debug> [1633088468.177437] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>'
ModemManager[259816]: <debug> [1633088468.178011] [modem0/modemu/at] operation failure: 100 (Unknown error)
ModemManager[259816]: <warn> [1633088468.182420] [modem0/bearer0] connection attempt #1 failed: Couldn't validate update of profile '1': Unknown error
ModemManager[259816]: <info> [1633088468.193156] [modem0/bearer0] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes
ModemManager[259816]: <debug> [1633088468.194280] [modem0] couldn't connect bearer: Couldn't validate update of profile '1': Unknown error
==259816== Invalid read of size 4
==259816== at 0x4FF66CF: UnknownInlinedFun (gerror.c:535)
==259816== by 0x4FF66CF: g_error_free (gerror.c:832)
==259816== by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52)
==259816== by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52)
==259816== by 0x1A7F49: profile_manager_get_profile_after_ready (mm-iface-modem-3gpp-profile-manager.c:140)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x1A867C: get_profile_list_ready (mm-iface-modem-3gpp-profile-manager.c:680)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x1A3DB5: internal_list_profiles_ready (mm-iface-modem-3gpp-profile-manager.c:774)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x1D7B8B: profile_manager_cgdcont_query_ready (mm-broadband-modem.c:10240)
==259816== by 0x4E1DB61: g_simple_async_result_complete (gsimpleasyncresult.c:802)
==259816== Address 0x9286da0 is 0 bytes inside a block of size 16 free'd
==259816== at 0x48440E4: free (vg_replace_malloc.c:755)
==259816== by 0x500FD1C: g_free (gmem.c:199)
==259816== by 0x502A22F: g_slice_free1 (gslice.c:1180)
==259816== by 0x4FF6780: g_error_free (gerror.c:864)
==259816== by 0x1B22D2: connect_bearer_ready (mm-iface-modem-simple.c:286)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x18031A: connect_ready (mm-base-bearer.c:917)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x18329B: connect_3gpp_ready (mm-broadband-bearer.c:918)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== Block was alloc'd at
==259816== at 0x484186F: malloc (vg_replace_malloc.c:380)
==259816== by 0x5013408: g_malloc (gmem.c:106)
==259816== by 0x502ACB4: g_slice_alloc (gslice.c:1069)
==259816== by 0x502B33D: g_slice_alloc0 (gslice.c:1095)
==259816== by 0x4FF64E6: g_error_allocate (gerror.c:702)
==259816== by 0x4FF6F03: UnknownInlinedFun (gerror.c:716)
==259816== by 0x4FF6F03: g_error_copy (gerror.c:886)
==259816== by 0x4E1D0A0: g_simple_async_result_set_from_error (gsimpleasyncresult.c:676)
==259816== by 0x236AAB: port_serial_got_response (mm-port-serial.c:744)
==259816== by 0x23B0F1: UnknownInlinedFun (mm-port-serial.c:934)
==259816== by 0x23B0F1: common_input_available (mm-port-serial.c:1035)
==259816== by 0x500AF9E: UnknownInlinedFun (gmain.c:3337)
==259816== by 0x500AF9E: g_main_context_dispatch (gmain.c:4055)
==259816== by 0x505F607: g_main_context_iterate.constprop.0 (gmain.c:4131)
==259816== by 0x500A562: g_main_loop_run (gmain.c:4329)
|
|
an error on all bad returns
modem_load_device_identifier_finish() expect it to do so and trips an
assertion failure in g_propagate_error():
ModemManager[256038]: <warn> [1633083601.491190] [modem0] couldn't load equipment identifier: Unknown error
ModemManager[256038]: <debug> [1633083601.491204] [modem0] loading device identifier...
ModemManager[256038]: <debug> [1633083601.491215] [modem0/modemu/at] device open count is 3 (open)
ModemManager[256038]: <debug> [1633083601.491231] [modem0/modemu/at] device open count is 2 (close)
ModemManager[256038]: <debug> [1633083601.491254] [modem0/modemu/at] --> 'ATI<CR>'
ModemManager[256038]: <debug> [1633083601.494616] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>'
ModemManager[256038]: <debug> [1633083601.494643] [modem0/modemu/at] operation failure: 100 (Unknown error)
(ModemManager:256038): GLib-CRITICAL **: 06:20:01.494: g_propagate_error: assertion 'src != NULL' failed
Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff77d1071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413
1413 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
Missing separate debuginfos, use: dnf debuginfo-install libmbim-1.26.0-2.el9.x86_64 libqmi-1.30.2-1.el9.x86_64
(gdb) bt
#0 g_logv (log_domain=0x7ffff77d1071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413
#1 0x00007ffff77813d3 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at ../glib/gmessages.c:1451
#2 0x000055555561122d in modem_load_device_identifier_finish (self=0x5555557e62d0, res=<optimized out>, error=0x7fffffffd320)
at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-broadband-modem.c:1168
#3 0x00005555555ea69a in load_device_identifier_ready (self=0x5555557e62d0, res=0x5555557ea6b0, task=task@entry=0x7fffe8011e20 [GTask])
at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-iface-modem.c:4727
#4 0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557ea6b0 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802
#5 0x00005555555d1b0a in at_sequence_parse_response (port=<optimized out>, res=<optimized out>, ctx=ctx@entry=0x5555557ed7f0)
at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-base-modem-at.c:250
#6 0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557e5440 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802
#7 0x00005555556805dc in serial_command_ready (port=<optimized out>, res=<optimized out>, simple=simple@entry=0x5555557e5440 [GSimpleAsyncResult])
at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial-at.c:378
#8 0x00007ffff7951b62 in g_simple_async_result_complete (simple=0x5555557d6730 [GSimpleAsyncResult]) at ../gio/gsimpleasyncresult.c:802
#9 0x000055555567fb35 in command_context_complete_and_free (ctx=ctx@entry=0x7fffe800c200, idle=idle@entry=0) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:141
#10 0x0000555555682a96 in port_serial_got_response (self=0x5555557dd4e0 [MMPortSerialAt], parsed_response=0x0, error=0x5555557d5040)
at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:755
#11 0x00005555556870d2 in parse_response_buffer (self=<optimized out>) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:934
#12 common_input_available (self=0x5555557dd4e0 [MMPortSerialAt], condition=(G_IO_NVAL | unknown: 0xf762a5c0)) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/mm-port-serial.c:1035
#13 0x00007ffff7778f9f in g_main_dispatch (context=0x5555557527c0) at ../glib/gmain.c:3337
#14 g_main_context_dispatch (context=0x5555557527c0) at ../glib/gmain.c:4055
#15 0x00007ffff77cd608 in g_main_context_iterate.constprop.0 (context=0x5555557527c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131
#16 0x00007ffff7778563 in g_main_loop_run (loop=0x55555576da60) at ../glib/gmain.c:4329
#17 0x00005555555b7b60 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/ModemManager-1.18.2-1.el9.x86_64/src/main.c:216
|
|
The timeout for sms send operation can exceed the current value, so
increase it to 5 minutes. Timeouts up to 4 minutes have been observed
in the following test scenario:
* Power up the modem and wait for registration.
* Right when the modem is registered, attenuate the rf signal
or remove the antenna.
* Immediately try to send an sms.
Increasing the timeout cover this corner case.
|
|
|
|
According to MBIM specification, the subscriber state is INITIALIZED
when SIM card is incompatible with enabled modem personalization lock.
This patch introduce additional check for enabled PIN lock in such case
and fixes depersonalization of one lock if several are enabled.
|
|
Initialize the scheme variable to QMI_VOICE_USS_DATA_CODING_SCHEME_UNKNOWN
to avoid the warning.
|
|
Don't close the UICC channel only when the EID was successfully
load. If for any reason it failed, also close the channel.
|
|
|
|
Support is added to set eid dbus interface property using
MBIM protocol when the inserted sim is esim.
|
|
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/433
|
|
The suspend/resume option does not build properly if journal option
is disabled. This is beacause the journal option is check to add
suspend/resume code.
It has been fixed by replacing journal option check by the
suspend/resume option.
|
|
|
|
Only error out if the required TLVs are missing.
|
|
../src/mm-iface-modem-voice.c: In function ‘mm_iface_modem_voice_reload_all_calls’:
../src/mm-iface-modem-voice.c:2549:64: warning: passing argument 2 of ‘((MMIfaceModemVoice *)g_type_interface_peek((void *)((GTypeInstance *)self)->g_class, mm_iface_modem_voice_get_type()))->load_call_list’ from incompatible pointer type [-Wincompatible-pointer-types]
2549 | reload_all_calls_ready,
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(MMIfaceModemVoice *, GAsyncResult *, GTask *) {aka void (*)(struct _MMIfaceModemVoice *, struct _GAsyncResult *, struct _GTask *)}
../src/mm-iface-modem-voice.c:2549:64: note: expected ‘GAsyncReadyCallback’ {aka ‘void (*)(struct _GObject *, struct _GAsyncResult *, void *)’} but argument is of type ‘void (*)(MMIfaceModemVoice *, GAsyncResult *, GTask *)’ {aka ‘void (*)(struct _MMIfaceModemVoice *, struct _GAsyncResult *, struct _GTask *)’}
|
|
the GTask
The process_get_all_call_info() was not completing the input GTask on
every possible code path (e.g. when remote party number or call info
wasn't available).
The method is now updated to avoid processing the GTask itself,
instead it will attempt to build the call list and return a GError on
any kind of failure.
|
|
Enable AT URCs for calls on top of QMI Voice indications
for AT+QMI devices only. Some AT+QMI devices send unreliable
QMI indications when the host is resuming. In such cases,
AT URCs can be used as a fall back to make calls reliable.
While AT+QMI devices relied before on AT commands to load
call list information and handle AT URCs for async updates,
this is now handled through QMI by forcefully reloading the
call list instead of processing the AT URCs.
This approach is disabled by default through the
MM_IFACE_MODEM_VOICE_INDICATION_CALL_LIST_RELOAD_ENABLED property.
This property is set to true in case of QMI modems.
|
|
Calls in a CLCC response in data-only or fax-only mode
do not count as actuall calls.
|
|
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
|
|
The user may request to disable QRTR support using `--without-qrtr`
even if libqmi has QRTR support.
|
|
Currently, we are sending the username twice instead of username and
password. Fix the password value.
|
|
The maximum MTU that the master interface can support should be less
or equal than RMNET_MAX_PACKET_SIZE, as defined in the
`rmnet_private.h` file in the linux sources (not a public header).
Only applicable to RMNET link management (i.e. not to qmi_wwan
add_mux/del_mux).
Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/71
|
|
When not requesting multiplexing support, only assume we don't need
any additional setup if multiplexing is disabled AND if the data modes
match between kernel and device.
This fixes the connection setup in MSM8916 (rpmsg+bam/dmux).
|
|
The new option will change the default setting in MBIM and QMI bearers
to "request" when no explicit "multiplex" configuration is given by
the user.
This option will help test the multiplexing support in the modems
before it's made a default in a future release.
|
|
The next 1.18 release will have multiplexing support, but not enabled
by default, to avoid breaking setups that don't expect the new virtual
net interfaces for the multiplexed sessions.
The exception is Qualcomm SoCs using the IPA driver, where
multiplexing is fully required.
|
|
The next 1.18 release will have multiplexing support, but not enabled
by default, to avoid breaking setups that don't expect the new virtual
net interfaces for the multiplexed sessions.
|
|
|
|
Using "requested" as a common default for every possible
implementation works, because it can handle setups without
multiplexing capabilities (e.g. plain AT+PPP modems) and also setups
without non-multiplexing capabilities (e.g. IPA based SoCs).
But if we don't want "requested" as default, then there will be
failing cases; e.g. we cannot use "none" as default for all as it
would break IPA, and we cannot use "required" as default for all as it
would break AT+PPP setups.
So, remove the common default, it's not flexible enough.
|
|
In IPA based setups, there are only multiplexed bearers supported,
there is no way to not enable multiplexing.
We change the logic that computes the maximum number of multiplexed
and non-multiplexed bearers, so that we check which are the current
kernel data modes before computing them.
|
|
|
|
Fixes warnings on AT+PPP based devices:
ModemManager[602870]: <debug> [1626948725.168355] [modem0] allowed up to 1 active bearers
(ModemManager:602870): GLib-GObject-WARNING **: 12:12:05.185: value "0" of type 'guint' is invalid or out of range for property 'max-active-multiplexed-bearers' of type 'guint'
|
|
|
|
If a SIM card is not fully ready or in a failed state in the
non-active slot, we should still report them as available.
|
|
|
|
A pointer can not be used anymore after its ownership has been transfered
using the g_steal_pointer function (pointer is nullified).
In this function, g_steal_pointer() is used when inserting 'value' inside
the array but can also be subsequently used when dumping 'value' to
'out_value' via g_strdup().
Fix that with simple reordering.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
|
|
The following functionalities are implemented:
1. Hold all and accept
2. Hangup all and accept
3. Hangup all
4. Join multiparty
5. Leave multiparty
6. Call transfer
|
|
|
|
Handle supplementary service notification indication.
Useful to know when existing call is on hold, unheld and waiting.
|
|
|
|
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/409
|
|
Only the plural ATTRS form was checked but we also need to support
the single ATTR for matching device's attribute only.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
|
|
The template files in the `build-aux` directory used in enums sources
and headers generation use the `{$name}-template.[ch]` pattern.
However, the examples in the official guide[0] and usually GNOME and
Freedesktop packages use the `{$name}.[ch].template` pattern.
Due to this, the name of the template files and build commands have
been changed.
[0] https://developer.gnome.org/gobject/stable/glib-mkenums.html
|
|
The port open operation may be happening very early after the device
has booted, so let's give the module some more time to reply the very
first MBIM query we do. The original 10s seems to be a bit tight in
some cases.
See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/405#note_1006746
|
|
Regardless of whether WDA is supported or not.
|
|
We should check if WDA is supported before running any other logic
that may change the state of the kernel or the modem. E.g. if we don't
do this as the first step, the loading of the supported kernel data
modes may end up changing the expected kernel data mode to raw-ip.
|
|
ModemManager[703345]: <debug> [1626962477.971869] [modem0] couldn't open QMI port with data format update: Unexpected kernel data mode: cannot setup using CTL
ModemManager[703345]: <debug> [1626962477.972197] [cdc-wdm0/qmi] Opening QMI device...
ModemManager[703345]: <debug> [1626962477.972310] [cdc-wdm0/qmi] Checking if QMI device already opening...
ModemManager[703345]: <warn> [1626962477.975182] [modem0] couldn't start initialization: QMI device open/close operation in progress
|
|
E.g. the ZTE MF190 has a very old QMI firmware that is not able to run
CTL Set Data Format (raw-ip).
ModemManager[666366]: [/dev/cdc-wdm0] QMI Device supports 4 services:
ModemManager[666366]: [/dev/cdc-wdm0] ctl (1.2)
ModemManager[666366]: [/dev/cdc-wdm0] wds (1.3)
ModemManager[666366]: [/dev/cdc-wdm0] dms (1.2)
ModemManager[666366]: [/dev/cdc-wdm0] nas (1.0)
ModemManager[666366]: [/dev/cdc-wdm0] Setting network port data format...
ModemManager[666366]: [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<< length = 21
<<<<<< data = 01:14:00:00:00:00:00:03:26:00:09:00:10:02:00:02:00:01:01:00:00
ModemManager[666366]: [/dev/cdc-wdm0] Sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 20
<<<<<< flags = 0x00
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 3
<<<<<< tlv_length = 9
<<<<<< message = "Set Data Format" (0x0026)
<<<<<< TLV:
<<<<<< type = "Protocol" (0x10)
<<<<<< length = 2
<<<<<< value = 02:00
<<<<<< translated = raw-ip
<<<<<< TLV:
<<<<<< type = "Format" (0x01)
<<<<<< length = 1
<<<<<< value = 00
<<<<<< translated = absent
ModemManager[666366]: [/dev/cdc-wdm0] Received message...
<<<<<< RAW:
<<<<<< length = 19
<<<<<< data = 01:12:00:80:00:00:01:03:26:00:07:00:02:04:00:01:00:2D:00
ModemManager[666366]: [/dev/cdc-wdm0] Received generic response (translated)...
<<<<<< QMUX:
<<<<<< length = 18
<<<<<< flags = 0x80
<<<<<< service = "ctl"
<<<<<< client = 0
<<<<<< QMI:
<<<<<< flags = "response"
<<<<<< transaction = 3
<<<<<< tlv_length = 7
<<<<<< message = "Set Data Format" (0x0026)
<<<<<< TLV:
<<<<<< type = "Result" (0x02)
<<<<<< length = 4
<<<<<< value = 01:00:2D:00
<<<<<< translated = FAILURE: InvalidDataFormat
ModemManager[666366]: <debug> [1626961628.001354] [cdc-wdm0/qmi] QMI port open operation failed: QMI protocol error (45): 'InvalidDataFormat'
ModemManager[666366]: <warn> [1626961628.002563] [modem0] couldn't start initialization: QMI protocol error (45): 'InvalidDataFormat'
ModemManager[666366]: <warn> [1626961628.004181] [modem0] couldn't initialize: 'Modem is unusable, cannot fully initialize'
|
|
|
|
WWAN network devices expose link management over netlink (wwan type),
but it is not yet supported by libmbim.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
|