CN103176877A - Method and system for debugging peripheral of embedded device - Google Patents

Method and system for debugging peripheral of embedded device Download PDF

Info

Publication number
CN103176877A
CN103176877A CN2013100924429A CN201310092442A CN103176877A CN 103176877 A CN103176877 A CN 103176877A CN 2013100924429 A CN2013100924429 A CN 2013100924429A CN 201310092442 A CN201310092442 A CN 201310092442A CN 103176877 A CN103176877 A CN 103176877A
Authority
CN
China
Prior art keywords
embedded device
computer
debugging
peripheral hardware
embedded
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.)
Pending
Application number
CN2013100924429A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN2013100924429A priority Critical patent/CN103176877A/en
Publication of CN103176877A publication Critical patent/CN103176877A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for debugging a peripheral of an embedded device. The method comprises: a data package containing debug commands is sent by a tool of a computer to the embedded device; the data package is analyzed by the embedded device, and corresponding debug operations are executed to the peripheral of the embedded device according to an analysis result. Compared with the prior art, the data package containing the debug commands is sent by the tool of the computer to the embedded device, the data package is analyzed by the embedded device, and the corresponding debug operations are executed to the peripheral of the embedded device according to the analysis result, and therefore debugging to the peripheral of the embedded device is conducted under the condition that dismantling, republishing of novel embedded type system software and a root permission are not needed, a production line can be generated beneficially, and the method can be used and popularized in users conveniently. The invention further discloses a system for debugging the peripheral of the embedded device.

Description

The method of the peripheral hardware of debugging embedded equipment and system thereof
Technical field
The present invention relates to communication technique field, relate more specifically to a kind of method and system thereof of peripheral hardware of debugging embedded equipment.
Background technology
At present, the adjustment method of embedded device peripheral hardware generally has following mode: (1) will be dressed up the embedded device of complete machine and tear machine open, then peripheral hardware is carried out corresponding debugging operations; (2) the embedded software that vendors ship is new is to carry out corresponding debugging operations; (3) the Special debugging instrument that provides by producer, the peripheral hardware to described embedded device under the state of not tearing machine open carries out corresponding debugging operations.
But the following defective that mode (1) exists: the machine of tearing open needs corresponding aid, and is cumbersome with respect to the user.In addition, tear the time that machine debugging consumes open also many.There is following defective in mode (2): after with the new software of vendors ship, described embedded device being carried out updating operation, wanting the rollback original version is difficult.There is following defective in mode (3): concerning domestic consumer, the possibility that the License of the debugging acid that producer provides application is successful is quite low.Even and if apply for successfully, because the debugging of most equipment need to be based on specific system (as Android system), these systems must have again the root authority can carry out debugging operations, have so also brought difficulty to the user.In addition, above-mentioned three kinds of modes once can only be carried out debugging operations to the peripheral hardware of an embedded device, are unfavorable for producing line production, also inconvenient popularization in the user uses.
Therefore, be necessary to provide a kind of method and system thereof of peripheral hardware of improved debugging embedded equipment to overcome defects, the method and system are in the situation that need not to tear machine open, need not again to issue new embedded system software and need not the root authority, can debug the peripheral hardware of embedded device quickly and easily, and be beneficial to and produce the line generation, also be convenient to promote in the user uses.
Summary of the invention
A kind of method that the purpose of this invention is to provide peripheral hardware of debugging embedded equipment, the method is in the situation that need not to tear machine open, need not again to issue new embedded system software and need not the root authority, can debug the peripheral hardware of embedded device, and be beneficial to and produce the line generation, also be convenient to promote in the user uses.
Another object of the present invention is to provide a kind of system of peripheral hardware of debugging embedded equipment, this system is in the situation that need not to tear machine open, need not again to issue new embedded system software and need not the root authority, can debug the peripheral hardware of embedded device, and be beneficial to and produce the line generation, also be convenient to promote in the user uses.
For achieving the above object, the invention provides a kind of method of peripheral hardware of debugging embedded equipment, comprise the following steps:
The instrument of computer sends and comprises the packet of debug command to embedded device;
Described embedded device is resolved described packet, and according to analysis result, the peripheral hardware of described embedded device is carried out corresponding debugging operations.
Compared with prior art, the present invention comprises the packet of debug command to embedded device by the instrument transmission of computer, embedded device can carry out corresponding debugging operations to the peripheral hardware of embedded device according to analysis result after resolving this packet, thereby realized in the situation that need not to tear open machine, need not again to issue new embedded system software and need not the root authority peripheral hardware of embedded device is debugged, and be beneficial to and produce the line generation, also be convenient to promote in the user uses.
Preferably, described " instrument sends described packet to described embedded device " also comprises before:
Set up the communication connection of described computer and described embedded device.
Preferably, described " setting up the communication connection of described computer and described embedded device " is specially:
Open the instrument of described computer;
Described embedded device connects described computer;
Described embedded device is carried out boot;
Described boot is communicated by letter and is successfully shaken hands with described instrument.
Preferably, described " described boot is communicated by letter and successfully shaken hands with described instrument " specifically comprises:
Described embedded device outwards sends " setting up communication request " and enters the receive data state, starts simultaneously a timer;
The instrument receive data of described computer starts a timer simultaneously;
Described computer judges whether described data are " setting up communication request ";
Described computer sends the first feedback information to described embedded device and enters the receive data state according to judged result;
Described embedded device receives and judges whether described data are " the first feedback information ";
Described embedded device enters preset mode according to judged result and sends the second feedback information to described computer;
Described computer receives and judges whether described data are " the second feedback information ", judges according to judged result whether described boot communicates by letter successfully with described instrument and judge whether described computer successfully enters described preset mode
Preferably, described " described embedded device outwards sends and sets up communication request and enter the receive data state, starts simultaneously a timer " also comprises afterwards:
Judge whether receive data is overtime, if overtime, normally start described embedded device.
Preferably, described " the instrument receive data of described computer starts a timer simultaneously " also comprises afterwards:
Judge whether receive data is overtime, if overtime, prompting reports an error.
Preferably, described " peripheral hardware to described embedded device is carried out corresponding debugging operations " also comprises afterwards:
Debug results is fed back to described instrument.
Correspondingly, the present invention also provides a kind of system of peripheral hardware of debugging embedded equipment, comprise computer and embedded device, described computer comprises tool model, and described tool model is used for sending and comprises the packet of debug command and receive the data that described embedded device returns;
Described embedded device comprises parsing module and execution module, described parsing module receives and resolves the packet that described tool model sends, and described execution module is carried out corresponding debugging operations according to the analysis result of described parsing module to the peripheral hardware of described embedded device.
Preferably, described computer and described embedded device include be used to the communication module that establishes a communications link, and a described communication module is connected with described tool model, and another described communication module is connected with described parsing module.
Preferably, described computer and described embedded device include be used to judging whether overtime time block of described tool model and described parsing module receive data.
By following description also by reference to the accompanying drawings, it is more clear that the present invention will become, and these accompanying drawings are used for explaining embodiments of the invention.
Description of drawings
Fig. 1 is the structured flowchart of the system of the peripheral hardware of the debugging embedded equipment of the present invention when connecting peripheral hardware.
Fig. 2 is the block diagram of an embodiment of system of the peripheral hardware of debugging embedded equipment shown in Figure 1.
Fig. 3 is the process flow diagram of method of the peripheral hardware of the debugging embedded equipment of the present invention.
Fig. 4 is the process flow diagram of the present invention's " boot is communicated by letter and successfully shaken hands with instrument ".
Embodiment
With reference now to accompanying drawing, describe embodiments of the invention, in accompanying drawing, similar element numbers represents similar element.
Please refer to Fig. 1, the invention provides a kind of system 100 of debugging embedded equipment peripheral hardware, this system 100 comprises computer 10 and the embedded device 20 that is connected with computer 10, and embedded device is connected with a plurality of peripheral hardwares 30.It should be noted that in the present embodiment, this embedded device 20 is a mobile phone.
Particularly, please refer to Fig. 2, computer 10 specifically comprises communication module 101, time block 102 and tool model 103; Wherein, communication module 101 is used for establishing a communications link with embedded device 20; Tool model 103 is connected with communication module 101, is used for after communicating to connect successfully foundation, and the packet that transmission comprises debug command is to embedded device 20, and tool model 103 receives the data that send from embedded device 20; Time block 102 is connected with tool model with communication module 101 and is connected, be used for judging whether the data of tool model 103 reception embedded devices 20 are overtime, if, this computer 10 with voice suggestion, in computer 10 interface display error messages or the mode of the combination between with two kinds report an error, otherwise, whether overtimely continue to detect the data that judge tool model 103 reception embedded devices 20.
Embedded device 20 specifically comprises: communication module 201, time block 202, parsing module 203 and execution module 204; Wherein, communication module 201 is used for establishing a communications link to realize being connected of embedded device 20 and computer 10 with communication module 101; Parsing module 203 is connected with communication module 201, is used for the packet that analytical tool module 103 sends, and analysis result is passed to execution module 204 with 204 work of indication execution module; Whether time block 202 is overtime for the data that the tool model 103 that judges parsing module 203 reception computers 10 sends, if, this embedded device 20 with voice suggestion, in embedded device 20 interface display error messages or the mode of the combination between with two kinds report an error, otherwise, continue detection and judge whether the data of parsing module 203 receiving tool modules 103 are overtime; Execution module 204 is carried out the debugging operations such as corresponding debugging, promotion and demotion and test according to analysis result to the peripheral hardware 30 of embedded device 20.
The principle of work of the system 100 of the peripheral hardware of the debugging embedded equipment of the present invention is as follows:
first peripheral hardware 30 is connected in embedded device 20, set up again communication module 101 and communication module 201 and communicate to connect to realize being connected of computer 10 and embedded device 20, the tool model 103 of computer 10 sends by communication module 101 and comprises the packet of debug command to the communication module 201 of embedded device 20 afterwards, communication module 201 is sent to packet parsing module 203 again, parsing module 203 is resolved this packet and analysis result is sent to execution module 204, 204 pairs of peripheral hardwares of execution module 30 are carried out corresponding debugging operations, and execution result is back to described tool model 103.It should be noted that time block 102 can Real-Time Monitorings judge whether tool model 103 receives the data that execution modules 204 return overtime, time block 202 can Real-Time Monitorings judge whether the data that parsing module 203 receiving tool modules 103 send are overtime.
Further, communication module 101 and communication module 201 process that successfully establishes a communications link is specific as follows: open the instrument on computer 10, embedded device 20 is connected computers 10, open simultaneously embedded device 20 in order to carry out boot.In the process of carrying out boot, embedded device 20 outwards sends " setting up communication request " and enters the receive data state, starts simultaneously time block 202; Tool model 103 receive datas (namely " setting up communication request ") of computer 10 also start time block 102, simultaneously, this computer 10 judges whether these data are " setting up communication request ", if send the first feedback information to embedded device 20 and enter data receiving state; This embedded device 20 receives and judges whether these data are the first feedback information, if enter preset mode and send the second feedback information to computer 10; 10, computer receives and judges whether these data are the second feedback information, if enter preset mode.At this moment, boot and the success of instrument communication handshake, namely communication module 201 successfully establishes a communications link with communication module 101.Wherein, " setting up communication request " is specially data " READY ", and " the first feedback information " is specially " EFWDL " and " the second feedback information " is specially " LDWFE ".
Correspondingly, please refer to Fig. 3, the present invention also provides a kind of method of peripheral hardware of debugging embedded equipment, comprises the following steps:
Step 001, the communication connection of setting up computer and embedded device; Be specially: open the instrument on computer, then embedded device is connected computer by serial interface, simultaneously, open embedded device to carry out boot, boot is communicated by letter and is successfully shaken hands with instrument; Wherein, kit contains single port and many mouthfuls of interfaces;
Step 002, the instrument of computer send and comprise the packet of debug command and operation to embedded device; Be specially, the data that the instrument of computer will comprise debug command and operation with the form of packet by serial communication with Packet Generation to embedded device;
Step 003, embedded device resolution data bag, and according to analysis result, the peripheral hardware of embedded device is carried out corresponding debugging operations; Particularly, embedded device is carried out the debugging operations such as debugging, promotion and demotion solid and test to peripheral hardware;
Step 004, embedded device feed back to debug results the instrument of computer; Particularly, embedded device feeds back to debug results the instrument of computer with the form of packet, and instrument is resolved this packet can obtain debug results, and the debug results after instrument will be resolved further is presented on the interface of computer and feeds back to the user.
Particularly, please in conjunction with shown in Figure 4, the idiographic flow of boot and instrument communication handshake is as follows:
Step 101, embedded device outwards send " setting up communication request ", and enter data receiving state, start simultaneously a timer; Wherein, described " setting up communication request " is specially " ready ", and this timer judges that whether embedded device receives overtime from the data of computer, as overtime, normally starts embedded device;
Step 102, the instrument receive data of computer starts a timer simultaneously; Be specially: the instrument of computer receives the data from embedded device, starts simultaneously a timer; This timer judges that whether computer receives overtime from the data of embedded device, if overtime, reports an error;
Step 103, computer judge whether in timing receive data and judge whether these data are " setting up communication request "; Be specially: whether the time that computer judges self receive data is in the timing of timer, and whether these data that judgement receives be " setting up communication request " ready, if be all yes, execution in step 104, otherwise execution in step 109;
Step 104, computer send the first feedback information to embedded device and enter the receive data state; Wherein, this first feedback information is " EFWDL ";
Step 105, embedded device judge whether in timing receive data and judge whether these data are " the first feedback information "; Be specially, the time that embedded device judges self receive data, in the timing of timer, simultaneously, whether these data that judgement receives were " the first feedback information ", if be all yes, execution in step 106; Otherwise execution in step 110;
Step 106, embedded device enter preset mode and send the second feedback information to computer; Wherein, this second feedback information is specially " LDWFE ";
Step 107, computer receive and judge whether data are the second feedback information; Be specially, computer receives the data from embedded device, simultaneously, judges whether the data of this reception are " the second feedback information ", if execution in step 108, otherwise execution in step 109;
Step 108, boot are communicated by letter with instrument and embedded device successfully enters preset mode;
Step 109 reports an error; Particularly, instrument shows error message on self interface or by voice suggestion, sounding reports an error, and can also report an error by combination between the two;
Step 110, the embedded device normal boot-strap;
Need to prove, when computer and embedded device all enter preset mode, show the success of boot and instrument communication handshake.
Can find out in conjunction with above description, the present invention comprises the packet of debug command to embedded device by the instrument transmission of computer, afterwards, embedded device is resolved this packet, and the peripheral hardware of embedded device is carried out the debugging operations such as correspondingly debugging, promotion and demotion and test according to resolving.Solved in the situation that need not to tear open machine, need not again to issue new embedded system software and need not that the root authority can be debugged the peripheral hardware of embedded device 102, the problem of the debugging operations such as promotion and demotion and test.
Above invention has been described in conjunction with most preferred embodiment, but the present invention is not limited to the embodiment of above announcement, and should contain various modification, equivalent combinations of carrying out according to essence of the present invention.

Claims (10)

1. the method for the peripheral hardware of a debugging embedded equipment, is characterized in that, comprises the following steps:
The instrument of computer sends and comprises the packet of debug command to embedded device;
Described embedded device is resolved described packet, and according to analysis result, the peripheral hardware of described embedded device is carried out corresponding debugging operations.
2. the method for the peripheral hardware of debugging embedded equipment as claimed in claim 1, is characterized in that, described " instrument sends described packet to described embedded device " also comprises before:
Set up the communication connection of described computer and described embedded device.
3. the method for the peripheral hardware of debugging embedded equipment as claimed in claim 2, is characterized in that, described " setting up the communication connection of described computer and described embedded device " is specially:
Open the instrument of described computer;
Described embedded device connects described computer;
Described embedded device is carried out boot;
Described boot is communicated by letter and is successfully shaken hands with described instrument.
4. the method for the peripheral hardware of debugging embedded equipment as claimed in claim 3, is characterized in that, described " described boot is communicated by letter and successfully shaken hands with described instrument " specifically comprises:
Described embedded device outwards sends " setting up communication request " and enters the receive data state, starts simultaneously a timer;
The instrument receive data of described computer starts a timer simultaneously;
Described computer judges whether described data are " setting up communication request ";
Described computer sends the first feedback information to described embedded device and enters the receive data state according to judged result;
Described embedded device receives and judges whether described data are " the first feedback information ";
Described embedded device enters preset mode according to judged result and sends the second feedback information to described computer;
Described computer receives and judges whether described data are " the second feedback information ", judges according to judged result whether described boot communicates by letter successfully with described instrument and judge whether described computer successfully enters described preset mode.
5. the method for the peripheral hardware of debugging embedded equipment as claimed in claim 4, is characterized in that, described " described embedded device outwards sends and sets up communication request and enter the receive data state, starts simultaneously a timer " also comprises afterwards:
Judge whether receive data is overtime, if overtime, normally start described embedded device.
6. the method for the peripheral hardware of debugging embedded equipment as claimed in claim 4, is characterized in that, described " the instrument receive data of described computer starts a timer simultaneously " also comprises afterwards:
Judge whether receive data is overtime, if overtime, prompting reports an error.
7. the method for the peripheral hardware of debugging embedded equipment as claimed in claim 1, is characterized in that, described " peripheral hardware to described embedded device is carried out corresponding debugging operations " also comprises afterwards:
Debug results is fed back to described instrument.
8. the system of the peripheral hardware of a debugging embedded equipment, comprise computer and embedded device, it is characterized in that, described computer comprises tool model, and described tool model is used for sending and comprises the packet of debug command and receive the data that described embedded device returns;
Described embedded device comprises parsing module and execution module, described parsing module receives and resolves the packet that described tool model sends, and described execution module is carried out corresponding debugging operations according to the analysis result of described parsing module to the peripheral hardware of described embedded device.
9. the system of the peripheral hardware of debugging embedded equipment as claimed in claim 8, it is characterized in that, described computer and described embedded device include be used to the communication module that establishes a communications link, and a described communication module is connected with described tool model, and another described communication module is connected with described parsing module.
10. the system of the peripheral hardware of debugging embedded equipment as claimed in claim 8, is characterized in that, described computer and described embedded device include be used to judging whether overtime time block of described tool model and described parsing module receive data.
CN2013100924429A 2013-03-21 2013-03-21 Method and system for debugging peripheral of embedded device Pending CN103176877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100924429A CN103176877A (en) 2013-03-21 2013-03-21 Method and system for debugging peripheral of embedded device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100924429A CN103176877A (en) 2013-03-21 2013-03-21 Method and system for debugging peripheral of embedded device

Publications (1)

Publication Number Publication Date
CN103176877A true CN103176877A (en) 2013-06-26

Family

ID=48636776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100924429A Pending CN103176877A (en) 2013-03-21 2013-03-21 Method and system for debugging peripheral of embedded device

Country Status (1)

Country Link
CN (1) CN103176877A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810103A (en) * 2014-02-28 2014-05-21 北京启源新能科技有限公司 Method and system for debugging electronic device
CN108037719A (en) * 2017-12-11 2018-05-15 日立楼宇技术(广州)有限公司 Buried bucket monitoring terminal installation and debugging method, apparatus, equipment and storage medium
CN109040752A (en) * 2018-10-15 2018-12-18 四川长虹电器股份有限公司 Automatic debugging system for smart television
CN110648716A (en) * 2019-08-05 2020-01-03 广州妙存科技有限公司 SOC-based disassembly-free eMMC debugging method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196822A (en) * 2007-07-02 2008-06-11 深圳创维-Rgb电子有限公司 Code upgrading device, method and system
CN102411539A (en) * 2011-12-01 2012-04-11 康佳集团股份有限公司 Method and system for online debugging external device of mobile phone

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196822A (en) * 2007-07-02 2008-06-11 深圳创维-Rgb电子有限公司 Code upgrading device, method and system
CN102411539A (en) * 2011-12-01 2012-04-11 康佳集团股份有限公司 Method and system for online debugging external device of mobile phone

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810103A (en) * 2014-02-28 2014-05-21 北京启源新能科技有限公司 Method and system for debugging electronic device
CN108037719A (en) * 2017-12-11 2018-05-15 日立楼宇技术(广州)有限公司 Buried bucket monitoring terminal installation and debugging method, apparatus, equipment and storage medium
CN109040752A (en) * 2018-10-15 2018-12-18 四川长虹电器股份有限公司 Automatic debugging system for smart television
CN110648716A (en) * 2019-08-05 2020-01-03 广州妙存科技有限公司 SOC-based disassembly-free eMMC debugging method

Similar Documents

Publication Publication Date Title
US9772919B2 (en) Automation of D-bus communication testing for bluetooth profiles
CN102270168A (en) Method for automatically detecting serial port information
CN103365688B (en) A kind of method for automatic installation and synchronization of software between Android intelligent devices
CN105354118B (en) Automatic test approach, the apparatus and system of intelligent terminal
CN104036628A (en) Intelligent remote controller based on Bluetooth and quick pairing method
CN102917095A (en) Method and device for testing terminal based on Android
CN103176877A (en) Method and system for debugging peripheral of embedded device
EP2778928B1 (en) D-bus communicaiton testing for bluetooth profiles
CN101499892A (en) Communication interface detection method and electronic device
CN109981360B (en) Internet of things equipment site opening method, device and system and storage medium
US20100218043A1 (en) System and method for testing a serial attached small computer system interface
CN102967815A (en) Chip testing method, automated testing equipment and system
CN109246628B (en) Wireless dispatching desk based on air bus digital trunking system and implementation method
CN104866418A (en) Automatic testing method and system
WO2012155412A1 (en) Firmware updating method and system under android system
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
CN111538515A (en) Method, device and equipment for upgrading electric energy meter program
CN109344086B (en) Software testing platform based on SIP chip
US20130305026A1 (en) System and method for input tool invocation and proxy device
CN107368061B (en) Self-diagnosis system and method for vehicle-mounted sound equipment
CN109774670A (en) A kind of car inspection and repair method, system and relevant device
KR101704108B1 (en) Terminal Apparatus and Method for Connecting of Head-Unit for Vehicle
CN109189629B (en) Method for realizing terminal remote control based on USB device and storage medium
WO2012155623A1 (en) Method and system for demonstrating mobile terminal user interface
CN115980554A (en) Chip testing method and electronic equipment thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20130626

RJ01 Rejection of invention patent application after publication