Updated June 2021
ModemManager1.Modem object appears, a Modem class instance is constructed.Modem instance.Modem class is a helper class for parsing ModemManager1.Modem CurrentCapabilities and Ports properties.Cellular Device exists, a new instance is created.Cellular Device is updated with the new Modem properties.Cellular instance may outlive the Modem instance and is only destroyed when Cellular is disabled or on Shutdown. This ensures a consistent user experience during a SIM swap or slot switch operation (which creates a new ModemManager.Modem` object).base::RefCounted Device class instance. Its lifetime is managed by the DeviceInfo class.Cellular instance is created, it is registered with the Manager class which handles startup, shutdown, policy, power events, and global properties.Cellular maintains a state machine tracking the state of the ModemManager1.Modem object.ModemManager1.Modem object is done through the CellularCapability helper class, owned by Cellular.CellularCapability3gpp owns a number of proxies for communicating with ModemManager1 interfaces (3gpp, Signal, Simple, Location) and the ModemManager1.Modem object.CellularCapability3gpp::Start is called, invoking the ModemManager1.Modem.Enable routine. On success this sets Cellular::State to Enabled and starts the Modem registration process.ModemManager provides a list of paths for available SIMs (on devices that support multi-sim), and the path of the currently active SIM. All available SIM properties are requested and provided to Cellular as a vector of SimProperties.Cellular::State becomes Registered, allowing the connect requests to be handled. (See Connect state machine for details).CellularServiceProvider determines which CellularService instances to load based on the available SimProperties.Cellular Service properties are always stored in the Device Profile.SimProperties, one entry for each active SIM slot, when they become available. At this point CellularServiceProvider ensures that correct service instances are loaded as follows:SimProperties entry:CellularService instance matching the SIM ICCID exists, it is updated with the current Cellular Device state.Profile, it is loaded and a new CellularService instance is created.Profile are loaded and CellularService instances are created if necessary.CellularService entries remain that do not match any SimProperties entries, they are destroyed.base::RefCounted Service class instance. Its lifetime is managed by the CellularServiceProvider class.CellularService instance is created, it is registered with the Manager class.CellularService uses the Cellular.ICCID property to uniquely identify service instances.CellularService registers Cellular specific Service properties.CellularService forwards Connect and Disconnect requests to the Cellular class.Connect requests come from a CellularService with an identifying ICCID.
CellularCapability3gpp::Connect is called which sets Roaming properties and builds and a list of APN properties to try.ModemManager1.ModemSimple.Connect with the first APN in the try list.ModemManager1.ModemSimple.Connect is called with subsequent APN entries in the try list.ModemManager1.ModemSimple.Connect is called once with an empty APN.When a Connect request succeeds:
Service::ConnectState::kStateConnected.kStateOnline.Portal state.When a Connect request fails:
Service::ConnectState::kStateFailure.Service::ConnectFailure string.cellular_carrier_entitlement.md