UC20 Android RIL Driver User Guide

Similar documents
Android RIL Driver User Guide Version 1.0

UC20 Linux USB Driver User Guide

UC20 WinCE USB Driver

WCDMA Audio Player Application Note

GSM Recording AT Commands Manual

QuecLocator AT Commands Manual

WCDMA UGxx PPP Application Note

BC95 Firmware Upgrade via Code Loader User Guide

M95 Dual SIM Application Notes

EC2x&EG9x&EM05 PPP Application Note

BG96 PPP Application Note

GSM Audio Player Application Note

UC15 SSL AT Commands Manual

SIMCom_3G_Linux_Driver_Applica tion Note_V1.00

L76-L I2C Application Note

Guide to Kernel Driver Integration in Android for Huawei Modules. Issue Date

Quectel Cellular Engine

UC20 FILE AT Commands Manual

EC20 SSL AT Commands Manual

Guide to Kernel Driver Integration in Android for Huawei Modules. Issue Date

EC20 MMS AT Commands Manual

GSM QuecCell AT Commands Manual

HUAWEI Module. Android RIL Integration Guide. Version 3.4. Date

Firmware Upgrade Tool Lite User Guide. Firmware_Upgrade_Tool_Lite_V1.1

How to use Linux driver

BG96 SSL AT Commands Manual

EC20 Wi-Fi Application Note

GSM. Quectel Cellular Engine. Firmware Update Application Note. Fw_Update_Application_Note_V3.1

Quectel Cellular Engine

Document Name: GPRS Startup. GPRS Startup_V01.00 Status: Created

How to use the SIM7100 Module in Linux

GSM DTMF Application Note

UART. SIM5360 UART Multiplexer Application Note. SIM5360_UART_Multiplexer_Application_Note_V

GSM POP3 AT Commands Manual

BC95-G&BC68 MQTT Application Note

Guide to Kernel Driver Integration in Linux for Huawei Modules. Issue 2.0. Date

SIMCom_3G_HTTP_Application Note_V1.00

Technical Note. TN_134 FTDI Android D2XX Driver

Delta Package Update Application Note

SIM7X00 Series_SAT_Application Note_V1.00

Quectel Cellular Engine

SIM28_EVB kit_user Guide_V1.02

GSM EVB User Guide. GSM/GPRS/UMTS/HSPA/NB-IoT Module Series. Rev. GSM_EVB_User_Guide_V3.4. Date:

SIMCom_3G_CSD_Application Note_V1.00

SIM7000 Series_NTP_Application Note_V1.00

BG96 MQTT Application Note

SIMCOM WCDMA Wireless Module. xx_sleep_mode_application_note

SIM7000 Series_HTTP_Application Note_V1.01

UART Application Note

USB Driver. Installation Guide for C2 and EV3 Devices

EC2x&EG9x&EM05 HTTP(S) AT Commands Manual

HTTP Application Note

Application Note. SIM7100_SMS_Application_Note_V

GSM/GPRS/GPS Tracker GL300 User Manual

SIMCom_3G_MQTT_Application Note_V1.00

M10. Quectel Cellular Engine. EVB User Guide M10_EVB_UGD_V1.00

SIM5360 Network Cell Info Application Note

GSM/GPRS/GPS Tracker GL300 User Manual

ofono Open-source telephony Rémi Denis-Courmont Aki Niemi Maemo summit October 10th 2009 Nokia Devices R&D Maemo Software

SIM7100_SIM7500_SIM7600 LBS_Application Note_V1.00

User Manual for ZTE Corporation s Data Card under Linux System

Quectel Cellular Engine

Audio LINE-IN input application. AN_SIM900_Audio LINE-IN Input_V1.01

Quectel Cellular Engine

SMS Application notes AN_SMS_V1.01

GSM. Quectel Cellular Engine. GSM FILE AT Commands GSM_FILE _ATC_V1.4

SSL Application Note. SIM5360_SSL_Application_Note_V0.01

SIM800C-DS_Application Note _V1.00

TCP/IP Application Note

SIM900_DTMF EmbeddedAT Application Note_V1.01

Smart Machine Smart Decision. R700_User Guide_V1.05 1

UART Dload Application Note

SIMCom_SIM800H_EAT_flash_Tool _User Manual_V1.01

VL3000 Manager Tool User Guide V1.05

SIM900_Multiplexer Manual_Application Note_V1.3

SIM5360_GPIO_Demo Note_V1.00

AT Commands Set SIM20_ATC_V1.02

SIM20_AT Command Manual_V1.04

Using USB Interface on Bitpipe

SIM7100 Network Cell Info Application Note

A9890A RAID Smart Array 6402 Controller Quick Installation Guide

SIM7000 Series_PING_Application Note_V1.00

Sinteso Test Installation Commissioning. Building Technologies. A6V _en--_a Control Products and Systems

N720 OpenLinux Software User Guide Version 1.0

GPS Application Note

Industrial Tri-band 3G Modem GTM-201-3GWA Series. User Manual

N720 OpenLinux Software User Guide Version 1.2

GSM. Quectel Cellular Engine. GSM TCPIP Recommended Process. GSM_TCPIP_Recommended_. Process_V1.2

Industrial Quad-band GPRS/GSM Modem GTM-201 Series. User Manual

SIM7100 TTS Application Note

How to use 3G data card on. UC-7400/IA241 Serials

USER MANUAL: 4G. The PiIoT is a WAN communications board which provides a 2G / 3G / 4G

Gemalto EHS6T-USB Terminal Starter Kit. Getting Started Guide

Mini PCIe_EVB kit_ User Guide_V1.00

WM DS28-EV1-REV2 Schematic and Layout WOLFSON DEVICE(S):

WM8805_6152_DS28_EV1_REV3 Schematic and Layout. WM8805_6152_DS28_EV1_REV3 Schematic and Layout. Customer Information 1 of 18 June 2007, Rev 3.

CDMA2000-1X Tracker GL300VC. User Manual. Application Notes: TRACGL300VCUM001 Revision:

SIM800H&L_ Secondary Reflow SMT _Guidelines_V1.00

Development Kit Manual SIM900D-EVB_UGD_V1.01

Development Kit Manual. SIM5360_EVB_User Guide_V1.02

Transcription:

UC20 Android RIL Driver User Guide UMTS/HSPA Module Series Rev. UC20_Android_RIL_Driver_User_Guide_V1.0 Date: 2013-06-18 www.quectel.com

Our aim is to provide customers with timely and comprehensive service. For any assistance, please contact our company headquarter: Wireless Solutions Co., Ltd. Room 501, Building 13, No.99, Tianzhou Road, Shanghai, China, 200233 Tel: +86 21 5108 6236 Mail: info@quectel.com Or our local office, for more information, please visit: http://www.quectel.com/support/salesupport.aspx For technical support, to report documentation errors, please visit: http://www.quectel.com/support/techsupport.aspx GENERAL NOTES QUECTEL OFFERS THIS 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 ARE SUBJECT TO CHANGE WITHOUT PRIOR NOTICE. COPYRIGHT THIS INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF QUECTEL CO., LTD. TRANSMITTABLE, REPRODUCTION, DISSEMINATION AND EDITING OF THIS DOCUMENT AS WELL AS UTILIZATION OF THIS CONTENTS 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 Wireless Solutions Co., Ltd. 2013. All rights reserved. UC20_Android_RIL_Driver_User_Guide / Released 1 / 15

About the document History Revision Date Author Description 1.0 2013-06-18 Clare CHEN Initial UC20_Android_RIL_Driver_User_Guide / Released 2 / 15

Contents About the document... 2 Contents... 3 Table Index... 4 Figure Index... 5 1 Introduction... 6 2 Introduction to Driver Software... 7 2.1. Driver Package... 7 2.1.1. Directory Structure... 7 2.1.2. Files Classification... 8 2.2. Driver Functionalities... 8 3 Introduction to System Setup... 9 3.1. RIL Driver Structure... 9 3.2. Add the Essential Components... 10 3.3. Add Device Driver... 10 3.4. RIL Driver Integration... 11 3.5. System Configuration... 11 3.5.1. To Implement SMS and VOICE CALL... 11 3.5.2. To Implement DATA SERVICE... 12 4 Debugging Method... 14 4.1. Method of Catching LOG... 14 4.2. Some Common LOG Tags... 14 5 Appendix A Reference... 15 UC20_Android_RIL_Driver_User_Guide / Released 3 / 15

Table Index TABLE 1: SUPPORTED FUNCTIONS... 8 TABLE 2: TERMS AND ABBREVIATIONS... 15 UC20_Android_RIL_Driver_User_Guide / Released 4 / 15

Figure Index FIGURE 1: RIL DRIVER PACKAGE STRUCTURE... 7 FIGURE 2: RIL DRIVER ARCHITECTURE... 9 UC20_Android_RIL_Driver_User_Guide / Released 5 / 15

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 and insert some script files for staring RIL service and PPP dialling. UC20_Android_RIL_Driver_User_Guide / Released 6 / 15

2 Introduction to Driver Software 2.1. Driver Package 2.1.1. Directory Structure The file structure of RIL driver package has published is shown as Figure 1. RIL Driver package Source Script Readme.txt Reference-ril Init.gprs-pppd Ip-up Ip-down Wcdma at_tok.c.... reference-ril.c Chat-wcdma-connect Chat-wcdma-disconnect Figure 1: RIL Driver Package Structure UC20_Android_RIL_Driver_User_Guide / Released 7 / 15

2.1.2. Files Classification RIL driver Directory Script for PPPD Script for CHAT Reference-ril Init.gprs-pppd, Ip-up, Ip-down, Wcdma Chat-wcdma-connect, Chat-wcdma-connect 2.2. Driver Functionalities When you installed and configured the RIL driver successfully, you can use the following functions in your Android operating system. Table 1: Supported Functions Function SMS VOICE CALL DATA SERVICE Support YES YES YES SIM TOOL KIT NO UC20_Android_RIL_Driver_User_Guide / Released 8 / 15

3 Introduction to System Setup The first part describes the RIL driver architecture. The rest introduces how to set up Android system with the RIL driver. 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 Application Framework Libraries (User Space) Call Tracker Phone Application SMS Dispatch Service Tracker Phone Java/android/telephony RIL Java/android/telephony/gsm Radio Daemon (rild) /commands/rild Vendor RIL System/libs/libril-vendor.so Unix Data Tracker Linux Kernel Linux IP Stack Packet Service Voice and Control Packet Driver PPP.for example Baseband Baseband Figure 2: RIL Driver Architecture UC20_Android_RIL_Driver_User_Guide / Released 9 / 15

The RIL in Android locates 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 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 user who can call them to realize the phone functions. 3.2. Add the Essential Components For the UC20 module, it adopts USB interface communicating with the target machine, and the function of the upper interface is a serial port, so system has to support the USB to serial port by adding the related kernel configuration items. The method is listed as follows: 1. Input commands in Terminal, to open the configuration window: #cd ($kernel_src) #make menuconfig //Locate in the Android kernel source code file directory //Open the interface of kernel configuration 2. Browse through the menus "Device Driver" "USB Support" "USB Serial Converter Support" and choose: "USB Generic Serial Driver" "USB driver for GSM and CDMA modems" 3. Save and exit. 4. Re-compile the kernel. 1. NOTE For the detailed operation, please refer to the document "UC20_Embedded_Linux_USB_Driver_User Guide_V1.0". 3.3. Add Device Driver Modify the source code file "option.c" in Android kernel by adding VID and PID of UC20, so that the OS can recognize it. UC20_Android_RIL_Driver_User_Guide / Released 10 / 15

The UC20 s VID and PID are listed as follows: VID 0x05c6 PID 0x9003 Open the file "option.c" in the path of "\drivers\usb\serial" and find the struct array "static structusb_device_idoption_ids[]". Insert "{USB_DEVICE (0x05c6, 0x9003)}," into the array, then save and close it. At last, re-compile the Linux kernel. 2. NOTE For the detailed operation, please refer to the document "UC20_Embedded_Linux_USB_Driver_User Guide_V1.0". 3.4. RIL Driver Integration At present, provides RIL driver in the form of source code. You only need to replace the RIL driver source code files into the correct path, and recompile the Android system. 1. The path of the RIL driver files in RIL Driver package is: RIL Driver package/source file/reference-ril 2. The replacement path in Android system is: ($Android_src)/hardware/ril/Reference-ril After the files have been replaced, you have to modify the system configuration so that the necessary services or processes can be loaded when the Android system started. 3.5. System Configuration In order to use the RIL driver normally, you also have to configure some Android system files. According to the functions you want, you can add or modify the related files selectively. 3.5.1. To Implement SMS and VOICE CALL Add the following strings in init.rc" that can start the RIL service when Android system started. Service ril-daemon /system/bin/rild -l /system/lib/ libreference-ril.so -- -d /dev/ttyusb2 socket rild stream 660 root radio socket rild-debug stream 660 radio system user root group radio cache inetmisc UC20_Android_RIL_Driver_User_Guide / Released 11 / 15

The path of the file "init.rc is "\rootfs_dir\init.rc". 3.5.2. To Implement DATA SERVICE provides six script files for DATA SERVICE. The files "Init.gprs-pppd" are used to start the PPPD process and the rest files are used for PPP dialling. The RIL driver creates PPP link finally by calling PPPD process, which is started by executing the script file "init.gprs-pppd". So, in addition to start RIL service, you have to add or modify the related script files to prepare for PPP dialling. The detailed steps are described as follows: 1. Add or Replace the Script Files 1) Insert the script files "Init.gprs-pppd","Ip-up", "Ip-down" into the path " \rootfs_dir\system\etc\ppp". 2) Insert the script files "Wcdma", "Chat-wcdma-connect", "Chat-wcdma-disconnect" into the path " \rootfs_dir\system\etc\ppp\peers". 2. Insert the Following Commands into the File "init.rc" #start script "init.gprs-pppd" Service pppd_gprs /etc/init.gprs-pppd /dev/ttyusb3 user root group radio cache inetmisc disabled oneshot 3. Set the Port Property The RIL driver needs to operate the port devices, so the port attribute of the devices should be set for read/write. The RIL source code that is provided by changed the attribute of /dev/ttyusb2 (AT channel) and /dev/ttyusb3 (Modem channel) by default, therefore, it is necessary to modify it on your real port. 4. Set the Right of the File "init.gprs-pppd" RIL driver needs to perform the script "init.gprs-pppd" in the stage of data networking, so the operation permissions of the script file should be set to be executable. Modify the file "android_filesystem_config.h" and insert the following black string into it. staticstructfs_path_configandroid_files[] = { { 00777, AID_ROOT, AID_SHELL, "system/etc/ppp/init.gprs-pppd" }, UC20_Android_RIL_Driver_User_Guide / Released 12 / 15

}; The path of the file "init.gprs-pppd" is "../system/core/include/private/". UC20_Android_RIL_Driver_User_Guide / Released 13 / 15

4 Debugging Method 4.1. Method of Catching LOG Catch the log of RIL module by typing the following commands in super terminal: Adb shell Logcat b radio& Catch the log of Android system by typing the following commands in super terminal: Adb shell Logcat& 4.2. Some Common LOG Tags RIL /hardware/ril/reference-ril/refereince-ril.c AT /hardware/ril/reference-ril/atchannel.c RILD RILC RILB /hardware/ril/rild/rild.c /hardware/ril/libril/ril.cpp /frameworks/base/telephony/java/com/android/internal/telephony/basecommands.java RILJ GSM /frameworks/base/telephony/java/com/android/internal/telephony/gsm/ril.java /frameworks/base/telephony/java/com/android/internal/telephony/gsm/gsmphone.java UC20_Android_RIL_Driver_User_Guide / Released 14 / 15

5 Appendix A Reference Table 2: Terms and Abbreviations Abbreviation RIL TA MS Description Radio Interface Layer Terminal Adapter Mobile Station UC20_Android_RIL_Driver_User_Guide / Released 15 / 15