1. RIL(Radio Interface Layer) Architecture
RIL is short name for Radio Interface Layer. The ril is divided into three rild, libril, reference-ril. Rild is a executable file,it can be run in linux, and call by init.rc script to run the rild. RIL sourcecode is under the directory as following:root/hardril/ril. The followingpicture show the position of RIL and function for other application.

Picture 1 RIL Architecture
In the picture, there is some information need to show. Vendor ril may be implementedby MODEM manufactory.They may use thefollowing method to implement.
a) Using AT command, this means that the commandshould be sent via COM or UART. So the command may sent by tty device. Thisimplementation recommend by GOOGLE, so in the Android source code, the ril isimplemented by this way.
b) Using message queue, this depending on themanufactory, they will develop their own method to handle the message. Butanyway, they may use the process communication, such as share memory(MemoryMapping), IO pipe(A pipe connect the AP and MODEM). This method need moredeveloping time due to we can not use the modem supporting AT command.(Themodem are supported the AT commands in 3GPP 27.007, the protocols is standardizedby 3GPP). The following, we will descript the ril boot using AT command method.
2. RILProgress of Booting up

The rildis executed by script init.rc. You can find the script in the directory/system/core/rootdir/init.rc. When you open the script and search the key words“rild”, you can findthe following code.
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log
So the rildwill be compile as an executable program and run by linux sys

本文详细介绍了Android的Radio Interface Layer(RIL)架构,包括RIL的三个组成部分:rild、libril和reference-ril。RIL主要通过AT命令与MODEM交互。接着,文章阐述了RIL的启动过程,包括参数检查、库加载、事件循环创建、RIL_Init函数获取及调用以及RIL_register等步骤。整个启动过程中,RIL与AP之间的通信和多通道管理对于实现实时通信至关重要。
最低0.47元/天 解锁文章
1241





