Skip to main content

Crate remora_modem_manager

Crate remora_modem_manager 

Expand description

D-Bus client for ModemManager.

The crate has an async proxy for every public interface of the org.freedesktop.ModemManager1 service. The service exports one object per modem, SIM, bearer, SMS, call and cell broadcast message. Only the manager has a fixed path. Build the other proxies with the object path that the service gives you.

use remora_modem_manager::ModemProxy;

let connection = zbus::Connection::system().await?;
let path = "/org/freedesktop/ModemManager1/Modem/0";
let modem = ModemProxy::new(&connection, path).await?;
println!("{:?}", modem.state().await?);

§Versions

The crate covers ModemManager 1.24.2. Members without a version note exist in ModemManager 1.10 and later. Other members and interfaces say in which release they appeared. Calls to a member that the running service lacks fail with a D-Bus error.

§Properties

The service sends PropertiesChanged whenever a property changes. The proxies cache every property.

§Types

Enums use the derives of remora-derive, and their Other variant keeps unknown values. Flags keep unknown bits. Dictionaries with documented keys are structs with optional fields, and keys that a struct does not name are dropped. The crate keeps a few values raw. The docs of each such member say why.

Dictionary structs are #[non_exhaustive], so build one from its default and set the fields you need:

use remora_modem_manager::BearerProperties;

let mut properties = BearerProperties::default();
properties.apn = Some("internet".to_owned());

Signals have the types that zbus generates, for example ModemStateChanged, ModemStateChangedArgs and ModemStateChangedStream. The types of signals that several interfaces share a name for carry the interface name as a prefix.

Upstream documentation: https://www.freedesktop.org/software/ModemManager/api/latest/.

Re-exports§

pub use zbus;

Modules§

proxies 🔒
types 🔒

Structs§

ActivationStateChanged
A ActivationStateChanged signal.
ActivationStateChangedArgs
ActivationStateChanged signal arguments.
ActivationStateChangedStream
A Stream implementation that yields ActivationStateChanged signals.
BearerAllowedAuth
Authentication methods of a bearer.
BearerApnType
The purposes of an APN.
BearerIpConfig
The IP settings of a connected bearer.
BearerIpFamily
IP families of a bearer.
BearerProperties
The settings of a bearer or connection profile.
BearerProxy
Client for a packet data bearer.
BearerRoamingAllowance
The networks that a bearer may use while roaming.
BearerStats
Statistics of a bearer.
CallAdded
A CallAdded signal.
CallAddedArgs
CallAdded signal arguments.
CallAddedStream
A Stream implementation that yields CallAdded signals.
CallAudioFormat
The audio format of a call that the host routes.
CallDeleted
A CallDeleted signal.
CallDeletedArgs
CallDeleted signal arguments.
CallDeletedStream
A Stream implementation that yields CallDeleted signals.
CallProperties
The properties of a new call for Voice.CreateCall.
CallProxy
Client for one voice call.
CallStateChanged
A StateChanged signal.
CallStateChangedArgs
StateChanged signal arguments.
CallStateChangedStream
A Stream implementation that yields StateChanged signals.
CbmProxy
Client for one cell broadcast message.
CdmaActivationChanges
The properties that an activation state change changed.
CdmaManualActivation
The provisioning data for Cdma.ActivateManual.
CdmaProxy
Client for the CDMA features of a modem.
CdmaSignal
Signal information for CDMA 1x.
CellBroadcastAdded
A Added signal.
CellBroadcastAddedArgs
Added signal arguments.
CellBroadcastAddedStream
A Stream implementation that yields Added signals.
CellBroadcastDeleted
A Deleted signal.
CellBroadcastDeletedArgs
Deleted signal arguments.
CellBroadcastDeletedStream
A Stream implementation that yields Deleted signals.
CellBroadcastProxy
Client for the cell broadcast features of a modem.
CellInfo
A cell that Modem.GetCellInfo reports.
DtmfReceived
A DtmfReceived signal.
DtmfReceivedArgs
DtmfReceived signal arguments.
DtmfReceivedStream
A Stream implementation that yields DtmfReceived signals.
EvdoSignal
Signal information for CDMA EV-DO.
FirmwareImage
An installed firmware image.
FirmwareProxy
Client for the firmware features of a modem.
FirmwareUpdateSettings
The details of a firmware update method.
GsmSignal
Signal information for GSM and GPRS.
KernelEvent
A kernel event for Manager.ReportKernelEvent.
LocationProxy
Client for the location features of a modem.
LteSignal
Signal information for LTE.
ManagerProxy
Client for the manager object of ModemManager.
MessagingAdded
A Added signal.
MessagingAddedArgs
Added signal arguments.
MessagingAddedStream
A Stream implementation that yields Added signals.
MessagingDeleted
A Deleted signal.
MessagingDeletedArgs
Deleted signal arguments.
MessagingDeletedStream
A Stream implementation that yields Deleted signals.
MessagingProxy
Client for the SMS features of a modem.
Modem3gppFacility
Facilities that a PIN can lock.
Modem3gppNetworkRejection
The last network rejection during registration.
Modem3gppNr5gRegistrationSettings
The 5G registration settings of a device.
Modem3gppProxy
Client for the 3GPP features of a modem.
ModemAccessTechnology
Access technologies that a modem uses on the network.
ModemCapability
Generic families of access technologies that a modem supports.
ModemFirmwareUpdateMethod
Firmware update procedures that a modem supports.
ModemLocationAssistanceDataType
Types of assistance data for a GNSS engine.
ModemLocationSource
Sources of location information.
ModemMode
Generations of access technologies that a modem may use.
ModemProxy
Client for a modem.
ModemStateChanged
A StateChanged signal.
ModemStateChangedArgs
StateChanged signal arguments.
ModemStateChangedStream
A Stream implementation that yields StateChanged signals.
NetworkScanResult
A network that Modem3gpp.Scan found.
NetworkTimeChanged
A NetworkTimeChanged signal.
NetworkTimeChangedArgs
NetworkTimeChanged signal arguments.
NetworkTimeChangedStream
A Stream implementation that yields NetworkTimeChanged signals.
NetworkTimezone
The timezone that the network reports.
Nr5gSignal
Signal information for 5G NR.
OmaFeature
OMA device management features.
OmaProxy
Client for the OMA device management features of a modem.
ProfileManagerProxy
Client for the connection profiles of a modem.
SarProxy
Client for the SAR power features of a modem.
SessionStateChanged
A SessionStateChanged signal.
SessionStateChangedArgs
SessionStateChanged signal arguments.
SessionStateChangedStream
A Stream implementation that yields SessionStateChanged signals.
SignalProxy
Client for the extended signal quality of a modem.
SignalThresholds
The thresholds for Signal.SetupThresholds.
SimProxy
Client for a SIM, USIM or RUIM card.
SimpleConnectProperties
The settings for Simple.Connect.
SimpleProxy
Client for the simple connection interface of a modem.
SimpleStatus
The result of Simple.GetStatus.
SmsProperties
The properties of a new SMS message for Messaging.Create.
SmsProxy
Client for one SMS message.
TimeProxy
Client for the network time of a modem.
UmtsSignal
Signal information for UMTS.
Updated
A Updated signal.
UpdatedStream
A Stream implementation that yields Updated signals.
UssdProxy
Client for the USSD features of a modem.
VoiceProxy
Client for the voice features of a modem.

Enums§

BearerAccessTypePreference
The access type that a 5G bearer prefers.
BearerIpMethod
How to configure the IP address of a bearer.
BearerMultiplexSupport
Whether a bearer uses a multiplexed network link.
BearerProfileSource
Who created a connection profile.
BearerType
The type of a bearer.
CallDirection
The direction of a call.
CallState
The state of a call.
CallStateReason
The reason for a state change of a call.
CbmState
The state of a cell broadcast message.
CdmaActivationError
The error of a CDMA activation.
CellType
The access technology of a cell.
FirmwareImageType
The type of a firmware image.
KernelEventAction
The action of a kernel event.
LogLevel
The logging verbosity of the daemon.
Modem3gppDrxCycle
The DRX cycle of a 5G device.
Modem3gppEpsUeModeOperation
The UE mode of operation for EPS.
Modem3gppMicoMode
The MICO mode of a 5G device.
Modem3gppNetworkAvailability
The availability of a network that a scan found.
Modem3gppPacketServiceState
The state of the packet service.
Modem3gppRegistrationState
The 3GPP registration state.
Modem3gppSubscriptionState
The state of the subscription of an account.
Modem3gppUssdSessionState
The state of a USSD session.
ModemBand
A radio frequency band.
ModemCdmaActivationState
The CDMA activation state.
ModemCdmaRegistrationState
The CDMA registration state.
ModemCdmaRmProtocol
The protocol of the CDMA Rm interface.
ModemLock
The lock that a modem waits for.
ModemPortType
The kind of a port of a modem.
ModemPowerState
The power state of a modem.
ModemState
The overall state of a modem.
ModemStateChangeReason
The reason for a state change of a modem.
ModemStateFailedReason
The reason for the failed state of a modem.
NetworkError
A network error that a registration or session setup returns.
OmaSessionState
The state of an OMA device management session.
OmaSessionStateFailedReason
The reason for the failure of an OMA session.
OmaSessionType
The type of an OMA device management session.
ProfileIndexField
The field that identifies a connection profile.
ServingCellType
The role of a serving cell in carrier aggregation.
SimEsimStatus
Whether an eSIM has profiles.
SimRemovability
Whether a SIM can be removed.
SimType
The kind of a SIM.
SmsCdmaServiceCategory
The CDMA service category of an SMS message.
SmsCdmaTeleserviceId
The CDMA teleservice of an SMS message.
SmsDeliveryState
The delivery state in a status report.
SmsPduType
The type of the PDUs of an SMS message.
SmsState
The state of an SMS message.
SmsStorage
A storage area for SMS messages.
SmsValidityType
The format of the validity period of an SMS message.