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

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

HUAWEI H30-U10. Quick Start Guide

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

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

HG658d Home Gateway. User Guide HUAWEI TECHNOLOGIES CO., LTD.

Linux-based PPP Dial-up Connection Application Guide

HUAWEI MU509-b HSDPA LGA Module V100R003. SSL Application Guide. Issue 01. Date

HG658 Home Gateway. User Guide HUAWEI TECHNOLOGIES CO., LTD.

HG253s V2 Home Gateway User Guide

Android RIL Driver User Guide Version 1.0

User Guide EMUI / 3.1

Copyright Huawei Technologies Co., Ltd

UC20 Android RIL Driver User Guide

Copyright Huawei Technologies Co., Ltd All rights reserved.

Honor Whistle Smart Control Rechargeable Headset User Guide

1 About this document Getting started Text input Network connection Network sharing (Certain models only)...

Copyright Huawei Technologies Co., Ltd

Contents. About this guide Getting to Know Your HUAWEI MateBook. Portfolio Keyboard. User Accounts. MatePen Stylus. MateDock Docking Station.

If the firmware version indicated is earlier than the "Version 1.06", please update the unit s firmware.

Installing Enterprise Switch Manager

End User License Agreement

1. License Grant; Related Provisions.

Installing Enterprise Switch Manager

Upgrading MYOB BankLink Notes (desktop)

Upgrading BankLink Books

New Features in Primavera Professional 15.2

JD Edwards World User Reserved Information. Version A9.2

OCTOSHAPE SDK AND CLIENT LICENSE AGREEMENT (SCLA)

Manual Download. Please visit SUNIX website by searching keyword isafe or KEY-256UN1 for detail.

Getting Started (No installation necessary) Windows On Windows systems, simply double click the AntGram icon to launch the program.

B310 LTE CPE Quick Start

Emerald. Caller-ID Search Version 1.2. Emerald Management Suite IEA Software, Inc.

VP-UML Installation Guide

One Identity Starling Two-Factor HTTP Module 2.1. Administration Guide

JD Edwards EnterpriseOne 8.12 Standalone Client Installation Guide. for the Oracle Application Server

AhnLab Software License Agreement

Tisio CE Release Notes

GS2K OV SDK User Guide. 1VV Rev

Shimadzu LabSolutions Connector Plugin

TERMS & CONDITIONS. Complied with GDPR rules and regulation CONDITIONS OF USE PROPRIETARY RIGHTS AND ACCEPTABLE USE OF CONTENT

Oracle Communications Policy Management Configuring NetBackup for Upgrade Method of Procedure

FW Update Tool. Installation Guide. Software Version 2.2

ST-C700 Firmware Update service

Copyright 1998, 2009, Oracle and/or its affiliates. All rights reserved.

TotalShredder USB. User s Guide

Temperature & Humidity SMS Alert Controller

Project Capuchin Bridging Flash Lite and Java ME in Sony Ericsson phones

UC20 Linux USB Driver User Guide

CRU Configurator. User Manual for Mac OS X. Features

HG658c Home Gateway Quick Start

Microcat Authorisation Server (MAS ) User Guide

Getting Started (No installation necessary) Windows On Windows systems, simply double click the AntPConc icon to launch the program.

Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation

Adding Users and Enrolling Devices

x10data Smart Client 6.5 for Windows Mobile Installation Guide

SmartList Builder for Microsoft Dynamics GP 10.0

MyCreditChain Terms of Use

Thank you for purchasing the LTE cube. This LTE cube brings you a high speed wireless network connection.

TWAIN 163/211. User Manual

Weights. Etch. Etch is a display font designed to be fun and playful. Inspired from old engraving plates.

Huawei OceanStor 6800 V3 Converged Storage Interoperability Matrix

User Manual Arabic Name Romanizer Name Geolocation System

Mobile On the Go (OTG) Server

KeyCarbon Raptor Laptop Keystroke Recorder

TERMS OF USE Effective Date: January 1, 2015 To review material modifications and their effective dates scroll to the bottom of the page. 1.Parties.

UM PR533 - PCSC Tool. User manual COMPANY PUBLIC. Rev November Document information

