Design method of dual network dual standby based on Android platform

0 Preface

This article refers to the address: http://

With the rapid development of mobile communication technology and the increasing demand for mobile phone functions, smart phones have gradually become consumers' daily consumer goods, and the number of users of smart phones is increasing. In order to facilitate people's lives, the pursuit of dual-network dual standby has become a common phenomenon in mobile phone R&D. Dual network dual standby solves the problem that one mobile phone can access two networks at the same time. The biggest advantage is that GSM and CDMA networks work in the same mobile phone at the same time, realizing the free connection between the two networks. The connectivity of the dual-network also has the advantage of differentiation. It can embody the high-speed access speed and communication security of CDMA in the terminal, enabling dual-network dual-standby mobile phone users to enjoy the colorful data value-added services supported by the CDMA network. . At the same time, the harmonious integration of GSM and CDMA networks will bring huge market value to mobile phone manufacturers.

As a rising star of many current smartphone system platforms, Android is gradually gaining popularity among mobile phone developers and mobile phone consumers. Achieving dual-network dual standby will also become an important factor in Android's continuous innovation and development.

The Android system consists of embedded Linux and Java. Therefore, the dual-network dual-standby design based on the Android system platform is different from the implementation of dual-network dual-standby by other mobile phones. It fully utilizes the clear system architecture and simple working principle of the Android platform. Some of the Phone core applications that have been implemented have extended the dual-network dual-standby function, which improves the efficiency of the dual-network dual-standby design of the Android platform.

1 Android operating system introduction

Android is the open source mobile operating system based on Linux 2. 6. 23 platform announced by Google in November 2007. It is the first truly open and complete mobile software for mobile devices. Google redesigned the Android Java virtual machine and system to make Android's Java application closer to the underlying system, which is more efficient. In addition, the use of virtual machine technology allows Android applications to run under monitored conditions with higher security. Android includes all the software needed for mobile phone work, and there are no proprietary barriers that hinder the innovation of the mobile industry. It has the characteristics of platform standardization, user customization and free service. It is a completely open platform for third-party software. Breaking through the shackles of the iPhone and so on that can only be added to a small number of fixed software; at the same time, unlike Windows Mobile, Symbian, iPhone OS and other vendors, the Android operating system is free to developers, greatly saving development costs.

The Android platform consists of an operating system, middleware, user interface, and application software. The Linux kernel layer is used to provide the underlying services of the system, between the hardware and other software. The Android runtime library contains a set of core libraries and Dalvik virtual machines. Android provides rich class library support and most of them are open source code. For example, the embedded database SQLite. application framework layer provides Android developers with access to the framework application interface. Permissions, structured design simplifies reuse between components. At the application level, Android itself comes with some core applications that greatly simplify the development of Android applications.

Therefore, it is easier to develop a smart phone system with dual-network dual standby function by using the Android platform, and it is also convenient to continuously improve and expand the function based on the original system.

2 Android platform dual network dual standby frame design

The dual-network dual-standby mobile phone implemented on the Android platform combines the GSM network and the CDMA network, so that one mobile phone can simultaneously insert two different network number cards, and at the same time, it can be turned on at the same time, and the user can dial any network without switching the network. Receiving and receiving text messages, and these phones can support China Telecom's own value-added services, enabling business people to enjoy the freedom of mobile work and rest and entertainment. In addition, the user can preset the order of answering and making calls, which is very convenient to use.

The dual-network dual-standby design based on the Android system platform fully combines the dual-card processing mechanism that has been implemented on the framework layer after the Android 2.1 version. The design scheme mainly focuses on the implementation mechanism of the RIL and ARM (modem) side. The dual card is processed separately by establishing a new processing mechanism on the RIL.

For example, when making a call, which set of requests is sent first selects which mechanism to send the request to, and then waits for the return of the message in this mechanism. The dual-network dual standby framework of the Android platform is shown in Figure 1.

Figure 1 Android platform dual network dual standby framework
Figure 1 Android platform dual network dual standby framework

In Figure 1, the GSM network and the CDMA network each have a separate RIL processing mechanism, so that the framework layer and the corresponding processing of the RIL layer can be executed according to the different Phone services of the upper layer, thereby realizing the coordinated work of the dual network and achieving the dual network in the same mobile phone. The effect of mutual interference between the two cards.

3 Android platform dual network dual standby software design

Android platform dual network dual standby function design mainly involves the four major functional modules of the Android software platform, namely the Linux kernel layer, the native library/runtime, the application framework layer and the application layer. The application layer uses Android's various component APIs to implement PhoneApp and provides the corresponding underlying driver in the Linux kernel layer. The Android system architecture is shown in Figure 2.

Figure 2 Android system architecture
Figure 2 Android system architecture

(1) Linux kernel.

The Android system platform was developed based on the optimized Linux kernel, adding a virtual CPU called Goldfish and the specific driver code required for Android to run. This layer is used to provide the underlying services of the system, providing driver modules such as memory management, process management, device driver, security management, power management, etc. as a virtual middle layer between the hardware and other software layers, using YAFFS2 The file system is also the connection layer of the mobile phone hardware and software. In system development, you also need to add corresponding drivers for your own hardware modules, such as Phone driver, GPRS driver, GPS driver, LCD and touchpad driver.

(2) Native library/Android runtime.

These shared libraries are written in C and C++ languages ​​and are compiled for the specific hardware architecture used by the phone and pre-installed on the phone by the phone manufacturer. The native library mainly includes: Standard C function library, media function library, browser engine, 2D and 3D graphics library, and SQLite engine. Developers can use these features to easily develop a human-machine interface-friendly application interface that greatly shortens the development process.

The Android runtime includes a set of Java kernel libraries and Dalvik virtual machines that effectively optimize the running of Java programs.

(3) Application framework layer.

Android application development is based on frameworks and components, which provide a variety of advanced building blocks that you need to use when creating your application, so in this layer, developers have full access to the framework API when developing the application. Calling many of the components that come with Android itself, you can also develop new components and put them into the application framework for yourself and other applications to call. Such modules greatly improve the development efficiency of the application.

(4) Application layer.

Android itself includes some core applications developed by Java, such as desktop, SMS transceiver, calendar, phone address book, browser, E-mail client, etc. Developers can also develop more unique features on this basis. Android apps, such as special effects cameras, players, charging photo frames, and more.

3. 1 Android dual network dual standby implementation

The scheme of implementing the dual-network dual-standby mechanism by adding a set of radio interface layer RIL supporting CDMA in GSM single-mode state is shown in Figure 3.

Figure 3 Android dual network dual standby phone part structure
Figure 3 Android dual network dual standby phone part structure

In PhoneAPP, a new GSMPhone and a CDMAPhone correspond to two frameworks (different CallTracker) and RIL (different RIL), respectively, to achieve single-mode dual-network dual standby improvement.

In the figure, CallLiST is mainly used to manage the switching between two phones, so as to avoid a series of interface display errors such as hanging one call but causing another to end. The CallList module manages two calls and all calls to both phones, storing all calls for both phones through a CallList table. The upper interface calls this CallList table to handle the switching of the two phones. In the framework, a new CallList class is used to store multiple phones of the phone for display on the upper layer.

The CallList class contains methods such as attached(), detach(), update(), clear(), get-CurrentCall(), getDefault(). Make the Calls of the two Phones under control. When you hang it, delete it from the table and add it to the table when you call it.

When the upper layer is displayed, as long as the last call to the Call in the CallList is called, there will be no interface error.

In the dual-network dual-standby module with GSM network and CDMA network, since the code of the CDMA part has changed a lot, the original CallTracker is only used by GSM. Here, it is changed to CallTracker and GsmCallTracker to abstract the CallTracker base class. It can also be used by CDMA; GSMCall becomes GsmCall, which is more consistent with the uniform naming rules; in addition, the startup part of pppd is also placed from the Java framework layer to the RIL layer.

3. 2 Android RIL layer improvements

In the Android system, RIL is a local implementation of the telephone system. It provides an abstraction layer between the Android phone service (android. telephony) and the radio hardware. It is mainly responsible for the transmission and response analysis of AT commands, which is also the basis for the implementation of the telephone service. In addition, RIL is responsible for the reliable transmission of data. So RIL plays a central role in the Android phone section. The design of the program mainly involves the modification of the following four parts of the RIL:

(1) Since the solution maintains two RIL instances, the RIL instance manager needs to be responsible for connecting with the android telephony through the socket. Each RIL instance provides a dedicated communication channel for the SIM-side communication service for the respective SIM card.

(2) Radio Service Arbitration Manager, which is a newly added module in the dual-network dual-standby scheme. It is mainly used to arbitrate voice and short message services for each RIL instance. MODEM to proceed.

(3) RIL Event Dispatcher, which is used to allocate RIL request and AMSS events to the communication service management module for processing.

(4) Radio Service Manager, the Android call application first needs to obtain the call service from the framework layer through the subsystem information, and then each SIM card subsystem will be mapped to a specific RIL instance ID, service management. The ID of the RIL instance will be used to identify the parameters of the DSS API in the subsystem ID.

3. 3 Android dual network dual standby call mechanism implementation

The implementation of Android system phone service is based on RIL. RIL in Android single mode is similar to TI and other platforms. It uses Google's default reference interface, which is to open the modem side or USB virtual serial port to send to the modem side. The AT command is used to perform actual wireless communication. For example, the upper layer of the UI sends a RIL_REQUEST_DIAL request to the RIL layer. When receiving the request, the RIL layer sends an "AT***" command to the modem through the serial port to initiate a call. Of course, the function that actually implements the call is the modem side. At this point, it has nothing to do with Android. The working principle of the Android platform RIL and modem is shown in Figure 4.

Figure 4 How RIL and modem work
Figure 4 How RIL and modem work

Calls are built on top of the basic architecture of the telephone service.

The main user interface related to the call is actually based on the ITelephony interface to implement the "Phone" service in the Phone application, and the access interface is provided through the TelephonyManager. This service internally accesses the RIL through the GSMPhone / CDMAPhone obtained by PhonyFactory, providing services such as dialing, connecting, hanging up, and holding calls. The structure of the Android dual-network dual standby call part is shown in Figure 5.

Figure 5 android dual network dual standby call part structure
Figure 5 android dual network dual standby call part structure

The implementation of the dual-network dual-standby call part of the Android system mainly involves several key data structures from GSMPhone/CDMAPhone to the corresponding RIL path, namely GSMCall /CDMACall, CallNotifiter, GSMConnection /CDMAConnection, CallTracker and so on.

Both GSMCall and CDMAPhone inherit the Call base class, providing basic call control structure and call status, such as Hold, Active, etc. Each connected GSMCall / CDMACall has one or more (conference call) GSMConnection / CDMAConnection structure. Used to maintain related information such as call duration. CallTracker is the core of the call module, which provides call-related interfaces such as calls, hang-ups, and more. GSMPhone / CDMAPhone has an instance of CallTracker and encapsulates the corresponding interface. This interface is implemented by calling CommandsInterface in GSMPhone / CDMAPhone, that is, the submitted RIL package.

In addition, the CallTracker maintains the current GSMCall and CDMACall lists, keeps track of all call statuses, and provides management of call status such as outgoing calls. The way to implement tracking is pollCallsWhenSafe, which gets the list of currently active calls through the getCurrentCalls interface of CommandsInterface. The underlying implementation of this operation is AT + CLCC (different Modem implementations may be different), which is the primary interface for getting a list of call states from Modem. The callback is done by ENENT_ POLL _ CALLS-RESULT. The callback function is handlePollCalls, which is the core method for getting the actual call information in the modem, and the meaning of the Tracker. handlePollCalls completes the actual tracking function, and updates the information of the Call list according to the status of Outgoing, Incomming, Active, Hold, etc. reported by the bottom layer. The state transition of each call during its life cycle can be reflected in the Call-Tracker, and will be reflected in the Call-Tracker. These changes are promptly notified to their followers, that is, to implement the Phone application.

4 Results analysis

Based on the Android operating system, the dual-network dual-standby function module design utilizes Android's universal system architecture and device-independent application development platform to realize the frame design and upper-layer Phone application design of the dual-network dual-standby single-pass system. The improved Android system platform supports both GSM and CDMA networks for simultaneous standby, which greatly facilitates many users who have two mobile phone cards and are not on the same network. Figure 6 is a state diagram of simultaneous standby of GSM and CDMA dual networks on the Android system platform.

Figure 6 GSM and CDMA dual network simultaneous standby interface
Figure 6 GSM and CDMA dual network simultaneous standby interface

5 Conclusion

Utilize Android's original system architecture and itself contain some Java core applications, and add a new set of CDMA-enabled RIL to realize dual-network dual standby design based on Android platform, so that one mobile phone maintains two independent RILs at the same time. Support GSM and support CDMA, respectively, separate processing of dual SIM cards, greatly facilitating the majority of Android mobile phone users. As a smartphone operating system that is currently highly anticipated, dual-network dual standby will surely win a broader development space and more supporters, and will also lay a solid foundation for future development. Although some of the design of this program is still not perfect, many details have yet to be resolved. However, with the continuous upgrade of Android version and the continuous enrichment of Android applications, the dual-network dual-standby design based on Android platform will continue to improve and develop.

The road lamp lighting is a main light source configuration is most widely used in Road Lighting engineering,mainly is suitable for the city roads,lans wide road lighting and decoration,is the way the functional lighting productsOur company's road lighting products include Lotus Combination Lamp,High-low arm High-power LED lamps,Lift type  High-mast lamp,Integrated Solar road light.

High-low arm High-power LED lamps   Lotus Combination Lamp

Lift type  High-mast lamp  Integrated Solar road light

The main road generally use high-quality steel manufacturing,stable structure and generous,illumination power and the main rod highly visible road width of scientific allocation.To ensure that the surface brightness,no glare,uniform illumination.Long distance continuous configuration,can describe the spatial light continuous beauty,make city roads at night more grandeur.


Road Lighting Series

Road Lighting Series,Road Lighting,Road Lighting Decoration,Road Lighting Book

Jiangsu chengxu Electric Group Co., Ltd , http://www.chengxulighting.com