|
Introduction |
|
The article explains about the building blocks of Android telephony and how it works. |
|
Android Telephony architecture |
|
|
Android RIL Architecture |
|
Application: All the telephony related applications like Dialer, Call Tracker, SMS, MMS, GPRS, antenna signal indicator and etc, would c Ome into the This section. All these applications is started during the Android boot up. These applications'll is tied up with the Android telephony framework services. The telephony framework provides APIs to access the Phone. Framework Services: Telephony Framework is initialized and started during the system start up. All the queries from the application through API would directed to the Radio interface Layer of Android by these services. The service would keep tracking of the unsolicited commands from the modem. Unsolicited commands is the commands initiated from the modem. Radio Interface Layer: It is the bridge between Android phone framework services and the hardware. In other words, it's the protocol stack for telephone. The RIL consist of the primary components.
|
|
RIL Daemon |
|
Rild'll is initialized during the Android system start up. It would read the system property to find which library have to is used for Vendor RIL, provide the appropriate input for VE Ndor RIL and finally calls Ril_init function of Vendor RIL to map all the Vendor RIL functions to the upper layer. Each vendor RIL have ril_init function. |
|
Vendor RIL |
|
It's a library specific to each modem. In other words, we can call it as a driver to function the modem. The RIL daemon the Ril_init function with the device location (eg:/DEV/TTYS0). It would initiate the modem and returns Theril_radiofunctions structure contains the handles of radio functions |
|
Type structure { Intril_version; Ril_requestfunconrequest; Ril_radiostaterequestonstaterequest; Ril_supports Supports; Ril_canceloncancel; Ril_getversiongetversion; } ril_radiofunctions; |
|
|
ril_version : version of Android RIL onrequest : Call to Vendor RIL to make a ril_request. It must is completed with a call to Ril_onrequestcomplete (). It's always been called from the same thread, so returning here implies that the radio are ready to process another Comman D (whether or not the previous command have completed) supports : Return current Radio state. Radio_state_unavailable should be the initial state getversion: Version of Vendor RIL There is both forms of communications in Android RIL |
|
Solicited Commands: |
|
These is commands initiated from the upper layer. Like, Dialing/send SMS is the solicited commands from the upper layer to the RIL. Onrequestis the function for sending the solicited commands from the upper layer The following diagram describes the solicited call in Android |
|
|
Solicited call in Android |
|
Each onrequest call should end with Ril_onrequestcomplete. It is-to-send the response for the previous onrequest and to intimate we were ready for the next command. Refer ril.h for all the solicited commands |
|
Unsolicited commands |
|
These is the commands initiated from the modem to the upper layer. Like, Receive call/receive SMS is the commands. The Vendor RIL have to continuously monitor, the device for unsolicited command from the modem. The following diagram describes the unsolicited call in Android |
|
|
Unsolicited call in Android |
|
Implementation of Vendor RIL |
|
Android is providing the basic vendor RIL with minimum feature set (Reference-ril). It is good to start with the that reference code. Compile the Vendor RIL as a shared library with the following style Libril-<companyname>-<ril version>.so Libril-all the Vendor Ril Library should start with this |
|
Vendor RIL Configuration: |
|
Replace the following line in the Init.rc file Serviceril-daemon/system/bin/rild With Serviceril-daemon/system/bin/rild-l/system/lib/libreference-ril.so â €? "-d/dev/ttysx Commands after "-" would be is input for Vendor Ril. |
|
Here is sample log of sending a SMS |
|
D/sms (1962): SMS Send size=0time=1319439322559 D/rilj (1962): [0312]> send_sms D/ril (1814): Onrequest:send_sms D/at (1814): Mux[primary]: at> at+cmgs=14 D/at (1814): Mux[primary]: at<> D/at (1814): At> 0001000a814978045948000002c834^z D/at (1814): Mux[primary]: at< q:31,0 D/at (1814): Mux[primary]: at< +cusd:0, "Your Last Call charge was Rs 0.5000 and current Balance is 47.8770 and EXP is 25/09/21. Love SPL 6 Caller tunes for Jd D/RILC (1814): Unsolicited Response!!! D/rilj (1962): [unsl]< UNSOL_ON_USSD 0 D/at (1814): Mux[primary]: at< ", 15 D/at (1814): Mux[primary]: at< +cmgs:219 D/at (1814): Mux[primary]: at< OK |
|
|
|