The content of the invention
The technical problem to be solved in the present invention is that the drawbacks described above for prior art is tested there is provided a kind of USB plugs
System and method, it is intended to which solving existing USB stability tests needs artificial plug USB interface to cause the problem of manpower expends.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of USB plugs test system, is connected with mobile phone to be measured, and it includes test terminal and USB connector;
Test terminal, which is sent, sets the USB interface between instruction control USB connector and mobile phone to be measured to connect or disconnect, and surveys
The status information of mobile phone to be measured is inquired about during examination terminal detection USB interface connection.
In described USB plug test systems, the test terminal includes:
GPIB control modules, set instruction to put high by the voltage on the VCOM interfaces of USB connector or set low for sending;
Enquiry module, when the magnitude of voltage on VCOM interfaces for detecting USB connector is high level, sends AT orders and looks into
Ask the status information of mobile phone to be measured.
In described USB plug test systems, GPIB cards are provided with the GPIB control modules, and NI-488 drives are installed
Dynamic program.
It is described to set instruction to be set ConnectMsg " VOLT 5 " in described USB plug test systems, USB is connected
Connect the high level that the voltage on the VCOM interfaces of device is set to+5V;It is described to set instruction to be set ConnectMsg " VOLT 0 ",
Voltage on the VCOM interfaces of USB connector is set to 0V low level.
In described USB plug test systems, the USB connector includes:
Agilent power module, for setting instruction to carry out low and high level conversion according to described, outputs it voltage and puts height
Or set low;
Usb hub, for putting high by voltage correspondence on its VCOM interface according to output voltage or setting low, and according to height
The break-make of Automatic level control USB interface.
A kind of USB plug method of testings using described USB plug test systems, it includes:
A, test terminal send the USB interface put between high setting instruction control USB connector and mobile phone to be measured and connected;
B, test terminal detect the status information of mobile phone to be measured;
The USB interface that C, test terminal are sent between the setting instruction control USB connector set low and mobile phone to be measured disconnects;
Whether the setting instruction that D, judgement are set low sends default testing time:It is to terminate USB plugs test;Otherwise return
Step A.
In described USB plug method of testings, the step A is specifically included:
A1, GPIB control module, which send to put high setting and instruct, gives Agilent power module,;
A2, Agilent power module connect according to the VCOM of high level to the usb hub of putting high setting instruction output+5V
Mouthful;
A3, usb hub obtain electric work, and mobile phone to be measured is connected with test terminal.
In described USB plug method of testings, the step B is specifically included:
When B1, enquiry module detect the VCOM interfaces for high level, the state letter that mobile phone to be measured is inquired about in AT orders is sent
Breath;
After the completion of B2, this inquiry, enquiry module sends change directive and gives GPIB control modules.
In described USB plug method of testings, the step C is specifically included:
C1, GPIB control module receive the setting instruction for sending and setting low after the change directive;
C2, Agilent power module instruct the low level for exporting 0V to the VCOM interfaces according to setting for setting low;
C3, usb hub power down are not worked, and mobile phone to be measured is disconnected with test terminal.
In described USB plug method of testings, the step D is specifically included:Current send of GPIB control modules record is put
The number of times of low setting instruction, and judge whether the number of times is equal to default testing time, it is to terminate USB plugs test;Otherwise
Return to step A.
Compared to prior art, USB plugs test system and its method that the present invention is provided are sent by testing terminal and set
Put the USB interface connection between instruction control USB connector and mobile phone to be measured or disconnect, test terminal detection USB interface connection
When inquire about the status information of mobile phone to be measured;By setting the disconnection and connection of instruction simulation USB interface, realize that automatization simulation is pulled out
Insert USB test;By inquiry can check multiple plug test after mobile phone to be measured whether occur deadlock, nonrecognition etc. is unstable
The problem of, will not engaged test personnel time and efforts, liberated the labour of tester.
Embodiment
The present invention provides a kind of USB plugs test system and its method, based on GPIB orders simulate the disconnection of USB interface with
Connection, realizes automatization simulation plug USB test, to check whether mobile phone occurs deadlock after up to a hundred plugs test, no
Identification etc. it is unstable the problem of, will not engaged test personnel time and efforts, liberated the labour of tester.To make this
The object, technical solution and advantage of invention are clearer, clear and definite, and the embodiment that develops simultaneously referring to the drawings is to of the invention further detailed
Describe in detail bright.It should be appreciated that specific embodiment described herein is not intended to limit the present invention only to explain the present invention.
Referring to Fig. 1, the USB plugs test system that the present invention is provided includes test terminal 10 and USB connector 20.It is described
Test terminal 10 is connected with USB connector 20, and mobile phone to be measured is connected with USB connector 20.The test terminal 10 sends setting
USB interface connection or disconnection between instruction control USB connector 20 and mobile phone to be measured, the test detection USB interface of terminal 10 connect
The status information of mobile phone to be measured is inquired about when connecing.When so carrying out USB stability test, without the manual plug USB of tester
Line, realize USB simulate plug Automated condtrol, will not engaged test personnel time and efforts, liberated tester
Labour.
In the present embodiment, test terminal 10, which is sent, sets the USB between instruction control USB connector 20 and mobile phone to be measured to connect
Connect or disconnect, be mainly based upon GPIB orders and the voltage on the VCOM interfaces of USB connector 20 is put into height(Connection)Or set low(It is disconnected
Open).The test terminal 10 is the PC for being mounted with GPIB cards and its correspondence driving(Personal Computer, PC),
SCPI language can be supported.
As shown in figure 1, the test terminal 10 includes GPIB control modules 110 and enquiry module 120.The GPIB controls
Module 110 passes through GPIB(General-Purpose Interface Bus, general purpose interface bus)Line connects with USB connector 20
Connect.GPIB cards are provided with GPIB control modules 110 and corresponding driving is mounted with, setting instruction can be sent by USB connector
VCOM interfaces on voltage put high or set low, that is, GPIB orders are sent to set the magnitude of voltage on VCOM interfaces for+5V or 0V.
Used order when the GPIB orders refer to be communicated using GPIB cards and its GPIB lines.All can be certainly based on every kind of driving
Oneself carries some basic communication tools, and the NI-488 of the present embodiment driving uses Measurement&Automation
Explorer (MAX) instrument, supports GPIB control modules.
Enquiry module 120 is connected using serial ports hardware interface with USB connector 20, detects the VCOM interfaces of USB connector
On magnitude of voltage when being high level, send inquiry of the AT orders realization to mobile phone state information to be measured, multinomial inquiry can be extended,
Whether can normally be called including mobile phone.
The MAX instruments are to provide some search connection equipment and the instrument communicated with equipment, can simplify GPIB controls
The identification and control of molding block.Behind the GPIB addresses for determining USB connector 20, you can quickly set up and be connected with USB connector 20,
And check and can normally receive and send messages.USB connector 20 would generally return to raw trade name, model name and raw manufacturer and be used for chasing after
The character that the letter and number of track firmware version is constituted.Using TCL scripts by GPIB orders(Instruction is set)Pass through
GPIB lines are sent to USB connector 20.Such as GPIB orders are set ConnectMsg " VOLT 5 ", are by USB connector 20
VCOM interfaces on voltage be set to+5V high level.GPIB orders are set ConnectMsg " VOLT 0 ", are by USB
Voltage on the VCOM interfaces of connector 20 is set to 0V low level.
The USB connector 20 includes Agilent power module 210 and usb hub(USB HUB)220.Agilent electricity
Source module 210 connects usb hub 220, and usb hub 220 connects mobile phone to be measured.Agilent power module 210 is according to described
GPIB orders carry out low and high level conversion, output it voltage and put high or set low, the output voltage is transmitted to usb hub 220
VCOM interfaces on so that the voltage correspondence of VCOM interfaces is put high or set low.
The usb hub 220 is a USB interface can be expanded into multiple USB interfaces(Usually 4), and can make
These USB interfaces device used at the same time.In present case, by control the voltage in usb hub 220 on VCOM interfaces come
Realize USB break-make.
For example, when GPIB orders are set ConnectMsg " VOLT 5 ", Agilent power module 210 exports+5V height
Level, makes the voltage on the VCOM interfaces of usb hub 220 be changed into+5V;Now usb hub 220 obtains electric normal work, leads to
Cross usb hub 220 to be connected mobile phone to be measured with test terminal 10, equivalent to USB connections.As GPIB orders set
During ConnectMsg " VOLT 0 ", Agilent power module 210 exports+0V low level, makes the voltage on the VCOM interfaces
It is changed into 0V;The chip in usb hub 220 now is supplied to without power supply, the no-voltage of usb hub 220 drives and stops work
Make, mobile phone to be measured is disconnected with test terminal 10, is disconnected equivalent to USB.
The detection usb hub 220 of enquiry module 120 can carry out the automatic inquiry of mobile phone state information to be measured when connecting,
Mainly send AT orders and mobile phone to be measured is transferred to by usb hub 220, corresponding is carried out to the value that mobile phone to be measured feeds back
Pair and judge, to complete the judgement to mobile phone state information to be measured.
In the present embodiment, status information includes the basic function and facility information for checking mobile phone.The form of AT orders can be
ATDxxxx.For example, send AT orders be ATD10010, as dial a phone go testing mobile phone call function whether
Normally.Corresponding AT orders can also be sent and test short breath function, whether can be crashed after multiple plug or the work(such as None- identified
Energy.Facility information is mainly the corresponding AT orders of transmission, can obtain the information such as manufacturer's information, the version model of mobile phone to be measured.
Based on above-mentioned USB plug test systems, the present invention also provides a kind of USB plugs method of testing, also referring to
Fig. 2, the USB plugs method of testing includes:
S100, test terminal send the USB interface put between high setting instruction control USB connector and mobile phone to be measured and connected
Connect;
S200, test terminal detect the status information of mobile phone to be measured;
The USB interface that S300, test terminal are sent between the setting instruction control USB connector set low and mobile phone to be measured breaks
Open;
S400, judge whether to reach default testing time:It is to terminate USB plugs test;Otherwise return to step S100.
In the present embodiment, the GPIB control modules of test terminal, which are first sent, puts high setting instruction, when enquiry module is completed
GPIB control modules are notified after state information searching, GPIB control modules send the setting instruction set low, also, GPIB again
Control module also needs to judge that the setting set low refers to have sent how many times, if reach default testing time(Such as 300 times).If not reaching
To default testing time, then GPIB control modules are first sent again puts high setting instruction and realizes USB connections, enquiry module continuation
Carry out state information searching.
In the step S100, GPIB control modules, which send to put high setting and instruct, gives Agilent power module, An Jie
Human relations power module is according to high setting instruction output+5V high level is put to the VCOM interfaces of usb hub, and usb hub is obtained
Electricity work, mobile phone to be measured is connected with test terminal.Specifically refer to above-described embodiment.
In the step S200, when the VCOM interfaces of enquiry module detection usb hub are high level, AT orders are sent
Mobile phone to be measured is transferred to by usb hub, the status information of mobile phone to be measured is inquired about.After the completion of this inquiry, enquiry module
Sending change directive notifies the change of GPIB control modules to set instruction.
In the step S300, GPIB control modules receive the setting instruction for sending and setting low after the change directive, peace
Prompt human relations power module according to the setting instruction output 0V set low low level to the VCOM interfaces, usb hub power down not work
Make, mobile phone to be measured is disconnected with test terminal.Specifically refer to above-described embodiment.
Then, in the step S400, the current number of times for sending the setting instruction set low of GPIB control modules record, and
Judge whether the number of times is equal to 300 times, be that can terminate test, otherwise return to step S100 continues to test.
In summary, the present invention is realized to the automatic of Agilent power module output voltage low and high level using gpib interface
Change control, the low and high level switching of the magnitude of voltage on VCOM interfaces to realize usb hub makes usb hub obtain electric work
Or power down is stopped, so as to realize that mobile phone to be measured is controlled with testing the break-make that the USB of terminal is connected, so as to realize USB mould
Intend plug, and inquire about in USB connections the status information of mobile phone to be measured;Will not engaged test personnel time and efforts, liberation
The labour of tester.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect scope.