CN101945155B - Method and terminal device for capturing terminal debugging information in real-time manner - Google Patents

Method and terminal device for capturing terminal debugging information in real-time manner Download PDF

Info

Publication number
CN101945155B
CN101945155B CN201010273315.5A CN201010273315A CN101945155B CN 101945155 B CN101945155 B CN 101945155B CN 201010273315 A CN201010273315 A CN 201010273315A CN 101945155 B CN101945155 B CN 101945155B
Authority
CN
China
Prior art keywords
log
terminal
module
computer
storage card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010273315.5A
Other languages
Chinese (zh)
Other versions
CN101945155A (en
Inventor
单华松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201010273315.5A priority Critical patent/CN101945155B/en
Publication of CN101945155A publication Critical patent/CN101945155A/en
Application granted granted Critical
Publication of CN101945155B publication Critical patent/CN101945155B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the field of communication and discloses a method and a terminal device for capturing terminal debugging information in a real-time manner. The method comprises the steps of leading a terminal to capture a log in the real-time manner, caching the captured log and saving in a memory card in the terminal. Compared with the method of obtaining log information of the terminal by an external computer through a serial port or a USB interface in the prior art, as the log is directly saved in the memory card in the terminal, a tester does not need to carry about a notebook computer, thereby saving test resources, relieving the tester from the heavy physical labor, being capable of capturing the log of the terminal [at] anytime and anywhere and facilitating the obtainment of the debugging information on the terminal.

Description

The method of capturing terminal debugging information in real-time manner and terminal equipment
Technical field
The present invention relates to the communications field, particularly the Debugging message of terminal crawl technology in the communications field.
Background technology
Along with the development of communication network, become requisite equipment in people's daily life such as the such terminal of mobile phone.For the mobile phone development personnel, in order to ensure the normal operation of terminal (being mobile phone), need to carry out various debugging to terminal, and grasp in real time Debugging message log, to obtain the ruuning situation information of software in the terminal.
At present, in the test process of outfield, mainly be serial ports or USB (the Universal Serial Bus by terminal, be called for short " USB ") interface, the log of terminal is sent to notebook computer, grasp and preserve log information in the terminal by the log tool software on the computer.
Specifically, in terminal software, in order to debug needs, tend in code, print log, the module that these log of concrete management are so just arranged, be log monitoring entity (Log Monitor Entity is called for short " LME "), be responsible for the unified log that receives other software modules in the self terminal (such as the module relevant with protocol stack or the operational blocks which partition system such as module relevant with operation interface) to send by LME, LME carries out buffer memory with the log that receives.Subsequently, LME sends to serial ports or USB interface with the log of buffer memory, obtains the log of terminal for the external notebook computer of terminal by serial ports or USB interface, as shown in Figure 1.
Need to prove, because the data on the terminal are Big Endian (large syllable sequence) forms, and the syllable sequence of Windows system is Little Endian (little-endian) form that adopts on the computer, therefore, also need in computer, carry out format conversion to log, be Little Endian form with the Big Endian format conversion of log, this some work is to be realized by the software on the computer at present.
Yet, the present inventor finds, grasp and preserve log information in the mobile phone by the log tool software on the notebook computer in the field testing process, brought very large inconvenience (needing the tester to carry computer) to the tester, the expense thing is wasted time and energy, and depends on the one hand computer equipment, it is more loaded down with trivial details to use on the other hand operation, the most important thing is, many times because all inconvenience can not be grasped the log that wants scene in time.
Summary of the invention
The object of the present invention is to provide a kind of method and terminal equipment of capturing terminal debugging information in real-time manner, the tester need not to carry notebook computer, saves test resource, and also can in time grasp the log of terminal whenever and wherever possible.
For solving the problems of the technologies described above, embodiments of the present invention provide a kind of method of capturing terminal debugging information in real-time manner, comprise following steps:
Terminal grasps Debugging message log in real time, and the log of crawl is carried out buffer memory;
Terminal is saved in storage card in this terminal with the log of buffer memory.
Embodiments of the present invention also provide a kind of terminal equipment, comprise:
Handling module is used in real time crawl Debugging message log in real time;
Cache module, the log that is used for real-time handling module is grabbed carries out buffer memory;
Memory module is used for log with the cache module buffer memory and is saved in storage card in this terminal equipment.
Embodiment of the present invention compared with prior art, the main distinction and effect thereof are:
Terminal is at real-time crawl log, and after the log of crawl carried out buffer memory, is saved in the storage card in the terminal.Cross serial ports or USB interface compared to of the prior art by external computer expert, obtain the log information of terminal, owing to be that log directly is saved in the storage card in the terminal, therefore the tester need not to carry notebook computer, saved test resource, the tester is freed from heavy manual labor, and can in time grasp the log of terminal whenever and wherever possible, the convenient Debugging message that obtains on the terminal.
Further, before the log with buffer memory is saved in storage card in this terminal, the log of buffer memory need to be carried out format conversion, log after the format conversion is packaged into the packet that the log tool software on the computer can directly read, during the log of memory buffers, be that the log packet after the encapsulation is saved in storage card in this terminal.By the format conversion to log, guaranteed the log form in terminal, preserved after the encapsulation, with the same by the log form of computer crawl, thereby guaranteed the compatibility of crawl log file.That is to say that the log file of preserving in the terminal inner storage card can directly be opened with the log tool software on the computer, work that need not any format conversion is so very rapidly playback.
Further, when detecting this terminal and be connected with computer, need to be with the log Packet Generation after the encapsulation to serial ports or general-purpose serial bus USB interface, obtain described log packet by this serial ports or USB interface for computer, the compatible mode of crawl terminal log in the existing field testing process.And, owing to directly be conversion and the encapsulation of in terminal, carrying out form, need not in computer, to carry out the conversion of form, so computer is after getting access to the log of terminal, directly rapidly playback.
Further, when the log packet after will encapsulating is saved in storage card in this terminal, once only write the data of 32K byte in the storage card.Because log is many, and writes data continually in storage card, just certainly will relate to the efficiency of reading and writing memory card.Through experiment showed, once the data of only writing 32kBytes (byte) in the storage card, can be so that store the most effective of log.
Description of drawings
Fig. 1 is the method schematic diagram according to capturing terminal debugging information in real-time manner of the prior art;
Fig. 2 is the method flow diagram according to the capturing terminal debugging information in real-time manner of first embodiment of the invention;
Fig. 3 is the method flow diagram according to the capturing terminal debugging information in real-time manner of second embodiment of the invention;
Fig. 4 is the method schematic diagram figure according to the capturing terminal debugging information in real-time manner of second embodiment of the invention;
Fig. 5 is the structural representation according to the terminal equipment of third embodiment of the invention;
Fig. 6 is the structural representation according to the terminal equipment of four embodiment of the invention.
Embodiment
In the following description, in order to make the reader understand the application better many ins and outs have been proposed.But, persons of ordinary skill in the art may appreciate that even without these ins and outs with based on many variations and the modification of following each execution mode, also can realize each claim of the application technical scheme required for protection.
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing embodiments of the present invention are described in further detail.
First embodiment of the invention relates to a kind of method of capturing terminal debugging information in real-time manner.Fig. 2 is the method flow diagram of this capturing terminal debugging information in real-time manner.
In step 210, terminal grasps Debugging message log in real time, and the log that grabs is in real time carried out buffer memory.Specifically, utilize the unified log that receives other software modules in the self terminal (such as the module relevant with protocol stack or the operational blocks which partition system such as module relevant with operation interface) to send of existing LME in the terminal, and the buffer memory of responsible log.This step is same as the prior art, does not repeat them here.
Then, in step 220, terminal is carried out format conversion to the log of buffer memory, and the log after the format conversion is packaged into the packet that the log tool software on the computer can directly read.
Specifically, PowerPC series adopts Big Endian mode to store data, x86 series then adopts Little Endian mode to store data, that mobile phone terminal uses is the former, and that the computer use is the latter, therefore, need to will be according to the scheduling strategy of oneself by the LME in the terminal, a log who wraps carries out the processing of format conversion in the taking-up buffer memory, the log of buffer memory is transformed into LittleEndian from Big Endian, and the log after the format conversion is packaged into the packet that the log tool software on the computer can directly read.That is to say that by the mode group bag of LME according to the Little Endian of computer, and the form of group bag is the form that the log tool software on the computer can directly read.
Then, in step 230, the log packet after terminal will encapsulate is saved in the interior storage card of this terminal.In the present embodiment, storage card can be safe digital card (Secure Digital MemoryCard is called for short " SD card ").Certainly, in actual applications, also can select the storage card of other types.
Specifically, the log packet after will being encapsulated by the LME in the terminal by writing the mode of SD storage card, is saved in the log packet after the encapsulation in the SD storage card, wherein, once only writes the data of 32K byte in the storage card.Because log is many, and writes data continually in storage card, just certainly will relate to the efficiency of reading and writing memory card.Through experiment showed, once the data of only writing 32kBytes (byte) in the storage card, can be so that store the most effective of log.
Be not difficult to find, present embodiment is crossed serial ports or USB interface compared to of the prior art by external computer expert, obtain the log information of terminal, owing to be that log directly is saved in the storage card in the terminal, therefore the tester need not to carry notebook computer, has saved test resource, and the tester is freed from heavy manual labor, and can in time grasp the log of terminal whenever and wherever possible, the convenient Debugging message that obtains on the terminal.
And, by the format conversion to log, guaranteed the log form in terminal, preserved after the encapsulation, with the same by the log form of computer crawl, thereby guaranteed the compatibility of crawl log file.That is to say that the log file of preserving in the terminal inner storage card can directly be opened with the log tool software on the computer, work that need not any format conversion is so very rapidly playback.
Second embodiment of the invention relates to a kind of method of capturing terminal debugging information in real-time manner.The second execution mode improves on the basis of the first execution mode, and main improvements are:
Log packet after will encapsulating is saved in before the storage card in this terminal, whether detect first this terminal is connected with computer, when detecting this terminal and be connected with computer, need to the log Packet Generation after the encapsulation to serial ports or general-purpose serial bus USB interface, obtain the log packet for computer by this serial ports or USB interface.
Idiographic flow as shown in Figure 3, step 310 is identical to step 220 with step 210 respectively to step 320, does not repeat them here.
In step 330, whether terminal detects this terminal and is connected with computer, is not connected if detect with computer, then enters step 340; Be connected if detect with computer, then enter step 350.
In step 340, the log packet after terminal will encapsulate is saved in the interior storage card of this terminal.This step is identical with step 230, does not repeat them here.
In step 350, terminal will be obtained the log packet for computer by this serial ports or USB interface with the log Packet Generation after the encapsulation to serial ports or USB interface, in the mode of crawl terminal log in the existing field testing process of compatibility, as shown in Figure 4.And, owing to directly be conversion and the encapsulation of in terminal, carrying out form, need not in computer, to carry out the conversion of form, so computer is after getting access to the log of terminal, directly rapidly playback.
Need to prove that each method execution mode of the present invention all can be realized in modes such as software, hardware, firmwares.No matter the present invention realizes with software, hardware or firmware mode, instruction code can be stored in the memory of computer-accessible of any type (for example permanent or revisable, volatibility or non-volatile, solid-state or non-solid-state, fixing or removable medium etc.).Equally, memory can for example be programmable logic array (Programmable ArrayLogic, be called for short " PAL "), random access memory (Random Access Memory, be called for short " RAM "), programmable read only memory (Programmable Read Only Memory, be called for short " PROM "), read-only memory (Read-Only Memory, be called for short " ROM "), Electrically Erasable Read Only Memory (Electrically Erasable Programmable ROM, be called for short " EEPROM "), disk, CD, digital versatile disc (Digital Versatile Disc is called for short " DVD ") etc.
Third embodiment of the invention relates to a kind of terminal equipment.Fig. 5 is the structural representation of this terminal equipment.This terminal equipment comprises:
Handling module is used in real time crawl Debugging message log in real time.
Cache module, the log that is used for real-time handling module is grabbed carries out buffer memory.
Format converting module is used for the log of cache module buffer memory is carried out format conversion.Wherein, format conversion is the format conversion from large syllable sequence Big Endian to little-endian Little Endian.
Package module is used for the log after the format converting module conversion is packaged into the packet that the log tool software on the computer can directly read.
Memory module is for the storage card that the log data after the package module encapsulation is saved in this terminal equipment.Memory module is once only write the data of 32K byte in the storage card when the storage card that the log data after package module encapsulation is saved in this terminal equipment.
Storage card in the present embodiment can be the SD card.
Be not difficult to find that the first execution mode is the method execution mode corresponding with present embodiment, present embodiment can with the enforcement of working in coordination of the first execution mode.The correlation technique details of mentioning in the first execution mode is still effective in the present embodiment, in order to reduce repetition, repeats no more here.Correspondingly, the correlation technique details of mentioning in the present embodiment also can be applicable in the first execution mode.
Four embodiment of the invention relates to a kind of terminal equipment.The 4th execution mode improves on the basis of the 3rd execution mode, and main improvements are that this terminal equipment is inclusion test module and sending module also, as shown in Figure 6.
Wherein, whether detection module is connected with computer for detection of this terminal equipment.Sending module is used for the log Packet Generation after the package module encapsulation to serial ports or general-purpose serial bus USB interface.
Memory module does not detect when being connected with computer at detection module, and the log data after the package module encapsulation are saved in storage card in this terminal equipment.Sending module is when detection module detects this terminal equipment and is connected with computer, and to serial ports or general-purpose serial bus USB interface, the confession computer obtains the log packet by this serial ports or USB interface with the log Packet Generation after the package module encapsulation.
Be not difficult to find that the second execution mode is the method execution mode corresponding with present embodiment, present embodiment can with the enforcement of working in coordination of the second execution mode.The correlation technique details of mentioning in the second execution mode is still effective in the present embodiment, in order to reduce repetition, repeats no more here.Correspondingly, the correlation technique details of mentioning in the present embodiment also can be applicable in the second execution mode.
Need to prove, each unit of mentioning in each equipment execution mode of the present invention all is logical block, physically, a logical block can be a physical location, it also can be the part of a physical location, can also realize that the physics realization mode of these logical blocks itself is not most important with the combination of a plurality of physical locations, the combination of the function that these logical blocks realize is the key that just solves technical problem proposed by the invention.In addition, for outstanding innovation part of the present invention, above-mentioned each the equipment execution mode of the present invention will not introduced not too close unit with solving technical problem relation proposed by the invention, and this does not show that there is not other unit in the said equipment execution mode.
Although pass through with reference to some of the preferred embodiment of the invention, the present invention is illustrated and describes, but those of ordinary skill in the art should be understood that and can do various changes to it in the form and details, and without departing from the spirit and scope of the present invention.

Claims (6)

1. the method for a capturing terminal debugging information in real-time manner is characterized in that, comprises following steps:
Terminal grasps Debugging message log in real time, and the log of crawl is carried out buffer memory;
Described terminal is carried out format conversion to the log of described buffer memory, and the log after the format conversion is packaged into the packet that the log tool software on the computer can directly read; Described format conversion is the format conversion from large syllable sequence Big Endian to little-endian Little Endian;
The log packet of described terminal after with described encapsulation is saved in the storage card in this terminal;
Wherein, the log packet after the described encapsulation is being saved in the step of the storage card in this terminal, described terminal is once only write the data of 32K byte in the described storage card.
2. the method for capturing terminal debugging information in real-time manner according to claim 1 is characterized in that, before the storage card that the log packet after the described encapsulation is saved in this terminal, also comprises following steps:
Whether described terminal detects this terminal and is connected with computer, if be not connected with computer, then carries out the step that the log packet after the described encapsulation is saved in the storage card in this terminal again; Be connected with computer if detect this terminal, the log Packet Generation after then will encapsulating obtains described log packet for computer by this serial ports or USB interface to serial ports or general-purpose serial bus USB interface.
3. the method for capturing terminal debugging information in real-time manner according to claim 1 and 2 is characterized in that, described storage card is safe digital card.
4. a terminal equipment is characterized in that, comprises:
Handling module is used in real time crawl Debugging message log in real time;
Cache module, the log that is used for described real-time handling module is grabbed carries out buffer memory;
Format converting module is used for the log of described cache module buffer memory is carried out format conversion;
Package module is used for the log after described format converting module conversion is packaged into the packet that the log tool software on the computer can directly read; Described format conversion is the format conversion from large syllable sequence Big Endian to little-endian Little Endian;
Memory module is for the storage card that the log packet after described package module encapsulation is saved in this terminal equipment;
Wherein, described memory module is once only write the data of 32K byte in the described storage card when the storage card that the log data after the encapsulation of described package module is saved in this terminal equipment.
5. terminal equipment according to claim 4 is characterized in that, described terminal equipment also comprises:
Whether detection module is connected with computer for detection of this terminal equipment;
Sending module is used for the log Packet Generation after described package module encapsulation to serial ports or general-purpose serial bus USB interface;
Described memory module does not detect when being connected with computer at described detection module, and the log data after described package module encapsulation are saved in storage card in this terminal equipment; Described sending module is when described detection module detects this terminal equipment and is connected with computer, log Packet Generation after described package module encapsulation to serial ports or general-purpose serial bus USB interface, is obtained described log packet for computer by this serial ports or USB interface.
6. according to claim 4 or 5 described terminal equipments, it is characterized in that described storage card is safe digital card.
CN201010273315.5A 2010-09-03 2010-09-03 Method and terminal device for capturing terminal debugging information in real-time manner Active CN101945155B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010273315.5A CN101945155B (en) 2010-09-03 2010-09-03 Method and terminal device for capturing terminal debugging information in real-time manner

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010273315.5A CN101945155B (en) 2010-09-03 2010-09-03 Method and terminal device for capturing terminal debugging information in real-time manner

Publications (2)

Publication Number Publication Date
CN101945155A CN101945155A (en) 2011-01-12
CN101945155B true CN101945155B (en) 2013-03-27

Family

ID=43436919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010273315.5A Active CN101945155B (en) 2010-09-03 2010-09-03 Method and terminal device for capturing terminal debugging information in real-time manner

Country Status (1)

Country Link
CN (1) CN101945155B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634441B (en) * 2012-08-24 2018-04-27 腾讯科技(深圳)有限公司 A kind of method and device for testing mobile terminal
CN103577308B (en) * 2013-11-15 2017-01-18 惠州Tcl移动通信有限公司 Method for obtaining log files of mobile device
CN103646045A (en) * 2013-11-20 2014-03-19 乐视致新电子科技(天津)有限公司 Method and device for storing debugging information into storage card
CN104768218B (en) * 2015-04-23 2019-11-12 上海斐讯数据通信技术有限公司 A kind of mobile telephone registration adjustment method and system
CN106294250A (en) * 2015-05-22 2017-01-04 腾讯科技(深圳)有限公司 A kind of method keeping USB (universal serial bus) communication robust and relevant device
CN105068797A (en) * 2015-07-24 2015-11-18 深圳市广和通无线股份有限公司 Mobile terminal device and LOG information capture method therefor
CN109901980B (en) * 2019-01-30 2022-08-23 努比亚技术有限公司 Serial port log capturing circuit, method, terminal and computer readable storage medium
CN113645052B (en) * 2020-04-27 2022-11-08 中移物联网有限公司 Firmware debugging method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000341386A (en) * 1999-05-31 2000-12-08 Tamura Electric Works Ltd Communication terminal test device
CN1976527A (en) * 2006-12-04 2007-06-06 华为技术有限公司 Method and system for mobile terminal test
CN101093514A (en) * 2007-08-20 2007-12-26 中兴通讯股份有限公司 Processing system for automated testing log
CN101179790A (en) * 2007-11-03 2008-05-14 青岛海信移动通信技术股份有限公司 Serial port communication method between mobile terminal processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000341386A (en) * 1999-05-31 2000-12-08 Tamura Electric Works Ltd Communication terminal test device
CN1976527A (en) * 2006-12-04 2007-06-06 华为技术有限公司 Method and system for mobile terminal test
CN101093514A (en) * 2007-08-20 2007-12-26 中兴通讯股份有限公司 Processing system for automated testing log
CN101179790A (en) * 2007-11-03 2008-05-14 青岛海信移动通信技术股份有限公司 Serial port communication method between mobile terminal processor

Also Published As

Publication number Publication date
CN101945155A (en) 2011-01-12

Similar Documents

Publication Publication Date Title
CN101945155B (en) Method and terminal device for capturing terminal debugging information in real-time manner
CN108009065B (en) Method and apparatus for monitoring AXI bus
CN110381093B (en) Method and device for converting data protocol, system for transmitting data and electronic equipment
CN107995068A (en) Network interface test method and equipment
CN202373055U (en) Embedded integrated lane controller
CN112995208B (en) Fault early warning test method and system for intelligent lock and storage medium
CN103634441A (en) Method and device for testing mobile terminal
CN101442548B (en) Solid-state hard disk and operation method thereof
CN103139018A (en) Network card condition monitoring and transmission control protocol (TCP) communication method in dispatching and transformer substation integrated system
CN104572421B (en) A kind of outer acquisition of band independent of SOL and the method for record server serial ports daily record
CN102508932B (en) Telemetering and remote signaling data process method and device
CN103927244B (en) A kind of method of the plug-in unit scheduling process monitoring realized based on dynamic proxy
CN105262645A (en) TCN train communication network analysis device and method
CN102611836A (en) High-speed image collecting method based on Labview
CN105451301B (en) Wearable device gateway networking method and gateway management platform
CN103731364A (en) X86 platform based method for achieving trillion traffic rapid packaging
US9396145B1 (en) In-chip bus tracer
CN104780123A (en) Network packet receiving and sending processing device and design method thereof
CN104468702B (en) A kind of general virtual test real object equipment access system
CN103810769A (en) Data recorder based on HDLC (high-level data link control) and recording method
CN103995789A (en) Direct memory access achievement system and method
CN209148784U (en) A kind of converter station light measurement system remote end module running state detecting device
CN103974033A (en) Remote monitoring system for laboratories
CN107465569A (en) A kind of SAS Switch whole machine cabinets crawl node phy error count method and system
CN207097222U (en) A kind of safety monitoring assembly

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant