Skip to content

mmrs: 3gpp registration info #409

@cachebag

Description

@cachebag

expose 3gpp network registration details from Modem.Modem3gpp interface.

api

pub struct RegistrationInfo {
    pub operator_code: String,      // mcc+mnc
    pub operator_name: String,
    pub registration_state: RegistrationState,
}

pub enum RegistrationState {
    Idle,
    Home,
    Searching,
    Denied,
    Unknown,
    Roaming,
}

pub async fn registration_info(&self) -> Result<RegistrationInfo>;

properties from Modem3gpp

  • OperatorCode — mcc+mnc string
  • OperatorName
  • RegistrationStateMM_MODEM_3GPP_REGISTRATION_STATE_*

roaming detection

pub async fn is_roaming(&self) -> Result<bool> {
    Ok(self.registration_info().await?.registration_state == RegistrationState::Roaming)
}

useful for bearer config allow_roaming decisions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestmmrsmodemmanager bindings cratemodemmodem device and bearer management

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions