LinuxCommandLibrary

ModemManager

Manage mobile broadband (2G/3G/4G/5G) modems

SYNOPSIS

ModemManager [OPTIONS]

PARAMETERS

--debug, -d
    Enable verbose debug output to the console.

--log-level=LEVEL
    Set the logging level to INFO, WARN, ERR, or DBG.

--disable-auto-suspend
    Prevent modems from automatically suspending when inactive.

--filter-policy=POLICY
    Set the device filtering policy. Policies include 'strict', 'loose', or 'disabled'.

--config-dir=DIR
    Specify an alternative directory for configuration files.

--no-auto-enable
    Do not automatically enable detected modems upon startup.

--no-daemon
    Do not fork into the background; run in the foreground.

--version
    Show ModemManager version information and exit.

--help
    Show this help message and exit.

DESCRIPTION

ModemManager is a system D-Bus service that provides a high-level, unified API for interacting with mobile broadband (2G/3G/4G/5G) modems. Its primary purpose is to abstract away the complexities of various modem protocols (like AT commands, QMI, and MBIM) and allow applications, such as NetworkManager, to easily manage cellular connections.

ModemManager handles a comprehensive set of functions including modem detection, initialization, PIN unlocking, network registration, and establishing data connections (e.g., PPP, QMI, MBIM). Beyond data, it also supports SMS sending/receiving, USSD requests, and voice call management, depending on the modem's capabilities. It integrates seamlessly with the Linux desktop environment, enabling users to connect to mobile networks without manual configuration.

By providing a standardized interface, ModemManager ensures reliable and consistent modem functionality across a wide range of hardware and different network types, making mobile broadband usage more accessible and user-friendly on Linux systems. It is typically run as a background daemon, with users interacting through client tools like mmcli or through the NetworkManager graphical interface.

CAVEATS

  • Relies heavily on udev for modem detection and device management; incorrect udev rules can prevent modems from being recognized.
  • Some modems may require specific firmware or kernel modules that are not universally supported or pre-installed.
  • Conflicts can arise if other modem management software (e.g., wvdial or manual pppd setups) attempts to control the same modem simultaneously.
  • Requires appropriate D-Bus permissions for client applications to interact with it.

D-BUS INTERFACE

ModemManager exposes its comprehensive functionality via a D-Bus interface. This allows other system components and user applications to programmatically query modem status, initiate connections, send SMS messages, perform USSD requests, and manage voice calls without needing to understand the underlying modem protocols.

UDEV INTEGRATION

Critical to its operation, ModemManager relies heavily on udev rules. These rules enable the daemon to automatically detect newly connected modems, identify their capabilities, and apply the correct drivers and configurations, ensuring seamless plug-and-play functionality for mobile broadband devices.

CONFIGURATION FILES

The behavior of ModemManager can be customized through configuration files, typically found in /etc/ModemManager or /usr/lib/ModemManager. These files allow system administrators to define specific modem blacklists or whitelists, adjust polling intervals, and fine-tune driver settings to optimize modem performance and compatibility for particular hardware or network environments.

HISTORY

ModemManager was developed by the NetworkManager team to address the growing need for a standardized, robust way to interact with mobile broadband modems on Linux. Introduced as a dedicated service, it aimed to centralize and simplify modem control, moving away from diverse, vendor-specific tools and ad-hoc scripts. This allowed NetworkManager to focus on network connection management while offloading the complexities of modem hardware and protocols to ModemManager.

Its development has continuously integrated support for new modem technologies (like 4G LTE and 5G) and improved compatibility with a vast range of hardware, making mobile broadband more accessible and reliable across different Linux distributions and desktop environments.

SEE ALSO

mmcli(1), NetworkManager(8), nmcli(1), udev(7), dbus-daemon(1)

Copied to clipboard