mmcli
Control and monitor modem devices
TLDR
List available modems
Print information about a modem
Enable a modem
List SMS messages available on the modem
Delete a message from the modem, specifying its path
SYNOPSIS
mmcli [GLOBAL_OPTIONS] [OBJECT_SELECTION_OPTIONS] [COMMAND] [COMMAND_OPTIONS]
Examples:
mmcli -L
mmcli -M 0 --enable
mmcli -m 0 --signal-setup=rate=5
PARAMETERS
--help, -h
Show help message and exit.
--version, -v
Display version information and exit.
--list-modems, -L
List all detected modem objects.
--list-sims, -S
List all detected SIM card objects.
--list-bearers, -B
List all data bearer objects.
--list-all, -a
List all ModemManager objects (modems, SIMs, bearers, SMS, etc.).
--modem=INDEX|PATH, -M INDEX|PATH
Specify the modem object to operate on, using its numerical index or D-Bus path.
--sim=INDEX|PATH, -s INDEX|PATH
Specify the SIM object to operate on.
--bearer=INDEX|PATH, -b INDEX|PATH
Specify the data bearer object to operate on.
--sms=INDEX|PATH, -C INDEX|PATH
Specify the SMS message object to operate on.
--enable
Enable the selected modem (requires --modem).
--disable
Disable the selected modem (requires --modem).
--connect=BEARER_PATH
Connect the selected modem using a specified bearer (requires --modem).
--disconnect=BEARER_PATH
Disconnect the selected modem from a specified bearer (requires --modem).
--create-bearer=[APN=...],[IP_TYPE=...]
Create a new data bearer with specified properties (requires --modem).
--delete-bearer=BEARER_PATH
Delete a specified data bearer (requires --modem).
--send-sms=[text="..."],[number="+..."]
Send an SMS message with content and destination number (requires --modem or --messaging).
--signal-setup=[rate=...],[threshold=...]
Configure signal strength monitoring for the modem (requires --modem).
--power-down
Power down the selected modem (requires --modem).
--reset
Reset the selected modem (requires --modem).
--set-allowed-modes=MODES
Set allowed network modes (e.g., '2g,3g,4g') for the modem (requires --modem).
--unlock-pin=PIN
Unlock the SIM card using a PIN (requires --sim).
--monitor-modem
Continuously monitor properties and signals of a selected modem (requires --modem).
DESCRIPTION
mmcli is the command-line interface for
ModemManager, a D-Bus service that provides a unified API for managing mobile broadband modems. It allows users to inspect, control, and interact with modems, SIM cards, data bearers, and SMS messages.
With mmcli, you can list available modems, enable/disable them, connect to mobile networks, send and receive SMS, manage network configurations (APN, IP type), monitor signal strength, and perform firmware updates. It is an essential tool for system administrators and developers working with mobile broadband on headless servers, embedded systems, or for scripting modem automation tasks.
CAVEATS
mmcli relies on the ModemManager service running and accessible via D-Bus.
Users often require elevated privileges (e.g., root or membership in the 'dialout' or 'network' group) to interact with modems.
Feature support can vary significantly between different modem hardware and firmware versions, meaning not all commands will work with every modem.
OBJECT-ORIENTED INTERACTION
mmcli organizes modem functionalities around D-Bus objects such as modems, SIMs, bearers, and SMS. Each object has a unique D-Bus path (e.g., /org/freedesktop/ModemManager1/Modem/0) and an associated index, allowing precise targeting of commands to specific components. This structure enables granular control over various aspects of the mobile broadband connection.
INTEGRATION WITH NETWORKMANAGER
While mmcli provides direct command-line control, NetworkManager often uses ModemManager in the background to manage mobile broadband connections automatically. For desktop users, NetworkManager is typically the primary interface for managing network connections, while mmcli offers a more granular, scriptable control for advanced scenarios, troubleshooting, and headless system deployments.
HISTORY
mmcli is an integral part of the ModemManager project, initiated to standardize and simplify interaction with diverse mobile broadband hardware on Linux. It has evolved significantly since its inception, continually adding support for new modem types, cellular technologies (2G, 3G, 4G, 5G), and complex functionalities, making it a robust and comprehensive tool for network management. Its development parallels the growing need for unified management of mobile connectivity in the Linux ecosystem.
SEE ALSO
ModemManager(8), nmcli(1), qmicli(1), mbimcli(1), dbus-send(1)