MTK feature phone basic function is call and SMS, to understand the MTK mobile phone software system, the first need to briefly review several mobile network communication basic concepts.
Figure 38. Gsm-gprs Architecture
Courtesy Http://farm3.static.flickr.com/2694/4239683146_55f0dd7e11_o.png
In the case of GSM systems, mobile phones establish a wireless connection to the base station (BTS), and the communication interface between them is um. The communication interface between the base station and the base station controller (BSC) is Abis, and the communication interface between the base station controller and the Mobile Switching Center (MSC) is a, see figure 38.
Figure 39. GSM Protocol Layer [1]
Courtesy Http://farm3.static.flickr.com/2784/4291716841_f48a0e217a_o.gif
The so-called Interface (Interface), is synonymous with a set of protocols, and these protocols can be divided into several layers, layered, so the interface is also known as the Protocol stack (Protocol stack). The leftmost column in Figure 39 shows the protocol stack that the phone needs to process. From the second column to the fourth column, respectively, the base station (BTS), the base station controller (BSC), and the Mobile Switching Center (MSC) are required to process the protocol stack. The dotted line between two adjacent columns represents the communication interface, and the protocol stack on both sides of the interface is symmetric to ensure that the information transmitted in the communication can be identified by the other party.
MTK mobile phone software system, need to deal with is the leftmost protocol stack [2].
1. The bottom layer of the stack is the physical layer (physical layer), which is responsible for radio frequency (GSM RF) and channel management (channel Access Method) for transmitting raw bit data streams, such as TDMA in a GSM system.
2. The second layer is the data link layer, LAPDM is the protocol used by this layer, responsible for dividing the data stream into several frames and processing flow control.
3. The third layer is the network layer, which is responsible for establishing the connection between the initiator and receiver of the mobile communication. The cell phone connection is inseparable from the base station, the base station controller and the Mobile Exchange center. And when the phone's position is not fixed, such as in the movement of the car on the phone, through the base station, even the base station controller is not fixed. Therefore, the network layer is subdivided into three sub-layers, namely RR layer, MM layer, and CM layer.
3.1. RR layer is responsible for wireless resource management (Radio Resource Management), which is responsible for establishing the connection between the mobile phone and the base station, especially when multiple mobile phones are contacting the same base station simultaneously, how to avoid the mutual interference between multiple channels.
3.2. MM layer is responsible for mobile management (Management). Mobile phone from one base station to another base station, even from a base station control center switch to another base station control center, switching process how to maintain the continuity of the call, such as the work of the MM layer is responsible.
3.3. CM layer, also known as the CC layer, is responsible for the management of connections and calls (Connection Management, or call control). On the phone call initiator dialing is, the CM layer is responsible for querying the receiver's current location, and whether in the call, whether the need to transfer to the voice message box and so on.
A brief review of the GSM protocol stack helps to understand MTK's software system. The GSM protocol layer only stipulates the L1 to L3 three layer protocol, namely the physical layer, the data link layer and the network layer, and does not stipulate the contents of the protocol L4 above. MTK regards L4 as the application layer, L4 protocol is used to let the application call the CM/CC sub-layer function module in the network layer L3.
Figure 40. MTK software function modules [3].
Courtesy Http://farm5.static.flickr.com/4059/4292450480_69a0012631_o.png
Figure 40 shows the basic modules included in the MTK software platform, from the MTK Engineer's speech [3]. The meaning of the abbreviated names of each of these modules can be found in the Appendix (appendix). Although this source is reliable, there are some confusing details in Figure 40,
1. Physical layer (L1), responsible for radio frequency and channel management. Figure 40 L1 the module, as shown in the thick border chart. Its left side is the driver (Drivers) module, the right side is the UART serial port. This kind of plotting method is not very accurate, in fact L1 and UART can be regarded as a kind of hardware plus drive.
MCU (micro-processing unit) supports a variety of peripherals, such as the speaker/usb/Far Infrared serial port, etc., see figure 35 above. Every peripheral requires not only hardware, but also driver software. The MTK software platform contains very rich driver software, sufficient to support all MCU peripherals.
2. The module of the Data Link layer (L2), which is included in the database section, such as L2R.
As shown in the figure, the application layer (L4) can call the L2 module directly through the CSM module. This is in conflict with the previously introduced GSM protocol stack, which, as stipulated in the protocol stack, can only be contacted by the CM/CC sub-layer in the L3. L4. But MTK's practice, allow L4 Leapfrog and L2 direct contact. In other words, [3] implies that the GSM protocol stack is only a recommendation and is not strictly adhered to in a specific implementation.
3. The network layer L3 contains a lot of function modules, can be summarized as RR, MM/GMM, and CC three parts, in the thick edge of the block diagram shown.
As mentioned earlier, the GSM protocol stack suggests that the RR sub-layer in the L3 layer should only be associated with the L2 module, and should not call the L1 module directly. As shown in the figure, MTK does not strictly abide by this rule. More interestingly, the figure depicts L2 and L3 as juxtaposition, and there is no direct link between them, which is also more puzzling.
4. The CSM module in the application layer L4, which is responsible for contacting the CM/CC module of the L3 layer and the L2R module of the L2 layer, seems to be unconventional.
L4 is the interface between the application and the GSM protocol stack module. In feature phone's vocabulary, applications are often used as a synonym for MMI (man-machine-interface), in fact scrutiny, more accurately, the application is part of MMI [4]. According to [3] text narration, especially pp19 about L4A and l4c introduction, as well as pp38 about the keypad event trigger mechanism, it seems that MTK's application, for other function module calls, there are four mechanisms, as shown in Figure 41.
Figure 41. MMI Architecture
Courtesy Http://farm5.static.flickr.com/4002/4292450478_37b455bd5f_o.png
4.1. Control the LCD display through the GUI module.
4.2. Through the L4 module, to the task of the way to achieve communication and other additional functions, such as SIM card control, voice communication, data communication, call history, phone book, camera and so on functions.
4.3. Use the API in the framework to operate directly on the file system without having to pass through the OS.
4.4. OS features are limited to multitasking scheduling and memory management.
These four invocation mechanisms, especially the third and the four, differ greatly from the PC and smartphone. This prevents the MTK software platform to develop smoothly in the future, this issue is left to follow-up articles for further discussion.
Figure 40 does not detail the four mechanisms for the MTK application module to invoke the underlying module, but merely succinctly and loosely describe it as FMI (Feature Rich MMI). Consider figure 41 as a partial amplification of the FMI module in Figure 40.
Although figure 40 has some confusing details, but based on its description of each function module of MTK, and referring to another picture of the same data [3], it is not difficult to outline the structure of the MTK software system, see figures 42. This picture omits some of the details in figure 40, such as RMI (Remote MMI). RMI not only supports PC-controlled handsets, but also provides the basis for the separation of APS (Application Processor) and BP (baseband Processor) in smartphone. These are left to the following chapters.
Figure 42. MTK software Platform overview [3].
Courtesy Http://farm5.static.flickr.com/4043/4292450482_c18a4b2a90_o.png
Comparing the location of the OS in Figure 40 with the 42,figure 40, it should be understood that the introduction of the principle is greater than the actual structure. and Figure 42 depicts the system architecture, more in line with the actual situation. That is, the OS is responsible for the entire system, including each protocol stack module, as well as the application, which provides multitasking scheduling, as well as memory management.
The OS used by MTK is nucleus. Nucleus originally for the accelerated technology company's products, developed in the 1990 's. Acquired by Mentor Graphics Company in 2002. Currently nucleus source code is completely open, no product royalties (royalty free), development and commissioning tools are complete. [5] The nucleus system is a modular structure that can be tailored to support virtually any embedded microprocessor (MCU) that is portable and does not need to be developed with BSP (Board support packages, edition-level supports).
Nucleus In addition to the operating system kernel (Kernel), also provides the TCP/IP protocol package (Nucleus Net), graphics package (Nucleus Grafix) and other ancillary tools, is widely used in various embedded systems, including mobile phones, network equipment, automotive electronic equipment, Communication equipment, medical equipment and so on.
MTK chooses nucleus reason, estimate has three, 1. Nucleus quality is reliable, 2. Development easy, 3. Low cost. Moreover, MTK uses only the kernel part of nucleus, which reduces the dependence of MTK software system on nucleus. The so-called nucleus kernel, mainly multi-task concurrency processing mechanism, as well as memory management, including the following several parts.
1. Task scheduling, including priority, time slice (Slice), and preemption (preemptive) control mechanism.
2. Communication between tasks, including mailbox (Mailbox), queue, and pipeline (pipe) communication mechanism.
3. Synchronization between tasks, including semaphore (Semaphore), Events (event), and Signal (Signal) synchronization mechanisms.
4. Memory management, including partitioning and dynamic two ways, that is, fixed-length and indefinite length of memory allocation and release.
There is no significant difference between the Nucleus kernel and Linux and other kernels. MTK sets an adaptation layer (KAL OS adaptation) between the nucleus and other system modules. The purpose of this adaptation layer is to encapsulate the specific implementation of the OS kernel to facilitate system call. In addition, MTK does not use nucleus support for peripheral management, as well as the nucleus application graphical interface library and so on.
About the MTK system hardware and software, is introduced here. Understand the MTK system, or more precisely, for Featurephone hardware and software systems, we are not difficult to understand the emergence of smartphone, is the evolution of featurephone products. The RMI (Remote MMI) mentioned in Figure 40 can be seen as entering the smartphone new world and listening to tell.
Appendix,
MTK software system, each function module name abbreviation of the full and introduction, see Figure 40.
1. Rmi:remote MMI, for example, a PC can communicate with the protocol stack via the UART port.
2. Fmi:feature Rich MMI
3. L4:mmi communicates with the GSM/GPRS protocol stack via L4, including the following sub-modules,
3.1. Atci:at command interpreter, explaining commands from the PC and ordering L4 to do the corresponding actions
3.2. L4A:L4 adaptation Layer, MMI and L4A via message communication
3.3. L4C:L4 Control Entity, handles all application requests and responses
3.4. Uem:user equipments adaptation, driver-related adaptation layer
3.5. Phb:phone Book management, phonebook-related processing, such as classification
3.6. Smu:sim management Unit, security management and STK
3.7. Csm:circuit switching protocol stack Management Circuit switching protocol stack management
3.8. Rac:registration Access Control
3.9. Smsal:short Message Service Application layer
3.10. Tcm:terminal Context Management
4. Nvram:nor-volatile RAM, which is an adaptation layer of MMI to flash, save some default settings
5. Sim:subscriber identity module. Handle SIM Behavior as ETSI 11.11 description
6. Data: Circuit-switched service, including the following sub-modules
6.1. Fax:group 3 Facsimile
6.2. Tdt:transparent Circuit Switching data
6.3. L2r:layer 2 Relay protocol for Non-transparent circuit switching data
6.4. Rlp:radio link protocol for Non-transparent circuit switching data
7. Cc:circuit-switched Call control circuit switching
8. Ss:supplementary Service Add-on services
9. Sms:short Message Service SMS
Sm:session Management Session Management
Mm/gmm:mobility Management Mobile Performance management
Sndcp:sub-network Dependent Convergence Protocol
Llc:logical Link Control Logical connection controls
Rr:radio resource management, including the following sub-modules
14.1. Rrm:handles cell selection and PLMN selection
14.2. Rmpc:handles the procedures in idle/dedicated state including the surrounding cell scheme and measurement reporting
14.3. Lapdm:handles the procedure defined in GSM Layer 2
14.4. Rlc:radio Link Control Protocol
14.5. Mac:medium Access Control Protocol
14.6. Mpal:adaptation layer for RR and L1A
PPP Point-to-Point protocol layer, client peer-to-peer protocol
Reference,
[1] GSM Protocol Stack. (http://www.tutorialspoint.com/gsm/gsm_protocol_stack.htm)
[2] GSM Um Interface. (Http://en.wikipedia.org/wiki/Um_Interface)
[3] MTK software Platform. (http://www.docin.com/p-6004509.html)
[4] Talking about the development of GSM mobile phone MMI software. (http://www.ergocn.com/wenzhai35.htm)
[5] Introduction to Nucleus OS. (http://www.docin.com/p-7535534.html)
On cottage phone and Android "7" MTK mobile phone software system