CN112039728B - Port communication test method and port communication test box - Google Patents

Port communication test method and port communication test box Download PDF

Info

Publication number
CN112039728B
CN112039728B CN202010881006.XA CN202010881006A CN112039728B CN 112039728 B CN112039728 B CN 112039728B CN 202010881006 A CN202010881006 A CN 202010881006A CN 112039728 B CN112039728 B CN 112039728B
Authority
CN
China
Prior art keywords
port
test
data packet
bit stream
data packets
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
CN202010881006.XA
Other languages
Chinese (zh)
Other versions
CN112039728A (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.)
Institute of Geology and Geophysics of CAS
Original Assignee
Institute of Geology and Geophysics of CAS
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 Institute of Geology and Geophysics of CAS filed Critical Institute of Geology and Geophysics of CAS
Priority to CN202010881006.XA priority Critical patent/CN112039728B/en
Publication of CN112039728A publication Critical patent/CN112039728A/en
Application granted granted Critical
Publication of CN112039728B publication Critical patent/CN112039728B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The invention relates to a port communication test method and a port communication test box, wherein the test method comprises the following steps: according to the test type of a port to be tested, a test box determines one or more different data packets and sends the one or more different data packets to an input port in the port to be tested in a specified bit stream waveform state for testing; and the test box receives the data packet and/or the bit stream waveform fed back by the output port in the port to be tested, and determines the communication condition of the port to be tested according to the data packet fed back by the output port. The test box provided by the embodiment of the invention can generate data packets with different characteristics, comprehensively cover various conditions in the test process and obtain test results on the spot; the system can also be configured in a customized way through a computer, and can carry out compatible tests on different interface types and different data packets; the battery is arranged, and the operation is convenient, fast and simple.

Description