Oracle Enterprise Single Sign-on Logon Manager How-To: Configuring ESSO-LM Event Logging with Microsoft SQL Server 2005 Release

PCMCIA Flash Card User Guide

DEMO MANUAL DC2645A LTC MHz to 9GHz High Linearity I/Q Demodulator with Wideband IF Amplifier DESCRIPTION BOARD PHOTO

Application Note. DN [Document ID] AS72xx. How to Program AS72xx Firmware with FlashCatUSB. ams Application Note Page 1

SpanDisc. U s e r s G u i d e

Quick Start Guide. Model 0260 Secondary Electronics

AT&T Entertainment Experience Suite Video Optimizer 1.2

DME-N Network Driver Installation Guide for M7CL

Terms and Conditions of Website Use

NCD ThinPATH PC Installation Guide and Release Notes

fontseek.info outofthedark.xyz

Map Utility Ver. 1.8 Instruction Manual

ImageMate 12-in-1 Reader/Writer User Guide

Quick start guide 2018

Stellar Phoenix Password Recovery For Windows Server. Version 2.0. User Guide

CRU Configurator. User Manual for Windows. Features

INTELLEX SOFTWARE VERSION 3.1 UPGRADE

B68L Wireless Gateway Quick Start

FOR TCG ACPI Specification

Mobile Banking and Mobile Deposit Terms & Conditions

NuXGate. Version 2.0. For WinNT/Win2000/Win XP/Win2003. Release Date 18 August User s Manual MobileXdge Inc

Upgrading BMDM and BMRG Software and MPM, BDS and DCM Firmware

ADN. System Installer. Instruction manual

Evaluation Board User Guide UG-163

MFL QUICK START MANUAL

Reference Guide VIB 10/11. (VIB 10 pictured) vehicle integration box

Contents. 1 Welcome. 2 Getting started. 3 Text input. 4 Network connection. 5 Network sharing. 6 Managing applications. 7

Oracle Auto Service Request

SpellCheck for Dynamics GP

Oracle. Field Service Cloud Using Android and ios Mobile Applications 18B

Price List Utilities. For Dynamics CRM 2016

Shoviv GroupWise To Outlook

Share Online 2.0. Copyright 2007 Nokia. All rights reserved.

Addendum to Cisco Physical Security Operations Manager Documentation, Release 6.1

Transcription:

HUAWEI Module Android RIL Integration Guide Version 3.4 Date 2014-04-26

2014. All rights reserved. No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd. and its affiliates ("Huawei"). The product described in this manual may include copyrighted software of Huawei and possible licensors. Customers shall not in any manner reproduce, distribute, modify, decompile, disassemble, decrypt, extract, reverse engineer, lease, assign, or sublicense the said software, unless such restrictions are prohibited by applicable laws or such actions are approved by respective copyright holders. Trademarks and Permissions,, and are trademarks or registered trademarks of Huawei Technologies Co., Ltd. LTE is a trade mark of ETSI. Other trademarks, product, service and company names mentioned may be the property of their respective owners. Notice Some features of the product and its accessories described herein rely on the software installed, capacities and settings of local network, and therefore may not be activated or may be limited by local network operators or network service providers. Thus, the descriptions herein may not exactly match the product or its accessories which you purchase. Huawei reserves the right to change or modify any information or specifications contained in this manual without prior notice and without any liability. DISCLAIMER ALL CONTENTS OF THIS MANUAL ARE PROVIDED AS IS. EXCEPT AS REQUIRED BY APPLICABLE LAWS, NO WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE MADE IN RELATION TO THE ACCURACY, RELIABILITY OR CONTENTS OF THIS MANUAL. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL HUAWEI BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES, OR LOSS OF PROFITS, BUSINESS, REVENUE, DATA, GOODWILL SAVINGS OR ANTICIPATED SAVINGS REGARDLESS OF WHETHER SUCH LOSSES ARE FORSEEABLE OR NOT. THE MAXIMUM LIABILITY (THIS LIMITATION SHALL NOT APPLY TO LIABILITY FOR PERSONAL INJURY TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH A LIMITATION) OF HUAWEI ARISING FROM THE USE OF THE PRODUCT DESCRIBED IN THIS MANUAL SHALL BE LIMITED TO THE AMOUNT PAID BY CUSTOMERS FOR THE PURCHASE OF THIS PRODUCT. Import and Export Regulations Customers shall comply with all applicable export or import laws and regulations and be responsible to obtain all necessary governmental permits and licenses in order to export, re-export or import the product mentioned in this manual including the software and technical data therein. Privacy Policy To better understand how we protect your personal information, please see the privacy policy at http://consumer.huawei.com/privacy-policy.

