Quectel Android RIL Driver User Guide V1.5
User Manual: Pdf
Open the PDF directly: View PDF
.
Page Count: 19
| Download | |
| Open PDF In Browser | View PDF |
Android RIL Driver User Guide GSM/GPRS/UMTS/HSPA/LTE Module Series Rev. Android_RIL_Driver_User_Guide_V1.5 Date: 2016-08-23 www.quectel.com GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide Our aim is to provide customers with timely and comprehensive service. For any assistance, please contact our company headquarters: Quectel Wireless Solutions Co., Ltd. Office 501, Building 13, No.99, Tianzhou Road, Shanghai, China, 200233 Tel: +86 21 5108 6236 Email: info@quectel.com Or our local office. For more information, please visit: l e t l c a e i t u n Q ide f n o C http://www.quectel.com/support/salesupport.aspx For technical support, or to report documentation errors, please visit: http://www.quectel.com/support/techsupport.aspx Or email to: Support@quectel.com GENERAL NOTES QUECTEL OFFERS THE INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION PROVIDED IS BASED UPON CUSTOMERS‟ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO CHANGE WITHOUT PRIOR NOTICE. COPYRIGHT THE INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF QUECTEL CO., LTD. TRANSMITTING, REPRODUCTION, DISSEMINATION AND EDITING OF THIS DOCUMENT AS WELL AS UTILIZATION OF THE CONTENT ARE FORBIDDEN WITHOUT PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF DAMAGES. ALL RIGHTS ARE RESERVED IN THE EVENT OF A PATENT GRANT OR REGISTRATION OF A UTILITY MODEL OR DESIGN. Copyright © Quectel Wireless Solutions Co., Ltd. 2016. All rights reserved. Android_RIL_Driver_User_Guide Confidential / Released 1 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide About the Document History l e t l c a e i t u n Q ide f n o C Revision Date Author Description 1.0 2015-02-27 Carl YIN Initial 1.1 2015-03-25 Carl YIN Updated supported products 1.2 2015-04-07 Kent XU Added Zero Packet feature in Section 3.3.3. 1.3 2015-07-10 Kent XU 1. 2. Added GSM modules in Supported Products Added Android 5.x in Supported Android Versions 1.4 2016-06-21 Carl YIN/ Neo HOU 1. 2. Added EC21&EC25 in Supported Products Added FAQ 1.5 2016-08-23 Kent XU Added EC20 R2.0 in Supported Products Android_RIL_Driver_User_Guide Confidential / Released 2 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide Contents About the Document ................................................................................................................................ 2 Contents .................................................................................................................................................... 3 Table Index ............................................................................................................................................... 4 Figure Index .............................................................................................................................................. 5 1 Introduction ....................................................................................................................................... 6 1.1. Directory Structure ..................................................................................................................... 6 2 Overview of Android RIL Driver ....................................................................................................... 7 2.1. Supported Products ................................................................................................................... 7 2.2. Supported Functions ................................................................................................................. 7 2.3. Supported Android Versions ...................................................................................................... 8 3 RIL Integration ................................................................................................................................... 9 3.1. RIL Driver Structure ................................................................................................................... 9 3.2. PPP Configuration in Linux Kernel .......................................................................................... 10 3.3. USB Drivers for UC15/UC20/UGxx/EC20/EC21/EC25/EC20 R2.0 ......................................... 10 3.4. RIL Driver Integration .............................................................................................................. 10 3.5. System Configuration ...............................................................................................................11 3.5.1. Configure "init.rc" ............................................................................................................11 3.5.2. Modify the Right of RILD ................................................................................................ 13 4 Debugging Method .......................................................................................................................... 14 4.1. Method of Catching LOG ......................................................................................................... 14 4.2. Some Common LOG Tags ...................................................................................................... 14 5 FAQ .................................................................................................................................................. 16 5.1. How to Set APN ....................................................................................................................... 16 5.2. Quectel RIL Does Not Work .................................................................................................... 17 5.3. Cannot Send or Receive Short Message ................................................................................ 17 6 Appendix .......................................................................................................................................... 18 l e t l c a e i t u n Q ide f n o C Android_RIL_Driver_User_Guide Confidential / Released 3 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide Table Index TABLE 1: SUPPORTED PRODUCTS ....................................................................................................... 7 TABLE 2: SUPPORTED FUNCTIONS ...................................................................................................... 7 TABLE 3: SUPPORTED ANDROID VERSIONS ....................................................................................... 8 TABLE 4: TERMS AND ABBREVIATIONS .............................................................................................. 18 l e t l c a e i t u n Q ide f n o C Android_RIL_Driver_User_Guide Confidential / Released 4 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide Figure Index FIGURE 1: RIL DRIVER STRUCTURE ..................................................................................................... 9 FIGURE 2: RIL FILES .............................................................................................................................. 11 FIGURE 3: EDIT ACCESS POINT .......................................................................................................... 16 l e t l c a e i t u n Q ide f n o C Android_RIL_Driver_User_Guide Confidential / Released 5 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 1 Introduction This document mainly introduces how to integrate RIL Driver into Android OS of your target machine and how to modify the configuration files for starting RIL service and PPP dialling. l e t l c a e i t u n Q ide f n o C 1.1. Directory Structure The file structure of Quectel RIL Driver Package: ├── ├── ├── ├── ├── ├── ├── ├── ├── ├── └── Android.mk atchannel.c atchannel.h at_tok.c at_tok.h misc.c misc.h ql-pppd.c gsm0710muxd_bp.c quectel_ril_porting_guide.txt reference-ril.c Android_RIL_Driver_User_Guide Confidential / Released 6 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 2 Overview of Android RIL Driver 2.1. Supported Products l e t l c a e i t u n Q ide f n o C Table 1: Supported Products Product UC20 UC15 UGxx Support or Not YES YES YES EC20/EC21/EC25/EC20 R2.0 YES Quectel GSM Modules YES 2.2. Supported Functions Table 2: Supported Functions Function SMS VOICE CALL Support or Not YES YES DATA SERVICE YES SIM TOOL KIT NO PHONEBOOK YES Android_RIL_Driver_User_Guide Confidential / Released 7 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 2.3. Supported Android Versions Presently, Quectel RIL driver supports the following Android versions: Table 3: Supported Android Versions Versions Support or not Android 2.x Android 3.x Android 4.x Android 5.x YES l e t l c a e i t u n Q ide f n o C Android_RIL_Driver_User_Guide YES YES YES Confidential / Released 8 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 3 RIL Integration The first part describes the RIL driver structure. The following parts introduce how to set up Android system with the RIL driver. l e t l c a e i t u n Q ide f n o C 3.1. RIL Driver Structure Android RIL (Radio Interface Layer) provides the abstract layer between Telephony service and Radio hardware. The following illustration describes the RIL‟s position in the Android architecture. Applications Phone Application Call Tracker Application Framework SMS Dispatch Service Tracker Data Tracker Phone Java/android/telephony RIL Java/android/telephony/gsm Unix Libraries (User Space) Radio Daemon (rild) /commands/rild Vendor RIL System/libs/libril-vendor.so Packet Service Linux Kernel Linux IP Stack Voice and Control Baseband Packet Driver PPP.for example Baseband Figure 1: RIL Driver Structure Android_RIL_Driver_User_Guide Confidential / Released 9 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide The RIL in Android is located between Kernel and Application Framework. It is divided into two parts, one is RILD and the other is Vendor RIL. RILD is responsible for the communication between Socket and Application Framework. Vendor RIL is responsible for communication with Radio via AT command channel and Packet data channel (PDCH). AT command channel is used for communicating with Radio directly and PDCH is used for data service. The java framework of RIL is divided into two parts too. One is RIL module and the other is Phone module. The RIL module is used to communicate with the lower RILD. The Phone module directly provides phone function interfaces to application through which you can call to realize the phone functions. l e t l c a e i t u n Q ide f n o C 3.2. PPP Configuration in Linux Kernel You need to configure the kernel to support PPP dial up. For detailed operation procedures, please refer to chapter 3.6 Configure Kernel to Support PPP in Quectel WCDMA<E Linux USB Driver User Guide. 3.3. USB Drivers for UC15/UC20/UGxx/EC20/EC21/EC25/EC20 R2.0 If you are using Quectel GSM modules, please skip this section. You need to configure the kernel to support UC15/UC20/UGxx/EC20/EC21/EC25/EC20 R2.0 modules. For detailed operation procedures, please refer to the following chapters in Quectel WCDMA<E Linux USB Driver User Guide: 3.2. USB Serial Driver for UC15/UC20/EC20/EC21/EC25/EC20 R2.0 3.3. CDC ACM Driver for UGxx 3.4. GobiNet Driver for UC20/EC20/EC21/EC25/EC20 R2.0 3.5. QMI WWAN Driver for UC20/EC20/EC21/EC25/EC20 R2.0 3.4. RIL Driver Integration Presently, Quectel provides RIL driver in the form of source code. You only need to copy the RIL driver source code files to the correct path on your project directory, and then recompile the Android system. Android_RIL_Driver_User_Guide Confidential / Released 10 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide The source path of the RIL driver files in RIL Driver package is: Driver package/reference-ril The destination path in Android system is: ($Android_src)/hardware/ril/ Please use following command to update these files‟ date stamp to make sure they will be compiled. touch hardware/ril/* l e t l c a e i t u n Q ide f n o C After you recompile the Android system successfully, please make sure the following files exists in folder "out/target/product/($your_board_name)/system". Figure 2: RIL Files NOTE Quectel would not give the PPP script, because we have integrated the PPP script in the source code of the RIL driver. And the chat, ip-up and ip-down would be generated when the RIL driver has been compiled. 3.5. System Configuration In order to use the RIL driver normally, you also have to modify some Android system configuration files. 3.5.1. Configure "init.rc" Add service "ril-daemon" in "init.rc": If you are using UC15/UC20/UGxx/EC20/EC21/EC25/EC20 R2.0 modules which are accessed by USB interface, please add the following service in "init.rc": service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so class main Android_RIL_Driver_User_Guide Confidential / Released 11 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide socket rild stream 660 root radio socket rild-debug stream 666 radio system user root group radio cache inet misc audio sdcard_rw log If you are using GSM modules which are accessed by UART interface, please add the following service in "init.rc": service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so -- -d–B –C class main socket rild stream 660 root radio socket rild-debug stream 666 radio system user root group radio cache inet misc audio sdcard_rw log l e t l c a e i t u n Q ide f n o C The following parameter needs to be configured: -d The name of UART port you are using. For example: /dev/ttyS1 It is optional to configure the following two parameters: -B The speed of UART port. For example: 115200, 230400, 460800bps. The default baud rate is 115200bps. -C 1: open hardware flow control 0: close hardware flow control Hardware flow control is closed by default. The "init.rc" file may be located in different paths according to different projects, for example: system/core/rootdir/init.rc device/fsl/imx6/init.rc device/ti/am335xevm_sk/init.am335xevm.rc device/generic/x86/init.rc device/samsung/smdkv210/init.smdkv210_sdmmc.rc Android_RIL_Driver_User_Guide Confidential / Released 12 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 3.5.2. Modify the Right of RILD RILD (ril-daemon) requires root privilege. So you need to comment out the function switchUser() in the file "($Android_src)/hardware/ril/rild/rild.c": OpenLib: #endif //switchUser(); dlHandle = dlopen(rilLibPath, RTLD_NOW) l e t l c a e i t u n Q ide f n o C Android_RIL_Driver_User_Guide Confidential / Released 13 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 4 Debugging Method 4.1. Method of Catching LOG 1) l e t l c a e i t u n Q ide f n o C Catch the log of RIL module by typing the following command in window‟s CMD tool: adb logcat –b radio –v time 2) Catch the log of Android system by typing the following command in window‟s CMD tool: adb logcat –v time 3) Sometimes, you may want to make tests on lots of devices or for a long time, and it is not convenient to connect all devices with PC via USB cables. In this case, you can log file by the following command: adb shell logcat –b radio –v time –f & The character „&‟ makes the „logcat‟ process running in background, so you can disconnect your devices. 4) When you finish your tests, you can fetch log files from devices to local directory by the following command: adb pull 4.2. Some Common LOG Tags RIL /hardware/ril/reference-ril/refereince-ril.c AT /hardware/ril/reference-ril/atchannel.c RILD /hardware/ril/rild/rild.c RILC /hardware/ril/libril/ril.cpp RILB /frameworks/base/telephony/java/com/android/internal/telephony/BaseCommands.java Android_RIL_Driver_User_Guide Confidential / Released 14 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide RILJ /frameworks/base/telephony/java/com/android/internal/telephony/gsm/RIL.java GSM /frameworks/base/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java l e t l c a e i t u n Q ide f n o C Android_RIL_Driver_User_Guide Confidential / Released 15 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 5 FAQ 5.1. How to Set APN l e t l c a e i t u n Q ide f n o C If the dialling process cannot go on, it is quite possible that the APN has not been set yet. The APN can be set in Android UI: Settings WIRELESS & NETWORKS More… Mobile Networks Access Point Names If you see nothing in Access Point Names, it indicates that the APN has not been set. In such case, you should add a new APN to the system. The following is an example which shows the access point editing interface. Please note that the Access Point Name varies with the operator and SIM card. Figure 3: Edit Access Point Android_RIL_Driver_User_Guide Confidential / Released 16 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 5.2. Quectel RIL Does Not Work There are many reasons why Quectel RIL does not work. The following are some common causes. 1. RIL daemon is not running Use command “getprop init.svc.ril-daemon” to check RIL daemon status. If non-value, Stopped or Restarting is returned, it indicates that RIL daemon is not running. The expected return value should be Running. 2. RIL library is not loaded correctly l e t l c a e i t u n Q ide f n o C Check the RIL-daemon service definition in init.rc through command “cat /init.rc | grep ril-daemon”. The expected result should be “service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so”. Check the arguments, word spelling, blank space, etc. to make sure the RIL library is loaded correctly. 3. Cannot access USB serial port device file Use command “ls –l /dev/ttyUSB*” to check the access right of the device file. Use command “getenforce” to check whether the SELinux has been enabled. Command “setenforce 0” can disable the SELinux. 4. The RIL library is not provided by Quectel Use command “getprop gsm.version.ril-impl” to check Quectel RIL version, and the return value should start with “Quectel_Android_RIL_SR”. If not, the RIL library is not provided by Quectel. 5.3. Cannot Send or Receive Short Message Use command “getprop telephony.sms.receive” or command “telephony.sms.send” to check whether the system has disabled SMS receive/send function. If the return value is false, it indicates that the SMS receive/send function has been disabled. If non-value is returned, you should check frameworks\base\core\res\res\values\config.xml (first check the manufacturer override config file) to see config_sms_capable. If the config_sms_capable config in the config.xml is false just like false , change it to true. Android_RIL_Driver_User_Guide Confidential / Released 17 / 18 GSM/GPRS/UMTS/HSPA/LTE Module Series Android RIL Driver User Guide 6 Appendix Table 4: Terms and Abbreviations Abbreviation GSM MS PID RIL TA VID WCDMA Description l e t l c a e i t u n Q ide f n o C Global System for Mobile Communications Mobile Station Product ID Radio Interface Layer Terminal Adapter Vendor ID Wideband Code Division Multiple Access Android_RIL_Driver_User_Guide Confidential / Released 18 / 18
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Has XFA : No Language : zh-CN Tagged PDF : Yes XMP Toolkit : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-20:48:00 Format : application/pdf Creator : clare Create Date : 2016:08:23 13:25:42+08:00 Creator Tool : Microsoft® Word 2010 Modify Date : 2016:08:23 13:50:10+08:00 Metadata Date : 2016:08:23 13:50:10+08:00 Producer : Microsoft® Word 2010 Document ID : uuid:e512fdfa-9a94-4f1f-98d0-40dfaa52f339 Instance ID : uuid:2120d211-69a4-4f1f-ae91-8e873ca9c1da Page Count : 19 Author : clareEXIF Metadata provided by EXIF.tools