CN107402856A - Method of testing, device and the readable storage medium storing program for executing of USB port - Google Patents

Method of testing, device and the readable storage medium storing program for executing of USB port Download PDF

Info

Publication number
CN107402856A
CN107402856A CN201710549905.8A CN201710549905A CN107402856A CN 107402856 A CN107402856 A CN 107402856A CN 201710549905 A CN201710549905 A CN 201710549905A CN 107402856 A CN107402856 A CN 107402856A
Authority
CN
China
Prior art keywords
port
test
tested
usb
communication functions
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
CN201710549905.8A
Other languages
Chinese (zh)
Other versions
CN107402856B (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.)
TCL King Electrical Appliances Huizhou Co Ltd
Original Assignee
TCL King Electrical Appliances Huizhou 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 TCL King Electrical Appliances Huizhou Co Ltd filed Critical TCL King Electrical Appliances Huizhou Co Ltd
Priority to CN201710549905.8A priority Critical patent/CN107402856B/en
Publication of CN107402856A publication Critical patent/CN107402856A/en
Application granted granted Critical
Publication of CN107402856B publication Critical patent/CN107402856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults

Abstract

The invention discloses a kind of method of testing of USB port, comprise the following steps:When detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns;If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, and the USB3.0 communication functions and USB2.0 communication functions of port to be tested are tested respectively;When detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show;USB3.0 ports include compatible USB2.0 communication functions and new USB3.0 communication functions;When detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show.The also corresponding test device and readable storage medium storing program for executing for proposing USB port of the present invention.Testing process of the invention by simplifying USB3.0, improve USB3.0 testing efficiency.

Description

Method of testing, device and the readable storage medium storing program for executing of USB port
Technical field
The present invention relates to technical field of measurement and test, more particularly to the method for testing of USB port, device and readable storage medium storing program for executing.
Background technology
As USB3.0 ports are constantly popularized on consumer product, the production process requirement of USB3.0 ports product is equipped with More comprehensively faster test mode realizes the test before product export.
USB3.0 ports are made up of 9 interface lines, realize the data between consumer product such as TV and carrier such as USB flash disk Transmission, USB3.0 transmission speed can be up to 4.8Gpbs;The production process for being equipped with the product of USB3.0 ports at present is to use USB3.0 USB flash disk is tested, and method of testing is that after inserting USB flash disk, external shifting is determined whether into the menu of equipment under test Dynamic equipment access, i.e. after insertion USB3.0 equipment, be introduced into equipment under test peripheral hardware menu and judge whether normally, then extract USB3.0 equipment inserts USB2.0 equipment, enters back into equipment under test peripheral hardware menu and judges whether normally.Judge to flow by tester Journey is cumbersome, and secondly tester needs secondary operation repeatedly to plug, and could carry out global function inspection, such operation judges flow It is relatively complicated, the efficiency of the equipment of outfit USB3.0 ports input in process of production is had a strong impact on, production line height can not be met Imitate quick testing process.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of method of testing of USB port, device and readable storage medium storing program for executing, it is intended to By simplifying USB3.0 testing process, USB3.0 testing efficiency is improved.
To achieve the above object, the present invention provides a kind of method of testing of USB port, the method for testing of the USB port Comprise the following steps:
When detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns;
If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, and point The USB3.0 communication functions and USB2.0 communication functions of port to be tested are not tested;
When detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show.
Alternatively, the USB3.0 communication functions correspond to communications protocol as USB3.0 communications protocol, USB2.0 communication work( Communications protocol can be corresponded to as USB2.0 communications protocol;
It is described when detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns Include before step:
USB3.0 communications protocol and USB2.0 communications protocol that USB3.0 port tests are related to are pre-stored in USB test equipments In, so that USB test equipments are based on instead based on the USB3.0 communications protocol to prestore and USB2.0 communications protocol generation check information Feedforward information judges whether port to be tested is abnormal.
Alternatively, it is described when detecting port test instruction, it is determined that whether current test pattern is that USB3.0 ports are surveyed Include after the step of die trial formula:
If current test pattern is not USB3.0 port test patterns, using port to be tested as USB2.0 ports;
Check information is generated based on the USB2.0 communications protocol that prestores, check information is sent to testing port to be tested;
The feedback information that port to be tested is generated based on check information is obtained, USB2.0 communication work(is generated according to feedback information The test result of energy and display.
Alternatively, if the current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, and include the step of test the USB3.0 communication functions and USB2.0 communication functions of port to be tested respectively:
If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, it is based on USB3.0 communications protocol and USB2.0 communications protocol generate check information respectively;
Check information is sent to testing port to be tested, with test respectively the USB3.0 communication functions of port to be tested and USB2.0 communication functions.
Alternatively, it is described test port to be tested respectively USB3.0 communication functions and USB2.0 communication functions the step of wrap Include:
The feedback information of check information generation of the port to be tested based on USB2.0 communications protocol is obtained, and is based on feedback letter Breath judges whether USB2.0 communication functions in port to be tested are abnormal;
If USB2.0 communication functions in port to be tested are abnormal, USB2.0 communication functions compatible in USB3.0 ports are prompted Corresponding stitch is abnormal.
Alternatively, it is described test port to be tested respectively USB3.0 communication functions and USB2.0 communication functions the step of also Including:
The feedback information of check information generation of the port to be tested based on USB3.0 communications protocol is obtained, based on feedback information Judge whether USB3.0 communication functions in port to be tested are abnormal;
If USB3.0 communication functions in port to be tested are abnormal, the USB3.0 communication functions of USB3.0 ports are prompted to correspond to pin Pin is abnormal.
Alternatively, it is described when detecting that port test to be tested is completed, generate test result corresponding to port to be tested And the step of showing, includes:
When detecting that port test to be tested is completed, test result corresponding to port to be tested is generated;
If the test result of port test to be tested is abnormal, corresponding prompt message is shown, for user's identification.
Alternatively, if the test result of the port test to be tested is abnormal, show that the step of corresponding to prompt message is wrapped Include:
If the test result of port test to be tested is abnormal, USB3.0 port test knots are prompted by preset warning light Fruit.
To achieve the above object, the present invention also provides a kind of test device of USB port, the test dress of the USB port Put including:Memory, processor and the test for being stored in the USB port that can be run on the memory and on the processor Program, wherein:
The method of testing of above-mentioned USB port is realized when the test program of the USB port is by the computing device Step.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, is deposited on the readable storage medium storing program for executing The test program of USB port is contained, the test program of the USB port realizes above-mentioned USB port when being executed by processor The step of method of testing.
A kind of method of testing for USB port that the embodiment of the present invention proposes, the method for testing of USB port include following step Suddenly:When detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns;If current test Pattern is USB3.0 port test patterns, then using port to be tested as USB3.0 ports, and tests port to be tested respectively USB3.0 communication functions and USB2.0 communication functions;When detecting that port test to be tested is completed, port pair to be tested is generated The test result answered and display.Carried out by USB port test equipment to USB3.0 ports based on communications protocol friendship check information Transmission, the USB2.0 and USB3.0 of USB3.0 ports function are all enumerated, USB port test equipment connects The function of entering the can stitch all to UBS3.0 is enumerated, and reduces the access repeatedly of USB test equipments, without independent Repeatedly test USB3.0 ports with USB2.0 port tests equipment using USB3.0 port tests equipment, without more The different test equipment of secondary plug could complete the test to USB3.0 ports, and indicator lamp is set outside USB port test equipment, The peripheral hardware menu of equipment under test need not be entered, just carry out judging based on feedback information the state of port to be tested, eliminate Troublesome operation in USB3.0 test process, tester can be used for quickly detecting judgement to the function of USB3.0 ports.
Brief description of the drawings
Fig. 1 is the hardware running environment terminal structure schematic diagram that scheme of the embodiment of the present invention is related to;
Fig. 2 is the diagrams illustrating stitches for being related to USB3.0 ports in the present invention;
Fig. 3 is the test device structural representation of USB port of the present invention;
Fig. 4 is the schematic flow sheet of the method for testing first embodiment of USB port of the present invention;
Fig. 5 is the schematic flow sheet of the method for testing second embodiment of USB port of the present invention;
Fig. 6 is the refinement schematic flow sheet of the step S20 of the method for testing of USB port in Fig. 4;
Fig. 7 is the refinement schematic flow sheet of the step S30 of the method for testing of USB port in Fig. 4.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
USB3.0 transmission rates reach 10 times of USB 2.0, and USB 2.0 speed is 480Mbps, and USB3.0 then can reach 4.8Gbps.Certainly, the speed that many equipment need not be so high, but requirement of the equipment such as hard disk and card reader to speed is still It is very high.Compared with USB 2.0, USB 3.0 will be saved more.In addition, USB 3.0 is backward compatible, USB 2.0 is supported to set It is standby.USB 3.0 has and with old edition phase compatibility standard, USB 3.0 has 9 stitch, as shown in Fig. 2 wherein D+ D- be compatible The stitch of USB 2.0, SSRX+ SSRX- SSTX+ SSTX- stitch be the new functions of USB 3.0, USB 3.0 supports general purpose I/O's Interface, and will optimize to reduce energy consumption, while improve the protocol efficiency of computer, consumer products and mobile product field Product, support Fast synchronization locomotivity, optics and digital component specifications can be supported simultaneously, and it is easy to have traditional USB technologies With property and the characteristic of plug and play.
Mini USB 3.0 have interface to be classified into the public mouths (Plug) of two kinds of A, B, and female mouth (Receptacle) will have B and AB Two kinds, from the point of view of in shape, mother's AB mouth two kinds of male mouths of compatible A and B, it can be seen that, the stitch of 3.0 editions public mouths is 9 pins simultaneously, And 2.0 are 5 pins.For backward compatible 2.0 editions, USB 3.0 employs the design of 9 stitch, wherein four stitch and USB 2.0 Shape, definition are identical, and other 5 are prepared exclusively for USB 3.0.As shown in figure 1, the input of USB3.0 ports Equipment (9 stitch D+ D- SSRX+ SSRX- SSTX+ SSTX- VBus\GND)。
As USB3.0 ports are constantly popularized on consumer product, the production process requirement of USB3.0 ports product is equipped with More comprehensively faster test mode realizes the test before product export;USB3.0 ports are made up of 9 interface lines, are realized and are disappeared Take the data transfer between class product such as TV and carrier such as USB flash disk;Being equipped with the production process of the product of USB3.0 ports at present is Tested with USB3.0 USB flash disk, and the design of USB3.0 interfaces is can to cover the data transfer of USB2.0 functions, such as Fig. 2 It is shown, if the D+ being equipped with the equipment of USB3.0 ports input D- disconnect, USB3.0 USB flash disk still can equipment under test again In be found, can not so judge USB3.0 ports D+ D- it is whether normal;If the equipment of USB3.0 ports input is equipped with again Middle SSRX+ SSRX- SSTX+ SSTX- disconnect, the equipment identification that USB3.0 USB flash disk can be still tested can not so judge SSRX+ in USB3.0 ports SSRX- SSTX+ SSTX- pins it is whether normal;If the USB flash disk using USB2.0 is being surveyed Examination, will expend the more time in the test of production process;The method of testing of current production process is after inserting USB flash disk, to enter Enter to determine whether that external mobile equipment accesses in the menu of equipment under test, judge that flow is relatively complicated, can not realize and quickly sentence The state of interruptive port;The test operation flow of cumbersome USB3.0 ports, directly influence and be equipped with setting for USB3.0 input ports The standby production efficiency in producing line production process, this hair is proposed in order to improve these USB3.0 testing process thus correspond to It is bright.
As shown in figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to.
The method of testing of USB port of the present invention is applied to the test device of USB port, USB port test device such as Fig. 3 institutes Show, the test device of USB port is arranged in terminal as shown in Figure 1, can also directly be carried out the test device of USB port USB port is tested, and terminal of the embodiment of the present invention can be the tool such as PC or smart mobile phone, tablet personal computer, pocket computer There is a packaged type terminal device of display function, the test device also test including USB port of the USB port in the present invention connects Head, the test splice as shown in Figure 2 (supplementary notes be USB port in the present invention test device and USB tests set Standby is that the test hardware for the USB port being related in the present invention can be replaced, and the USB3.0 ports being related in specification are surveyed Equipment is tried, USB2.0 port test equipment is port test equipment of the prior art).
As shown in figure 1, the terminal can include:Processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is used to realize the connection communication between these components. User interface 1003 can include display screen (Display), input block such as keyboard (Keyboard), optional user interface 1003 can also include wireline interface, the wave point of standard.Network interface 1004 can optionally connect including the wired of standard Mouth, wave point (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Alternatively, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor ratio such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity transducer can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect in all directions the size of (generally three axles) acceleration, quiet Size and the direction of gravity are can detect that when only, the application available for identification mobile terminal posture is (such as horizontal/vertical screen switching, related Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match somebody with somebody The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared ray sensor are put, will not be repeated here.
It will be understood by those skilled in the art that the restriction of the terminal structure shown in Fig. 1 not structure paired terminal, can be wrapped Include than illustrating more or less parts, either combine some parts or different parts arrangement.
As shown in figure 1, it can lead to as in a kind of memory 1005 of computer-readable storage medium including operating system, network Believe the test application program of module, Subscriber Interface Module SIM and USB port.
In the terminal shown in Fig. 1, network interface 1004 is mainly used in connecting background server, is carried out with background server Data communicate;User interface 1003 is mainly used in connecting client (user terminal), enters row data communication with client;And processor 1001 can be used for calling the test application program of USB port stored in memory 1005, and perform following operate:
When detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns;
If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, and point The USB3.0 communication functions and USB2.0 communication functions of port to be tested are not tested;
When detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show.
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
It is corresponding logical as USB3.0 communications protocol, USB2.0 communication functions that the USB3.0 communication functions correspond to communications protocol Agreement is interrogated as USB2.0 communications protocol;
It is described when detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns Include before step:
USB3.0 communications protocol and USB2.0 communications protocol that USB3.0 port tests are related to are pre-stored in USB test equipments In, so that USB test equipments are based on instead based on the USB3.0 communications protocol to prestore and USB2.0 communications protocol generation check information Feedforward information judges whether port to be tested is abnormal..
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
It is described when detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns Include after step:
If current test pattern is not USB3.0 port test patterns, using port to be tested as USB2.0 ports;
Check information is generated based on the USB2.0 communications protocol that prestores, check information is sent to testing port to be tested;
The feedback information that port to be tested is generated based on check information is obtained, USB2.0 communication work(is generated according to feedback information The test result of energy and display.
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
If the current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, And the step of testing the USB3.0 communication functions and USB2.0 communication functions of port to be tested respectively, includes:
If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, it is based on USB3.0 communications protocol and USB2.0 communications protocol generate check information respectively;
Check information is sent to testing port to be tested, with test respectively the USB3.0 communication functions of port to be tested and USB2.0 communication functions.
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
It is described test port to be tested respectively USB3.0 communication functions and USB2.0 communication functions the step of include:
The feedback information of check information generation of the port to be tested based on USB2.0 communications protocol is obtained, and is based on feedback letter Breath judges whether USB2.0 communication functions in port to be tested are abnormal;
If USB2.0 communication functions in port to be tested are abnormal, USB2.0 communication functions compatible in USB3.0 ports are prompted Corresponding stitch is abnormal.
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
It is described test port to be tested respectively USB3.0 communication functions and USB2.0 communication functions the step of also include:
The feedback information of check information generation of the port to be tested based on USB3.0 communications protocol is obtained, based on feedback information Judge whether USB3.0 communication functions in port to be tested are abnormal;
If USB3.0 communication functions in port to be tested are abnormal, the USB3.0 communication functions of USB3.0 ports are prompted to correspond to pin Pin is abnormal..
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
It is described when detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show Step includes:
When detecting that port test to be tested is completed, test result corresponding to port to be tested is generated;
If the test result of port test to be tested is abnormal, corresponding prompt message is shown, for user's identification.
Further, processor 1001 can call the test application program of the USB port stored in memory 1005, also Perform following operate:
If the test result of the port test to be tested is abnormal, show that the step of corresponding to prompt message includes:
If the test result of port test to be tested is abnormal, USB3.0 port test knots are prompted by preset warning light Fruit.
Reference picture 4, the USB3.0 embodiments in the method for testing of USB port of the present invention, device and readable storage medium storing program for executing carry For a kind of method of testing of USB port, the method for testing of the USB port includes:
Step S10, when detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test moulds Formula.
Specifically, the method for testing executive agent of terminal USB port of the present invention is that USB test equipments (are called USB port Test device), USB port is is devices under positioned at television set or computer etc., and by USB port, (USB port includes USB3.0 ports, USB2.0 ports, USB1.0 ports etc.) (supplementary notes are test interfaces for test interface in test device Outward appearance is similar to USB flash disk, as shown in figure 3, having control with the test interface 1 and test indicator lamp 2, centre being adapted to USB port Chip IC) in the USB port that is devices under of insertion or, triggering USB test equipments port test instruction, USB port test Device is preset with USB3.0 test patterns and non-USB3.0 test patterns, and wherein USB3.0 test patterns can test the new work(of USB3.0 The function of USB2.0 and following version can be only tested with compatible USB2.0 and following version function, non-USB3.0 test patterns, USB test equipments determine test pattern corresponding to test interface, to judge whether to be in USB3.0 port test patterns.
Step S20, if current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ends Mouthful, and the USB3.0 communication functions and USB2.0 communication functions of port to be tested are tested respectively.
If port testing device is in USB3.0 port test patterns, using port to be tested as USB3.0 ports, and According to USB3.0 agreements, USB test equipments are inserted to the instrument or equipment for being equipped with USB3.0 ports, and corresponding detection USB3.0 ends Extremely whether (function of USB3.0 ports includes USB3.0 communication functions and compatible USB2.0 communication work(to the function of stitch in mouthful Can), and the USB3.0 communication functions and USB2.0 communication functions of port to be tested are tested respectively.
Specifically, the compatible USB2.0 functions of the USB3.0 ports (are enumerated first:Program design language is called the turn with nature language The word of corresponding meaning is called the turn to represent a certain state.That is, the value that forethought may take to a certain variable, as far as possible Its each value is represented with the clear word of implication in natural language, this method is referred to as enumeration methodology), judge USB3.0 Whether the compatible USB2.0 communication functions of port are normal, then the USB3.0 communication functions of the USB3.0 ports are enumerated, and sentence The USB3.0 communication functions of disconnected USB3.0 ports it is whether normal (it should be added that:During USB3.0 port tests, USB3.0 The function of different stitch, which is enumerated, in port to be adjusted, i.e., it is right first compatible USB2.0 communication functions to be enumerated again USB3.0 communication functions are enumerated, or first USB3.0 communication functions are enumerated again to enter compatible USB2.0 communication functions Row is enumerated, or compatible USB2.0 communication functions and USB3.0 communication functions are enumerated simultaneously).
Step S30, when detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show Show.
When detecting that USB3.0 port tests are completed, the test result of USB3.0 ports is subjected to display output, reference Fig. 3, Fig. 3 are the test device (being called USB test equipments) of the USB port used in the present invention, have what is be adapted to USB port Interface 1 and the indicator lamp of test prompts 2, when port test is completed, indicator lamp 2 can prompt test result by color change (prompting of test result can be prompted by the warning light 2 of test device, can also by USB test equipments with it is corresponding Terminal is connected by information, in the display screen display test result of terminal).
It is in the present embodiment when port test pattern is in USB3.0 test patterns, the institute for testing USB3.0 is active Can, to USB3.0 ports hand over the transmission of check information based on communications protocol by USB port test equipment, to USB3.0 ends The USB2.0 and USB3.0 of mouth function are all enumerated, and the access can of a USB port test equipment is to UBS3.0 The function of all stitch is enumerated, and reduces the access repeatedly of USB test equipments, without individually carrying out using USB3.0 ends Mouth test equipment is repeatedly tested USB3.0 ports with USB2.0 port tests equipment, without repeatedly plugging different tests Equipment could complete the test to USB3.0 ports, and indicator lamp is set outside USB port test equipment, without into equipment under test Peripheral hardware menu, just carry out judging based on feedback information the state of port to be tested, eliminate numerous in USB3.0 test process Trivial operation, tester can be used for quickly detecting judgement to the function of USB3.0 ports.
Further, the method for testing of USB port, it is further comprising the steps of:
It is corresponding logical as USB3.0 communications protocol, USB2.0 communication functions that the USB3.0 communication functions correspond to communications protocol Agreement is interrogated as USB2.0 communications protocol;
USB3.0 communications protocol and USB2.0 communications protocol that USB3.0 port tests are related to are pre-stored in USB test equipments In, so that USB test equipments are based on instead based on the USB3.0 communications protocol to prestore and USB2.0 communications protocol generation check information Feedforward information judges whether port to be tested is abnormal.
Specifically, the present invention is to being devices under by the test device (or being USB test equipments) of USB port The USB port of (be devices under, e.g., television set, computer etc.) sends the check information formed based on different communications protocol, After USB port receives the check information based on communications protocol generation, if USB port stitch is normal, it is possible to be correspondingly formed The feedback information of check information, completes the testing process to USB port, and the test device in the present invention in USB port (or is named USB test equipments) in prestore corresponding agreement, backward compatible USB2.0 communication functions and new are related in USB3.0 ports USB3.0 communication functions, thus need to configure different functional protocols that (agreement of difference in functionality is corresponding with different version etc. no Same information), i.e. agreement corresponding to the USB3.0 communication functions for being prestored in USB test equipments new is called USB3.0 communications protocol, Agreement corresponding to compatible USB2.0 communication functions is called USB2.0 communications protocol, it is necessary to which supplementary notes are USB3.0 communications protocol It is a kind of communications protocol with USB2.0 communications protocol, there is different protocol version protocol types, USB test equipments can be based on The communications protocol to prestore forms check information and sent to USB port, whether judges port to be tested based on feedback information with detection It is abnormal.
USB3.0 communications protocol and USB2.0 communications protocol that USB3.0 port tests are related to are prestored in the present embodiment In USB test equipments, so that USB test equipments are based on the USB3.0 communications protocol to prestore and USB2.0 communications protocol generation school Test information and judge whether port to be tested is abnormal based on feedback information.Assisted by the communication for prestoring different in USB test equipments View, when inserting USB test equipments, USB3.0 ports can be sent to based on different communications protocol generation check informations, be not required to Otherwise same test equipment carries out multiple plug in USB3.0 ports, can accordingly reduce testing process.
Reference picture 5, a kind of method of testing of USB port is provided in the USB2.0 embodiments of the present invention, the USB port Include after method of testing step S10:
Step S40, if current test pattern is not USB3.0 port test patterns, using port to be tested as USB2.0 Port;Check information is generated based on the USB2.0 communications protocol that prestores, check information is sent to testing port to be tested.
Specifically, USB test equipments can test USB port (the USB surveys of different editions by setting different patterns Examination equipment can test USB3.0 ports, USB2.0 ports or USB1.0 ports), it is not USB3.0 ports in USB test equipments During test pattern, USB test equipments, which are tested port to be tested as USB2.0 ports, (that is, only tests USB2.0 ports Function USB2.0 communication functions, or only test compatible USB2.0 functions in USB3.0 ports without testing USB3.0 ports In new USB3.0 communication functions), it is to be measured that USB test equipments are based on checking information test corresponding to the generation of USB2.0 communications protocol Port is tried, USB2.0 ports can receive the checking information based on the generation of USB2.0 communications protocol and be correspondingly formed feedback information, The USB test equipments of the method for testing of USB port, it is corresponding to be configured with the complete of USB2.0 functions in non-USB3.0 test patterns The port of fast mode, the equipment under test for being equipped with USB2.0 input ports is communicated, communication process is based on USB2.0 specifications Physical layer, linking layer, protocol layer;The result fed back from protocol layer, judgement are that exception exits test.
Step S50, the feedback information that port to be tested is generated based on check information is obtained, is generated according to feedback information The test result of USB2.0 communication functions and display.
USB test equipments obtain feedback information that port to be tested formed according to USB2.0 communications protocol check information (if The stitch of USB2.0 ports goes wrong, and can not receive check information corresponding to USB2.0 communications protocol, cannot also be formed Corresponding feedback information, at this moment USB test equipments can accordingly judge USB2.0 ports exception, port extremely include physical layer, Linking layer, protocol layer), USB test equipments are correspondingly formed test result according to feedback information, and test result is surveyed by USB Preset indicator lamp in examination equipment is prompted.
The port test of USB test equipments in the present embodiment, can also be to USB2.0 ends not only for USB3.0 ports Mouth and following version are tested, and the method for testing of USB port can be applied in the port test of different editions, and correspondingly Test prompts information is formed, the compatibility of USB test equipments is higher, simple to operate.
Reference picture 6, a kind of method of testing of USB port, the method for testing step of the USB port are provided in the present embodiment S20 includes:
Step S21, if current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ends Mouthful, check information is generated based on USB3.0 communications protocol and USB2.0 communications protocol respectively.
When USB test equipments are in USB3.0 port test patterns, i.e. USB test equipments using port to be tested as , it is necessary to test the compatible USB2.0 communication functions of USB3.0 ports and new USB3.0 communication functions, i.e. USB is surveyed for USB3.0 ports Examination equipment is based respectively on corresponding to USB2.0 communications protocol corresponding to compatible USB2.0 communication functions and new USB3. communication functions USB3.0 communications protocol generation check information is sent to port to be tested, so that port check bit information to be tested is correspondingly formed instead Feedforward information.
Specifically, the test equipment of USB port, USB3.0 ports can be configured to the end of the hyperspin mode of USB3.0 functions Mouthful, the equipment under test for being equipped with USB3.0 input ports is communicated, physical layer of the communication process based on USB3.0 specifications, link Layer, protocol layer;The result fed back from protocol layer, the new USB3.0 for judging port to be tested based on feedback information communicate work( Whether the USB2.0 communication functions of energy and compatibility are abnormal, and (step is preferentially to carry out in existing test equipment, if sentenced Break and USB3.0 communication functions in USB3.0 ports and have exception, port can be communicated in a manner of USB2.0).
Step S22, check information is sent to port to be tested is tested, led to testing the USB3.0 of port to be tested respectively Communication function and USB2.0 communication functions.
Check information is sent to port to be tested is tested, USB test equipments obtain port to be tested and are based on checking information The feedback information of generation, in the test of physical layer:If USB3.0 ports be not received by USB test equipments based on USB3.0 The checking information of communications protocol generation, i.e., can not be correspondingly formed feedback information USB test equipments correspondingly can obtain USB3.0 ports In new USB3.0 communication functions stitch occur it is abnormal, if same USB3.0 ports are not received by USB test equipments Checking information based on the generation of USB2.0 communications protocol, i.e. can not be correspondingly formed feedback information USB test equipments can correspondingly obtain The stitch of compatible USB2.0 communication functions occurs abnormal in USB3.0 ports, there may be USB3.0 ports can receive Situations such as still agreement is obstructed to corresponding agreement, USB test equipments can accordingly judge according to the feedback information received Whether USB3.0 port functions are abnormal.
Specifically, the feedback information of check information generation of the port to be tested based on USB2.0 communications protocol is obtained;It is based on Feedback information judges whether USB2.0 communication functions in port to be tested are abnormal, if USB2.0 communication functions in port to be tested are abnormal, USB2.0 communication functions compatible in USB3.0 ports are then prompted to correspond to stitch exception.Port to be tested is obtained based on USB3.0 to lead to Interrogate the feedback information of the check information generation of agreement;Judge whether USB3.0 communication functions in port to be tested are different based on feedback information Often, if USB3.0 communication functions in port to be tested are abnormal, prompt the USB3.0 communication functions of USB3.0 ports that to correspond to stitch different Often.
Generation check information based on communications protocol in the present embodiment, judges the function of USB3.0 ports, When detecting that the USB3.0 functions of USB3.0 ports occur abnormal, it can also accordingly be switched to USB2.0 functions and carry out signal biography It is defeated, detected by the function of all stitch to USB3.0 ports, improve the testing efficiency of USB3.0 ports.
Reference picture 7, a kind of method of testing of USB port, the method for testing step of the USB port are provided originally applying example S30 includes:
Step S31, when detecting that port test to be tested is completed, generate test result corresponding to port to be tested.
When USB test equipments detect that USB3.0 port tests are completed, USB test equipments are anti-according to port to be tested Feedforward information, the test result of generation USB3.0 ports.
Step S32, if the test result of port test to be tested is abnormal, corresponding prompt message is shown, so that user knows Not.
If the test result of port test to be tested is abnormal, USB3.0 port test knots are prompted by preset warning light (i.e., it is possible to which an indicator lamp is used to show compatible USB2.0 communication functions, an indicator lamp user shows new USB3.0 to fruit Communication function, represent whether test result is abnormal with different indicator light colors), or USB test results are tested with USB The terminal display screen of equipment communication connection shows test result.
The test result of USB port is intuitively represented with USB test equipments in the present embodiment, USB port tester Fast reaction is made to tested port, is not limited to indicator lamp, it is also including other communication modes, above test result is quickly anti- Feed tester, but makes test result more intuitively display output.
The present invention also provides a kind of test device of USB port.
The test device of USB port of the present invention includes:Memory, processor and it is stored on the memory and can be in institute The test program of the USB port run on processor is stated, wherein:The test program of USB port is by real during the computing device Now such as the step of the method for testing of USB port.
Wherein, the method realized when the test program of USB port is performed can refer to the method for testing of this USB port Each embodiment, here is omitted.
The present invention also provides a kind of readable storage medium storing program for executing.
The test program of USB port is stored with readable storage medium storing program for executing of the present invention, the test program of the USB port is located The step of reason device realizes the method for testing of above-mentioned USB port when performing.
Wherein, the method realized when the test program of USB port is performed can refer to the method for testing of this USB port Each embodiment, here is omitted.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or system institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of method of testing of USB port, it is characterised in that the method for testing of the USB port comprises the following steps:
When detecting port test instruction, it is determined that whether current test pattern is USB3.0 port test patterns;
If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, and survey respectively Try the USB3.0 communication functions and USB2.0 communication functions of port to be tested;
When detecting that port test to be tested is completed, generate test result corresponding to port to be tested and show.
2. the method for testing of USB port as claimed in claim 1, it is characterised in that the USB3.0 communication functions are corresponding logical Agreement is interrogated as USB3.0 communications protocol, USB2.0 communication functions correspond to communications protocol as USB2.0 communications protocol;
It is described when detecting port test instruction, it is determined that the step of whether current test pattern is USB3.0 port test patterns Include before:
USB3.0 communications protocol and USB2.0 communications protocol that USB3.0 port tests are related to are pre-stored in USB test equipments, So that USB test equipments are based on feedback letter based on the USB3.0 communications protocol to prestore and USB2.0 communications protocol generation check information Breath judges whether port to be tested is abnormal.
3. the method for testing of USB port as claimed in claim 2, it is characterised in that described to detect that port test instructs When, it is determined that including after the step of whether current test pattern is USB3.0 port test patterns:
If current test pattern is not USB3.0 port test patterns, using port to be tested as USB2.0 ports;
Check information is generated based on the USB2.0 communications protocol that prestores, check information is sent to testing port to be tested;
The feedback information that port to be tested is generated based on check information is obtained, USB2.0 communication functions are generated according to feedback information Test result is simultaneously shown.
4. the method for testing of USB port as claimed in claim 2, it is characterised in that if the current test pattern is USB3.0 port test patterns, then using port to be tested as USB3.0 ports, and the USB3.0 of port to be tested is tested respectively The step of communication function and USB2.0 communication functions, includes:
If current test pattern is USB3.0 port test patterns, using port to be tested as USB3.0 ports, it is based on USB3.0 communications protocol and USB2.0 communications protocol generate check information respectively;
Check information is sent to testing port to be tested, with test respectively the USB3.0 communication functions of port to be tested and USB2.0 communication functions.
5. the method for testing of USB port as claimed in claim 4, it is characterised in that described to test port to be tested respectively The step of USB3.0 communication functions and USB2.0 communication functions, includes:
The feedback information of check information generation of the port to be tested based on USB2.0 communications protocol is obtained, and is sentenced based on feedback information Whether USB2.0 communication functions in port to be tested of breaking are abnormal;
If USB2.0 communication functions in port to be tested are abnormal, prompt USB2.0 communication functions compatible in USB3.0 ports corresponding Stitch is abnormal.
6. the method for testing of USB port as claimed in claim 4, it is characterised in that described to test port to be tested respectively The step of USB3.0 communication functions and USB2.0 communication functions, also includes:
The feedback information of check information generation of the port to be tested based on USB3.0 communications protocol is obtained, is judged based on feedback information Whether USB3.0 communication functions in port to be tested are abnormal;
If USB3.0 communication functions in port to be tested are abnormal, prompt the USB3.0 communication functions of USB3.0 ports that to correspond to stitch different Often.
7. the method for testing of the USB port as described in claim 1 to 6 any one, it is characterised in that described ought detect is treated When test port test is completed, generate test result corresponding to port to be tested and include the step of display:
When detecting that port test to be tested is completed, test result corresponding to port to be tested is generated;
If the test result of port test to be tested is abnormal, corresponding prompt message is shown, for user's identification.
8. the method for testing of USB port as claimed in claim 7, it is characterised in that if the survey of the port test to be tested Test result is abnormal, then shows that the step of corresponding to prompt message includes:
If the test result of port test to be tested is abnormal, USB3.0 port test results are prompted by preset warning light.
9. a kind of test device of USB port, it is characterised in that the test device of the USB port includes:Memory, processing Device and the test program for being stored in the USB port that can be run on the memory and on the processor, wherein:
The test program of the USB port is realized as any one of claim 1 to 8 during the computing device The step of method of testing of USB port.
A kind of 10. readable storage medium storing program for executing, it is characterised in that the test program of USB port is stored with the readable storage medium storing program for executing, The USB port as any one of claim 1 to 8 is realized when the test program of the USB port is executed by processor The step of method of testing.
CN201710549905.8A 2017-07-06 2017-07-06 USB port testing method and device and readable storage medium Active CN107402856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710549905.8A CN107402856B (en) 2017-07-06 2017-07-06 USB port testing method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710549905.8A CN107402856B (en) 2017-07-06 2017-07-06 USB port testing method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN107402856A true CN107402856A (en) 2017-11-28
CN107402856B CN107402856B (en) 2021-07-06

Family

ID=60405383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710549905.8A Active CN107402856B (en) 2017-07-06 2017-07-06 USB port testing method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN107402856B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752771A (en) * 2019-03-29 2020-10-09 杭州海康威视数字技术股份有限公司 USB port test equipment and system
CN113010356A (en) * 2021-02-22 2021-06-22 深圳市微特精密科技股份有限公司 USB2.0/3.0 interface testing device and testing method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011286A1 (en) * 2010-07-09 2012-01-12 Sae Magnetics (H.K.) Ltd. Optical communication module, universal serial bus cable with the same and processing method of data transfer thereof
CN104679620A (en) * 2013-11-28 2015-06-03 英业达科技有限公司 Hot swapping/hot plugging device and method for conducting automatic switching of protocols to establish and test data channel
CN205982507U (en) * 2016-08-23 2017-02-22 广州视睿电子科技有限公司 Testing arrangement of USB3. 0 equipment
CN106649015A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Testing device and testing method of USB interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120011286A1 (en) * 2010-07-09 2012-01-12 Sae Magnetics (H.K.) Ltd. Optical communication module, universal serial bus cable with the same and processing method of data transfer thereof
CN104679620A (en) * 2013-11-28 2015-06-03 英业达科技有限公司 Hot swapping/hot plugging device and method for conducting automatic switching of protocols to establish and test data channel
CN205982507U (en) * 2016-08-23 2017-02-22 广州视睿电子科技有限公司 Testing arrangement of USB3. 0 equipment
CN106649015A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Testing device and testing method of USB interface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752771A (en) * 2019-03-29 2020-10-09 杭州海康威视数字技术股份有限公司 USB port test equipment and system
CN113010356A (en) * 2021-02-22 2021-06-22 深圳市微特精密科技股份有限公司 USB2.0/3.0 interface testing device and testing method thereof

Also Published As

Publication number Publication date
CN107402856B (en) 2021-07-06

Similar Documents

Publication Publication Date Title
US20160191358A1 (en) Testing method for a smart wristband and testing system thereof
CN106341827A (en) Testing methods and systems for mobile communication devices
JP2010537156A (en) Integrated circuit with self-test mechanism to verify functionality of external interface
CN107402856A (en) Method of testing, device and the readable storage medium storing program for executing of USB port
CN110222510A (en) A kind of leak detection method, device and computer system
CN103248420A (en) Methods, systems and devices for detecting and identifying fiber connection
CN109783340A (en) Test code programming method, IP test method and the device of SoC
CN108683556A (en) Detect the method, apparatus and computer storage media of network interface card functional status
CN111339731A (en) FPGA (field programmable Gate array) verification platform and method for SoC (System on chip)
US11188708B2 (en) Electronic device, method, and computer readable medium for dynamic layout message
US20080021695A1 (en) ROM emulator and ROM testing method using the same
CN113078962B (en) Radio frequency calibration method, radio frequency calibration device, test equipment and storage medium
CN111786852B (en) Test method and related equipment
CN105588993A (en) Signal test method, tested equipment and signal test system
CN108259895A (en) set-top box test method, system and terminal device
CN105743879B (en) Smart television personal identification method and system
WO2017092391A1 (en) Middle-tier database virtual control and testing method and system utilizing same
CN107231462A (en) The test device of terminal
CN105652114B (en) Method of supplying power to, device and measurement jig during a kind of test display screen
CN106201930B (en) A kind of device port determining device, terminal and method
CN106940647A (en) Code administration method and apparatus
CN106346481A (en) Intelligent robot system for achieving configuration information transplanting and information transplant method
CN107423168A (en) Method of testing and test device
CN104079453B (en) The enumeration methodology and device of commissioning device
CN105635730B (en) A kind of set-top box test method and user terminal

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