[go: up one dir, main page]

CN100458725C - Method for testing by using universal serial bus port to connect testing device - Google Patents

Method for testing by using universal serial bus port to connect testing device Download PDF

Info

Publication number
CN100458725C
CN100458725C CNB2005101323970A CN200510132397A CN100458725C CN 100458725 C CN100458725 C CN 100458725C CN B2005101323970 A CNB2005101323970 A CN B2005101323970A CN 200510132397 A CN200510132397 A CN 200510132397A CN 100458725 C CN100458725 C CN 100458725C
Authority
CN
China
Prior art keywords
port
serial bus
universal serial
usb
upstream usb
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.)
Expired - Fee Related
Application number
CNB2005101323970A
Other languages
Chinese (zh)
Other versions
CN1987808A (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.)
Xuzhou Lifang Electromechanical Equipment Manufacturing Co Ltd
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CNB2005101323970A priority Critical patent/CN100458725C/en
Publication of CN1987808A publication Critical patent/CN1987808A/en
Application granted granted Critical
Publication of CN100458725C publication Critical patent/CN100458725C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention relates to a method for testing by using a universal serial bus port to connect a testing device. The USB port connection testing device comprises a first USB port, a second USB port, a data transmission line and a USB port switching chip, wherein the data transmission line is connected with the first USB port and the second USB port, and the USB port switching chip is positioned on the data transmission line. The method for testing comprises the steps of installing a driver of the USB port connection testing device on an electronic device to be tested, starting two upstream USB ports of the device to be tested, connecting the two upstream USB ports through the testing device, starting the driver of the testing device, opening the two upstream USB ports of equipment to be tested, transmitting data packets through the two upstream USB ports through the testing device, recording the data of the data packets in log files of the two upstream USB ports, and comparing the transmitted data with the recorded data to test whether the two upstream USB ports work normally or not.

Description

利用通用串行总线端口连接测试装置进行测试的方法 Method for testing by connecting test device with universal serial bus port

技术领域 technical field

本发明涉及一种利用USB端口连接测试装置进行测试的方法,特别是涉及可同时检测两个上游USB端口的测试方法,因此在同样数据量的测试中,将效率提高一倍的USB端口连接测试装置及其测试方法。The invention relates to a method for testing by using a USB port connection testing device, in particular to a testing method capable of simultaneously detecting two upstream USB ports, so that the efficiency of the USB port connection test can be doubled in the test of the same amount of data Device and its test method.

背景技术 Background technique

通用串行总线(Universal Serial Bus,英文简称:USB)是一种应用在个人计算机(PC)领域的新型接口技术。早在1995年,就已经有PC机带有USB接口,但由于缺乏软件及硬设备的支持,这些PC机的USB接口都闲置未用。1998年后,随着微软在Windows 98操作系统中内置了对USB接口的支持模块,加上带有USB端口的设备的日渐增多,USB接口技术才逐步走进了实用阶段。Universal Serial Bus (Universal Serial Bus, English abbreviation: USB) is a new interface technology applied in the field of personal computer (PC). As early as 1995, there were already PCs with USB ports, but due to the lack of software and hardware support, the USB ports of these PCs were left unused. After 1998, as Microsoft built a support module for the USB interface in the Windows 98 operating system, coupled with the increasing number of devices with USB ports, the USB interface technology gradually entered the practical stage.

这几年,随着大量支持USB端口的个人计算机的普及,USB接口逐步成为PC机的标准接口已经是大势所趋。在主机端,最新推出的PC机几乎100%支持USB接口;而在外设端,使用USB接口的电子设备也与日俱增,例如数码相机、扫描仪、摇杆、磁带和软驱、图像处理设备、打印机、键盘、鼠标等等。In recent years, with the popularization of a large number of personal computers supporting USB ports, it is the general trend that USB ports gradually become the standard ports of PCs. On the host side, almost 100% of the latest PCs support USB interfaces; and on the peripheral side, electronic devices using USB interfaces are also increasing day by day, such as digital cameras, scanners, joysticks, tapes and floppy drives, image processing equipment, printers, Keyboard, mouse, etc.

早期利用USB接口传输数据其标准为USB1.0/1.1标准。USB端口1.0/1.1标准对于低速设备传输速率可达1.5Mbps;对于全速设备,传输速率最大可达12Mbps。由于USB1.0/1.1标准传输速率比较低,若需传输大量数据则耗费时间较多。于是COMPAQ、Hewlett Packard、Intel、Lucent、Microsoft、NEC和PHILIPS这7家厂商联合制定了USB2.0接口标准。USB2.0接口标准将设备之间的数据传输速率增加到了480Mbps,比USB1.1标准快40倍左右,传输速率的提高对于用户的最大好处就是意味着用户可以使用到更高效的外部设备,而且具有多种速率的接口设备都可以被连接到使用USB2.0接口标准的线路上,而且无需担心数据传输时发生瓶颈效应。USB2.0标准对于高速设备可支持高达480Mbps的数据传输率,它主要适用于高画质的摄像头、高分辨率扫描仪以及大容量的便携内存之类的高性能外部设备。而且,USB2.0接口标准也向下兼容旧的USB1.0/1.1软件和设备,因此,用户就避免了由于兼容性而引起的问题。The early use of the USB interface to transmit data was based on the USB1.0/1.1 standard. The USB port 1.0/1.1 standard can transfer up to 1.5Mbps for low-speed devices; for full-speed devices, the transfer rate can reach up to 12Mbps. Since the transfer rate of the USB1.0/1.1 standard is relatively low, it will take a lot of time to transfer a large amount of data. So seven manufacturers, COMPAQ, Hewlett Packard, Intel, Lucent, Microsoft, NEC and PHILIPS, jointly formulated the USB2.0 interface standard. The USB2.0 interface standard increases the data transmission rate between devices to 480Mbps, which is about 40 times faster than the USB1.1 standard. The biggest benefit of the increase in the transmission rate for users is that they can use more efficient external devices, and Interface devices with multiple rates can be connected to the line using the USB2.0 interface standard, and there is no need to worry about bottleneck effects during data transmission. The USB2.0 standard can support a data transfer rate of up to 480Mbps for high-speed devices. It is mainly suitable for high-performance external devices such as high-definition cameras, high-resolution scanners, and large-capacity portable memory. Moreover, the USB2.0 interface standard is also backward compatible with the old USB1.0/1.1 software and devices, so users can avoid problems caused by compatibility.

在Windows操作系统中支持USB接口,WINDOWS XP操作系统已经能完全支持USB2.0设备。它将个人计算机的外围通信端口统一指定规格,USB接口支持即插即用和热插拔(hot plug),具有强大的可扩展性,为外围设备提供了低成本的标准数据传输形式。无论是例如键盘、鼠标、游戏摇杆之类的简单输入设备,还是如打印机、扫描仪、储存设备、摄像头之类的高级外部设备都可以采用USB接口,几乎包含了所有的外围设备。在一台PC上往往具有多个上游USB端口,可以同时连接几个下游USB设备。The USB interface is supported in the Windows operating system, and the WINDOWS XP operating system can fully support USB2.0 devices. It unifies the specifications of the peripheral communication ports of personal computers. The USB interface supports plug-and-play and hot plug (hot plug), has strong scalability, and provides a low-cost standard data transmission form for peripheral devices. Whether it is a simple input device such as a keyboard, mouse, or joystick, or an advanced external device such as a printer, a scanner, a storage device, or a camera, the USB interface can be used, and almost all peripheral devices are included. There are often multiple upstream USB ports on a PC, and several downstream USB devices can be connected at the same time.

目前所使用的USB端口测试方法是使用USB硬盘作为测试工具,然而现有技术的这种做法仍然存有诸多缺陷,特别是每一个USB端口要插入一块USB硬盘进行测试,如果被测机器有多个USB端口就需要多块USB硬盘,如果对被测机器进行批量生产,则需要多块USB硬盘进行大规模的测试,如此必会大大增加测试成本;此外,在仅有一块USB硬盘而要对多个USB端口进行测试时,只能分别对每一个USB端口进行测试,因而测试效率低下。The currently used USB port test method is to use a USB hard disk as a test tool, but this way of the prior art still has many defects, especially each USB port will be inserted into a USB hard disk for testing. One USB port needs multiple USB hard disks. If the machine under test is mass-produced, multiple USB hard disks are required for large-scale testing, which will greatly increase the test cost; in addition, when there is only one USB hard disk and the When multiple USB ports are tested, each USB port can only be tested separately, so the test efficiency is low.

发明内容 Contents of the invention

本发明所要解决的技术问题在于提供一种利用USB端口连接测试装置进行测试的方法,用以测试电子设备的USB端口的性能,可大大节约成本,可同时检测两个上游USB端口,因此在同样数据量的测试中,使用此USB端口连接测试装置进行测试的效率会提高一倍。The technical problem to be solved by the present invention is to provide a method for testing the performance of the USB port of an electronic device by connecting a test device with a USB port, which can greatly save costs, and can detect two upstream USB ports at the same time, so in the same In the test of the amount of data, the test efficiency will be doubled by using the USB port to connect the test device.

本发明提供一种利用通用串行总线端口连接测试装置进行测试的方法,利用该通用串行总线端口连接测试装置对一电子装置上的第一上游通用串行总线端口及一第二上游通用串行总线端口进行测试,该通用串行总线端口连接测试装置包括有一第一通用串行总线端口、一第二通用串行总线端口、一连接上述第一通用串行总线端口及第二通用串行总线端口的数据传输线以及一位于该数据传输线上的通用串行总线端口转接芯片,其特点在于,该进行测设的方法包含以下步骤:The present invention provides a method for testing by using a universal serial bus port connection test device, using the universal serial bus port connection test device to test a first upstream universal serial bus port and a second upstream universal serial bus port on an electronic device row bus port for testing, the universal serial bus port connection testing device includes a first universal serial bus port, a second universal serial bus port, a connection between the first universal serial bus port and the second universal serial bus port The data transmission line of the bus port and a universal serial bus port adapter chip located on the data transmission line are characterized in that the method for testing and setting includes the following steps:

(1)于该电子装置安装该通用串行总线端口连接测试装置的驱动程序,并同时启动一第一上游通用串行总线端口与一第二上游通用串行总线端口;(1) installing the driver program of the universal serial bus port connection testing device on the electronic device, and simultaneously starting a first upstream universal serial bus port and a second upstream universal serial bus port;

(2)通过该通用串行总线端口连接测试装置将该第一上游通用串行总线端口与该第二上游通用串行总线端口进行连接,并启动该通用串行总线端口连接测试装置的驱动程序;(2) connect the first upstream USB port with the second upstream USB port through the USB port connection testing device, and start the driver program of the USB port connection testing device ;

(3)打开该第一上游通用串行总线端口与该第二上游通用串行总线端口;(3) opening the first upstream USB port and the second upstream USB port;

(4)由该第一上游通用串行总线端口通过该通用串行总线端口连接测试装置发送测试数据包至该第二上游通用串行总线端口,并将该第一上游通用串行总线端口发送的测试数据包的数据记录至该第一上游通用串行总线端口的日志文件,将该第二上游通用串行总线端口接收的测试数据包的数据记录至该第二上游通用串行总线端口的日志文件;(4) Send a test data packet to the second upstream USB port from the first upstream USB port through the USB port connection test device, and send the first upstream USB port The data of the test data packet is recorded to the log file of the first upstream Universal Serial Bus port, and the data of the test data packet received by the second upstream Universal Serial Bus port is recorded to the log file of the second upstream Universal Serial Bus port. log files;

(5)读取该第一上游通用串行总线端口的日志文件记录的发送数据以及该第二上游通用串行总线端口的日志文件记录的接收数据,并且将该第一上游通用串行总线端口的日志文件记录的发送数据和该第二上游通用串行总线端口的日志文件记录的接收数据分别与该测试数据包的数据进行比较;(5) Read the sending data recorded in the log file of the first upstream Universal Serial Bus port and the receiving data recorded in the log file of the second upstream Universal Serial Bus port, and the first upstream Universal Serial Bus port The sending data recorded in the log file and the receiving data recorded in the log file of the second upstream USB port are compared with the data of the test packet respectively;

(6)比较第一上游通用串行总线端口日志文件记录与第二上游通用串行总线端口日志文件记录来决定该第一上游通用串行总线端口的运作状态;(6) comparing the first upstream USB port log file record with the second upstream USB port log file record to determine the operating status of the first upstream USB port;

(7)由该第二上游通用串行总线端口发送测试数据包至该第一上游通用串行总线端口,并将该第二上游通用串行总线端口发送的测试数据包的数据记录至该第二上游通用串行总线端口的日志文件,将该第一上游通用串行总线端口接收的测试数据包的数据记录至该第一上游通用串行总线端口的日志文件;(7) Send a test packet to the first upstream USB port from the second upstream USB port, and record the data of the test packet sent by the second upstream USB port to the first upstream USB port. 2. The log file of the upstream USB port, recording the data of the test packet received by the first upstream USB port to the log file of the first upstream USB port;

(8)读取该第二上游通用串行总线端口的日志文件记录的发送数据以及该第一上游通用串行总线端口的日志文件记录的接收数据,并且将该第二上游通用串行总线端口的日志文件记录的发送数据以及该第一上游通用串行总线端口的日志文件记录的接收数据分别与该测试数据包的数据进行比较;(8) Read the sending data recorded in the log file of the second upstream Universal Serial Bus port and the receiving data recorded in the log file of the first upstream Universal Serial Bus port, and the second upstream Universal Serial Bus port The sending data recorded in the log file and the receiving data recorded in the log file of the first upstream USB port are compared with the data of the test packet respectively;

(9)比较第一上游通用串行总线端口日志文件记录与第二上游通用串行总线端口日志文件记录来决定该第二上游通用串行总线端口的运作状态;以及(9) comparing the first upstream USB port log file record with the second upstream USB port log file record to determine the operating status of the second upstream USB port; and

(10)结束测试。(10) End the test.

上述利用通用串行总线端口连接测试装置进行测试的方法,其中步骤(6)还包含如下步骤:The above-mentioned method utilizing a universal serial bus port to connect a testing device for testing, wherein step (6) also includes the following steps:

(a)当该第一上游通用串行总线端口的日志文件记录的发送数据与该测试数据包的数据不同时,则可判定该第一上游通用串行总线端口发送数据包有问题;以及(a) When the sending data recorded in the log file of the first upstream Universal Serial Bus port is different from the data of the test data packet, it can be determined that there is a problem with the sending data packet of the first upstream Universal Serial Bus port; and

(b)当该第一上游通用串行总线端口的日志文件记录的发送数据与该测试数据包的数据相同而该第二上游通用串行总线端口的日志文件记录的接收数据与该测试数据包的数据不同时,则可判定该第二上游通用串行总线端口接收数据包有问题。(b) When the sending data recorded in the log file of the first upstream Universal Serial Bus port is the same as the data of the test data packet and the received data recorded in the log file of the second upstream Universal Serial Bus port is the same as the data of the test data packet When the data are different, it can be determined that there is a problem with the second upstream USB port receiving the data packet.

上述利用通用串行总线端口连接测试装置进行测试的方法,其中步骤(9)还包含如下步骤:The above-mentioned method for testing by using a universal serial bus port to connect a testing device, wherein step (9) also includes the following steps:

(a)当该第二上游通用串行总线端口的日志文件记录的发送数据与该测试数据包的数据不同时,则可判定该第二上游通用串行总线端口发送数据包有问题;(a) When the sending data recorded in the log file of the second upstream universal serial bus port is different from the data of the test data packet, it can be determined that there is a problem with the sending data packet of the second upstream universal serial bus port;

(b)当该第二上游通用串行总线端口的日志文件记录的发送数据与该测试数据包的数据相同而该第一上游通用串行总线端口的日志文件记录的接收数据与该测试数据包的数据不同时,则可判定该第一上游通用串行总线端口接收数据包有问题;以及(b) When the sending data recorded in the log file of the second upstream Universal Serial Bus port is the same as the data of the test data packet and the received data recorded in the log file of the first upstream Universal Serial Bus port is the same as the data of the test data packet When the data is different, it can be determined that the first upstream USB port has a problem receiving the data packet; and

(c)当该测试数据包的数据与该第一上游通用串行总线端口的日志文件记录的接收数据及该第二上游通用串行总线端口的日志文件记录的发送数据都相同时,则可判定所测试的该第一上游通用串行总线端口与该第二上游通用串行总线端口均工作正常。(c) when the data of the test packet is the same as the received data recorded in the log file of the first upstream USB port and the sent data recorded in the log file of the second upstream USB port, then it may be It is determined that both the tested first upstream USB port and the second upstream USB port work normally.

本发明的优点在于:The advantages of the present invention are:

1、由于使用USB端口连接测试装置,其成本较低,一个USB端口连接测试装置的成本要大大低于一块USB测试硬盘的成本,可大大节约成本。1. Since the test device is connected to a USB port, its cost is relatively low, and the cost of a test device connected to a USB port is much lower than that of a USB test hard disk, which can greatly save costs.

2、使用USB端口连接测试装置进行测试时,此USB端口连接测试装置可以连接两个上游USB端口,同时检测两个上游USB端口,因此在同样数据量的测试中,使用此USB端口连接测试装置进行测试的效率会提高一倍。2. When using a USB port connection test device for testing, this USB port connection test device can connect two upstream USB ports and detect two upstream USB ports at the same time, so in the test of the same data volume, use this USB port connection test device The efficiency of testing will be doubled.

以下结合附图和具体实施例对本发明进行详细描述,但不作为对本发明的限定。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the present invention.

附图说明 Description of drawings

图1为本发明的USB端口连接测试装置的结构图;以及Fig. 1 is the structural diagram of USB port connection testing device of the present invention; And

图2至图4为本发明测试USB端口的方法的流程图。2 to 4 are flow charts of the method for testing a USB port of the present invention.

其中,附图标记:Among them, reference signs:

10第一上游USB端口                20第二上游USB端口10 First upstream USB port 20 Second upstream USB port

30USB端口连接测试装置            31第一USB端口30 USB port connection test device 31 1st USB port

32第二USB端口                    33数据传输线32 Second USB port 33 Data transmission line

34USB端口转接芯片                40拥有USB端口的电子设备34 USB port adapter chip 40 Electronic equipment with USB ports

步骤100安装USB端口连接测试装置驱动程序,并同时启动第一上游USB端口与第二上游USB端口的测试程序;Step 100 installs the USB port connection test device driver, and simultaneously starts the test program of the first upstream USB port and the second upstream USB port;

步骤101通过USB端口连接测试装置将第一上游USB端口与第二上游USB端口进行连接,并启动USB端口连接测试装置驱动程序;Step 101: connect the first upstream USB port to the second upstream USB port through the USB port connection test device, and start the USB port connection test device driver;

步骤102打开第一上游USB端口与第二上游USB端口;Step 102: Open the first upstream USB port and the second upstream USB port;

步骤103由第一上游USB端口通过USB端口连接测试装置发送测试数据包至第二上游USB端口,并将第一上游USB端口发送的测试数据包的数据与第二上游USB端口接收的测试数据包的数据分别记录至第一与第二上游USB端口的日志文件;In step 103, the first upstream USB port connects the testing device to send the test data packet to the second upstream USB port, and combines the data of the test data packet sent by the first upstream USB port with the test data packet received by the second upstream USB port. The data of is respectively recorded to the log files of the first and second upstream USB ports;

步骤104读取第一上游USB端口的日志文件记录的发送数据以及第二上游USB端口的日志文件记录的接收数据,并且将两个数据分别与测试数据包的数据进行比较;Step 104 reads the sending data recorded in the log file of the first upstream USB port and the receiving data recorded in the log file of the second upstream USB port, and compares the two data with the data of the test data packet respectively;

步骤105第一上游USB端口的日志文件记录的发送数据与测试数据包的数据相同;Step 105 The sending data recorded in the log file of the first upstream USB port is the same as the data of the test packet;

步骤106第一上游USB端口发送数据包有问题;In step 106, the first upstream USB port has a problem in sending data packets;

步骤107第二上游USB端口的日志文件记录的接收数据与测试数据包的数据相同;Step 107 The receiving data recorded in the log file of the second upstream USB port is the same as the data of the test packet;

步骤108第二上游USB端口发送数据包有问题;In step 108, the second upstream USB port has a problem in sending data packets;

步骤109第一上游USB端口发送数据包与第二上游USB端口发送数据包通过测试;Step 109: the data packet sent by the first upstream USB port and the data packet sent by the second upstream USB port pass the test;

步骤110由第二上游USB端口通过USB端口连接测试装置发送测试数据包至第一上游USB端口,并将第二上游USB端口发送的测试数据包与第一上游USB端口接收的数据包的数据分别记录至第二与第一上游USB端口的日志文件;In step 110, the test data packet sent by the second upstream USB port to the first upstream USB port is connected to the test device through the USB port, and the data of the test data packet sent by the second upstream USB port and the data packet received by the first upstream USB port are respectively log files to the second and first upstream USB ports;

步骤111第二上游USB端口的日志文件记录的发送数据与测试数据包的数据相同;The sending data recorded in the log file of the second upstream USB port in step 111 is identical to the data of the test packet;

步骤112第二上游USB端口发送数据包有问题;In step 112, the second upstream USB port has a problem in sending data packets;

步骤113第一上游USB端口的日志文件记录的接收数据与测试数据包的数据相同;Step 113: The received data recorded in the log file of the first upstream USB port is identical to the data of the test packet;

步骤114第一上游USB端口发送数据包有问题;以及Step 114 There is a problem with sending data packets from the first upstream USB port; and

步骤115第一上游USB端口接收数据包与第二上游USB端口发送数据包通过测试。Step 115: The first upstream USB port receives the data packet and the second upstream USB port sends the data packet to pass the test.

具体实施方式 Detailed ways

请参考图1,图中表示了本发明的一种USB端口连接测试装置30,利用USB端口连接测试装置30连接位于拥有USB端口的电子设备40的两个上游USB端口10、20,以在两个上游USB端口10、20之间进行数据包传输,此连接测试装置30包含:一个第一USB端口31,用以连接第一上游USB端口10;一个第二USB端口32,用以连接第二上游USB端口20;一个数据传输线33,用以连接第一USB端口31与第二USB端口32;以及一个位于数据传输线33上的USB端口转接芯片34,以在第一上游USB端口10与第二上游USB端口20之间进行数据包传输。Please refer to Fig. 1, a kind of USB port connection testing device 30 of the present invention is shown in the figure, utilize USB port connection testing device 30 to connect two upstream USB ports 10, 20 that are positioned at the electronic equipment 40 that has USB port, with two Data packet transmission is carried out between two upstream USB ports 10,20, and this connection testing device 30 comprises: a first USB port 31, in order to connect the first upstream USB port 10; A second USB port 32, in order to connect the second Upstream USB port 20; a data transmission line 33 for connecting the first USB port 31 and the second USB port 32; Data packets are transmitted between the two upstream USB ports 20 .

USB端口设备分为上游USB端口设备和下游USB端口设备,当下游USB端口设备与上游USB端口设备连接时,才能传输数据,通常上游USB端口设备之间或下游USB端口设备之间不能传输数据,这也是普通USB端口连接测试装置即使连接两USB端口也无法测试两个USB端口的原因。本发明的USB端口连接测试装置30中间有一块转接芯片34,用以将本发明的USB端口连接测试装置30连接的一上游USB端口发送的数据包转发到另一个上游USB端口,这样两个上游USB端口设备之间就不仅可以建立联接并且还可以互相传递数据。根据此转接芯片34符合USB端口的标准,可以测试符合不同标准的USB端口。比如,目前USB端口设备大都符合USB端口2.0标准,在本发明的一实施例中,第一上游USB端口10与第二上游USB20端口均符合USB端口2.0标准,所以在本实施例的USB端口连接测试装置30中提供符合USB端口2.0标准的转接芯片。USB port devices are divided into upstream USB port devices and downstream USB port devices. Data can only be transmitted when a downstream USB port device is connected to an upstream USB port device. Usually, data cannot be transmitted between upstream USB port devices or between downstream USB port devices. It is also the reason why a common USB port connection test device cannot test two USB ports even if it is connected to two USB ports. There is an adapter chip 34 in the middle of the USB port connection testing device 30 of the present invention, which is used to forward the data packet sent by an upstream USB port connected by the USB port connection testing device 30 of the present invention to another upstream USB port, so that the two Upstream USB port devices can not only establish a connection but also transfer data to each other. According to the adapter chip 34 conforming to the standard of the USB port, USB ports conforming to different standards can be tested. For example, most of the current USB port devices conform to the USB port 2.0 standard. In an embodiment of the present invention, the first upstream USB port 10 and the second upstream USB 20 port both conform to the USB port 2.0 standard, so the USB port connection in this embodiment An adapter chip conforming to the USB port 2.0 standard is provided in the test device 30 .

现在请参考图2至图4,图2至图4为一种利用本发明的USB端口连接测试装置对两个上游USB端口进行测试方法的流程图,如图所示,本发明的方法包含以下步骤:Please refer to Fig. 2 to Fig. 4 now, Fig. 2 to Fig. 4 are a kind of flow chart that utilizes USB port connection test device of the present invention to test two upstream USB ports, as shown in the figure, the method of the present invention comprises the following step:

步骤100,安装USB端口连接测试装置驱动程序,并同时启动第一上游USB端口与第二上游USB端口的测试程序;步骤101,通过USB端口连接测试装置将第一上游USB端口与第二上游USB端口进行连接,并启动USB端口连接测试装置的驱动程序;步骤102,打开第一上游USB端口与第二上游USB端口;步骤103,由第一上游USB端口通过USB端口连接测试装置发送测试数据包至第二上游USB端口,并将第一上游USB端口发送的测试数据包与第二上游USB端口接收的测试数据包的数据分别记录至第一与第二上游USB端口的日志文件;步骤104,读取第一上游USB端口的日志文件记录的发送数据以及第二上游USB端口的日志文件记录的接收数据,并且将两个数据分别与测试数据包的数据进行比较;以下转至A,A连接至图3所示的后续方法流程,即:步骤105,比较第一上游USB端口的日志文件记录的发送数据与测试数据包的数据是否相同;若为否,步骤106,则判定第一上游USB端口发送数据包有问题,然后转至B(B连接至图4所示的后续方法流程);若为是,步骤107,则比较第二上游USB端口的日志文件记录的接收数据与测试数据包的数据是否相同;步骤109,若也为是则第一上游USB端口发送数据包与第二上游USB端口发送数据包通过测试,然后转至B;若为否,步骤108,则判定第二上游USB端口发送数据包有问题,然后转至B;现请参照图4,如图所示,B连接的后续方法流程为:步骤110,由第二上游USB端口通过USB端口连接测试装置发送测试数据包至第一上游USB端口,并分别将第二上游USB端口发送的测试数据包与第一上游USB端口接收的数据记录至第二与第一上游USB端口的日志文件步骤;步骤111,比较第二上游USB端口的日志文件记录的发送数据与测试数据包的数据是否相同;若为否,步骤112,则判定第二上游USB端口发送数据包有问题,此测试过程结束;若为是,步骤113,则比较第一上游USB端口的日志文件记录的接收数据与测试数据包的数据是否相同;若为否,步骤114,则判定第一上游USB端口发送数据包有问题,此测试过程结束;若为是,步骤115,第一上游USB端口接收数据包与第二上游USB端口发送数据包通过测试;此测试完成。在本发明的一实施例中可以通过计算机屏幕显示测试结果。Step 100, install the USB port connection test device driver, and start the test program of the first upstream USB port and the second upstream USB port at the same time; Step 101, connect the first upstream USB port and the second upstream USB port by the USB port connection test device port is connected, and start the driver program of USB port connection test device; Step 102, open the first upstream USB port and the second upstream USB port; Step 103, send test packet by the first upstream USB port by USB port connection test device To the second upstream USB port, and record the data of the test packet sent by the first upstream USB port and the test packet received by the second upstream USB port to the log files of the first and second upstream USB port respectively; Step 104, Read the sending data recorded in the log file of the first upstream USB port and the receiving data recorded in the log file of the second upstream USB port, and compare the two data with the data of the test data packet; go to A, A connection below To the follow-up method flow shown in Figure 3, that is: step 105, compare whether the sending data recorded in the log file of the first upstream USB port is the same as the data of the test packet; if no, step 106, then determine whether the first upstream USB There is a problem with the port sending data packet, then go to B (B is connected to the follow-up method process shown in Figure 4); if yes, step 107, then compare the receiving data and the test data packet recorded by the log file of the second upstream USB port Whether the data is the same; step 109, if yes, the first upstream USB port sends the data packet and the second upstream USB port sends the data packet through the test, and then goes to B; if no, step 108, then judges the second upstream There is a problem with the data packet sent by the USB port, and then go to B; now please refer to Figure 4, as shown in the figure, the follow-up method flow of B connection is: Step 110, the second upstream USB port is connected to the test device through the USB port to send test data Packet to the first upstream USB port, and the test packet that the second upstream USB port sends and the data record that the first upstream USB port receives are to the log file step of the second and the first upstream USB port respectively; Step 111, compare the first Whether the sending data of the log file record of two upstream USB ports is identical with the data of test data packet; If no, step 112, then judge that the second upstream USB port sends data packet to have problem, this test process ends; If yes, step 112 113, then compare whether the received data recorded in the log file of the first upstream USB port is the same as the data of the test data packet; if not, step 114, then determine that the first upstream USB port has a problem in sending the data packet, and this test process ends; If yes, step 115 , the first upstream USB port receives the data packet and the second upstream USB port sends the data packet and passes the test; the test is completed. In an embodiment of the present invention, the test results can be displayed on a computer screen.

当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明权利要求的保护范围。Certainly, the present invention also can have other multiple embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding changes All changes and modifications should belong to the protection scope of the claims of the present invention.

Claims (3)

1, a kind of USB (universal serial bus) port of utilizing connects the method that proving installation is tested, utilizing this USB (universal serial bus) port to connect proving installation tests first upstream USB (universal serial bus) port on the electronic installation and one second upstream USB (universal serial bus) port, this USB (universal serial bus) port connects proving installation and includes one first USB (universal serial bus) port, one second USB (universal serial bus) port, one data line and that connects above-mentioned first USB (universal serial bus) port and second USB (universal serial bus) port is positioned at the USB (universal serial bus) port connect chip on this data line, it is characterized in that this is surveyed the method for establishing and comprises following steps:
(1) in this electronic installation the driver that this USB (universal serial bus) port connects proving installation is installed, and is started one first upstream USB (universal serial bus) port and one second upstream USB (universal serial bus) port simultaneously;
(2) connect proving installation by this USB (universal serial bus) port this first upstream USB (universal serial bus) port is connected with this second upstream USB (universal serial bus) port, and start the driver that this USB (universal serial bus) port connects proving installation;
(3) open this first upstream USB (universal serial bus) port and this second upstream USB (universal serial bus) port;
(4) connect proving installation by this first upstream USB (universal serial bus) port by this USB (universal serial bus) port and send test packet to this second upstream USB (universal serial bus) port, and the data recording of the test packet that this first upstream USB (universal serial bus) port is sent is to the journal file of this first upstream USB (universal serial bus) port, and the data recording of the test packet that this second upstream USB (universal serial bus) port is received is to the journal file of this second upstream USB (universal serial bus) port;
(5) read the reception data of the journal file record of the transmission data of journal file record of this first upstream USB (universal serial bus) port and this second upstream USB (universal serial bus) port, and the reception data of the journal file record of the transmission data of the journal file record of this first upstream USB (universal serial bus) port and this second upstream USB (universal serial bus) port are compared with the data of this test packet respectively;
(6) relatively the first upstream USB (universal serial bus) port journal file record writes down the operating state that decides this first upstream USB (universal serial bus) port with the second upstream USB (universal serial bus) port journal file;
(7) send test packet to this first upstream USB (universal serial bus) port by this second upstream USB (universal serial bus) port, and the data recording of the test packet that this second upstream USB (universal serial bus) port is sent is to the journal file of this second upstream USB (universal serial bus) port, and the data recording of the test packet that this first upstream USB (universal serial bus) port is received is to the journal file of this first upstream USB (universal serial bus) port;
(8) read the reception data of the journal file record of the transmission data of journal file record of this second upstream USB (universal serial bus) port and this first upstream USB (universal serial bus) port, and the reception data of the journal file record of the transmission data of the journal file record of this second upstream USB (universal serial bus) port and this first upstream USB (universal serial bus) port are compared with the data of this test packet respectively;
(9) relatively the first upstream USB (universal serial bus) port journal file record writes down the operating state that decides this second upstream USB (universal serial bus) port with the second upstream USB (universal serial bus) port journal file; And
(10) finish test.
2, the USB (universal serial bus) port of utilizing according to claim 1 connects the method that proving installation is tested, and wherein step (6) also comprises following steps:
(a) when the data of the transmission data of the journal file of this first upstream USB (universal serial bus) port record and this test packet not simultaneously, then these first upstream USB (universal serial bus) port transmission data of decidable are surrounded by problem; And
(b) data of the reception data of the journal file record of and this second upstream USB (universal serial bus) port identical and this test packet when the data of the transmission data of the journal file of this first upstream USB (universal serial bus) port record and this test packet not simultaneously, then these second upstream USB (universal serial bus) port reception data of decidable are surrounded by problem.
3, the method for utilizing USB (universal serial bus) port to connect proving installation test all-purpose serial bus port according to claim 1, wherein step (9) also comprises following steps:
(a) when the data of the transmission data of the journal file of this second upstream USB (universal serial bus) port record and this test packet not simultaneously, then these second upstream USB (universal serial bus) port transmission data of decidable are surrounded by problem;
(b) data of the reception data of the journal file record of and this first upstream USB (universal serial bus) port identical and this test packet when the data of the transmission data of the journal file of this second upstream USB (universal serial bus) port record and this test packet not simultaneously, then these first upstream USB (universal serial bus) port reception data of decidable are surrounded by problem; And
(c) when the transmission data of the journal file record of the reception data of the data of this test packet and the journal file record of this first upstream USB (universal serial bus) port and this second upstream USB (universal serial bus) port are all identical, then decidable this first upstream USB (universal serial bus) port and this second upstream USB (universal serial bus) port of testing is all working properly.
CNB2005101323970A 2005-12-23 2005-12-23 Method for testing by using universal serial bus port to connect testing device Expired - Fee Related CN100458725C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101323970A CN100458725C (en) 2005-12-23 2005-12-23 Method for testing by using universal serial bus port to connect testing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101323970A CN100458725C (en) 2005-12-23 2005-12-23 Method for testing by using universal serial bus port to connect testing device

Publications (2)

Publication Number Publication Date
CN1987808A CN1987808A (en) 2007-06-27
CN100458725C true CN100458725C (en) 2009-02-04

Family

ID=38184612

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101323970A Expired - Fee Related CN100458725C (en) 2005-12-23 2005-12-23 Method for testing by using universal serial bus port to connect testing device

Country Status (1)

Country Link
CN (1) CN100458725C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855168A (en) * 2011-06-27 2013-01-02 鸿富锦精密工业(深圳)有限公司 Enhanced small form-factor pluggable (SFP+) interface test system

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201789539U (en) * 2010-09-09 2011-04-06 中兴通讯股份有限公司 Mobile terminal
CN102495779B (en) * 2011-11-22 2014-04-16 华南理工大学 Integrated sensor RFID (radio frequency identification device) system and mixed-mode interface performance test method thereof
CN104965166A (en) * 2015-07-16 2015-10-07 四川和芯微电子股份有限公司 Test method of USB chip and system thereof
CN106918771A (en) * 2015-12-24 2017-07-04 英业达科技有限公司 Suitable for the test circuit plate of universal serial bus connector
US20170373881A1 (en) * 2016-06-27 2017-12-28 Qualcomm Incorporated Systems and methods for controlling isochronous data streams

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369792A (en) * 2000-07-14 2002-09-18 英业达股份有限公司 Method and device for testing USB port
CN1504887A (en) * 2002-12-02 2004-06-16 英业达股份有限公司 Universal serial bus port testing device and method
CN2689346Y (en) * 2004-04-05 2005-03-30 联想(北京)有限公司 Universal series bus interface testers
US20050216811A1 (en) * 2004-03-23 2005-09-29 Mirae Corporation Apparatus for testing USB memory and method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369792A (en) * 2000-07-14 2002-09-18 英业达股份有限公司 Method and device for testing USB port
CN1504887A (en) * 2002-12-02 2004-06-16 英业达股份有限公司 Universal serial bus port testing device and method
US20050216811A1 (en) * 2004-03-23 2005-09-29 Mirae Corporation Apparatus for testing USB memory and method thereof
CN2689346Y (en) * 2004-04-05 2005-03-30 联想(北京)有限公司 Universal series bus interface testers

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855168A (en) * 2011-06-27 2013-01-02 鸿富锦精密工业(深圳)有限公司 Enhanced small form-factor pluggable (SFP+) interface test system

Also Published As

Publication number Publication date
CN1987808A (en) 2007-06-27

Similar Documents

Publication Publication Date Title
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
US7058748B1 (en) ATA device control via a packet-based interface
US7921244B2 (en) Data sharing and transfer systems and methods
US7765344B2 (en) Apparatus and method for dynamically providing hub or host operations
JP4799417B2 (en) Host controller
US20020156952A1 (en) Communication control apparatus, communication system and communication control method
US20050223181A1 (en) Integrated circuit capable of copy management
US8909822B2 (en) Output device, log collecting method for output device, and storage medium
CN101359307A (en) SAS channel testing device and method
US7610482B1 (en) Method and system for managing boot trace information in host bus adapters
US7178054B2 (en) Frame validation
CN100458725C (en) Method for testing by using universal serial bus port to connect testing device
US7124235B2 (en) USB apparatus with switchable host/hub functions and control method thereof
US8527667B2 (en) Apparatuses and methods for transferring data
TWI416418B (en) Controllers, apparatuses, and methods for transferring data
CN111124985A (en) Read-only control method and device for mobile terminal
CN213365381U (en) Main board
US7761630B2 (en) Application programming interface for fusion message passing technology
CN113434442A (en) A switch and data access method
US20050182615A1 (en) Method and system for creating an automatically adjusting USB mass storage device
CN104123257B (en) Universal serial bus device, communication method and computer readable storage medium
US6950894B2 (en) Techniques using integrated circuit chip capable of being coupled to storage system
US8214569B2 (en) Method for reading and writing non-standard register of serial advanced technology attachment (SATA) device
JP4576082B2 (en) Memory card controller and memory card control method
CN109254937B (en) USB hub, USB device enumeration exception detection method and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191220

Address after: No. 99, University Road, high tech Zone, Xuzhou City, Jiangsu Province

Patentee after: XUZHOU LIFANG ELECTROMECHANICAL EQUIPMENT MANUFACTURING CO., LTD.

Address before: Taipei City, Taiwan, China

Patentee before: Yingda Co., Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090204

Termination date: 20191223

CF01 Termination of patent right due to non-payment of annual fee