HUAWEI Module Android RIL Integration Guide About This Document About This Document Revision History Document Version Date Chapter Description 1.0 2011-06-23 Created 3 Added guide for TD-SCDMA 2.0 2011-09-09 4.2 Upgraded guide for UpdateWizard V100R005. 4.4 Added GPS guide for Android 2.3. 2.1 2011-12-30 3.2 Added 3.2.7, usage of OEM- HOOK. 2.3 Added support for Android 4.0 2.2 2012-02-03 3.2 Modified 3.2.6 for CDMA2000 SMS 4.4 Added GPS guide for Android 3.x, 4.0 2.3 2012-02-10 4.4 Added interfaces supported by GPS for Android 3.x, 4.0 2.4 2012-03-13 3.3 Deleted the description on how to integrate drivers 2.5 2012-03-13 4.4 modified the description on how to integrate GPS 2.6 2012-05-02 4.4 Added XTRA server in gps.conf 3.2 Added XTRA server in gps.conf 2.7 2012-07-20 4.4.5 Deleted SONY GPS customization 2.8 2013-01-14 3.2 Modified the document to be sure that it can be used for Huawei Module and data card 3

HUAWEI Module Android RIL Integration Guide About This Document Document Version Date Chapter Description 2.9 2013-01-18 4.5.5 Added a description of how to Launch gps.default.so 3.0 2013-02-08 2.4 Added support for MU609 4.3 Added support for MU609 3.1 2013-05-30 3.2.2 Added ports instructions 3.2 2013-10-12 2.4 Added GPS support for MU736 3.2.8 Added support for LTE 3.3 2014-01-08 2.2 Added Support for GPS+GLONASS Position 2.4 Added support for ME906E 4.5.5 Modified Android 2.3 System for GPS and deleted GPS Integration for Android 2.2 3.4 2014-04-26 Copyright Updated Copyright description 2.4 Deleted Supported Products 4

HUAWEI Module Android RIL Integration Guide Contents Contents 1 Overview... 7 1.1 About This Chapter... 7 1.2 Introduction to the Huawei RIL... 7 1.3 Huawei RIL Deliverables... 8 2 What Are Supported... 9 2.1 About This Chapter... 9 2.2 Supported Functions... 9 2.3 Supported Android Versions... 9 3 Integration... 10 3.1 About This Chapter...10 3.2 Integrating the Huawei RIL...10 3.2.1 Launching libhuawei-ril.so...10 3.2.2 Modifying the Rights of Device Ports...10 3.2.3 Preparing ip-up and ip-down Scripts... 11 3.2.4 Modifying the Right of RILD... 11 3.2.5 Notification for CDMA2000 Support on Android 2.3... 11 3.2.6 Notifications for CDMA2000 SMS Support... 11 3.2.7 Sending AT Commands Through OEM-HOOK-STRING...12 3.2.8 Using LTE Only Option...12 4 Other Deliverables... 13 4.1 About This Chapter...13 4.2 UpdateWizard For EM820W/MC509/MU509...13 4.2.1 Deliverables...13 4.2.2 Procedures...13 4.2.3 Requirements...14 4.3 UpdateWizard For MU733/MU739/MU609T/MU609...14 4.3.1 Deliverables...14 4.3.2 Procedures...14 4.3.3 Requirements...15 4.4 QXDMlog Tool...15 4.4.1 Deliverable...15 4.4.2 Procedures for Obtaining a Huawei Module Log...16 5

HUAWEI Module Android RIL Integration Guide Contents 4.5 GPS...16 4.5.1 Supported GPS Functions...16 4.5.2 Interfaces Supported by the GPS Function...16 4.5.3 Android Versions Supported by the GPS Function...17 4.5.4 GPS Deliverable...17 4.5.5 GPS Integration...17 5 Abbreviations... 21 6

HUAWEI Module Android RIL Integration Guide Overview 1 Overview 1.1 About This Chapter This chapter describes the short introduction and deliverables of the Huawei RIL. Introduction to the Huawei RIL Huawei RIL Deliverables 1.2 Introduction to the Huawei RIL RIL is short for Radio Interface Layer. When an Android operating system (OS) works with a module/modem to provide functions such as data, voice and Global Positioning System (GPS) services, the Android OS must communicate with the module/modem. The RIL is used to implement the communication between an Android OS and a module/modem. To enable Android to support different communications methods (such as using AT commands or QMI commands), Google divides the RIL into two components: an RIL Daemon (RILD) and a Vendor RIL. The RILD monitors the requests (for example, a request for making a call) from the upper layers of Android, and invokes the interfaces implemented at the Vendor RIL to send the requests to the module/modem. Then the module/modem handles the requests. For Huawei modules, this process is to convert the requests into corresponding AT commands and send the commands to the modules. The RILD has been designed by Google and does not require any modification. The Vendor RIL is designed by vendors, and it is the Huawei RIL in this document. 7

HUAWEI Module Android RIL Integration Guide Overview Figure 1-1 RIL architecture 1.3 Huawei RIL Deliverables Huawei RIL deliverables are: RIL library file: libhuawei-ril.so. This is the Vendor RIL. ip-up script When a Point-to-Point Protocol (PPP) link is established successfully, this script is executed to set the ip, dns and gw parameters. ip-down script When a PPP link failed to be established, this script is executed to clear the ip, dns and gw parameters. Release notes The version information of the Huawei RIL. 8

HUAWEI Module Android RIL Integration Guide What Are Supported 2 What Are Supported 2.1 About This Chapter This chapter describes what are supported by the Huawei RIL, including: Supported Functions Supported Android Versions 2.2 Supported Functions The Huawei RIL supports the following: Basic device and network management service for WCDMA, CDMA2000 and TD-SCDMA; Data service for WCDMA, CDMA2000 and TD-SCDMA; SMS service for WCDMA, CDMA2000 and TD-SCDMA; Basic PCM voice service for WCDMA, CDMA2000 and TD-SCDMA; Phonebook service for WCDMA and TD-SCDMA; Voice supplementary services for WCDMA and CDMA; USSD service for WCDMA; Support for GPS + GLONASS two positioning system positioning; 2.3 Supported Android Versions At present, the Huawei RIL supports the following versions of Android: Android 2.x Android 3.x Android 4.x 9

HUAWEI Module Android RIL Integration Guide Integration 3 Integration 3.1 About This Chapter This chapter describes the integration of Huawei RIL. 3.2 Integrating the Huawei RIL The following integration procedure is based on a platform of Nvidia Tegra 2 + Android 2.2. Integration on other platforms may be slightly different. 3.2.1 Launching libhuawei-ril.so Modifying the initialization script (system/core/rootdir/init.rc): service ril-daemon /system/bin/rild -l libhuawei-ril.so Put libhuawei-ril.so into /system/lib 3.2.2 Modifying the Rights of Device Ports Please make sure the device ports, PCUI and MODEM, possess readable, writable, and executive rights. For example, add commands, chmod 777 /dev/ttyusb0 chmod 777 /dev/ttyusb2 or, chmod 777 /dev/ttyacm0 chmod 777 /dev/ttyacm1 in the initialization script rootdir/init.rc. 10

HUAWEI Module Android RIL Integration Guide Integration Usually, for TD-SCDMA module, /dev/ttyacm0 is modem port, while /dev/ttyacm1 is PCUI port. In addition, the modem/pcui/diag/ port names depend on the modules instructions of which you can refer to. 3.2.3 Preparing ip-up and ip-down Scripts Copy ip-up and ip-down scripts to directory /etc/ppp. Scripts ip-up and ip-down need readable, writable and executive rights. For example, add commands, chmod 777 /etc/ppp/ip-up chmod 777 /etc/ppp/ip-down in the initialization script rootdir/init.rc. 3.2.4 Modifying the Right of RILD RILD needs executive right. For example, comment out the function switchuser() in the file /hardware/ril/rild/ rild.c: // switchuser(); 3.2.5 Notification for CDMA2000 Support on Android 2.3 To support CDMA2000 module in Android 2.3, the preferred network mode should be changed to "4", preferred_network_mode of WCDMA and TD-SCDMA module is "0". For example: Using adb shell to execute the following command: sqlite3 /data/data/com.android.providers.settings/databases/settings.db update secure set value='4' where name='preferred_network_mode';.quit Now, the system can use the CDMA module. 3.2.6 Notifications for CDMA2000 SMS Support 1. Modify the following functions on the file: {android_root}/frameworks/base/telephony/java/com/android/internal/telephony/c dma/smsmessage.java (1) privategetsubmitpdu():modify int teleservice = bearerdata.hasuserdataheader? SmsEnvelope.TELESERVICE_WEMT : SmsEnvelope.TELESERVICE_WMT; to int teleservice = SmsEnvelope.TELESERVICE_WMT; 11

HUAWEI Module Android RIL Integration Guide Integration (2) createfromefrecord():modify int size = data[1]; to int size = data[1] & 0xff; (3) parsepdufromefrecord():modify int parameterlen = dis.readbyte(); to int parameterlen = dis.readbyte() & 0xff; 2. Modify the following function on the file: {android_root}/frameworks/base/telephony/java/com/android/internal/telephony/cdma /sms/bearderdata.java (1) decode7bitascii():modify int wantedbits = (offset * 8) + (numfields * 7); to if (48 == offset) { } offset++; numfields = numfields - 7; int wantedbits = offset + (numfields * 7); 3.2.7 Sending AT Commands Through OEM-HOOK-STRING RIL OEM-HOOK interfaces allow users to send AT commands to module/modem directly. Currently, Huawei RIL only implements the interface OEM-HOOK-STRING. Following example shows how to send AT command from framework directly. Send command "AT^SWSPATH=2" to switch the module to PCM mode when SIM is ready. File: GsmServiceStateTracker.java or CdmaServiceStateTracker.java, Function: public void handlemessage (Message msg), Sample: case EVENT_SIM_READY: phone.invokeoemrilrequeststrings(new String[]{ "AT^SWSPATH=2" }, mhandler.obtainmessage(event_oem_ril_message)); 3.2.8 Using LTE Only Option There is no "LTE Only Option" on Android UI. So if you want the module/modem to use LTE, you must to modify Android codes. 12

HUAWEI Module Android RIL Integration Guide Other Deliverables 4 Other Deliverables 4.1 About This Chapter This chapter describes other deliverables, including: UpdateWizard For EM820W/MC509/MU509 UpdateWizard For MU733/MU739/MU609T/MU609 QXDMlog Tool GPS 4.2 UpdateWizard For EM820W/MC509/MU509 4.2.1 Deliverables Huawei UpdateWizard tool is running on Android to upgrade firmware. Deliverables: 4.2.2 Procedures Upgrade tool: UpdateWizard Configurable file: StringList.strings Firmware will be released as an *.bin file, whose file name is in the form of ModuleName_VersionNumber.bin. Step 1 Change the firmware name from ModuleName_VersionNumber.bin to MOBILE_CONNECT.BIN. Step 2 Modify StringList.strings. The "IDS_UPD_VERSION" and "IDS_PRODUCE_ID" should be the ModuleName. The "IDS_PRODUCE_Version" should be the VersionNumber. Step 3 Connect to Android system, and create a new directory named update. (the name can be any as you like). 13

HUAWEI Module Android RIL Integration Guide Other Deliverables Step 4 Use adb push command to push upgrade tool and upgrade package into the directory update/. UpdateWizard, MOBILE_CONNECT.BIN, and StringList.strings should be under the same directory. Step 5 Enter the directory update/. Step 6 Modify rights of UpdateWizard: chmod 777 UpdateWizard. Step 7 Terminate ril: stop ril-daemon. Step 8 If the upgrade requires a password, run./updatewizard./ XXXXXXXX. If it does not require a password, run./updatewizard./. XXXXXXXX: an 8-digit password. The executable file name and the password in the command must be separated with a space. Step 9 Restart ril: start ril-daemon. 4.2.3 Requirements The Android where the UpdateWizard tool is running must support plug and play. 4.3 UpdateWizard For MU733/MU739/MU609T/MU609 4.3.1 Deliverables Huawei UpdateWizard tool is running on Android to upgrade firmware. Deliverables: 4.3.2 Procedures Upgrade tool: UpdateWizard Firmware will be released as an *.bin file, whose file name is in the form of ModuleName_VersionNumber.bin. Step 1 Copy android-ndk-r8b-linux-x86.tar.tar to any folder in linux, and unpack it. Step 2 Copy UpdateWizard3.1\code\sdk\build\Android\jni.zip to any folder in linux, and unpack it. Step 3 Copy folder build, include, and src in UpdateWizard3.1\Tool-Android_Update - WizardV300R002B001\code\sdk to folder jni in linux, and merge the original folder build, include, and src in jni. 14

HUAWEI Module Android RIL Integration Guide Other Deliverables "merge" must be used rather than replace. Step 4 In the directory of jni in linux, open the terminal and entry the command: androidndk-r8b/ndk-build to generate the UpdateWizard tool. Step 5 Connect to Android system, and create a new directory named update (the name can be any as you like). Step 6 Use adb push command to push upgrade tool and upgrade package into the directory update/. UpdateWizard and ModuleName_VersionNumber.bin should be under the same directory. Step 7 Enter the directory update/. Step 8 Modify rights of UpdateWizard: chmod 777 UpdateWizard. Step 9 Terminate ril: stop ril-daemon. Step 10 If the upgrade requires a password, run./updatewizard./ XXXXXXXX. If it does not require a password, run./updatewizard./ ModuleName_VersionNumber.bin. XXXXXXXX: an 8-digit password. The executable file name and the password in the command must be separated with a space. Step 11 Restart ril: start ril-daemon. 4.3.3 Requirements The Android where the UpdateWizard tool is running must support plug and play. 4.4 QXDMlog Tool 4.4.1 Deliverable The QXDMLog tool is used to obtain the logs of Huawei modules in Android. QXDMLog tool 15

HUAWEI Module Android RIL Integration Guide Other Deliverables The Huawei QXDMLog tool is named CTOOL-ANDROID, which can obtain up to 40 MB log information at a time. If the log information is larger than 40 MB, it will be saved to the SD card on the module. If the SD card does not exist, the process of obtaining the log information is terminated. 4.4.2 Procedures for Obtaining a Huawei Module Log Step 1 Copy the QXDMLog tool to any folder except root directories. For example, to copy the QXDMLog tool to /data/, run adb push CTOOL-ANDROID /data/. Step 2 Run chmod 777 /data/ctool-android. Step 3 Run cd /data. Step 4 Run./CTOOL-ANDROID to obtain the log. A log file named HWQXDMLog will be created in the same directory where the tool is stored. Step 5 Press Ctrl+C to stop the tool. Step 6 To copy the HWQXDMLog file to the PC, run adb pull /data/hwqxdmlog. 4.5 GPS 4.5.1 Supported GPS Functions Supported GPS functions are: Standalone GPS and Assisted GPS (AGPS) for WCDMA Standalone GPS for CDMA Standalone GPS and XTRA GPS for WCDMA 4.5.2 Interfaces Supported by the GPS Function 1. GPS Interface static const GpsInterface HwGpsInterface = { sizeof(gpsinterface),//for android 2.3 or later version hw_gps_init, hw_gps_start, hw_gps_stop, hw_gps_cleanup, hw_gps_inject_time, hw_gps_inject_location, hw_gps_delete_aiding_data, hw_gps_set_position_mode, 16

HUAWEI Module Android RIL Integration Guide Other Deliverables }; hw_gps_get_extension, 2. AGPS Interface static const AGpsInterface HwAGpsInterface = { }; sizeof(agpsinterface), //for android 2.3 or later version hw_agps_init, hw_agps_data_conn_open, hw_agps_data_conn_closed, hw_agps_data_conn_failed, hw_agps_set_server, 3. XTRA inferface static const GpsXtraInterface hwxtrainterface = { }; sizeof(gpsxtrainterface), hw_xtra_init, hw_inject_xtra_data, 4.5.3 Android Versions Supported by the GPS Function 4.5.4 GPS Deliverable 4.5.5 GPS Integration Launching gps.default.so For Android 2.3 The GPS function supports Android 2.3, 3.x and 4.x. On Android 2.3, 3.x and 4.x, GPS deliverable is /system/lib/hw/gps.default.so. 1. Delete the gps.xxx.so file under android directory /system/lib/hw/. 2. Push the gps.default.so file into the directory /system/lib/hw/. 3. Push the updated gps.conf file into the directory /system/etc/. The following integration procedure is based on a platform of Freescale I.MX51 + Android 2.3. Integration on other platforms may be slightly different. 1. Add JNI layer GPS init code for Android 2.3. File to be modified: 17

HUAWEI Module Android RIL Integration Guide Other Deliverables mydroid/frameworks/base/services/jni/com_android_server_location_gpslocatio nprovider.cpp Function to be modified: Function :android_location_gpslocationprovider_init const GpsInterface* interface = GetGpsInterface(env, obj); if (!interface) return false; if (NULL!= interface->init && 0!= interface->init(&sgpscallbacks)) { } LOGD("GpsInterface init failed!"); return false; sagpsinterface = (const AGpsInterface*) interface- >get_extension(agps_interface); if (sagpsinterface) sagpsinterface->init(&sagpscallbacks); The bolder code above should be added in function android_location_gpslocationprovider_init. Function to be modified: GetGpsInterface static const GpsInterface* GetGpsInterface(JNIEnv* env, jobject obj) { // this must be set before calling into the HAL library if (!mcallbacksobj) mcallbacksobj = env->newglobalref(obj); if (!sgpsinterface) { sgpsinterface = get_gps_interface(); if (!sgpsinterface) { sgpsinterface = NULL; return NULL; } } return sgpsinterface; } 18

HUAWEI Module Android RIL Integration Guide Other Deliverables 2. Modify the access right of the GPS data and control ports. Modify etc file: mydroid/system/core/rootdir/etc/ueventd.freescale.rc modify ttyusb* access permission as below: /dev/ttyusb* 0777 radio radio This is for freescale i.mx51 board. For another platform, it may be slightly different. 3. Create a gps.conf file. In mydroid/out/target/product/imx51_bbg/system/etc, add a gps.conf file containing the following contents: NTP_SERVER=asia.pool.ntp.org SUPL_HOST=http://supl.google.com SUPL_PORT=7276 XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin SUPL_HOST is an AGPS server which is carrier specified. XTRA_SERVER is an XTRA server which is carrier specified. For Android 3.x 4. Compile the Android system again and flash the re-compiled Android image onto the Android tablet. 1. Create a gps.conf file. In mydroid/out/target/product/xxx/system/etc, add a gps.conf file containing the following contents: NTP_SERVER=asia.pool.ntp.org SUPL_HOST=http://supl.google.com SUPL_PORT=7276 XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin 19

HUAWEI Module Android RIL Integration Guide Other Deliverables SUPL_HOST is an AGPS server which is carrier specified. XTRA_SERVER is an XTRA server which is carrier specified. For Android 4.x 2. Compile the Android system again and flash the re-compiled Android image onto the Android tablet. The following integration procedure is based on a platform of pandaboard. Integration on other platforms may be slightly different. 1. Create a gps.conf file. In mydroid/out/target/product/pandaboard/system/etc, add a gps.conf file containing the following contents: NTP_SERVER=asia.pool.ntp.org SUPL_HOST=http://supl.google.com SUPL_PORT=7276 XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin SUPL_HOST is an AGPS server which is carrier specified. XTRA_SERVER is an XTRA server which is carrier specified. 2. Compile the Android system again and flash the re-compiled Android image onto the Android tablet. 20

HUAWEI Module Android RIL Integration Guide Abbreviations 5 Abbreviations Abbreviations AGPS CDMA GPS NMEA RIL TD-SCDMA WCDMA XTRA GPS Full spelling Assisted Global Positioning System Code Division Multiple Access Global Positioning System National Marine Electronics Association Radio Interface Layer Time Division-Synchronous Code Division Multiple Access Wideband CDMA Xtra Global Position System 21