Testing method for identifying USB (Universal Serial Bus) equipment based on domestic platform

Through the test script, the ID number of the USB device is detected in real time and the results are automatically counted, which solves the problem of low USB device identification and testing efficiency, and realizes an accurate and efficient identification and statistics process.

CN119201570APending Publication Date: 2024-12-27西安超越申泰信息科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411267892.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During the computer development and design process, the USB interface probability cannot identify the problem that the USB device is stuck or cannot enter the system after insertion, resulting in the tester having to reproduce the problem and manually record the number of tests, which is inefficient and error-prone, and lacks rapidity. Efficient identification method.

Method used

Get and mark the ID number of the USB device through the test script, detect the ID number of the inserted device in real time, and match it with the marked ID number, automatically count the number of successful and failed tests, and display the results in real time. If the match is displayed, 'PASS' or 'FALL', The number of records is easy to count.

Benefits of technology

It achieves the accuracy and efficiency of USB device identification testing, reduces the steps of manual observation and recording, and improves the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201570A_ABST
    Figure CN119201570A_ABST
Patent Text Reader

Abstract

The invention provides a test method for identifying USB (universal serial bus) equipment based on a domestic platform, which belongs to the technical field of computers, and comprises the following steps of: after to-be-identified USB equipment is inserted into a machine, identifying an ID (identity) number by a test script, carrying out matching test on the ID number and a marked USB equipment ID number, and displaying a test result under a system terminal in real time. And the number of times of test success and failure is automatically counted. And the identification test of the USB equipment is more accurate and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a testing method for identifying a USB device based on a domestic platform. Background Art

[0002] During the computer R&D and design process, for problems discovered during the testing phase, such as the USB interface probabilistically failing to recognize USB devices, the system probabilistically freezing after inserting USB devices, and being unable to enter the system, the R&D end must first reproduce the problem when solving such problems. Since such problems are mostly probabilistic problems and require continuous repetitive operations, testers need to continuously observe the information in the "lsusb" command under the system terminal to determine whether the inserted USB device is recognized normally, and manually record the number of tests. Such test operations are inefficient and prone to errors, and are not conducive to timely discovery of USB problems to be reproduced. A fast and efficient test method for identifying USB devices is urgently needed. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a test method for identifying USB devices based on a domestic platform.

[0004] The technical solution of the present invention is:

[0005] A test method for identifying USB devices based on a domestic platform. After the USB device to be identified is inserted into the machine, the test script identifies the ID number and performs a matching test with the marked USB device ID number. The test results will be displayed in real time on the system terminal, and the number of test successes and failures will be automatically counted.

[0006] Furthermore,

[0007] First, obtain and mark the ID number of the USB device to be identified, and then run the test script command through the system terminal to detect the USB device and its ID number inserted into the tested machine in real time;

[0008] If the USB device number detected by the test script does not match the marked device number, the system terminal displays "FALL";

[0009] If the USB device number detected by the test script matches the marked device number, the system terminal displays "PASS" and records the number of successes or failures for test statistics.

[0010] Furthermore,

[0011] The script file detects the USB device and its ID number inserted into the tested machine in real time through the lsusb command.

[0012] Furthermore,

[0013] The comparison result of the USB device ID number is displayed in real time on the system terminal.

[0014] Furthermore,

[0015] After each USB device ID comparison is completed, the system terminal will display the number of test successes or failures in real time.

[0016] Furthermore,

[0017] The specific working steps are as follows:

[0018] First, obtain and mark the ID number of the USB device to be tested, run the test script in the system terminal to obtain the ID number of the USB device inserted into the machine in real time, and match the marked USB device ID number with the USB device ID number obtained in real time.

[0019] If the match is successful, the system terminal will display "PASS" and record once that the USB recognition is normal;

[0020] If the matching fails, it means that the system did not recognize the USB device after it was inserted into the machine. The USB device recognition problem reappears, "FALL" is displayed on the system terminal, and an abnormal recognition is recorded. Repeat the USB plug-in and unplug test.

[0021] The beneficial effects of the present invention are

[0022] This paper provides a new method for domestic platforms to identify and test USB devices, making the identification and testing of USB devices more accurate and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a block diagram of the USB device identification working principle of the present invention;

[0024] Figure 2 This is a flow chart of USB device identification according to the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0026] The present invention provides a test method for identifying USB devices based on a domestic platform, such as Figure 1After the USB device to be identified is inserted into the machine, the test script identifies the ID number and performs a matching test with the marked USB device ID number. The test results will be displayed in real time on the system terminal, and the number of test successes and failures will be automatically counted.

[0027] like Figure 2 The workflow diagram of the present invention shown in the figure first obtains and marks the ID number of the USB device to be tested, runs the test script under the system terminal to obtain the ID number of the USB device inserted into the machine in real time, matches the marked USB device ID number with the USB device ID number obtained in real time, if the match is successful, "PASS" is displayed under the system terminal and a USB recognition is recorded once. If the match fails, it means that the system did not recognize the USB device after it was inserted into the machine, and the USB device recognition problem reappears, "FALL" is displayed under the system terminal, and a recognition abnormality is recorded once, and the USB plug-in and unplug test is repeated.

[0028] During operation,

[0029] (1) Insert the USB device to be tested into the host.

[0030] (2) Run the test script in the system terminal to display the recognition status of the USB device in real time. If the recognition is normal, "PASS" will be displayed; if the recognition is abnormal, "FALL" will be displayed.

[0031] (3) Repeatedly plug and unplug USB devices.

[0032] The above description is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A test method for identifying USB devices based on a domestic platform, characterized in that: After the USB device to be identified is inserted into the machine, the test script will identify the ID number and perform a matching test with the marked USB device ID number. The test results will be displayed in real time on the system terminal, and the number of test successes and failures will be automatically counted.

2. The method according to claim 1, characterized in that First, obtain and mark the ID number of the USB device that needs to be identified, and then run the test script command through the system terminal to detect the USB device and its ID number inserted into the tested machine in real time.

3. The method according to claim 2, characterized in that If the USB device number detected by the test script does not match the marked device number, the system terminal displays "FALL".

4. The method according to claim 2, characterized in that: If the USB device number detected by the test script matches the marked device number, the system terminal displays "PASS" and records the number of successes or failures for test statistics.

5. The method according to claim 2, characterized in that: The script file detects the USB device and its ID number inserted into the tested machine in real time through the lsusb command.

6. The method according to claim 2, characterized in that The comparison result of the USB device ID number is displayed in real time on the system terminal.

7. The method according to claim 2, characterized in that After each USB device ID comparison is completed, the system terminal will display the number of test successes or failures in real time.

8. The method according to claim 2, characterized in that: The specific working steps are as follows: First, obtain and mark the ID number of the USB device to be tested, run the test script in the system terminal to obtain the ID number of the USB device inserted into the machine in real time, and match the marked USB device ID number with the USB device ID number obtained in real time; If the match is successful, the system terminal will display "PASS" and record once that the USB recognition is normal; If the matching fails, it means that the system did not recognize the USB device after it was inserted into the machine. The USB device recognition problem reappears, "FALL" is displayed on the system terminal, and an abnormal recognition is recorded. Repeat the USB plug-in and unplug test.