Communication terminal enters, exits and the method for advance and retreat calibration mode
Technical field
The present invention relates to field of communication technology, in particular to a kind of communication terminal enters, exits and advance and retreat calibration mode
Method.
Background technique
The absolute precision of component used is generally inadequate for device frequency, power electricity in communication terminal (such as mobile phone)
The performance objective of gentle other parameters.After producing line assembling finishes, since itself of component and process flow are existing accidentally
Difference, so that the electrical property of each communication terminal is not identical, this may generate large effect to its communication quality.
The requirement of wireless transmission, receiving device to component can be then reduced by calibration, reduces material cost, most final decline
Low entire wireless transmission, the cost of receiving device, reach optimal communication quality.Calibration is by computer control communication terminal
Communication terminal relevant parameter is measured into test mode, and by instrument and meter, by the radio frequency parameter of communication terminal, battery parameter
Wait adjustment to most accurate state.
Therefore, in research and development of products and producing line, the electronic products such as mobile phone usually require to calibrate.However, the prior art
Communication terminal under normal operation (normal mode) is calibrated, the operation for first carrying out power-on and power-off is typically necessary
(referring specifically to the operation re-powered after lower electricity), then just can enter calibration mode, if also wanting to return just after calibration finishes
Norm formula then also needs the operation for carrying out power-on and power-off, not only cumbersome in this way, and wastes time, waste of manpower resource,
It is even more difficulty especially for non-removable all-in-one machine.
Summary of the invention
The problem to be solved in the present invention is switching of the communication terminal between normal mode and calibration mode in the prior art
The operation for requiring to carry out power-on and power-off is just able to achieve, and is caused cumbersome and is wasted time, human resources.
To solve the above problems, technical solution of the present invention provides a kind of method that communication terminal enters calibration mode, comprising:
When communication terminal is in normal mode, by making it into calibration to the first control command of communication terminal transmission
Mode;First control command is suitable in the case where the communication terminal maintains power-up state always, triggers for described
In the communication protocol stack of communication terminal module relevant to pending calibration tasks unlatching control, and with pending school
The closing of the unrelated module of quasi- task controls.
Optionally, first control command is AT order or DIAG order.
Optionally, the communication terminal enters the method for calibration mode further include: when the communication terminal enters calibrating die
Formula, setting calibration marker are DIAG order by the command id transmitted between equipment and the communication terminal is controlled;The control
Equipment is suitable for controlling the communication terminal and carries out calibration operation in the calibration mode, and the calibration marker is suitable for identifying the control
The order transmitted between equipment and the communication terminal is AT order or DIAG order.
Optionally, transmission is ordered in the corresponding process of used interface between the control equipment and the communication terminal
Two threads are set up, the transmission of AT order Yu DIAG order is respectively used to, are realized between two threads according to the calibration marker
Switching.
Optionally, the communication terminal enters the method for calibration mode further include:
The order transmitted between control equipment and the communication terminal is packaged in the form of DIAG frame;The control is set
The standby control communication terminal that is suitable for carries out calibration operation in the calibration mode;
When the communication terminal enters calibration mode, the control equipment and the communication are judged by detection DIAG frame
The order transmitted between terminal is the DIAG order or pure DIAG order in the form of DIAG frame to being formed after AT order encapsulation.
Optionally, Xiang Suoshu communication terminal sends the first control command and makes it into calibration mode and include:
After receiving first control command, the communication terminal is made to enter offline mode;In the offline mode
Under, the modules in the communication protocol stack are in closed state;
Module relevant to pending calibration tasks in the communication protocol stack is opened, so that the communication terminal enters
Calibration mode.
Optionally, so that the communication terminal is entered offline mode is locally to force to carry out in the communication terminal.
Optionally, first control command is by universal asynchronous receiving-transmitting transmitter (UART, Universal
Asynchronous Receiver and Transmitter) interface or universal serial bus (USB, Universal Serial
Bus) interface is transmitted.
To solve the above problems, technical solution of the present invention also provides a kind of method that communication terminal exits calibration mode, packet
It includes:
When communication terminal is in calibration mode, by sending the second control command to the communication terminal, to exit it described
Calibration mode is to enter normal mode;Second control command is suitable for maintaining the feelings of power-up state always in the communication terminal
Under condition, triggers and the unlatching of modules in the communication protocol stack of the communication terminal is controlled.
Optionally, second control command is AT order or DIAG order.
Optionally, the method that the communication terminal exits calibration mode further include: when the communication terminal enters normal mode
Formula, setting calibration marker are AT order by the command id transmitted between equipment and the communication terminal is controlled;The control is set
The standby control communication terminal that is suitable for carries out functional test and verification operation in the normal mode, and the calibration marker is suitable for mark
The order transmitted between the control equipment and the communication terminal is AT order or DIAG order.
Optionally, transmission is ordered in the corresponding process of used interface between the control equipment and the communication terminal
Two threads are set up, the transmission of AT order Yu DIAG order is respectively used to, are realized between two threads according to the calibration marker
Switching.
Optionally, second control command is transmitted by UART or USB interface.
To solve the above problems, technical solution of the present invention also provides a kind of method of communication terminal advance and retreat calibration mode, packet
It includes:
When communication terminal is in normal mode, by making it into calibration to the first control command of communication terminal transmission
Mode;
When communication terminal is in calibration mode, by sending the second control command to the communication terminal, to exit it described
Calibration mode is to enter normal mode;
First control command is suitable in the case where the communication terminal maintains power-up state always, triggers for institute
State module relevant to pending calibration tasks in the communication protocol stack of communication terminal unlatching control, and with it is pending
The closing of the unrelated module of calibration tasks controls, and second control command is suitable for maintaining to power on shape always in the communication terminal
In the case where state, triggers and the unlatching of modules in the communication protocol stack is controlled.
Optionally, first control command and the second control command are AT order or DIAG order.
Optionally, the method for the communication terminal advance and retreat calibration mode further include:
When the communication terminal enters calibration mode, setting calibration marker will be controlled between equipment and the communication terminal and be passed
Defeated command id is DIAG order;
When the communication terminal enters normal mode, setting calibration marker will be controlled between equipment and the communication terminal and be passed
Defeated command id is AT order;
The control equipment is suitable for controlling the communication terminal and carries out calibration operation in the calibration mode and in normal mode
Functional test and verification operation are carried out under formula, the calibration marker is suitable for identifying to be transmitted between control equipment and the communication terminal
Order be AT order or DIAG order.
Optionally, transmission is ordered in the corresponding process of used interface between the control equipment and the communication terminal
Two threads are set up, the transmission of AT order Yu DIAG order is respectively used to, are realized between two threads according to the calibration marker
Switching.
Optionally, the method for the communication terminal advance and retreat calibration mode further include:
The order transmitted between control equipment and the communication terminal is packaged in the form of DIAG frame;The control is set
It is standby be suitable for controlling the communication terminal carry out calibration operation in the calibration mode and carry out in the normal mode functional test and
Verification operation;
When the communication terminal enters calibration mode, the control equipment and the communication are judged by detection DIAG frame
The order transmitted between terminal is the DIAG order or pure DIAG order in the form of DIAG frame to being formed after AT order encapsulation.
Optionally, Xiang Suoshu communication terminal sends the first control command and makes it into calibration mode and include:
After receiving first control command, the communication terminal is made to enter offline mode;In the offline mode
Under, the modules in the communication protocol stack are in closed state;
Module relevant to pending calibration tasks in the communication protocol stack is opened, so that the communication terminal enters
Calibration mode.
Optionally, so that the communication terminal is entered offline mode is locally to force to carry out in the communication terminal.
Optionally, first control command and the second control command are transmitted by UART or USB interface.
Compared with prior art, technical solution of the present invention has at least the following advantages:
In the case where communication terminal maintains power-up state always, by sending control command, trigger for the communication
The unlatching of correlation module and independent modules close control in the communication protocol stack of terminal, without carrying out the operation of power-on and power-off
Just realize that the communication terminal switches between normal mode and calibration mode, thus, it is possible to streamline operations, and save
A large amount of time, human resources are saved.
Detailed description of the invention
Communication terminal is entered the flow diagram of calibration mode by normal mode to Fig. 1 in the prior art;
Fig. 2 is the flow diagram that communication terminal is entered calibration mode by normal mode in the embodiment of the present invention;
Fig. 3 is the schematic diagram that appliance control communication terminal advance and retreat calibration mode is controlled in the embodiment of the present invention;
Fig. 4 is to control communication terminal in the embodiment of the present invention to carry out showing for functional test and verification operation and calibration operation
It is intended to;
Fig. 5 is the flow diagram of communication terminal advance and retreat calibration mode in the embodiment of the present invention.
Specific embodiment
To make the above purposes, features and advantages of the invention more obvious and understandable, with reference to the accompanying drawing to the present invention
Specific embodiment be described in detail.
The communication terminal (such as mobile phone) that the prior art is related to first by normal mode enter the process of calibration mode into
Row is simple to be introduced.
In the prior art, if desired the communication terminal under normal mode is calibrated, is typically necessary advanced
The operation re-powered after the lower electricity of row, then could select to enter calibration mode.As known to those skilled in the art, communication terminal
After normal mode refers to communication terminal normal boot-strap, it is able to carry out the operation for the operations such as make a phone call, send short messages, surfing the Internet, downloading
System model.
As shown in Figure 1, it includes following below scheme that communication terminal, which enters calibration mode by normal mode, in the prior art:
Firstly, executing step S101, communication terminal is in normal mode.
When needing to calibrate communication terminal, S102 is thened follow the steps, communication terminal carries out down electrically operated.
After step S102, step S103 is executed, communication terminal carries out power on operation.
After communication terminal completes power on operation, step S104 is executed, communication terminal sends power on operation to control equipment
Completed handshake information.
As known to those skilled in the art, the control equipment refers to that control communication terminal is calibrated in the calibration mode
The equipment of operation, usually can be real by being equipped with the PC (PC, Personal Computer) of respective alignment tool
It is existing.
After issuing the handshake information, step S105 is executed, equipment to be controlled is waited to select to communication terminal sending mode
Message.Model selection in step S105 refers to model selection of the communication terminal conducted in start process, usual situation
Lower booting default enters normal mode, in particular demands, can be selected to enter calibration mode by the control equipment.
During waiting equipment to be controlled to send message to communication terminal, also execution step S106 judges whether to receive
To the message of model selection, and whether overtime wait.
In the case where not receiving the message of model selection, is had not timed out if waiting, step S105 is continued to execute, if waiting
To time-out, then time-out is waited, then follow the steps S107, closes the switch of control model selection.After step S107, communication terminal will
Into normal mode;If receiving the message of model selection, and wait and having not timed out, then follow the steps S108, communication terminal enters
Calibration mode.
It follows that communication terminal by normal mode enters calibration mode in the prior art, require to communication terminal into
It is capable to restart and (descend electricity to power on again, model selection), and present inventor recognizes: when the communication terminal for needing to be implemented calibration operation
Negligible amounts when, those skilled in the art can't usually perceive the side that the prior art is entered calibration mode by normal mode
Formula there are what deficiency, and when needed to be implemented on production line the quantity of communication terminal of calibration operation it is especially huge when, existing skill
Art it is lower electricity, re-power by way of calibration mode, not only shut down, the operation turned back on itself needs to occupy centainly
Time, and after lower electricity powers on again, the re-enumeration of the interface software driving of communication terminal is also required to the time, in addition, opening again
It also needs for the associated process of operating system to be loaded into memory during machine, it is contemplated that above-mentioned factor, cumbersome and waste
The shortcomings that time, waste of manpower resource, just displays.
Present inventor further analyzes: the difference between the normal mode and calibration mode of communication terminal, substantially
It can be presented as the situation that opens or closes of corresponding module in the communication protocol stack (PS, Protocol Stack) of communication terminal
It is different.The communication protocol stack includes multiple protocol stack modules (module referred to as in protocol stack), and the items of communication terminal are logical
The realization of communication service needs to load corresponding protocol stack module in an operating system and is just able to achieve.In the normal mode, Ge Xiangtong
Telecommunication function needs to load at this time the modules in the communication protocol stack, i.e., under normal mode generally all in open state
Modules in communication protocol stack are in the open state;And in the calibration mode, usually for a certain communication service (such as
Radio frequency) it is calibrated, if other communication services are also being run at this time, it is likely that generated to the calibration result of this communication service
Interference, for exclusive PCR, need to separate the respective protocol stack module of other communication services from operating system, only retain with
The relevant protocol stack module of calibration tasks, i.e., module relevant to calibration tasks is in unlatching in communication protocol stack under calibration mode
State, other modules unrelated with calibration tasks are in close state.However, when communication terminal is under normal mode, according to
The unlatching of corresponding module and the closing of independent modules in different calibration tasks control communication protocol stacks, this is not light and easy
It lifts, but needs to make corresponding improvement to the calling control of communication protocol stack, be a relatively complicated task, therefore general
It is not easy to be expected by those skilled in the art.
Based on above-mentioned analysis, in one embodiment of the invention, the side that a kind of communication terminal enters calibration mode is provided
Method, comprising: when communication terminal is in normal mode, by making it into calibration to the first control command of communication terminal transmission
Mode;First control command is suitable in the case where the communication terminal maintains power-up state always, triggers for described
In the communication protocol stack of communication terminal module relevant to pending calibration tasks unlatching control, and with pending school
The closing of the unrelated module of quasi- task controls.
In the specific implementation, the process that communication terminal enters calibration mode by normal mode in the present embodiment is as shown in Figure 2:
Step S201, communication terminal are in normal mode.
Step S202, communication terminal maintain power-up state always.
Step S203, it is ensured that the port communicated between communication terminal and control equipment is in the open state.This implementation
In example, the control equipment is the equipment for carrying out calibration operation in the calibration mode suitable for controlling communication terminal, specifically with installation
There is the PC of respective alignment tool to realize.
Step S204, control equipment send the first control command to communication terminal by the port, and triggering is for communicating eventually
In the communication protocol stack at end module relevant to pending calibration tasks unlatching control, and with pending calibration tasks
The closing of unrelated module controls.
Step S205, communication terminal enter calibration mode.
The communication terminal provided through this embodiment enters the method for calibration mode, in the normal mode without restarting (packet
Containing lower electricity power on operation, mode selecting operation etc. again) communication terminal, can make as long as sending a control command its quickly into
Enter calibration mode.
In actual implementation, first control command can be realized by way of AT order or DIAG order.This reality
It applies in example, is illustrated so that first control command is AT order as an example.
As known to those skilled in the art, the mode communicated between domestic and international more mature PC and mobile phone mostly uses greatly
Following two: DIAG order and AT order.
AT, that is, Attention, AT Command Set are set from terminal device (TE, Terminal Equipment) or data terminal
Standby (DTE, Data Terminal Equipment) is whole to terminal adapter (TA, Terminal Adapter) or data circuit
What end equipment (DCE, Data Circuit Terminal Equipment) was sent.By TA, TE sends AT order and moves to control
The function of dynamic platform (MS, Mobile Station), interacts with wireless cellular network business.User can by AT order into
The control of row calling, short message, phone directory, data service, fax etc..
DIAG original meaning Diagnostic is vedio on radio binary operation environment (BREW, the Binary Runtime of high pass
Environment for Wireless) platform a module, it provides test, debugging etc. for communication terminals such as such as mobile phones
Function.On binary runtime environment for wireless, AT and DIAG both of which are usually mutual exclusion, i.e., when mobile phone is under AT mode, can only respond
AT order cannot respond DIAG order, and under DIAG mode, DIAG order can only be responded, AT order cannot be responded.
Currently, " AP+CP " scheme is prevailing with the rise of intelligent communications terminal (such as smart phone) in the communications field,
Wherein AP (Application Processor) is properly termed as application processor, is responsible for the processing of all application programs, CP
(Communication Processor) is properly termed as Communication processor, is responsible for the execution of all communication softwares.The part AP and CP
Part be it is separated from each other, generally communicated between the two by AT order, such as: when making a phone call, AP passes through AT order
When controlling CP, and having incoming call, CP notifies AP by AT order.In the present embodiment, the communication terminal is to have " AP+CP " framework
Smart phone for be illustrated.
It should be noted that the first control command in the present embodiment is not the AT that those skilled in the art generally use
Order, but the AT order with specific function, are to realize that communication terminal provided in this embodiment enters calibration mode
Method and especially set up, which will be added in communication protocol stack, once identify the AT order, just trigger for
In the communication protocol stack of communication terminal module relevant to pending calibration tasks unlatching control, and with pending school
The closing of the unrelated module of quasi- task controls.
In the specific implementation, the calibration tasks can be in different wireless access technology (RAT, Radio Access
Technology it is carried out under), the wireless access technology includes: global system for mobile communications (GSM, Globe System of
Mobile Communication), TD SDMA (TD-SCDMA, Time Division-Synchronous
Code Division Multiple Access), wideband code division multiple access (WCDMA, Wideband Code Division
Multiple Access), long term evolution (LTE, Long Term Evolution) etc.;Under every kind of wireless access technology, all
It may include a plurality of types of calibration tasks such as RF calibration, the calibration of power, signal gain calibration and temperature correction.
Therefore, if the current pending calibration tasks of communication terminal are the RF calibration under GSM, the communication of communication terminal
Module relevant with pending calibration tasks then should belong in protocol stack module relevant to gsm communication mode in protocol stack,
And in the communication protocol stack protocol stack module relevant to the communication patterns such as TD-SCDMA, WCDMA or LTE then should belong to
The unrelated module of pending calibration tasks, protocol stack module relevant to radio frequency should belong to and pending calibration tasks phase
The module unrelated with pending calibration tasks should belong in the module of pass, the protocol stack module unrelated with radio frequency.In this implementation
In example, according to the difference of pending calibration tasks, by the communication protocol stack of communication terminal with pending calibration tasks phase
The module of pass is opened, and the module unrelated with pending calibration tasks is closed, just can make communication terminal into
Enter calibration mode.
In the present embodiment, Xiang Suoshu communication terminal sends the first control command and makes it into calibration mode, can specifically lead to
Under type such as is crossed to realize:
After receiving first control command, the communication terminal is made to enter offline mode;In the offline mode
Under, the modules in the communication protocol stack are in closed state;
Module relevant to pending calibration tasks in the communication protocol stack is opened, so that the communication terminal enters
Calibration mode.
In actual implementation, so that the communication terminal is entered offline mode is locally to force to carry out in the communication terminal
's.It should be noted that can generally be sent to network side when communication terminal enters offline mode in the normal fashion in the prior art
Space interface signaling, to notify the network side communication terminal to will be switched off the connection with communication network;And in the present embodiment, the communication is eventually
End is locally to be forced into offline mode, can't send space interface signaling to network side, so can more quickly make described
Modules in communication protocol stack enter closed state, to quickly communication terminal be made to be switched to calibration mode.At other
In embodiment, after Xiang Suoshu communication terminal sends the first control command, it is not absolutely required to by each mould in communication protocol stack
Block is all closed, and is then turned on module relevant to pending calibration tasks, and directly in communication close protocol stack with it is pending
The unrelated module of calibration tasks, keep module relevant to pending calibration tasks in communication protocol stack to be in opening state
State.
In actual implementation, calibration operation is carried out in the calibration mode since control equipment controls the communication terminal, is led to
It is all often to be transmitted in the form of DIAG order, and the communication terminal is typically all in the form of AT order in the normal mode
Relevant operation is carried out, is generally also carried out by AT order between the application processor and Communication processor in the communication terminal
Communication, it is highly efficient for the transmission of DIAG order and identification under calibration mode in order to make, it can pass through and calibration marker is set
The command id transmitted between the control equipment and the communication terminal is AT life by the mode of (calibration flag)
Order or DIAG order.
In the present embodiment, when the communication terminal enters calibration mode, the calibration marker, which can be set, to be controlled
The command id transmitted between equipment and communication terminal is DIAG order.In actual implementation, if the calibration marker is arranged
It is 1, then controls the order transmitted between equipment and communication terminal and be generally all identified as DIAG order, if the calibration marker is set
It is set to 0, then controls the order transmitted between equipment and communication terminal and is generally all identified as AT order.
In the specific implementation, transmission used interface can be ordered between the control equipment and the communication terminal
Two threads are set up in corresponding process, are respectively used to the transmission of AT order Yu DIAG order, realize two according to the calibration marker
Switching between a thread.
It should be readily apparent to one skilled in the art that " transmission order is made between control equipment and communication terminal in the present embodiment
With interface " in " interface ", be not limited solely to hardware view, what is more embodied is the meaning of software view, control equipment and logical
Letter terminal, which passes through, is somebody's turn to do " interface " transmission order, needs respective drive program to be just able to achieve, specifically then relies on and be somebody's turn to do " interface "
Accordingly " process " handles data communication between the control equipment and the communication terminal, is somebody's turn to do " process " in the present embodiment and is contained in
The application processor of communication terminal, in actual implementation usually with " Engpc " name, can be understood as be control equipment with
The channel of order transmission is realized between communication terminal, the calibration marker is set in " Engpc " this process, and is respectively used to
AT order transmission then switches according to calibration marker progress is corresponding to two threads that DIAG order is transmitted, logically can be with
It is interpreted as the switching of the transmission channel between control equipment and communication terminal, if the calibration marker is set as 1, the life transmitted
Enable the channel DIAG, if the calibration marker is set as 0, the channel AT is walked in the order transmitted.By the above-mentioned means, can make to control
DIAG transmission channel and AT transmission channel are supported between control equipment and communication terminal simultaneously.
Certainly, in other embodiments, it can not also use above by two threads and set up the side of calibration marker
Formula realizes the identification and processing that order is transmitted between control equipment and communication terminal.Such as: can by will control equipment with
The order transmitted between communication terminal is packaged in the form of DIAG frame, judges the control equipment by detection DIAG frame
The order transmitted between the communication terminal be in the form of DIAG frame to the DIAG order that is formed after AT order encapsulation or
Pure DIAG order;When communication terminal is under normal mode, controlling the order transmitted between equipment and communication terminal is with DIAG
The DIAG order that is formed after the form of frame encapsulates AT order, realization be still original AT order function;And when described logical
Letter terminal enters calibration mode, and controlling the order transmitted between equipment and communication terminal is pure DIAG order.It should be noted that
In these cases, first control command should also be as being to order the DIAG formed after AT order encapsulation in the form of DIAG frame
It enables.
In actual implementation, first control command can be transmitted by UART or USB interface.It needs to illustrate
It is that the UART or USB interface in the embodiment of the present invention are the concept of software view, same physics is used in actual implementation and is connect
Mouthful, only the driver on the basis of the physical interface is different, so as to cause the area between UART interface and USB interface
Not.
In the present embodiment, the interface specifically uses UART interface, can so make to control between equipment and communication terminal
It is more stable when transmission order.In other embodiments, the interface can also use USB interface, for the technology of the present invention side
The realization of case can't impact.
It should be pointed out that due to UART interface or USB interface be all in communication terminal it is more common, so not needing
In addition it creates new interface control equipment is connected with communication terminal to realize the transmission of control command or data.
This gives the methods that communication terminal is quickly switched into calibration mode from normal mode, when communication terminal exists
It, both can be by lower electricity in the prior art again if wishing to return to normal mode after completing all calibration tasks under calibration mode
The mode powered on enters normal mode after restarting, and the method that can also be provided by following example exits calibration mode to enter
Normal mode.
In another embodiment of the present invention, a kind of method that communication terminal exits calibration mode is also provided, comprising: when
Communication terminal is in calibration mode, by the communication terminal send the second control command make its exit the calibration mode with
Into normal mode;Second control command is suitable in the case where the communication terminal maintains power-up state always, triggering
Unlatching control for modules in the communication protocol stack of the communication terminal.
It should be noted that the communication terminal in the present embodiment has been in the state of calibration mode, as communication end
How end enters calibration mode, this is realized after can both restarting in such a way that lower electricity in the prior art powers on again, can also lead to
Cross the method realization that communication terminal given by one embodiment enters calibration mode.In the present embodiment, " in a upper reality
It applies the communication terminal that example provides to enter on the basis of the method for calibration mode, implements the method that communication terminal exits calibration mode "
For be illustrated, related content can be repeated no more with reference to the description in upper one embodiment.
In the normal mode due to communication terminal, usually every communication function needs to load at this time all in open state
Modules in the communication protocol stack, therefore can be from control equipment by sending a control command to communication terminal
(i.e. the second control command) triggering controls the unlatching of modules in the communication protocol stack of the communication terminal, in this process
In, communication terminal maintains power-up state always, does not need to carry out the process that lower electricity powers on again, to equally simplify operation stream
Journey, and save a large amount of time, human resources.
In actual implementation, second control command can be realized by way of AT order or DIAG order.This reality
It applies in example, is illustrated so that second control command is AT order as an example, second control command again may be by
UART or USB interface are transmitted.
It should be noted that the second control command in the present embodiment is not equally that those skilled in the art generally use
AT order, but with specific function AT order, be to realize that communication terminal provided in this embodiment exits calibrating die
The method of formula and especially set up, which will also be added in communication protocol stack, once identifying the AT order, just touch
It sends out and the unlatching of modules in the communication protocol stack of communication terminal is controlled.
In the present embodiment, the life transmitted between equipment and communication terminal will be controlled still through the mode of setting calibration marker
Order is identified as AT order or DIAG order.In actual implementation, if setting 1 for the calibration marker, controls equipment and lead to
The order transmitted generally all is identified as DIAG order between letter terminal, if the calibration marker is set as 0, control equipment and
The order transmitted between communication terminal is generally all identified as AT order.In the present embodiment, when communication terminal enters normal mode,
It can be AT order by the command id transmitted between equipment and the communication terminal is controlled by setting calibration marker.
When it is implemented, can still transmit the corresponding process for ordering used interface between control equipment and communication terminal
In set up two threads, be respectively used to the transmission of AT order Yu DIAG order, according to the calibration marker realize two threads it
Between switching.
The control equipment is not only suitable for controlling communication terminal and carries out calibration operation in the calibration mode, is further adapted for controlling institute
It states communication terminal and carries out functional test and verification operation in the normal mode.In a particular embodiment, it the functional test and tests
Card operation may include patch test, field is surveyed, WLAN (WLAN, Wireless Local Area Networks) is surveyed
Examination, comprehensive survey and International Mobile Equipment Identity identification code (IMEI, International Mobile Equipment
Identity) one of write verification or a variety of.
Enter the method for calibration mode based on the communication terminal that above-mentioned two embodiment provides and communication terminal exits school
The method of quasi-mode also provides a kind of method of communication terminal advance and retreat calibration mode in one more embodiment of the present invention.
Since communication terminal is in producing line, not only need to execute calibration operation to it in the calibration mode, it is also necessary to just
Functional test and verification operation are carried out under norm formula to it, and calibration operation is usually to operate in multiple function test and verification
Between execute, just need communication terminal is enable quickly and easily to be cut between normal mode and calibration mode at this time
It changes, and the method for communication terminal advance and retreat calibration mode provided in this embodiment, then it can maintain always to power on shape in communication terminal
This purpose is realized in the case where state.
The method of the communication terminal advance and retreat calibration mode includes: when communication terminal is in normal mode, by described
Communication terminal sends the first control command and makes it into calibration mode;When communication terminal is in calibration mode, by leading to described
Letter terminal, which sends the second control command, makes it exit the calibration mode to enter normal mode;First control command is suitable for
In the case where the communication terminal maintains power-up state always, triggering in the communication protocol stack of the communication terminal with to
The unlatching of the relevant module of the calibration tasks of execution controls, and the closing control of the module unrelated with pending calibration tasks
System, second control command are suitable in the case where the communication terminal maintains power-up state always, and triggering is for described logical
Believe the unlatching control of modules in protocol stack.
The overall process for controlling appliance control communication terminal advance and retreat calibration mode is as shown in Figure 3:
Firstly, control equipment is controlled by AT order, communication terminal carries out functional test in the normal mode and verifying is grasped
Make.In the present embodiment, the communication terminal is with the smart phone with " application processor (AP)+Communication processor (CP) " framework
For be illustrated.
When needing to calibrate communication terminal, control equipment sends the first control command (" AT+ to communication terminal
MODECHAN=0,0 "), calibration mode is made it into the case where communication terminal maintains power-up state always, works as communication terminal
After entering calibration mode, the feedback (indicating in Fig. 3 with " OK ") for being successfully switched to calibration mode can be sent to control equipment.
Communication terminal receive " AT+MODECHAN=0, after 0 " the first control command, the mailing address in communication terminal
Reason device enters the state of calibration mode, and application processor calibration is notified to start, and application processor then can terminate and lead at this time
Some services of interaction between processor are interrogated, to ensure the accuracy of calibration operation.
After controlling appliance control communication terminal all calibration tasks of completion, then the second control life is sent to communication terminal
Enable (" AT+MODECHAN=0,2 "), so that it is exited calibration mode in the case where communication terminal maintains power-up state always and returns
Normal mode is returned, after communication terminal exits calibration mode, equally can successfully exit calibration mode to control equipment transmission
It feeds back (also being indicated in Fig. 3 with " OK ").
Communication terminal receive " AT+MODECHAN=0, after 2 " the second control command, the mailing address in communication terminal
Reason device exits calibration mode, returns to the state of normal mode, and application processor calibration is notified to terminate, at this time application processor
The some services interacted between Communication processor can then be reopened.
In actual implementation, first control command and the second control command can pass through AT order or DIAG order
Form realize, first control command and the second control command can be transmitted by UART or USB interface.This reality
Apply in example, be AT order with first control command and the second control command, and for being transmitted by UART interface into
Row explanation.
It, can will be between the control equipment and the communication terminal in such a way that calibration marker is set in the present embodiment
The command id of transmission is AT order or DIAG order.When the communication terminal enters calibration mode, setting calibration marker will be controlled
The command id transmitted between control equipment and the communication terminal is DIAG order;When the communication terminal enters normal mode,
It is AT order that calibration marker, which is arranged, by the command id transmitted between equipment and the communication terminal is controlled.
When it is implemented, the phase for ordering used interface can be transmitted between the control equipment and the communication terminal
It answers and sets up two threads in process, be respectively used to the transmission of AT order Yu DIAG order, realize two according to the calibration marker
Switching between thread.
It is realized two threads and by way of setting up calibration marker and transmits life between control equipment and communication terminal
The identification and processing of order, specific implementation can also be with reference to the associated descriptions in one embodiment.
Need to illustrate when, in other embodiments, can not also use above by two threads and set up calibration
The mode of mark realizes the identification and processing that order is transmitted between control equipment and communication terminal, implements at first to this
It is discussed in detail in example, details are not described herein again.
In the present embodiment, the specific implementation that the first control command makes it into calibration mode is sent to communication terminal,
It can also then be then turned in communication protocol stack and appoint with pending calibration using first making the communication terminal enter offline mode
It is engaged in relevant module, so that communication terminal enters calibration mode.Wherein, so that communication terminal is entered offline mode is in communication terminal
What local pressure carried out.The specific implementation for making it into calibration mode to the first control command of communication terminal transmission can also refer to
Associated description in one embodiment, details are not described herein again.
As previously mentioned, communication terminal is in the production line, both need to carry out calibration operation in the calibration mode, it is also desirable to just
Functional test and verification operation are carried out under norm formula, since calibration operation is usually between the operation of multiple function test and verification
It executes, the front and back that multiple function test and verification operation in other words can be arranged in calibration operation respectively carries out, therefore communicates eventually
End more convenient, quickly can switch between normal mode and calibration mode, the production and survey for communication terminal
Examination has very important significance.
Fig. 4 is to control communication terminal in the embodiment of the present invention to carry out showing for functional test and verification operation and calibration operation
It is intended to.
When communication terminal is under normal mode, it will carry out patch test, field survey, Wireless LAN testing, carrying out
When these test assignments, the AT order for being free from DIAG frame transmitted between equipment and communication terminal is controlled.
After completing patch test, field survey, Wireless LAN testing, control equipment sends " AT+ to communication terminal
MODECHAN=0,0 " the first control command, makes communication terminal enter calibration mode.At transmission " AT+MODECHAN=0,0 "
The first control command when, control the order or data transmitted between equipment and communication terminal and be still free of DIAG frame.
After communication terminal enters calibration mode, start to execute calibration tasks under the control of control equipment.In the present embodiment
It is illustrated so that the calibration tasks are RF calibration as an example.In other embodiments, the calibration tasks can also include function
The multiple types such as rate calibration, signal gain calibration and temperature correction.
In addition, if communication terminal supports a variety of wireless access technologys, the calibration tasks that can wirelessly connect in different
Enter and carried out under technology, the wireless access technology includes: GSM, TD-SCDMA, WCDMA, LTE etc..Such as: support GSM and TD-
The communication terminal of SCDMA had both needed to execute RF calibration under gsm communication mode, it is also desirable under TD-SCDMA communication pattern
Execute RF calibration.
For communication terminal during carrying out RF calibration, what is transmitted between control equipment and communication terminal is DIAG frame
Calibration command.Certainly, as known to those skilled in the art, DIAG is a kind of multiplex protocol, and when being calibrated, communication terminal is with control
When equipment interacts, there are many different types of calibration data, and a DIAG frame head is added before these calibration data just
Become DIAG order, what data communication terminal can be to determine by the frame head of judgement DIAG frame, finally take away below
Data handled.
After completing RF calibration, control equipment sends " AT+MODECHAN=0,2 " the second control to communication terminal
Order, makes communication terminal exit calibration mode.In transmission, " AT+MODECHAN=0 when 2 " the second control command, controls equipment
The order or data transmitted between communication terminal is free of DIAG frame.
After communication terminal switches back into normal mode from calibration mode, continue other functional tests and verifying behaviour
Make, it may be assumed that comprehensive survey and IMEI write verification.Equally, it when carrying out these test assignments, controls and is passed between equipment and communication terminal
The defeated AT order for being also free from DIAG frame.
The detailed process of communication terminal advance and retreat calibration mode is as shown in Figure 5 in the present embodiment:
Firstly, control equipment sends the AT order for being free of DIAG frame to communication terminal, these are free of the AT order of DIAG frame
The Communication processor of communication terminal is sent to by the Engpc in the application processor of communication terminal, the state of Engpc is at this time
Processing is free of the AT order of DIAG frame, and the state of Communication processor is the AT order that processing is free of DIAG frame under normal mode.
As described in one embodiment, the Engpc in application processor be responsible for stage process handling equipment with communicate
The process of data communication between terminal can be understood as being to control to realize the logical of order transmission between equipment and communication terminal
Road.In the present embodiment, by be arranged in " Engpc " this process calibration marker and setting up be respectively used to AT order transmission and
Two threads of DIAG order transmission, and the mutual switching between the two threads is carried out according to the calibration marker, it is specific real
The process of applying can be with reference to the associated description in one embodiment.
When needing to carry out calibration operation, control equipment sends " AT+MODECHAN=0,0 " the first control to communication terminal
Order, " AT+MODECHAN=0,0 " is sent to Communication processor by Engpc, and the state of Engpc is converted to handle at this time
DIAG order, the state of Communication processor switch to calibration mode process DIAG order.
After the state of Communication processor switchs to calibration mode process DIAG order, it can also be returned by Engpc to control equipment
The feedback message for returning "+MODECHAN:0 ", shows successfully to be switched to calibration mode.
Equipment is controlled after receiving the feedback message of "+MODECHAN:0 ", by involved by DIAG order setting calibration
Wireless access technology, setting calibrate involved in wireless access technology DIAG order and calibration process involved in DIAG
Order, is sent to Communication processor by Engpc successively, and state of Engpc is processing DIAG order, Communication processing during this
The state of device is that DIAG order is handled under calibration mode.
After completing calibration tasks, control equipment sends " AT+MODECHAN=0,2 " the second control life to communication terminal
It enables, " AT+MODECHAN=0,2 " are sent to Communication processor by Engpc.
It should be noted that " AT+MODECHAN=0,2 " when being sent to Engpc, although the state of Engpc is still processing
DIAG order, the state of Communication processor are also still temporarily calibration mode process DIAG order, but by " AT+ in this present embodiment
MODECHAN=0,0 " and " AT+MODECHAN=0,2 " this two AT orders are write in advance already extremely in Engpc, that is to say, that
State regardless of Engpc, this two AT orders can be all identified, so " AT+MODECHAN=is not present
0,2 " the case where can not being identified by Engpc.It in other embodiments, can also be by " AT+MODECHAN=0,2 " use DIAG frame
Form is encapsulated as DIAG order, and the state of Engpc is processing DIAG order at this time, naturally also can recognize that the order.
" AT+MODECHAN=0, after 2 " the second control command, the state of Engpc is just converted to processing not receiving
The AT order of the frame containing DIAG, and Communication processor just makes its state switch to normal mode without restarting.
After the state of Communication processor switchs to normal mode, can also by Engpc to control equipment return "+
The feedback message of MODECHAN:0 " shows successfully to exit calibration mode, and is switched to normal mode.
Equipment is controlled after receiving the feedback message of "+MODECHAN:0 ", can send and be free of to communication terminal
The AT order of DIAG frame, these AT orders are sent to Communication processor by the Engpc in application processor, at this time Engpc
State is the AT order that processing is free of DIAG frame, and the state of Communication processor is that AT of the processing without DIAG frame is ordered under normal mode
It enables.
It should be noted that control in actual implementation and carry out order and the communication of data between equipment and communication terminal,
Entire communication process will be recorded in the form of log (log), therefore, communication terminal provided in an embodiment of the present invention into
Enter, exit and advance and retreat calibration mode method can be embodied from the log.
Further, since communication terminal is switched to from normal mode in such a way that first lower electricity powers on again in the prior art
Calibration mode, since in the restarting process of communication terminal, the record of the log is pause, even if communication terminal has been switched to
Calibration mode loads, at this time the record of the log since the driver of equipment certain in communication terminal does not complete temporarily
There are incomplete problems, if some mistakes occur in calibration process, may also can not find reason from the log;And pass through
Communication terminal provided in an embodiment of the present invention enters, exits and advance and retreat calibration mode method, since communication terminal is in normal mode
Always power-up state is maintained in handoff procedure between formula and calibration mode, also just there is no the drivers of certain equipment not
The problem of success loads, incomplete problem is also not present in the record of the log, once then mistake occurs in calibration process,
Also reason smoothly, accurately can be found from the log.
Although present disclosure is as above, present invention is not limited to this.Anyone skilled in the art are not departing from this
It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
Subject to the range of restriction.