Hello all, I continue the Powered saga with Nokia N900 phone as an example use case. N900 is a Linux phone running Maemo 5, it has a Nokia modem with ISI interface.
When N900 is powered on, it boots the Linux. First thing in user space are the system services, things like system dbus, hal, ohm. Also, the daemons controlling the modem, sscd and csd are started immediately after the system dbus gets started. (csd provides roughly the same functionality as ofono does, sscd powers on the modem and controls its RF state.) Next step is to start the X server and launch the X session. The first UI component started after the boot is system-ui. If phone is in offline or "flight" mode, system-ui asks whether user wants to get online. If so, it changes the system mode to "normal". Next thing is pin-query UI. The PIN query checks if there is SIM card which requires a PIN or PUK code. After giving the PIN/PUK code to the modem, it also checks if additional codes like device unlocking code is needed and prompts for them. Next thing is localization wizard, known as startup-wizard. If it detects that a new SIM card is inserted into the device it will prompt the user about the user interface language and the regional settings with defaults based on the information read from the SIM card. The normal X session is then started with home screen. The session includes the Telepathy framework used to handle calls and messaging. A Telepathy component called Mission Control loads the UI and logging components and the protocol-specific connection managers. Only after they are ready to handle an incoming call, the modem is given permission to register to the cellular network. N900 modem has three runlevels or states used to control modem, POWER_OFF, RF_INACTIVE and NORMAL. Power off means real power off, it is only used when whole device is powered off. The rf inactive is also pretty self-explanatory. The normal state activates the 3G/UMTS radios and the software controlling it. The first thing the radio resource control (RRC) does is registering the modem to the network. If the SIM is ready, it registers using IMSI. If not, it registers using IMEI. In latter case, the network only provides "limited services". Only service available in this limited service mode is emergency call. There are two conditions when N900 modem enters the normal mode (turn on the modem radios and register to the network): 1) SIM is ready (there is a SIM card inserted in the device, a PIN code is entered), device is not in flight mode and call UI is ready to accept an incoming call 2) an emergency call is made On N900, emergency calls can be initiated by three UI components: normal call UI, PIN query UI, and screen lock UI. You can make an emergency call if you enter a valid emergency number like 112 or 911 as pin code or lock code. This is not a N900 feature, but a type approval requirement for cellular phones. These UI components need to access the list of valid emergency numbers and a way to initiate an emergency call regardless of the RF state of the modem. It makes no sense to enable cellular radio just in order to check if a screen lock code entered by user is an emergency call number. When the UI component requests an emergency call, the csd call component makes things required to place the call: enables RF (and registers to network), detaches GPRS and then lets the modem dial the emergency call. So, based on N900 experience, the current "Powered" property does not serve any purpose in RF control. The only interesting use case for RF control is in post-sim state. If the modem is on, but there is no SIM card or it requires a PIN code, modem should not enable RF. However, the atoms required to initiate emergency call should be there. The emergency call can and probably should override the normal power control. In other words, if RF is disabled for any reason, it gets enabled for emergency calls but only during the call. Many other settings beside RF on/off gets overridden during the call. If registration is disabled, it gets enabled. If manual registration is configured, and that network rejects the registration attempt, modem registers to an another network. -- Pekka.Pessi mail at nokia.com _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono