CN104750588A - Serial port communication based pressure testing method - Google Patents

Serial port communication based pressure testing method Download PDF

Info

Publication number
CN104750588A
CN104750588A CN201510096012.3A CN201510096012A CN104750588A CN 104750588 A CN104750588 A CN 104750588A CN 201510096012 A CN201510096012 A CN 201510096012A CN 104750588 A CN104750588 A CN 104750588A
Authority
CN
China
Prior art keywords
serial communication
data
communication link
testing
described step
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.)
Granted
Application number
CN201510096012.3A
Other languages
Chinese (zh)
Other versions
CN104750588B (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.)
Guangdong Coagent Electronics S&T Co Ltd
Original Assignee
Guangdong Coagent Electronics S&T 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 Guangdong Coagent Electronics S&T Co Ltd filed Critical Guangdong Coagent Electronics S&T Co Ltd
Priority to CN201510096012.3A priority Critical patent/CN104750588B/en
Publication of CN104750588A publication Critical patent/CN104750588A/en
Application granted granted Critical
Publication of CN104750588B publication Critical patent/CN104750588B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a serial port communication based pressure testing method. The method comprises the steps that a transmitting end TX and a receiving end RX of a test-needed serial port communication link are in short circuit, and a transmitting end TX and a receiving end RX of a test tool are connected with the serial port communication link; data parameters of the test tool are configured, and transmitting and receiving are carried out on data, and contrastive analysis is carried out to judge whether transmitting data are matched with receiving data or not; a matching result is shown, it is judged whether the testing continues to be carried out or not according to the matching result; when the testing is needed to be continued, transmitting data parameters are changed to exert pressure on the serial port communication link, and an optimal performance index of the serial port communication link is obtained. According to the serial port communication based pressure testing method, the communication is guaranteed to be stable according to various types of test mechanisms, whether the serial port communication is normal or not can be tested, the optimal performance index of the serial port communication can be tested, and therefore the stability and the reliability of the serial port communication are guaranteed.

Description

A kind of method for testing pressure based on serial communication
Technical field
The present invention relates to serial port communication technology field, particularly relate to a kind of method for testing pressure based on serial communication.
Background technology
Along with the development of computer network and microcomputer grading distribution application system, the function of communication is more and more important.Communication refers to that computing machine transmits with extraneous data, namely comprises the transmission between computing machine and computing machine, also comprises the transmission of computing machine and external unit.Serial communication to refer between main frame and external unit and the serial transfer of data between host computer system and host computer system.Use a data line, data ground transmitted successively, each data occupy one regular time length, its needs several lines just can exchange information between system.Have because serial ports connects advantages such as connecting easy, the relatively convenient and transmission stability of plug, current serial communication is widely used in vehicle electric field.
But vehicle electric field, serial communication mode has DMA to transmit or ordinary buffer sends, serial communication generally needs through hardware layer, OEM layer, BSP layer, the good multilayer link of APP layer, cause obliterated data in communication process, or data congestion and cause Caton phenomenon and communication delay uncertain.The method of current test serial communication performance has a lot, but all more single and complicated operations of function ratio.
Therefore, prior art has yet to be improved and developed.
Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide a kind of method for testing pressure based on serial communication, the single and problem of complicated operation of the methodological function being intended to solve existing test serial communication performance.
Technical scheme of the present invention is as follows:
Based on a method for testing pressure for serial communication, wherein, step is comprised:
A, by the transmitting terminal TX of the serial communication link of required test and receiving end RX short circuit, the transmitting terminal TX of testing tool to be connected with serial communication link respectively with receiving end RX;
B, configure the data parameters of testing tool, then send data and receive data, and whether mating with the data sent of receiving of comparative analysis;
C, display matching result, and judge whether to continue test according to matching result;
D, when needs continue test time, change send data parameters to serial communication link apply pressure, to obtain the optimal performance index of serial communication link.
The described method for testing pressure based on serial communication, wherein, described step B specifically comprises:
B1, configure the data parameters of testing tool;
B2 Lookup protocol one timer, then judge whether to send data by timer;
B3, when sending out data, record sends and the data packet number received, size and School Affairs respectively;
Whether what B4, analysis received mates with the data packet number sent, size and School Affairs.
The described method for testing pressure based on serial communication, wherein, described step B3 also comprises:
Record sends the time of data and receives the time of data.
The described method for testing pressure based on serial communication, wherein, described step B4 also comprises:
Analyze the time interval sending data to and receive data.
The described method for testing pressure based on serial communication, wherein, the start bit that in described step B1, described data parameters comprises corresponding com port, data packet number, data package size, transmission frequency, transmitting terminal TX communicate with receiving end RX, data bit, position of rest, check bit, loop test time and baud rate.
The described method for testing pressure based on serial communication, wherein, in described step D, the data packet number that change sends, size or School Affairs apply pressure to serial communication link.
The described method for testing pressure based on serial communication, wherein, in described step D, the data packet number that change sends, size, School Affairs or transmission frequency apply pressure to serial communication link.
The described method for testing pressure based on serial communication, wherein, in described step D, increases the data packet number sending data and applies pressure to serial communication link.
The described method for testing pressure based on serial communication, wherein, in described step D, accelerates transmission frequency and applies pressure to serial communication link.
The described method for testing pressure based on serial communication, wherein, in described step D, arranges long-time loop test and applies pressure to serial communication link.
Beneficial effect: the above-mentioned method for testing pressure based on serial communication provided by the present invention, guarantee that communication is stable by multiple verification scheme, serial communication can not only be tested whether normal, the optimal performance index of serial communication can also be tested out, thus ensure that stability and the reliability of serial communication.
Accompanying drawing explanation
Fig. 1 is a kind of structural representation based on the pressure test device in the method for testing pressure embodiment of serial communication of the present invention.
Fig. 2 is the process flow diagram of the preferred embodiment of a kind of method for testing pressure based on serial communication of the present invention.
Fig. 3 is the particular flow sheet of step S200 in method shown in Fig. 2.
Fig. 4 is the process flow diagram of a kind of another embodiment of method for testing pressure based on serial communication of the present invention.
Embodiment
The invention provides a kind of method for testing pressure based on serial communication, for making object of the present invention, technical scheme and effect clearly, clearly, the present invention is described in more detail below.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Refer to Fig. 1, Fig. 1 is a kind of structural representation based on the pressure test device in the method for testing pressure embodiment of serial communication of the present invention.As shown in the figure, pressure test device of the present invention comprises: the serial communication link 300 of facility communication system or PC 100, the serial communication testing tool 200 being built in facility communication system or PC, transmitting terminal TX and receiving end RX short circuit.
Fig. 2 is the process flow diagram of a kind of method for testing pressure preferred embodiment based on serial communication of the present invention, and it comprises step:
S100, by the transmitting terminal TX of the serial communication link of required test and receiving end RX short circuit, the transmitting terminal TX of testing tool to be connected with serial communication link respectively with receiving end RX;
S200, configure the data parameters of testing tool, then send data and receive data, and whether mating with the data sent of receiving of comparative analysis;
S300, display matching result, and judge whether to continue test according to matching result, be then perform step S400, no, then return step S200;
S400, when needs continue test time, change send data parameters to serial communication link apply pressure, to obtain the optimal performance index of serial communication link.
The above-mentioned method for testing pressure based on serial communication provided by the present invention, by receive with the matching result of data sent, whether normally test serial communication; And apply pressure by the data parameters that change sends to serial communication link, test the optimal performance index of serial communication.Above-mentioned multiple verification scheme of the present invention ensure that communication is stable, thus ensure that stability and the reliability of serial communication.
Particularly, in described step S100, the transmitting terminal TX of the serial communication link of required test and receiving end RX short circuit can be inner short circuit or direct short circuit.
Specifically, as shown in Figure 3, described step S200 can be refined as following steps:
S201, configure the data parameters of testing tool;
Particularly, first open serial communication testing tool, then configure the data parameters of testing tool.The parameters such as the start bit that described data parameters comprises corresponding com port, data packet number, data package size, transmission frequency, transmitting terminal TX communicate with receiving end RX, data bit, position of rest, check bit and baud rate.
S202, Lookup protocol one timer, then judge whether to send data by timer, be, then perform step S203, no, then perform step S205;
S203, when sending out data, record sends and the data packet number received, size and School Affairs respectively;
Particularly, when sending out data, data packet number, size and School Affairs that record transmitting terminal TX sends, record data packet number, size and School Affairs that receiving end RX receives simultaneously.
Whether what S204, analysis received mates with the data packet number sent, size and School Affairs;
In described step S204, whether the data packet number, size and the School Affairs that receive by analyzing receiving end RX mate data packet number, size and the School Affairs that transmitting terminal TX sends, and whether normally can test out serial communication link.
S205, etc. data to be sent, and continue to be back to step S202.
Further, described step S203 also comprises the time of record transmission data and receives the time of data.
Further, described step S204 also comprises the time interval analyzed and send data to and receive data.Namely when sending out data, record the data packet number of transmitting terminal TX transmission, size and School Affairs, also record the time that transmitting terminal TX sends data, record the time of the data packet number of receiving end RX reception, size, School Affairs and reception data simultaneously.Whether what then comparative analysis receiving end RX received mates with data packet number, size and School Affairs that transmitting terminal TX sends, and calculates the time interval sending data to and receive data.In the present invention, whether the data packet number, size and the School Affairs that receive by analyzing receiving end RX mate data packet number, size and the School Affairs that transmitting terminal TX sends, simultaneously in conjunction with the time interval of receiving end RX and transmitting terminal TX, serial communication link can not only be tested out whether normal, the performance index of serial communication link can also be tested out.
Further, in described step S400, when continuing test, testing tool can be changed the data packet number of transmission, size or School Affairs and apply pressure to serial communication link.Testing tool also can be changed the transmission frequency sending data and apply pressure to serial communication link.Such as, testing tool utilizes the random or fixed character string data bag produced, increase or reduce the size of each packet sent, the mode such as transmission frequency accelerated or slow down Packet Generation applies pressure to serial communication, to obtain performance index and the communication efficiency of serial communication link, long-time winding loop test also can be set simultaneously to verify stability and the reliability of serial communication.
Further, the present invention, in test process, also applies pressure, to obtain the maximum data packet quantity of serial communication link by increasing the data packet number sending data to serial communication link.
Further, the present invention, in test process, also applies pressure, to obtain the highest transmission frequency of serial communication link by accelerating to send data frequency to serial communication link.
Further, the present invention, in test process, also applies pressure, to obtain the longest stabilized communication time of serial communication link by arranging long-time loop test to serial communication link.
The present invention sends data packet number by above-mentioned increase, accelerates transmission frequency and arranges the modes such as long-time loop test and applies pressure to whole serial communication link, to obtain the maximum data packet quantity of serial communication link, the highest transmission frequency, the performance index such as the longest stabilized communication time, thus ensure that stability and the reliability of serial communication.
Further, the mode of serial communication of the present invention can be DMA transmission or ordinary buffer transmission.In other words, namely serial communication of the present invention is applicable to high speed data transfer, is also applicable to ordinary buffer transmission.
As shown in Figure 4, it is the process flow diagram of a kind of another embodiment of method for testing pressure based on serial communication of the present invention, and as shown in the figure, it comprises:
S1, open serial ports test;
S2, configuration data parameter;
S3, timer judge whether to send data, are, then perform step S4, no, then perform step S5;
S4, transmission data, and record sends data parameters;
S5, etc. data to be sent, and return step S3;
S6, reception data, and record receives data parameters;
S7, comparative analysis send data with receive data parameters, and writing time interval;
S8, judge test whether terminate, be, then perform step S9, no, then perform step S10;
S9, end;
S10, continuation test, and return step S3.
In sum, the above-mentioned method for testing pressure based on serial communication provided by the present invention, guarantee that communication is stable by multiple verification scheme, serial communication can not only be tested whether normal, the optimal performance index of serial communication can also be tested out, thus ensure that stability and the reliability of serial communication.
Should be understood that, application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, and all these improve and convert the protection domain that all should belong to claims of the present invention.

Claims (10)

1. based on a method for testing pressure for serial communication, it is characterized in that, comprise step:
A, by the transmitting terminal TX of the serial communication link of required test and receiving end RX short circuit, the transmitting terminal TX of testing tool to be connected with serial communication link respectively with receiving end RX;
B, configure the data parameters of testing tool, then send data and receive data, and whether mating with the data sent of receiving of comparative analysis;
C, display matching result, and judge whether to continue test according to matching result;
D, when needs continue test time, change send data parameters to serial communication link apply pressure, to obtain the optimal performance index of serial communication link.
2. the method for testing pressure based on serial communication according to claim 1, is characterized in that, described step B specifically comprises:
B1, configure the data parameters of testing tool;
B2, Lookup protocol one timer, then judge whether to send data by timer;
B3, when sending out data, record sends and the data packet number received, size and School Affairs respectively;
Whether what B4, analysis received mates with the data packet number sent, size and School Affairs.
3. the method for testing pressure based on serial communication according to claim 2, is characterized in that, described step B3 also comprises:
Record sends the time of data and receives the time of data.
4. the method for testing pressure based on serial communication according to claim 3, is characterized in that, described step B4 also comprises:
Analyze the time interval sending data to and receive data.
5. the method for testing pressure based on serial communication according to claim 1, it is characterized in that, the start bit that in described step B, described data parameters comprises corresponding com port, data packet number, data package size, transmission frequency, transmitting terminal TX communicate with receiving end RX, data bit, position of rest, check bit, loop test time and baud rate.
6. the method for testing pressure based on serial communication according to claim 5, is characterized in that, in described step D, the data packet number that change sends, size or School Affairs apply pressure to serial communication link.
7. the method for testing pressure based on serial communication according to claim 5, is characterized in that, in described step D, the data packet number that change sends, size, School Affairs or transmission frequency apply pressure to serial communication link.
8. the method for testing pressure based on serial communication according to claim 5, is characterized in that, in described step D, increases the data packet number sending data and applies pressure to serial communication link.
9. the method for testing pressure based on serial communication according to claim 5, is characterized in that, in described step D, accelerates transmission frequency and applies pressure to serial communication link.
10. the method for testing pressure based on serial communication according to claim 5, is characterized in that, in described step D, arranges long-time loop test and applies pressure to serial communication link.
CN201510096012.3A 2015-03-04 2015-03-04 A kind of method for testing pressure based on serial communication Expired - Fee Related CN104750588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510096012.3A CN104750588B (en) 2015-03-04 2015-03-04 A kind of method for testing pressure based on serial communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510096012.3A CN104750588B (en) 2015-03-04 2015-03-04 A kind of method for testing pressure based on serial communication

Publications (2)

Publication Number Publication Date
CN104750588A true CN104750588A (en) 2015-07-01
CN104750588B CN104750588B (en) 2018-08-31

Family

ID=53590324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510096012.3A Expired - Fee Related CN104750588B (en) 2015-03-04 2015-03-04 A kind of method for testing pressure based on serial communication

Country Status (1)

Country Link
CN (1) CN104750588B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975368A (en) * 2016-05-23 2016-09-28 浪潮电子信息产业股份有限公司 DB9 serial port automatic testing loop jig and testing method thereof
CN107026765A (en) * 2016-02-02 2017-08-08 美的集团股份有限公司 Supplied materials detection method, terminal and the system of WiFi module
CN107579862A (en) * 2017-10-17 2018-01-12 北京安控科技股份有限公司 A kind of method of measuring apparatus network communications capability
CN109376042A (en) * 2018-10-12 2019-02-22 华自科技股份有限公司 Serial ports test method, device, communication manager and storage medium
CN111459143A (en) * 2020-04-26 2020-07-28 上海航天计算机技术研究所 Multi-serial port communication self-closed loop detection system and method
CN111562490A (en) * 2019-02-14 2020-08-21 深圳市汇顶科技股份有限公司 Test method and system
CN112162890A (en) * 2020-09-24 2021-01-01 深圳市航顺芯片技术研发有限公司 DMA pressure test method and device of MCU and storage medium
CN112925684A (en) * 2021-03-22 2021-06-08 西安紫光国芯半导体有限公司 Testing method of link establishment logic and related equipment
CN113127401A (en) * 2021-03-10 2021-07-16 歌尔科技有限公司 Earphone box and earphone communication method and system
CN113568793A (en) * 2021-07-26 2021-10-29 西安广和通无线软件有限公司 Serial port testing method, intelligent module and storage medium
CN113655773A (en) * 2021-07-19 2021-11-16 东风汽车集团股份有限公司 Vehicle machine system communication serial port pressure testing system and method
CN114070753A (en) * 2021-10-12 2022-02-18 山东有人物联网股份有限公司 Transparent transmission equipment testing method and device and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0702239B1 (en) * 1994-09-01 2004-07-21 STMicroelectronics Limited A controller for implementing scan testing
CN1952906A (en) * 2005-10-21 2007-04-25 鸿富锦精密工业(深圳)有限公司 Test system and method of serial port of host computer
CN1963778A (en) * 2005-11-11 2007-05-16 鸿富锦精密工业(深圳)有限公司 System and method for testing serial port of mainboard
CN101556304A (en) * 2008-04-10 2009-10-14 福建升腾资讯有限公司 Automatic diagnostic method and equipment of serial ports of embedded type equipment
JP2010097603A (en) * 2008-09-18 2010-04-30 Denso Wave Inc Communication system
CN102446129A (en) * 2010-10-14 2012-05-09 鸿富锦精密工业(深圳)有限公司 System and method for testing mainboard serial port

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0702239B1 (en) * 1994-09-01 2004-07-21 STMicroelectronics Limited A controller for implementing scan testing
CN1952906A (en) * 2005-10-21 2007-04-25 鸿富锦精密工业(深圳)有限公司 Test system and method of serial port of host computer
CN1963778A (en) * 2005-11-11 2007-05-16 鸿富锦精密工业(深圳)有限公司 System and method for testing serial port of mainboard
CN101556304A (en) * 2008-04-10 2009-10-14 福建升腾资讯有限公司 Automatic diagnostic method and equipment of serial ports of embedded type equipment
JP2010097603A (en) * 2008-09-18 2010-04-30 Denso Wave Inc Communication system
CN102446129A (en) * 2010-10-14 2012-05-09 鸿富锦精密工业(深圳)有限公司 System and method for testing mainboard serial port

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026765A (en) * 2016-02-02 2017-08-08 美的集团股份有限公司 Supplied materials detection method, terminal and the system of WiFi module
CN105975368A (en) * 2016-05-23 2016-09-28 浪潮电子信息产业股份有限公司 DB9 serial port automatic testing loop jig and testing method thereof
CN107579862A (en) * 2017-10-17 2018-01-12 北京安控科技股份有限公司 A kind of method of measuring apparatus network communications capability
CN107579862B (en) * 2017-10-17 2021-05-18 北京安控科技股份有限公司 Method for measuring network communication capability of equipment
CN109376042A (en) * 2018-10-12 2019-02-22 华自科技股份有限公司 Serial ports test method, device, communication manager and storage medium
CN111562490A (en) * 2019-02-14 2020-08-21 深圳市汇顶科技股份有限公司 Test method and system
CN111459143A (en) * 2020-04-26 2020-07-28 上海航天计算机技术研究所 Multi-serial port communication self-closed loop detection system and method
CN112162890A (en) * 2020-09-24 2021-01-01 深圳市航顺芯片技术研发有限公司 DMA pressure test method and device of MCU and storage medium
CN112162890B (en) * 2020-09-24 2021-09-21 深圳市航顺芯片技术研发有限公司 DMA pressure test method and device of MCU and storage medium
CN113127401B (en) * 2021-03-10 2023-03-28 歌尔科技有限公司 Earphone box and earphone communication method and system
CN113127401A (en) * 2021-03-10 2021-07-16 歌尔科技有限公司 Earphone box and earphone communication method and system
CN112925684A (en) * 2021-03-22 2021-06-08 西安紫光国芯半导体有限公司 Testing method of link establishment logic and related equipment
CN113655773A (en) * 2021-07-19 2021-11-16 东风汽车集团股份有限公司 Vehicle machine system communication serial port pressure testing system and method
CN113655773B (en) * 2021-07-19 2023-02-28 东风汽车集团股份有限公司 Vehicle machine system communication serial port pressure testing system and method
CN113568793A (en) * 2021-07-26 2021-10-29 西安广和通无线软件有限公司 Serial port testing method, intelligent module and storage medium
CN114070753A (en) * 2021-10-12 2022-02-18 山东有人物联网股份有限公司 Transparent transmission equipment testing method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN104750588B (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN104750588A (en) Serial port communication based pressure testing method
US9945906B2 (en) Test device and method
US20090109864A1 (en) Network card testing system
CN104237699B (en) A kind of USB interface communication test system and method
CN103685103A (en) Integral verification platform based on FPGA communication base bands
CN105991358B (en) Method, device, test board and system for testing interface board flow
US20190044760A1 (en) Technologies for optimizing transmitter equalization with high-speed retimer
US20120082166A1 (en) Analog front end protocol converter/adapter for slpi protocol
CN102904772A (en) Method and device for realizing throughput test of network equipment
CN102104502A (en) Ethernet equipment performance test platform based on Linux system
CN105827476A (en) High-speed PING implementation method and PING testing method
CN106649165A (en) Method for establishingcommunication connection of embedded system and PC host
CN106980559A (en) One kind detects circuit and Multimedia Transmission System based on HDMI hot plugs
CN110290187A (en) Transmission method and device, storage medium, the electronic device of data information
CN102377505A (en) Serial port-based IPMI (Intelligent Platform Management Interface) package transmission method
WO2016131404A1 (en) New type can frame based communication method, device and system
CN108320706A (en) Driving device, driving method and display system
CN101383731A (en) Network card test system
US20240104046A1 (en) Spread spectrum clock negotiation method, and peripheral component interconnect express device and system
US20070258478A1 (en) Methods and/or apparatus for link optimization
CN106797357A (en) The treating method and apparatus of high-speed serial signals
CN202094915U (en) Tester aiming at network transmission rate in network television
CN106257257A (en) A kind of detect the method for optical module planisphere, device and virtual vector analyser
CN109062837A (en) A kind of usb signal light teletransmission control module and method based on FPGA
CN104679715A (en) Simple inter-chip communication method and simple inter-chip communication device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180831

Termination date: 20200304