1. Technical Field
The present invention relates to a testing apparatus and method for testing USB ports.
2. Description of Related Art
Today, universal serial bus (USB) technology is broadly applied to serial communication solutions and has become more and more important. Before distributing electronic devices having USB ports to the market, the USB ports need to be tested. A typical method for testing the USB ports is using typical USB devices such as USB mice, keyboards, and hard disk drives, directly connected to the USB ports, and inspecting the working status of the USB devices to determine if the USB ports meet the requirements of the electronic devices. However, the method includes identifying the types of the USB devices, loading drivers of the USB devices, and identifying the types of files from the USB devices, which is time consuming.
Therefore, a testing apparatus and method for testing USB ports is desired to overcome the above described deficiency.
Referring to
The computer 10 includes two USB ports 111, 112, a USB controller 113, an information reading module 114, and an information analyzing module 115. The USB port 111 is connected to a first USB device 21, and the USB port 112 is connected to a second USB device 22. The USB controller 113 is connected to the USB ports 111, 112.
The information reading module 114 is configured to read USB bus configuration information from the USB controller 113, and configuration information from the first USB device 21 and the second USB device 22. USB bus configuration information includes port numbers and bus numbers. Each of the USB ports 111, 112 corresponds to a port number and a bus number.
The information analyzing module 115 is configured to analyze the operating status of the USB ports 111, 112 according to information read by the information reading module 114, and transfer the information to the display device 30.
In a step S201, the information reading module 114 reads USB bus configuration information from the USB controller 113 and configuration information from the USB devices 21, 22.
Continuing to a step S202, the information analyzing module 115 analyzes the working status of the USB ports 111, 112 according to information read by the information reading module 114. If the information reading module 114 reads USB bus configuration information and configuration information from the USB device 21 successfully, the USB port 111 is in a good working status. If the information reading module 114 reads the USB bus configuration information and configuration information from the USB device 21 unsuccessfully, the USB port 111 is in a defective working status. The USB port 112 is tested at the same time from the USB device 22. The working status is displayed via the display device 30.
It is to be understood, however, that even though numerous characteristics and advantages of the embodiments have been set forth in the foregoing description, together with details of the structure and function of the embodiments, the disclosure is illustrative only, and changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
Number | Date | Country | Kind |
---|---|---|---|
200810302043.X | Jun 2008 | CN | national |