Lubomir Rintel e3d108de0f broadband-modem: ensure mm_broadband_modem_create_device_identifier() sets 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
2021-10-03 13:13:21 +00:00
2021-09-07 10:55:43 +00:00
2021-09-07 10:55:43 +00:00
2021-09-07 10:55:43 +00:00
2019-09-04 10:37:39 -07:00
2021-09-07 10:55:43 +00:00
2021-09-07 10:55:43 +00:00
2021-09-17 12:10:31 +02:00
2021-09-07 10:55:43 +00:00
2013-08-14 13:30:35 +02:00
2021-09-20 07:22:05 +00:00
2021-08-10 00:01:01 +02:00
2013-08-14 15:43:28 +02:00
2021-02-05 14:56:59 +01:00
2021-02-24 09:16:49 +01:00
2018-01-25 09:52:12 +01:00

ModemManager.
ModemManager provides a unified high level API for communicating with mobile
broadband modems, regardless of the protocol used to communicate with the
actual device (Generic AT, vendor-specific AT, QCDM, QMI, MBIM...).

Using.
ModemManager is a system daemon and is not meant to be used directly from
the command line. However, since it provides a DBus API, it is possible to use
'dbus-send' commands or the new 'mmcli' command line interface to control it
from the terminal. The devices are queried from udev and automatically updated
based on hardware events, although a manual re-scan can also be requested to
look for RS232 modems.

Implementation.
ModemManager is a DBus system bus activated service (meaning it's started
automatically when a request arrives). It is written in C, using glib and gio.
Several GInterfaces specify different features that the modems support,
including the generic MMIfaceModem3gpp and MMIfaceModemCdma which provide basic
operations for 3GPP (GSM, UMTS, LTE) or CDMA (CDMA1x, EV-DO) modems. If a given
feature is not available in the modem, the specific interface will not be
exported in DBus.

Plugins.
Plugins are loaded on startup, and must implement the MMPlugin interface. It
consists of a couple of methods which tell the daemon whether the plugin
supports a port and to create custom MMBroadbandModem implementations. It most
likely makes sense to derive custom modem implementations from one of the
generic classes and just add (or override) operations which are not standard.
There are multiple fully working plugins in the plugins/ directory that can be
used as an example for writing new plugins. Writing new plugins is highly
encouraged! The plugin API is open for changes, so if you're writing a plugin
and need to add or change some public method, feel free to suggest it!

License.
The ModemManager and mmcli binaries are both GPLv2+.
The libmm-glib library is LGPLv2+.

Code of Conduct.
Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms, which you can
find in the following link:
  https://www.freedesktop.org/wiki/CodeOfConduct
CoC issues may be raised to the project maintainers at the following address:
  modemmanager-devel-owner@lists.freedesktop.org
Languages
C 98.6%
Meson 0.8%
Python 0.4%
Shell 0.1%