The logic to build the generic device ids may run by the time we have already removed the ports in the modem. If so, just cleanly error out and avoid the assertion. 0x00007df14bb03a3f (libc.so.6 - pthread_kill.c: 44) __pthread_kill_implementation 0x00007df14bab8c6c (libc.so.6 - raise.c: 26) raise 0x00007df14baa4462 (libc.so.6 - abort.c: 79) abort 0x00007df14c2c8686 (libglib-2.0.so.0 - gtestutils.c: 3450) g_assertion_message 0x00007df14c2c86fa (libglib-2.0.so.0 - gtestutils.c: 3476) g_assertion_message_expr 0x000059ff23c90c90 (ModemManager - mm-iface-modem-firmware.c: 353) mm_iface_firmware_build_generic_device_ids 0x000059ff23ceef7d (ModemManager - mm-shared-fibocom.c: 495) fibocom_at_port_get_firmware_version_ready 0x00007df14c158e57 (libgio-2.0.so.0 - gtask.c: 1309) g_task_return_now 0x00007df14c158e8a (libgio-2.0.so.0 - gtask.c: 1323) complete_in_idle_cb 0x00007df14c2a47a4 (libglib-2.0.so.0 - gmain.c: 3460) g_main_dispatch 0x00007df14c2a47a4 (libglib-2.0.so.0 - gmain.c: 4200) g_main_context_dispatch 0x00007df14c2a4ac3 (libglib-2.0.so.0 - gmain.c: 4276) g_main_context_iterate 0x00007df14c2a4d41 (libglib-2.0.so.0 - gmain.c: 4479) g_main_loop_run 0x000059ff23c43741 (ModemManager - main.c: 221) main 0x00007df14baa46c5 (libc.so.6 - libc_start_call_main.h: 58) __libc_start_call_main 0x00007df14baa4781 (libc.so.6 - libc-start.c: 389) __libc_start_main_impl 0x000059ff23c430b0 (ModemManager + 0x000b00b0) _start 0x00007ffc53d5bd27
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