Port communication test method and port communication test box
Technical Field
The invention relates to the technical field of port communication testing, in particular to the technical field of port communication testing under special conditions, and particularly relates to a port communication testing method and a port communication testing box of an underground instrument.
Background
In order to complete corresponding functions, the downhole while drilling instrument (not limited to the downhole while drilling instrument) is internally provided with a large number of circuit boards, and the circuit boards are usually provided with respective processors, such as ARM, FPGA or single chip microcomputer. The processors are connected through various interfaces, such as CAN, UART, I2C, and the like. The firmware of each interface needs to be fully tested in the development process, and if the circuit boards are connected through the bus, the circuit boards need to be tested in a targeted manner according to the characteristics of the bus.
In the prior art, during the development process of each circuit board, the ports of each circuit board are correspondingly tested and then jointly debugged. Generally, during debugging, a computer is used to connect a USB interface (CAN/UART/I2C) and various data packets are generated/received by the computer for testing. In the test process, a serial assistant may be used for sending/receiving data, and analysis of some protocol data packets is troublesome and requires additional calculation/software for analysis; and the computer is large in size, complicated in operation and inconvenient in the field debugging process. The waveform (bit stream) at the bottom of the interface is abnormal, and the test cannot be carried out.
Disclosure of Invention
The present invention aims to solve the following technical problems at least to a certain extent:
the traditional computer equipment has large volume and needs professional software, thus bringing great inconvenience to field test;
the traditional detection mode is only to detect through a single type of data packet, and no bit stream environment is found to be an important factor influencing the detection result.
A first aspect of an embodiment of the present invention provides a port communication test method, including:
according to the test type of a port to be tested, a test box determines one or more different data packets and sends the one or more different data packets to an input port of the port to be tested in a specified bit stream waveform state for testing, wherein the test type at least comprises one of the following types: functional test, performance test, extreme environment adaptability test, the said many kinds of different data packets include at least one of the following: the messy code, the correct data packet losing a part, and a correct data packet in the middle of the messy code;
and the test box receives the data packet and/or the bit stream waveform fed back by the output port in the port to be tested, and determines the communication condition of the port to be tested according to the data packet and/or the bit stream waveform fed back by the output port.
The embodiment of the invention can comprehensively cover various conditions in the test process through different test requirements and various data packets with different characteristics, and can obtain test results on the spot.
In one example, the test cartridge determines one or more different data packets, including:
if the test type is a function test, the test box respectively determines the types of a plurality of different data packets, and determines the parameter of the data packet to be sent according to the types of the plurality of different data packets, wherein the parameter of the data packet to be sent at least comprises one of times and periods.
The embodiment of the invention tests various functions of the tested object in a targeted manner by setting various types of data packets, comprehensively covers various conditions in the test process, has comprehensive test and high applicability, further optimizes the types of the data packets, and improves the detection efficiency by adopting different parameters for different data packets.
In one example, the sending the one or more different data packets to an input port of the ports under test in a specified bitstream waveform state for testing includes:
and coupling a bit stream corresponding to a correct data packet to be sent and another bit stream, and then sending the coupled bit stream and another bit stream to an input port in the port to be tested for testing, wherein the type of the data packet carried by the another bit stream is random.
In one example, if the test box sends the correct data packet to the input port for testing, after the test box receives the data packet fed back by the output port, the method further includes:
and changing the interval time of sending two correct data packets by the test box, and receiving the data packets fed back by the output port to test the transmission interval of the correct data packets with the length.
The embodiment of the invention further optimizes the test process according to the type of the data packet, detects the object to be detected by secondarily adjusting the parameters of the data packet, and improves the detection coverage.
In one example, the test box determines one or more different data packets and sends the one or more different data packets to an input port of the ports under test for testing in a specified bitstream waveform state, including:
and if the test type is a performance test, the test box continuously sends correct data packets to the input port for testing in a specified bit stream waveform state and continues for a certain time.
The embodiment of the invention optimizes the performance test method, thereby improving the detection accuracy.
In one example, the test box determines one or more different data packets and sends the one or more different data packets to an input port of the ports under test for testing in a specified bitstream waveform state, including:
if the test type is an extreme environment adaptability test, the test box continuously sends correct data packets to the input port for testing in a specified bit stream waveform state and continues for a certain time, wherein in the test process, an instrument to which the port to be tested belongs is in an extreme environment, and the extreme environment comprises: temperature, vibration, shock.
The method and the device can test the object to be tested in the extreme environment, and improve the applicability.
In one example, the specified bitstream waveform state includes at least one of:
presetting a normal bit stream, a bit stream of random bit flipping, a bit stream of baud rate fluctuation, and continuously presetting a normal bit stream with adjustable rate.
In one example, further comprising:
determining whether to analyze the data packet fed back by the output port according to the communication condition of the port to be tested; and/or
Determining whether to store the data packet fed back by the output port in a memory according to the communication condition of the port to be tested so as to transmit the data packet fed back by the output port to a computer for analysis; andor or
And determining whether to display the bit stream waveform fed back by the output port according to the communication condition of the port to be tested, wherein the communication condition of the port to be tested is displayed through a display of the test box.
The test result can be displayed through the display, and a tester can know the test condition in real time. And the problems which cannot be resolved by the test box can be stored and handed to a computer with higher calculation for analysis.
In one example, further comprising:
and receiving a configuration instruction of a computer, and setting the data packet and the sending parameters of the data packet based on the configuration instruction.
The embodiment of the invention can configure the test box, thereby increasing the use flexibility of the test box
The second aspect of the embodiments of the present invention further provides a test box for performing a port communication test by using the port communication test method, including:
the interfaces are used for being connected with a port to be detected and detecting the port to be detected, the interfaces are used for being connected with a computer, and a user sets the data packet and the sending parameters of the data packet according to a configuration instruction of the computer;
a plurality of buttons for adjusting a type of the data packet;
a plurality of key switches for adjusting transmission parameters of data packets and specified bit stream waveform state, and for determining whether parsing of data packets fed back from the output port is required,
the display is used for displaying the communication condition of the port to be tested;
a memory for storing the data packet fed back from the output port and the data packet transmitted to the input port;
and the processor is used for generating corresponding data packets according to the plurality of buttons and the indications of the plurality of key switches and detecting the port to be detected.
The test box provided by the embodiment of the invention can generate data packets with different characteristics, comprehensively cover various conditions in the test process and obtain test results on the spot; the system can also be configured in a customized way through a computer, and can carry out compatible tests on different interface types and different data packets; the battery is arranged, and the operation is convenient, fast and simple.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic flow chart of a method provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a bitstream waveform according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a frame of a test cassette provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a contactless information transmission unit according to an embodiment of the present invention.
Detailed Description
In order to more clearly explain the overall concept of the present application, the following detailed description is given by way of example in conjunction with the accompanying drawings.
According to a first aspect of the embodiments of the present invention, the present invention provides a port communication testing method, fig. 1 is a schematic flow chart of the method provided by the embodiments of the present invention, and as shown in fig. 1, the method includes:
s101, according to the test type of a port to be tested, a test box determines one or more different data packets and sends the one or more different data packets to an input port of the port to be tested in a specified bit stream waveform state for testing, wherein the test type at least comprises one of the following types: functional test, performance test, extreme environment adaptability test, the said many kinds of different data packets include at least one of the following: the messy code, the correct data packet losing a part, and a correct data packet in the middle of the messy code;
s102, the test box receives the data packet and/or the bit stream waveform fed back by the output port of the port to be tested, and determines the communication condition of the port to be tested according to the data packet and/or the bit stream waveform fed back by the output port.
It should be understood that the input port in the embodiment of the present invention refers to a port for inputting a packet of a test object, the output port refers to a port for outputting a packet of a test object, and the input port and the output port may be a physical interface for bidirectional transmission or two physical interfaces for unidirectional transmission, which is not limited in the present invention.
Specifically, for different types of tests, the embodiments of the present invention provide different types of data packets, including the following:
scrambling code, length can be configured by computer, for example: AA CC EE FF 007800;
the correct packet length can be configured by the computer, for example: AA BB 05112233445505;
the correct packet, but a portion of it is lost, and the length can be configured by the computer, for example: AA BB 051133445505;
the correct packet is partially lost, and then a correct packet, the length of which can be configured by the computer, for example: AA BB 051133445505 AA BB 05112233445505;
the scrambling code has a correct data packet in the middle, and the length can be configured by a computer, for example: AA CC EE FF 007800 AA BB 051122334455058908686658.
It will be appreciated that all correct packets may be random or fixed, as may be the case with computer configuration. The button number on the test box, the corresponding test sending content, and the interface type needing to be configured and tested by the computer also need to be configured by the computer.
The data packet mainly comprises a packet head, a data length, data, a packet tail, escape character extension and check bits. The test box has the advantages that during the test process, the received data packets can be correct or wrong, the test box also has the analysis function, during the test process, if the data packets are not analyzed, the received bytes are stored and counted for statistics, and if the data packets are analyzed, the correct data packets are stored and counted for statistics.
Fig. 2 is a schematic diagram of a bitstream waveform according to an embodiment of the present invention, and as shown in fig. 2, the specified bitstream waveform state at least includes one of the following states: a predetermined normal bit stream, a bit stream with random bit flipping, a bit stream with baud rate fluctuation, and a continuous predetermined normal bit stream with adjustable rate (not shown). It is understood that the bit stream of random bit flipping, the bit stream of baud rate fluctuation, the continuous preset normal bit stream of adjustable rate are varied on the basis of the preset normal bit stream.
Fig. 3 is a schematic diagram of a frame of a test cartridge according to an embodiment of the present invention, as shown in the figure, the test cartridge for port communication test includes a battery, and the test cartridge includes:
the system comprises a plurality of interfaces, a plurality of data packets and a plurality of data packets, wherein the interfaces are used for being connected with ports to be detected and detecting the ports to be detected, the interfaces are used for being connected with a computer, and a user sets the data packets and sending parameters of the data packets according to configuration instructions of the computer.
Specifically, the plurality of interfaces include test interfaces including CAN, I2C, UART, etc. as shown in fig. 1, the test cartridge is connected to the computer through interface 1, the computer configures/upgrades the test cartridge through interface 1, after the configuration is completed, the test cartridge CAN work independently and CAN select different test modes to work independently, and the display CAN display the test mode and the test result. The data of the test is stored in a memory inside the test cartridge. These data can be read into a computer through the interface 1 for further analysis.
Running matched operation software on the computer can upgrade the program in the test box, configure the test number of the test box, read the data in the test box and analyze the data.
Interface 2 and interface 3 … of the test box are both test interfaces, and are connected to corresponding interface objects to be tested, and then corresponding tests can be carried out on the test box through operating buttons.
A plurality of buttons for adjusting the type and length of the data packet; each corresponding to a type (mainly referring to different data packet structures) and/or length of a transmitted data packet, and the type and/or length of the data packet can be pre-configured in advance through a computer. Or, in the working process of the test box, the type of the data packet preset by the computer and the length of each type of data packet can be adjusted through the buttons.
The plurality of key switches are used for adjusting the sending parameters of the data packets, and determining whether the data packets fed back by the output port need to be analyzed;
in particular, a plurality of test switches are used to control the initiation of a plurality of transmission tests, which in some preferred embodiments of the invention comprises:
one is a toggle switch K1, and 2 gears are respectively: (K1-1) sending data packets in a single time, and (K1-2) sending data packets in a circulating mode.
A toggle switch K2, 10 gears (K2-1, K2-21, K2-3, K2-4, K2-5, K2-6, K2-7, K2-8, K2-9 and K2-10) are corresponding to the cycle interval of circularly sending data packets, and the cycle interval of each gear is configured by a computer.
A toggle switch K3, 2 gears, are: (K3-1) does not parse the data packet, and (K3-2) parses the data packet. The data packet consists of a packet head, a data length, data, a packet tail, an escape character extension and a check bit. The test box may receive an incorrect packet, and the need to parse the packet is determined by K3. (K3-1) the data packet is not analyzed, namely, the data packet is not analyzed, and the received bytes are stored, counted and counted; (K3-2) parsing the packet, i.e. the received data, performing packet parsing, storing the correct packet and counting statistics.
A toggle switch K4, 4 gears, which are respectively: (K4-1) presetting a normal bit stream, (K4-2) a bit stream with random bit flipping, (K4-3) a bit stream with fluctuating baud rate, (K4-4) continuously transmitting a random preset normal bit stream, specifically, all transmitting data under a corresponding toggle switch, such as (K4-2), bit flipping at random of the bit stream for simulating data transmission under an unstable channel environment; (K4-3) all transmitted data, bit stream baud rate fluctuation, fluctuation range is configured by computer, used for simulating data transmission in unstable channel environment.
In some preferred embodiments of the present invention, (K4-4) the rate of continuously sending random preset normal bit streams is adjustable, and is adjusted by the K5 switch, and the K5 switch has 10 gears, and the rate corresponding to each gear can be configured by the computer. Correspondingly, a toggle switch K6 is also arranged, and (K6-1) the bit stream starts to be transmitted; (K6-2) stopping transmitting the bitstream.
The display is used for displaying the communication condition of the port to be tested; specifically, the type of the transmitted packet, the number of transmitted packets, the number of transmitted bytes, the received packet, the number of received packets, and the number of received bytes are displayed on the display.
A memory for storing the data packet fed back from the output port and the data packet transmitted to the input port;
and the processor is used for generating corresponding data packets according to the plurality of buttons and the indications of the plurality of key switches and detecting the port to be detected. The processor can be an arm chip/FPGA chip, and the processor controls the corresponding interface to generate the corresponding test data packet under the triggering of the operation button according to the configuration of the computer. And the data packets received through the corresponding interfaces are analyzed by the arm/FPGA and displayed on the display.
Embodiments of the invention will now be described in connection with a test cartridge and test method.
The test box one-time complete sending test process comprises the following steps:
the test box is connected to a computer through an interface 1, and the computer configures the following contents:
a) the port type to be tested designates the interface 2 as an available port;
b) the 10 gears of the configuration toggle switch K2 are respectively: t1, T2, T3, T4, T5, T6, T7, T8, T9, T10, corresponding to 10 time intervals;
c) the button 1 is configured to: random scrambling code, length L1;
d) the button 2 is configured to: the correct data packet, length L2, the data packet content is fixed;
e) the button 3 is configured to: correct packets, length L3, each packet having random contents;
f) the button 4 is configured to: correct data packets plus incomplete data packets, length L4, and random content of each data packet;
g) the button 5 is configured to: a correct data packet is arranged in the messy code, the length of the data packet is L5, and the content of each data packet is fixed;
and connecting the interface 2 with the tested object.
A button on the test cartridge is controlled to initiate the test.
a) K3 is dialed to position K3-1;
b) k1 is dialed to position K1-1;
c) selecting a button 1, sending a random messy code with the length of L1 by an interface 2, stopping sending after sending once, and displaying the test 1, the number of sent data packets and the number of bytes by a display;
d) k1 is dialed to K1-2 position, K2 is dialed to K2-1 position;
e) selecting a button 2, sending a fixed data packet with the length of L2 by the interface 2 at T1 intervals, and displaying the test 2 and the counted number of the sent data packets and the counted number of bytes by a display;
in the steps a-e, the received data is not analyzed, and the number of bytes of the data is directly counted.
f) K3 is dialed to position K3-2;
g) k1 is dialed to K1-2 position, K2 is dialed to K2-2 position;
h) selecting a button 3, sending a random data packet with the length of L3 by an interface 2 at T2 intervals, and displaying the test 3 and the counted number of the sent data packets and the counted number of bytes by a display;
in step fgh, the received data is analyzed to obtain the correct data packet, and the number of data packets and the number of bytes are counted.
In the above steps, the data sent and tested and the corresponding time are stored in the memory inside the test box.
The test box is connected to a computer through an interface 1, and the computer reads data in a memory in the test box. Further analysis may be performed.
Fig. 4 is a schematic structural diagram of a contactless information transmission unit according to an embodiment of the present invention, and examples of test types of different ports are described below with reference to fig. 4.
The structure of the non-contact information transmission unit is shown in FIG. 4, and a circuit A and a circuit B realize the conversion between a magnetic field signal and a port (CAN/I2C/UART) signal. The contactless information transfer unit has two external ports: port a and port B, and the following protocol packet design on the two ports, in this case: the data packet consists of a packet header, a length and a check, wherein the packet header is 0xAA and 0 xBB; escape character 0xFF, check and adopt byte XOR; if 0xAA or 0xBB or 0xFF appears in the data/check, an escape character is added before the data/check: 0xFF, 0xAA, 0xFF, 0xBB, 0 xFF. For data packets that do not conform to this format, the contactless information transfer unit does not forward. The test of the non-contact information transmission unit can be completed by using the test box provided by the embodiment of the invention.
The port A of the non-contact magnetic field transmission unit is connected with the port 2 of the test box, and the port B of the non-contact magnetic field transmission unit is connected with the port 3 of the test box.
The test type introduced in the embodiment of the invention is a function test, and mainly tests the data packet analysis function of the non-contact information transmission unit. And the port of the non-contact information transmission unit receives the analyzed data packet and forwards the analyzed data packet, so that the function of the non-contact information transmission unit for forwarding the data packet is tested.
1) Testing the messy codes:
and (3) configuring a test box: (K1-1) Single Send, (K3-1) no packets are parsed.
The testing process comprises the following steps: the port 2 of the test box sends the messy code to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
And (3) testing results: if the test box does not receive the data packet from the port 3, it indicates that the non-contact information transmission unit can correctly filter the messy code packet.
2) The correct packet length can be configured by the computer or by the buttons of the test cartridge.
And (3) configuring a test box: (K1-2) continuously transmitting, (K2-1) packet interval T1, and (K3-1) not parsing packets.
The testing process comprises the following steps: the port 2 of the test box sends a correct random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects data sent from the port B of the non-contact information transmission unit and counts the received data packets.
The switch is adjusted (K2-1), the packet interval is changed, and the test is repeated.
And (3) testing results: if the data packet received by the port 3 of the test box is consistent with the data packet sent by the port 2, the non-contact information transmission unit can accurately forward the correct data packet. If the K2 is configured such that the interval Tn cannot be 100% forwarded, it means that the transmission interval of the non-contact information transmission unit cannot be smaller than Tn for a data packet of a certain length. The test can test the minimum data transmission interval of the non-contact information transmission unit. 3) The correct data packet, but a portion of it is missing, can be configured in length by the computer, or by buttons on the test box.
And (3) configuring a test box: (K1-2) continuously transmitting, (K2-1) packet interval T1, and (K3-1) not parsing packets.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
It will be appreciated that in some embodiments of the invention, port a corresponds to an input port and port B corresponds to an output port. In other embodiments of the present invention, bidirectional simultaneous testing of bidirectional communication ports is also possible.
And (3) testing results: if the test box does not receive the data packet from the port 3, the non-contact information transmission unit can correctly filter the defective data packet.
4) The correct packet is missing a portion, and then a correct packet, the length of which can be configured by the computer or by buttons on the test box.
And (3) configuring a test box: (K1-2) continuously transmitting, (K2-1) packet interval T1, and (K3-1) not parsing packets.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
And (3) testing results: if the number of the data packets received by the test box from the port 3 is the same as that of the data packets sent by the port 2, the non-contact information transmission unit can correctly filter the defective data packets, and find the correct data packets in the defective data packets.
5) The messy code has a correct data packet in the middle, and the length can be configured by a computer or a button of the test box.
And (3) configuring a test box: (K1-2) continuously transmitting, (K2-1) packet interval T1, and (K3-1) not parsing packets.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
And (3) testing results: if the number of the data packets received by the test box from the port 3 is the same as that of the data packets sent by the port 2, the fact that the non-contact information transmission unit can correctly filter the messy codes is shown, and the correct data packets are found in the messy codes.
The test type introduced in the embodiment of the invention is performance test, and mainly tests the packet loss condition of the tested object. The length can be configured by the computer by testing the correct data packet.
And (3) configuring a test box: (K1-2) continuously transmitting, (K2-1) packet interval T1, and (K3-1) not parsing packets.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
The operation is carried out for a long time, such as about 5 hours or more.
And (3) testing results: if the data packet received by the port 3 of the test box is consistent with the data packet sent by the port 2, it indicates that the non-contact information transmission unit can accurately forward the correct data packet, and there is no packet loss. If there is a difference in data. The test cartridge may be connected to a computer and the stored data sent and received may be transmitted to the computer for further analysis.
The test type introduced in the embodiment of the invention is a limit environment adaptability test, and the function and the packet loss condition of the tested object under certain limit environments are tested. The extreme environment may be high temperature, vibration, shock.
The length can be configured by a computer through testing by correct data packets
And (3) configuring a test box: (K1-2) continuously transmitting, (K2-1) packet interval T1, and (K3-1) not parsing packets.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
The operation is carried out for a long time, such as about 5 hours or more.
And (3) testing results: if the data packet received by the port 3 of the test box is consistent with the data packet sent by the port 2, it indicates that the non-contact information transmission unit can accurately forward the correct data packet, and there is no packet loss. If there is a difference in data. The test cartridge may be connected to a computer and the stored data sent and received may be transmitted to the computer for further analysis.
The above-described functional test, performance test, and extreme environment adaptability test are all performed in a normal bitstream environment, and if it is desired to perform bitstream detection in the above-described process, it is sufficient to activate a corresponding toggle switch on a test box, and it can be understood that, in the method provided in the embodiment of the present invention, detection can be performed only by a packet, only by a bitstream, or by a combination of both, and the following describes an implementation case in which the performance test is combined.
The embodiment of the invention mainly tests the identification degree of the tested object to the unstable bit stream and the stability of the system.
1) Setting the corresponding bit stream for testing by correct packets (random bit-flipped bit stream/bit stream with fluctuating baud rate)
And (3) configuring a test box: (K1-2) continuously transmitted, (K2-1) packet interval T1, (K3-1) no packets are parsed, (K4-2) bit stream random bit flipping or (K4-3) bit stream baud rate fluctuation.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
And (3) testing results: if the data packet received by the port 3 of the test box is consistent with the data packet sent by the port 2, it indicates that the non-contact information transmission unit can accurately forward the correct data packet, and there is no packet loss. If there is a difference in data. The test cartridge may be connected to a computer and the stored data sent and received may be transmitted to the computer for further analysis. Meanwhile, the system stability is checked by combining a debugging tool of the tested object.
It should be noted that if the detection is performed only through the bit stream, a high-speed waveform sampling interface (e.g., interface 4, interface 5 shown in fig. 3) is added, and the transmitted and received bit stream waveforms are recorded for analyzing the adaptability of the tested object to different bit streams.
2) With the correct data packets, the corresponding bit stream is set for testing (random normal bit stream is sent continuously).
And (3) configuring a test box: (K1-2) continuous transmission, (K2-1) packet interval T1, (K3-1) no packet parsing, (K4-4) continuous transmission of random normal bit stream, (K5) rate of normal bit stream, (K6-1) transmission of bit stream, (K6-2) stop transmission.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data packet.
And (3) testing results: if the data packet received by the port 3 of the test box is consistent with the data packet sent by the port 2, it indicates that the non-contact information transmission unit can accurately forward the correct data packet, and there is no packet loss. If there is a difference in data. The test cartridge may be connected to a computer and the stored data sent and received may be transmitted to the computer for further analysis. Meanwhile, the K5 is adjusted to adjust the sending rate by combining a debugging tool of the tested object, and the stability of the system is checked.
It should be noted that if the detection is performed only through the bitstream waveform, a high-speed waveform sampling interface (e.g., interface 4 and interface 5 shown in fig. 3) is added, and the transmitted and received bitstream waveforms are recorded for analyzing the adaptability of the tested object to different bitstreams.
3) In some preferred embodiments of the present invention, waveform signals of two correct data packets of a sender are coupled by an ARM/FPGA chip of a test box according to an embodiment of the present invention, and then the coupled signals are sent to a device under test. The test mode is mainly used for testing the robustness of the tested object under the condition that other data interference exists in the bus.
The testing process comprises the following steps: the port 2 of the test box sends the test random data packet to the port A of the non-contact information transmission unit, and the port 3 of the test box detects the data sent from the port B of the non-contact information transmission unit and counts the received data.
And (3) testing results: firstly, whether the device to be tested normally operates is checked, for example, the judgment is performed through an indicator light which represents the working state of the device to be tested. Then, the received data is counted, and the receiving condition of a correct data packet in the received data is checked to determine the robustness of the tested object in the communication process.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the application.

Claims (6)

1. A port communication test method is characterized by comprising the following steps:
according to the test type of a port to be tested, a test box determines one or more different data packets and sends the one or more different data packets to an input port in the port to be tested in a specified bit stream waveform state for testing;
wherein the specified bitstream waveform state comprises: presetting a normal bit stream, a bit stream of random bit flipping, a bit stream of baud rate fluctuation and/or a continuous preset normal bit stream with adjustable rate;
the test types include: functional test, performance test and ultimate environment adaptability test;
if the test type is a function test, the test box respectively determines the types of a plurality of different data packets, and determines parameters for sending the data packets according to the types of the plurality of different data packets, wherein the parameters for sending the data packets at least comprise one of times and periods;
if the test type is a performance test, the test box continuously sends correct data packets to the input port for testing in a specified bit stream waveform state and continues for a certain time;
if the test type is an extreme environment adaptability test, the test box continuously sends correct data packets to the input port for testing in a specified bit stream waveform state and continues for a certain time, wherein in the test process, an instrument to which the port to be tested belongs is in an extreme environment, and the extreme environment comprises: high temperature, vibration and/or shock;
the types of the data packets include: the messy code, the correct data packet losing a part, and a correct data packet between the correct data packet and the messy code;
and the test box receives the data packet and/or the bit stream waveform fed back by the output port in the port to be tested, and determines the communication condition of the port to be tested according to the data packet and/or the bit stream waveform fed back by the output port.
2. The method of claim 1, wherein the sending the one or more different data packets to an input port of the ports under test in a specified bitstream waveform state for testing comprises:
and coupling a bit stream corresponding to a correct data packet to be sent and another bit stream, and then sending the coupled bit stream and another bit stream to an input port in the port to be tested for testing, wherein the type of the data packet carried by the another bit stream is random.
3. The method of claim 1, wherein if the test box sends the correct data packet to the input port for testing, after the test box receives the data packet fed back from the output port, the method further comprises:
and changing the interval time of sending two correct data packets by the test box, repeating the test, and receiving the data packets fed back by the output port to test the minimum transmission interval of the correct data packets.
4. The method of claim 1, further comprising:
determining whether to analyze the data packet fed back by the output port according to the communication condition of the port to be tested; and/or
Determining whether to store the data packet fed back by the output port in a memory according to the communication condition of the port to be tested so as to transmit the data packet fed back by the output port to a computer for analysis; and/or
And determining whether to display the bit stream waveform fed back by the output port according to the communication condition of the port to be tested, wherein the communication condition of the port to be tested is displayed through a display of the test box.
5. The method of claim 1, further comprising:
and receiving a configuration instruction of a computer, and setting the type of the data packet and the sending parameter of the data packet based on the configuration instruction.
6. A test cartridge for performing a port communication test using the port communication test method according to any one of claims 1 to 5, comprising:
one of the interfaces is used for being connected with a computer, a user sets the type of the data packet and the sending parameter of the data packet according to a configuration instruction of the computer, and the rest interfaces of the interfaces are used for being connected with a port to be detected to detect the port to be detected;
a plurality of buttons for adjusting a type of the data packet;
a plurality of key switches for adjusting transmission parameters of data packets and specified bit stream waveform state, and for determining whether parsing of data packets fed back from the output port is required,
the display is used for displaying the communication condition of the port to be tested;
a memory for storing the data packet fed back from the output port and the data packet transmitted to the input port;
and the processor is used for generating corresponding data packets according to the plurality of buttons and the indications of the plurality of key switches and detecting the port to be detected.
CN202010881006.XA 2020-08-27 2020-08-27 Port communication test method and port communication test box Active CN112039728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010881006.XA CN112039728B (en) 2020-08-27 2020-08-27 Port communication test method and port communication test box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010881006.XA CN112039728B (en) 2020-08-27 2020-08-27 Port communication test method and port communication test box

Publications (2)

Publication Number Publication Date
CN112039728A CN112039728A (en) 2020-12-04
CN112039728B true CN112039728B (en) 2021-05-18

Family

ID=73586582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010881006.XA Active CN112039728B (en) 2020-08-27 2020-08-27 Port communication test method and port communication test box

Country Status (1)

Country Link
CN (1) CN112039728B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112696189B (en) * 2020-12-16 2022-12-20 北京六合伟业科技股份有限公司 Near-bit rapid detection device and method
CN115720201B (en) * 2022-07-28 2024-04-12 山东有人物联网股份有限公司 Method for testing data transmission stability of transparent transmission equipment, terminal equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101884031A (en) * 2007-12-04 2010-11-10 阿尔卡特朗讯美国公司 Method and apparatus for testing a system-on-chip involving parallel and serial accesses
CN102377611A (en) * 2010-08-18 2012-03-14 正文科技股份有限公司 Automatic testing system for dynamic host configuration protocol server
CN104914845A (en) * 2014-03-14 2015-09-16 深圳市赛格导航科技股份有限公司 Vehicle body controller fault test method and system based on industrial personal computer
CN108259264A (en) * 2017-12-01 2018-07-06 国网北京市电力公司 Test method, the device and system of the network equipment
CN110632499A (en) * 2019-09-23 2019-12-31 珠海格力电器股份有限公司 Test vector generation method based on test object and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101884031A (en) * 2007-12-04 2010-11-10 阿尔卡特朗讯美国公司 Method and apparatus for testing a system-on-chip involving parallel and serial accesses
CN102377611A (en) * 2010-08-18 2012-03-14 正文科技股份有限公司 Automatic testing system for dynamic host configuration protocol server
CN104914845A (en) * 2014-03-14 2015-09-16 深圳市赛格导航科技股份有限公司 Vehicle body controller fault test method and system based on industrial personal computer
CN108259264A (en) * 2017-12-01 2018-07-06 国网北京市电力公司 Test method, the device and system of the network equipment
CN110632499A (en) * 2019-09-23 2019-12-31 珠海格力电器股份有限公司 Test vector generation method based on test object and storage medium

Also Published As

Publication number Publication date
CN112039728A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN112039728B (en) Port communication test method and port communication test box
CN107769865B (en) Automatic test method for radio frequency parameters of Bluetooth module
JP6271520B2 (en) Efficient parallel test method for time division duplex (TDD) communication systems
KR101784405B1 (en) System and method for using multiple network addresses to establish synchronization of a device under test and test equipment controlling the test
US5842039A (en) Most recent first dynamic protocol detection for use with a programmable controller
US9020496B2 (en) System for testing mobile communication apparatus and test method therefor
CN112737886B (en) Tool testing method and system, electronic equipment and storage medium
KR20090024071A (en) Systems and methods for mobile phone validation
CN112653600A (en) Network card performance testing method and device based on USB network card and electronic equipment
CN113255271B (en) Automatic verification system and method for IO pin of chip
CN107977290B (en) MIPI loop test method and test system
CN115032969A (en) Ethernet test system of vehicle-mounted controller
JPH0215753A (en) Evaluation method and evaluation system of data transmission
CN110646723B (en) Bus interface test circuit and method
CN102426548A (en) Debugging method, debugger and debugging system for embedded system
CN110719216B (en) Data transmission data processing method, system, device and storage medium
CN105910700B (en) Noise detection device
CN105630646A (en) Method for quickly judging connectivity and stability of serial port
US11442801B2 (en) Error rate measuring apparatus and error counting method
CN216870733U (en) Board level communication testing device
US10396910B2 (en) Over the air commands for RF testing
CN110442548B (en) System on chip and interface data processing method and device thereof
CN111460745B (en) Method for detecting connectivity between chips of equipment
CN115575752A (en) Device and method for detecting packet loss and error code of CAN chip
CN202004970U (en) Control unit simulator for base station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant