USB driver test method and device

By combining batch data transmission verification with various test commands, the shortcomings of existing USB driver software testing are solved, enabling comprehensive testing of USB driver software and improving system stability and data accuracy.

CN121940314APending Publication Date: 2026-04-28GUANGZHOU ANYKA MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU ANYKA MICROELECTRONICS CO LTD
Filing Date
2024-10-28
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing USB testing solutions mainly focus on the hardware level and lack comprehensive testing of USB driver software, which may lead to problems such as communication failure, system crashes, and data errors.

Method used

By using a batch data transmission verification method, data packets are sent and received repeatedly, and requests are sent again after feedback is received, to achieve BULK transmission testing of the USB driver software. Combined with plugging/unplugging, enumeration, driver control, and level monitoring commands, the performance and stability of the USB driver software are comprehensively tested.

Benefits of technology

It improves the comprehensiveness of USB testing, enabling the detection and resolution of communication problems caused by USB driver software, and ensuring system stability and data accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121940314A_ABST
    Figure CN121940314A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of USB testing, and discloses a USB drive testing method and device, and the method comprises the steps: a USB host module sends a test data packet, batch output data and a batch input request to a USB device module, and circularly sends the batch output data after the sending is completed; the USB equipment module verifies the received batch output data, and generates a slave batch test result according to a verification result; after the batch input request is received, the received test data packet is sent to the USB host module; and the USB host module verifies the received test data packet and generates a host batch test result according to a verification result of the test data packet. According to the method and the device, the BULK transmission test on the USB drive software is realized through the transmission verification of batch data, and the comprehensiveness of the USB test is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of USB testing technology, and in particular to a USB driver testing method and device. Background Technology

[0002] USB driver software issues can cause USB communication failures. These failures are unrelated to hardware and originate entirely from software problems. USB driver software issues can also cause system crashes, rendering USB devices unusable or even the entire system unusable. Furthermore, USB driver software issues can lead to data errors, such as distorted UAC (USB Audio) sound and severe noise, UVC (USB Video) video decoding failures, and various other problems.

[0003] Current USB testing solutions mainly focus on the hardware level, while comprehensive testing of USB driver software is relatively lacking. Summary of the Invention

[0004] This application provides a USB driver testing method and device, which realizes the test of BULK transmission of USB driver software through batch data transmission verification, thereby improving the comprehensiveness of USB testing.

[0005] Firstly, this application provides a USB driver testing method, including:

[0006] The USB host module sends test data packets, batch output data, and batch input requests to the USB device module, and then sends batch output data in a loop after sending is complete.

[0007] The USB device module verifies the received batch output data and generates slave batch test results based on the verification results; and after receiving a batch input request, it sends the received test data packet to the USB host module.

[0008] The USB host module verifies the received test data packets and determines whether the number of batch output data sent has reached the first preset number and whether the number of batch input requests sent has reached the second preset number.

[0009] If yes, the USB host module stops sending batch output data and generates host batch test results based on the verification results of the test data packets; if no, it sends batch input requests again.

[0010] Furthermore, the method also includes:

[0011] The control module sends plugging and unplugging commands to the test module, and after sending the plugging and unplugging commands, sends enumeration query commands to the USB host module and the USB device module.

[0012] The test module powers on or off the USB host module and USB device module according to the plug-in / plug-out command; the USB host module and USB device module respond to the received enumeration query command, generate serial port data according to the device information, and send it to the control module.

[0013] The control module obtains the enumeration test results based on the plug-in / plug-out commands and the received serial port data.

[0014] Furthermore, the method also includes:

[0015] When sending plug-in / plug-out commands, the control module sends driver control commands to the USB host module or USB device module.

[0016] The USB host module or USB device module unloads or loads the driver according to the driver control command;

[0017] The control module obtains the enumeration test results based on the drive control instructions, plug-in / plug-out instructions, and serial port data.

[0018] Furthermore, the method also includes:

[0019] After sending a level control command to the test module, the control module monitors the serial port strings of the USB host module and the USB device module, and sends system test commands to the USB host module and the USB device module.

[0020] The test module pulls the digital interface level of the USB host module and USB device module high or low according to the received level control command; the USB host module and USB device module execute the received system test command, generate the command execution result and send it to the control module;

[0021] After sending the system test command, the control module obtains the voltage level test results of the USB host module and the USB device module based on the command execution result and the monitored serial port string.

[0022] Furthermore, the method also includes:

[0023] In response to electrostatic interference commands or power replacement commands, the control module monitors the serial port strings of the USB host module and the USB device module, and sends system test commands to the USB host module and the USB device module; and obtains the interference test results of the USB host module and the USB device module based on the command execution results and the serial port strings.

[0024] Furthermore, the method also includes:

[0025] After sending a handshake command to the USB device module, the control module monitors the serial port strings of the USB host module and the USB device module, and obtains the abnormal test results of the USB host module and the USB device module based on the serial port strings.

[0026] The USB device module responds to the handshake command and controls either endpoint to generate a handshake signal.

[0027] Secondly, this application provides a USB driver testing device, including a USB host module and a USB device module;

[0028] The USB host module includes a first transmitting unit, a first verification unit, and a judgment unit;

[0029] The first sending unit is used to send test data packets and batch input requests to the USB device module, while cyclically sending batch output data; and to stop sending batch output data after receiving a stop command;

[0030] The first verification unit is used to verify the received test data packets and resend the batch input request; and to stop sending the batch input request after receiving the stop command; the judgment unit is used to send the stop command to the first sending unit and the first verification unit when the number of batch output data sent reaches the first preset number and the number of batch input requests sent reaches the second preset number, and to generate the host batch test result based on the verification result of the test data packets;

[0031] The USB device module includes a second sending unit and a second verification unit; the second verification unit is used to verify the received batch output data and generate slave batch test results based on the verification results; the second sending unit is used to send the received test data packets to the USB host module after receiving a batch input request.

[0032] Furthermore, the device also includes a control module and a testing module;

[0033] The control module sends plugging / unplugging commands to the test module, and then sends enumeration query commands to the USB host module and USB device module. Based on the plugging / unplugging commands and the received serial port data, the enumeration test results are obtained.

[0034] Both the first transmitting unit of the USB host module and the second transmitting unit of the USB device module are used to respond to the received enumeration query command, generate serial port data according to the device information, and send it to the control module.

[0035] The test module is used to power on or off the USB host module and USB device module according to plug-in / plug-out commands.

[0036] Furthermore, the control module is also used to send drive control commands to the USB host module or USB device module at the same time as sending plug-in / plug-out commands; and to obtain enumeration test results based on the drive control commands, plug-in / plug-out commands and received serial port data.

[0037] The USB host module also includes a first execution unit, and the USB device module also includes a second execution unit;

[0038] The first or second execution unit is used to unload or load the driver according to the driver control instructions.

[0039] Furthermore, the control module is also used to monitor the serial port strings of the USB host module and the USB device module after sending a level control command to the test module, and send system test commands to the USB host module and the USB device module; and to obtain the level test results of the USB host module and the USB device module based on the command execution results and the monitored serial port strings.

[0040] The first execution unit of the USB host module and the second execution unit of the USB device module are also used to execute the received system test instructions, generate instruction execution results and send them to the control module; the test module is also used to pull up or pull down the digital interface level of the USB host module and the USB device module according to the received level control instructions.

[0041] Furthermore, the control module is also used to respond to electrostatic interference commands or power replacement commands, monitor the serial port strings of the USB host module and USB device module, and send system test commands to the USB host module and USB device module; and obtain the interference test results of the USB host module and USB device module based on the command execution results and the monitored serial port strings.

[0042] Furthermore, the control module is also used to monitor the serial port strings of the USB host module and the USB device module after sending a handshake command to the USB device module, and obtain the abnormal test results of the USB host module and the USB device module based on the monitored serial port strings.

[0043] The second execution unit of the USB device module is also used to respond to handshake commands and control either endpoint to generate a handshake signal.

[0044] In summary, compared with the prior art, the beneficial effects of the technical solution provided in this application include at least the following:

[0045] This application provides a USB driver testing method in which a USB host module cyclically sends batch output data to a USB device module, causing the USB device module to continuously verify the received batch output data. Simultaneously, after receiving a test data packet from the USB device module, a batch input request is sent again, causing the USB device module to respond to the batch data request again. This process is repeated multiple times to obtain batch test results for both the host and slave devices. This application achieves BULK transmission testing of the USB driver software through batch data transmission verification, improving the comprehensiveness of USB testing. Attached Figure Description

[0046] Figure 1 A flowchart illustrating a USB driver testing method provided as an exemplary embodiment of this application;

[0047] Figure 2 A structural diagram of a USB driver testing device is provided as an exemplary embodiment of this application;

[0048] Figure 3 This is a structural diagram of a USB driver testing device provided as another exemplary embodiment of this application. Detailed Implementation

[0049] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0050] Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] In existing technologies, USB hardware specifications are tested, including eye diagrams, to ensure that hardware-level performance meets the standard requirements of the USB specification. The following table lists the hardware specifications to be tested:

[0052]

[0053]

[0054] The above-mentioned indicators can be obtained by testing with professional equipment. This application can also incorporate the above-mentioned hardware indicator testing process. After obtaining the software-level test results through the scheme disclosed in this application, the results are combined with the hardware test results to finally output a comprehensive test report on USB hardware and driver software.

[0055] Please see Figure 1This application provides a USB driver testing method, including:

[0056] In step S11, the USB host module sends a test data packet, batch output data, and batch input request to the USB device module, and then sends the batch output data in a loop after the sending is completed.

[0057] In step S12, the USB device module verifies the received batch output data and generates slave batch test results based on the verification results; and after receiving a batch input request, it sends the received test data packets to the USB host module.

[0058] In step S13, the USB host module verifies the received test data packet and determines whether the number of batch output data sent reaches the first preset number and whether the number of batch input requests sent reaches the second preset number.

[0059] Step S14: If yes, the USB host module stops sending batch output data and generates host batch test results based on the verification results of the test data packets; if no, the batch input request is sent again.

[0060] Specifically, the USB host module is flashed with the host firmware for USB Testing on Linux, and the USB device module is flashed with the device firmware for USB Testing on Linux. Connect the USB host module and the USB device module with a USB cable, power on both modules, and run the above steps.

[0061] The test data packet is a data packet, the bulk input request is a bulk in packet, and the bulk output data is a bulkout packet. Before sending the bulk out packet and the data packet for the first time, the USB host module will send a control out packet to notify the USB device module of the data length of the in packet. The USB device module verifies the bulk out packet and the USB host module verifies the data packet in the same way as mod63. The verification result is the batch test result of the USB host module and the USB slave module.

[0062] Specifically, the above process implements fixed-length ring bulk in and ring bulk out tests for two USB modules. The corresponding variable-length ring bulk in and ring bulk out tests follow the same procedure as the fixed-length tests, except that the in and out packet lengths are variable. In addition to the ring bulk in and ring bulk out tests, this application also provides methods for testing other software performance parameters:

[0063] Case 1: Bulk out fixed-length test. The USB host module sends a bulk out packet and a data packet. The USB device module receives and verifies the data. The verification method is mod63.

[0064] Case 2: Bulk in fixed-length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, and the verification method is mod63.

[0065] Case 3: Bulk out variable length test. The USB host module sends a bulk out packet and a data packet. The USB device module receives and verifies the data packet. The verification method is mod63. The length of the data packet is variable.

[0066] Case 4: Bulk in variable length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data packet. The verification method is mod63. The length of the data packet is variable.

[0067] Case 5: SGList bulk out fixed-length test. The USB host module sends bulk out packets and data packets, which are received and verified by the USB device module using mod63 verification. SGList is a USB optimization technique that optimizes DMA transmission for the USB controller by submitting multiple distributed physical blocks of data to the controller at once, reducing CPU utilization and increasing throughput. For USB controllers that do not support SGList, the kernel will split the SGList into multiple URBs, each URB corresponding to a contiguous physical block. This project tests the SGList optimization.

[0068] Case 6: sglist bulk in fixed-length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, and the verification method is mod63.

[0069] Case 7: sglist bulk out variable length test. The USB host module sends bulk out packets and data packets. The USB device module receives and verifies them. The verification method is mod63. The length of the data packet is variable.

[0070] Case 8: sglist bulk in variable length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data packet. The verification method is mod63. The length and number of data packets are variable.

[0071] Case 9: Bulk-in unlink ring URB test. The USB host module sends a control out packet to notify the USB device module of the data length in the in packet. Then, the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, selecting mod63 as the verification method. Then, it sends a bulk in packet again, and in the process, calls the driver interface to delete this URB to see if the driver can stop the transmission normally.

[0072] Case 10: Bulk out unlink ring URB test. The USB host module sends a bulk out packet and a data packet. The USB device module receives and verifies the data, selecting mod63 as the verification method. Then, the USB host module sends a bulk out packet again. During the above process, the driver interface is called to delete this URB. See if the driver can stop the transmission normally.

[0073] Case 11: Variable-length control out test. The USB host module initiates a control transfer, sending data to the USB device module. The USB device module then forwards the data sent by the USB host module to the USB host module. The USB host module receives the data and performs verification, selecting mod63 as the verification method. The data length is variable.

[0074] Case 12: Fixed-length ISO out test. The USB host module sends an ISO out packet and a data packet. The USB device module receives the data packet, which is all zeros and is not verified.

[0075] Case 13: Fixed-length ISO in test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends an ISO in packet. After receiving the ISO in packet, the USB device module sends a data packet to the USB host module. The data packet is all 0xa5 and is not verified.

[0076] Case 14: Transmission test when bulk out memory is an unaligned address. The USB host module sends bulk out packets and data packets, which are received and verified by the USB device module. The buffer address passed from the upper layer to the driver is not aligned to the word boundary.

[0077] Case 15: Transmission test when bulk in memory is an unaligned address. The USB host module sends a controlout packet to notify the USB device module of the data length of the in packet. Then the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, and the verification method is mod63. However, the buffer address passed from the upper layer to the driver is not aligned to the word boundary.

[0078] Case 16: Transmission test when bulk out pre-allocated memory and the memory address is unaligned. The USB host module sends bulk out packets and data packets, which are received and verified by the USB device module using mod63 verification. However, the buffer address passed to the driver from the upper layer is not aligned to the word boundary and is pre-allocated.

[0079] Case 17: Transmission test when bulk in pre-allocated memory and the memory address is unaligned. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends a bulk in packet. After receiving the bulk in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, and the verification method is mod63. However, the buffer address passed from the upper layer to the driver is not aligned to the word boundary and is pre-allocated.

[0080] Case 18: Transmission test when control out memory is unaligned. The USB host module initiates a control transfer to send data to the USB device module. The USB device module then sends the data sent by the USB host module back to the USB host module. The USB host module receives the data and performs verification, selecting mod63 as the verification method. The data length is variable, and the buffer address passed from the upper layer to the driver is not aligned to the word boundary.

[0081] Case 19: Transmission test when iso out memory is an unaligned address. The USB host module sends iso out packets and data packets, which are received by the USB device module. The data packet is all 0s and is not checked. Furthermore, the buffer address passed from the upper layer to the driver is not aligned to the word boundary.

[0082] Case 20: Transmission test when iso in memory is an unaligned address. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends an iso in packet. After receiving the iso in packet, the USB device module sends a data packet to the USB host module. The data packet is all 0xa5, without verification, and the buffer address passed from the upper layer to the driver is not aligned to the word boundary.

[0083] Case 21: Bulk out unlink URB test. The USB host module sends a bulk out packet and a data packet. The USB device module receives and verifies the packet. The verification method is mod63. During the above process, the driver interface is called to delete the URB. Check whether the driver can normally stop the deletion of the URB.

[0084] Case 22: Intertupt out fixed-length test. The USB host module sends an int out packet and a data packet. The USB device module receives and verifies the data. The verification method is mod63.

[0085] Case 23: Intertupt in fixed-length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends an int in packet. After receiving the int in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, and the verification method is mod63.

[0086] Case 24: Bulk out performance test. The USB host module sends bulk out packets and data packets, which are received by the USB device module without verification.

[0087] Case 25: Bulk-in performance test. The USB host module sends a bulk-in packet. After receiving the bulk-in packet, the USB device module sends a data packet to the USB host module. The USB host module receives the data packet but does not perform any verification.

[0088] Case 26: Variable length ISO out test. The USB host module sends an ISO out packet and a data packet, which are received by the USB device module. The data packet contains all zeros and is not verified. The length of the data packet is variable.

[0089] Case 27: Variable length ISO in test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then, the USB host module sends an ISO in packet. After receiving the ISO in packet, the USB device module sends a data packet to the USB host module. The data packet is all 0xa5, without verification, and the length of the data packet is variable.

[0090] Case 28: Interrupt in performance test. The USB host module sends an int in packet. After receiving the int in packet, the USB device module sends a data packet to the USB host module. The USB host module receives the data packet but does not verify it.

[0091] Case 29: Interrupt out performance test. The USB host module sends an int out packet and a data packet, which are received by the USB device module, but no verification is performed.

[0092] Case 30: sglist iso in fixed-length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends an iso in packet. After receiving the in packet, the USB device module sends a data packet to the USB host module. The data packet is all 0xa5 and is not verified.

[0093] Case 31: sglist iso out fixed-length test. The USB host module sends an iso out packet and a data packet. The USB device module receives the data packet, which is all 0s and does not perform verification.

[0094] Case 32: sglist iso in variable length test. The USB host module sends a control out packet to notify the USB device module of the in packet data length. Then the USB host module sends an iso in packet. After receiving the iso in packet, the USB device module sends a data packet to the USB host module. The data packet is all 0xa5, without verification, and the length of the data packet is variable.

[0095] Case 33: sglist iso out variable length test. The USB host module sends an iso out packet and a data packet, which are received by the USB device module. The data packet is all 0s and is not verified. The length of the data packet is variable.

[0096] Case 34: Interrupt in variable length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then, the USB host module sends an int in packet. After receiving the int in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data packet. The verification method is mod63. The length of the data packet is variable.

[0097] Case 35: Interrupt out variable length test. The USB host module sends an int out packet and a data packet. The USB device module receives and verifies the data packet. The verification method is mod63. The length of the data packet is variable.

[0098] Case 36: sglist interrupt in fixed-length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends an int in packet. After receiving the int in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data, and the verification method is mod63.

[0099] Case 37: sglist interrupt out fixed-length test. The USB host module sends an int out packet and a data packet. The USB device module receives and verifies the data. The verification method is mod63.

[0100] Case 38: sglist interrupt in variable length test. The USB host module sends a control out packet to notify the USB device module of the data length of the in packet. Then the USB host module sends an int in packet. After receiving the int in packet, the USB device module sends a data packet to the USB host module. The USB host module receives and verifies the data packet. The verification method is mod63. The length of the data packet is variable.

[0101] Case 39: sglist interrupt out variable length test. The USB host module sends an int out packet and a data packet. The USB device module receives and verifies the data packet. The verification method is mod63. The data packet length is variable.

[0102] The above tests are executed using the `testusb` command. The usage of the `testusb` command is as follows:

[0103] -t specifies the test case number, -c specifies the number of tests, and -s specifies the packet size; if the packet size is variable, -s indicates the maximum packet size, otherwise the default is 512. -g specifies the number of physical blocks to run in each sglist, -v specifies the change in packet size, and -a indicates automatic identification of the device under test. The following testusb command sequence is typically used for testing:

[0104] testusb-t 1-c 10000-s 512-g 1-a

[0105] testusb-t 1-c 10000-s 1000-g 1-a

[0106] testusb-t 1-c 10000-s 65536-g 1-a

[0107] testusb-t 2-c 10000-s 512-g 1-a

[0108] testusb-t 2-c 10000-s 1000-g 1-a

[0109] testusb-t 2-c 10000-s 65536-g 1-a

[0110] testusb-t 3-c 10000-s 65536-v 1-g 1-a

[0111] testusb-t 4-c 10000-s 65536-v 1-g 1-a

[0112] testusb-t 5-c 10000-s 512-g 4096-a

[0113] testusb-t 5-c 10000-s 1000-g 4096-a

[0114] testusb-t 5-c 10000-s 65536-g 4096-a

[0115] testusb-t 6-c 10000-s 512-g 4096-a

[0116] testusb-t 6-c 10000-s 1000-g 4096-a

[0117] testusb-t 6-c 10000-s 65536-g 4096-a

[0118] testusb-t 7-c 10000-s 65536-v 1-g 4096-a

[0119] testusb-t 8-c 10000-s 65536-v 1-g 4096-a

[0120] testusb-t 9-c 10000-a

[0121] testusb-t 10-c 10000-a

[0122] testusb-t 11-c 10000-a

[0123] testusb-t 12-c 10000-a

[0124] testusb-t 13-c 10000-a

[0125] testusb-t 14-c 10000-s 65536-v 1-a

[0126] testusb-t 15-c 10000-s 1024-a

[0127] testusb-t 15-c 10000-s 3072-a

[0128] testusb-t 15-c 10000-s 1023-a

[0129] testusb-t 16-c 10000-s 1024-a

[0130] testusb-t 16-c 10000-s 3072-a

[0131] testusb-t 16-c 10000-s 1023-a

[0132] testusb-t 17-c 10000-s 512-a

[0133] testusb-t 18-c 10000-s 512-a

[0134] testusb-t 19-c 10000-s 512-a

[0135] testusb-t 20-c 10000-s 512-a

[0136] testusb-t 21-c 10000-s 512-a

[0137] testusb-t 22-c 10000-s 512-a

[0138] testusb-t 23-c 10000-s 512-a

[0139] testusb-t 24-c 10000-a

[0140] testusb-t 25-c 10000-s 1024-a

[0141] testusb-t 25-c 10000-s 64-a

[0142] testusb-t 25-c 10000-s 8-a

[0143] testusb-t 26-c 10000-s 1024-a

[0144] testusb-t 26-c 10000-s 64-a

[0145] testusb-t 26-c 10000-s 8-a

[0146] testusb-t 27-c 1000-s 65536-g 4096-a

[0147] testusb-t 28-c 1000-s 65536-g 4096-a

[0148] testusb-t 29-c 10000-s 1024-v 1-a

[0149] testusb-t 29-c 10000-s 3072-v 1-a

[0150] testusb-t 29-c 10000-s 1023-v 1-a

[0151] testusb-t 30-c 10000-s 1024-v 1-a

[0152] testusb-t 30-c 10000-s 3072-v 1-a

[0153] testusb-t 30-c 10000-s 1023-v 1-a

[0154] testusb-t 31-c 100000-s 1024-a

[0155] testusb-t 32-c 100000-s 65536-v 1-a

[0156] testusb-t 35-c 10000-s 1024-a

[0157] testusb-t 35-c 10000-s 64-a

[0158] testusb-t 35-c 10000-s 8-a

[0159] testusb-t 36-c 10000-s 1024-a

[0160] testusb-t 36-c 10000-s 64-a

[0161] testusb-t 36-c 10000-s 8-a

[0162] testusb-t 37-c 10000-s 1024-g 4096-a

[0163] testusb-t 37-c 10000-s 3072-g 4096-a

[0164] testusb-t 37-c 10000-s 1023-g 4096-a

[0165] testusb-t 38-c 10000-s 1024-g 4096-a

[0166] testusb-t 38-c 10000-s 3072-g 4096-a

[0167] testusb-t 38-c 10000-s 1023-g 4096-a

[0168] testusb-t 39-c 10000-s 1024-g 4096-v 1-a

[0169] testusb-t 39-c 10000-s 3072-g 4096-v 1-a

[0170] testusb-t 39-c 10000-s 1023-g 4096-v 1-a

[0171] testusb-t 40-c 10000-s 1024-g 4096-v 1-a

[0172] testusb-t 40-c 10000-s 3072-g 4096-v 1-a

[0173] testusb-t 40-c 10000-s 1023-g 4096-v 1-a

[0174] testusb-t 41-c 10000-s 1024-v 1-a

[0175] testusb-t 41-c 10000-s 64-v 1-a

[0176] testusb-t 41-c 10000-s 8-v 1-a

[0177] testusb-t 42-c 10000-s 1024-v 1-a

[0178] testusb-t 42-c 10000-s 64-v 1-a

[0179] testusb-t 42-c 10000-s 8-v 1-a

[0180] testusb-t 43-c 10000-s 1024-g 4096-a

[0181] testusb-t 43-c 10000-s 64-g 4096-a

[0182] testusb-t 43-c 10000-s 8-g 4096-a

[0183] testusb-t 44-c 10000-s 1024-g 4096-a

[0184] testusb-t 44-c 10000-s 64-g 4096-a

[0185] testusb-t 44-c 10000-s 8-g 4096-a

[0186] testusb-t 45-c 10000-s 1024-g 4096-v 1-a

[0187] testusb-t 45-c 10000-s 64-g 4096-v 1-a

[0188] testusb-t 45-c 10000-s 8-g 4096-v 1-a

[0189] testusb-t 46-c 10000-s 1024-g 4096-v 1-a

[0190] testusb-t 46-c 10000-s 64-g 4096-v 1-a

[0191] testusb-t 46-c 10000-s 8-g 4096-v 1-a

[0192] The above test items test the control transmission, interrupt transmission, BULK transmission, and ISO transmission of the internal driver software of the two USB modules. If each test item is successfully tested / verified, it will display "pass"; otherwise, it will be considered an abnormal situation.

[0193] The above embodiment provides a USB driver testing method in which the USB host module cyclically sends batch output data to the USB device module, causing the USB device module to continuously verify the received batch output data. Simultaneously, after receiving the test data packet from the USB device module, the host module sends a batch input request again, causing the USB device module to respond to the batch data request again. This process is repeated multiple times to obtain the batch test results of the host and slave devices. This application achieves BULK transmission testing of USB driver software through batch data transmission verification, improving the comprehensiveness of USB testing.

[0194] In some embodiments, the method further includes:

[0195] In step S21, the control module sends a plug-in / plug-out command to the test module, and after sending the plug-in / plug-out command, sends an enumeration query command to the USB host module and the USB device module.

[0196] Step S22: The test module powers on or off the USB host module and USB device module according to the plug-in / plug-out command.

[0197] In step S23, the USB host module and the USB device module respond to the received enumeration query command, generate serial port data based on the device information, and send it to the control module.

[0198] In step S24, the control module obtains the enumeration test results based on the plugging / unplugging command and the received serial port data.

[0199] The enumeration query command is specifically the `lsusb` command, used to request and display information about devices connected to the USB bus. When the enumeration is correct, the execution result of the `lsusb` command (i.e., the received serial port data) displays the device information of the two devices, for example:

[0200] Bus 001Device 001:ID 1d6b:0002

[0201] Bus 001Device 002:ID 007a:6052

[0202] The first is the USB host controller of the USB host module.

[0203] The second is the USB device module (usually the device board is simulated as a USB flash drive).

[0204] However, when an error occurs during execution, i.e. when the test fails, only device information from the USB host controller is received.

[0205] The above embodiments achieve enumeration testing under different power-on and power-off conditions through the control of plugging and unplugging commands, including: 1. The USB host module is not powered off, but the USB device module is powered off and then powered on again; 2. The USB host module is not powered off, and the USB device module is not powered off, but the DP / DM line between the two modules is disconnected and reconnected; 3. The USB host module is powered off and then powered on again, but the USB device module is not powered off; 4. The USB host board is powered off and then powered on again, and the USB device board is also powered off and then powered on again.

[0206] Taking the first scenario as an example, the control module sends plug-in / plug-out commands to the test module via the I2C protocol to power on the USB host module and the USB device module, then powers off and then on the USB device module. After sending the plug-in / plug-out commands, the control module sends an enumeration query command to the USB host module. Then, the control module monitors the serial port data output by the USB host module. When the enumeration is complete, the serial port of the USB host module will display the string "New USB device found".

[0207] In actual testing, the USB device module and USB host module need to be powered on and off multiple times, typically 5000 times per scenario by default. The control module also records the time from sending the enumeration query command to receiving the string "New USBdevice found," using this as the enumeration completion time. However, the stability of the enumeration completion time is usually not used as a criterion for determining test success or failure; unstable enumeration time is usually caused by unstable device power supply.

[0208] The above embodiments enable testing of whether the enumeration function can be correctly implemented under various working conditions of the USB device module and the USB host module, greatly improving the comprehensiveness of USB driver testing.

[0209] In some embodiments, the method further includes:

[0210] When sending plug-in / plug-out commands, the control module sends driver control commands to the USB host module or USB device module.

[0211] The USB host module or USB device module unloads or loads the driver according to the driver control command.

[0212] The control module obtains the enumeration test results based on the drive control instructions, plug-in / plug-out instructions, and serial port data.

[0213] Specifically, the enumeration test scenarios also include: 1. The USB host module and the USB device module do not lose power, and the USB host module driver is unloaded and loaded; 2. The USB host module and the USB device module do not lose power, and the USB device module driver is unloaded and loaded. The corresponding enumeration test results also include the content of the test scenarios.

[0214] The above embodiments improve the correctness and stability of enumerating USB host modules and USB device modules under different conditions such as driver loading and unloading, further enhancing the comprehensiveness of USB testing.

[0215] In some embodiments, the method further includes:

[0216] Step S31: After sending a level control command to the test module, the control module monitors the serial port strings of the USB host module and the USB device module, and sends system test commands to the USB host module and the USB device module.

[0217] Specifically, the system test command is a LINUX command. The control module determines whether the LINUX system corresponding to the USB module has crashed based on whether the system test command receives a response.

[0218] In step S32, the test module pulls the digital interface levels of the USB host module and the USB device module high or low according to the received level control command. Specifically, the "digital interface levels" refer to the levels of the DP lines of the two USB modules.

[0219] In step S33, the USB host module and the USB device module execute the received system test command, generate the command execution result, and send it to the control module. Specifically, the level test in this application addresses two situations:

[0220] 1. Force the DP line of the USB host module and USB device module to a high level.

[0221] 2. Force the DP lines of the USB host module and USB device module to a low level.

[0222] Step S34: After sending the system test command, the control module obtains the level test results of the USB host module and the USB device module based on the command execution result and the monitored serial port string.

[0223] The control module is specifically used to monitor the serial ports of the USB host module and the USB device module for error, oops, or backtrace strings to determine if the USB driver has crashed. If so, it indicates that the corresponding module has crashed.

[0224] In addition to the two judgment methods mentioned above, the control module can also execute the first test item mentioned above, i.e., case 1, by having the USB host module execute it normally. If it can be executed normally, i.e. the test result is pass, it means that the USB driver is normal; otherwise, it means that there is an error.

[0225] In some embodiments, the method further includes:

[0226] In response to electrostatic interference commands or power replacement commands, the control module monitors the serial port strings of the USB host module and the USB device module, and sends system test commands to the USB host module and the USB device module; and obtains the interference test results of the USB host module and the USB device module based on the command execution results and the serial port strings.

[0227] The "electrostatic interference command" is input to the control module after electrostatic interference is introduced during the communication between the USB host module and the USB device module. Specifically, different levels of electrostatic interference can be introduced multiple times, and the level is put into the electrostatic interference command. The control module will obtain the electrostatic interference test result based on the electrostatic interference level in the electrostatic interference command and the monitoring results. That is, when the electrostatic interference is at a certain level or value, the test is normal or abnormal.

[0228] The "Power Replacement Command" is input to the control module after the power supply of the USB host module is replaced with an unstable power supply; the control module will also generate power interference test results based on the new power supply status in the power replacement command and the monitoring results.

[0229] In some embodiments, the method further includes:

[0230] After sending a handshake command to the USB device module, the control module monitors the serial port strings of the USB host module and the USB device module, and obtains the abnormal test results of the USB host module and the USB device module based on the serial port strings.

[0231] The USB device module responds to the handshake command and controls either endpoint to generate a handshake signal.

[0232] Specifically, the control module directly configures the USB device module via the serial port, causing one of its endpoints to continuously generate a NAK (handshake signal). Typically, two endpoints can be selected: endpoint 0 and any non-zero endpoint. At this time, the USB host module and the USB device module can execute Linux commands normally, which can only be determined by observing whether an error message string appears.

[0233] Furthermore, the various transmission type tests, plug-in / plug-out tests, interference tests, and anomaly tests in the above embodiments can be performed at different rate settings to test the correctness and stability of the USB host module driver and the USB device module driver at different rates. Specifically, the control module can control the speed of the USB host module driver and the USB device module to low speed, full speed, or high speed via serial port (the USB low speed, full speed, and high speed speeds have corresponding fixed parameters); then control the USB host module and the USB device module to communicate according to the test items in the above embodiments.

[0234] Please see Figure 2 Another embodiment of this application provides a USB driver testing device, including a USB host module and a USB device module; the USB host module includes a first sending unit, a first verification unit and a judgment unit.

[0235] The first sending unit is used to send test data packets and batch input requests to the USB device module, while cyclically sending batch output data; and to stop sending batch output data after receiving a stop command.

[0236] The first verification unit is used to verify the received test data packets and resend the batch input request; and to stop sending the batch input request after receiving the stop command.

[0237] The judgment unit is used to send a stop command to the first sending unit and the first verification unit when the number of batch output data sent reaches a first preset number and the number of batch input requests sent reaches a second preset number, and to generate host batch test results based on the verification results of the test data packets; specifically, a pass is achieved if the verification is correct, otherwise it is considered an error.

[0238] The USB device module includes a second sending unit and a second verification unit; the second verification unit is used to verify the received batch output data and generate slave batch test results based on the verification results; the second sending unit is used to send the received test data packets to the USB host module after receiving a batch input request.

[0239] The test data packet is a data packet, the bulk input request is a bulk in packet, and the bulk output data is a bulkout packet. Before sending the bulk out packet and the data packet for the first time, the first sending unit will send a control out packet to notify the USB device module of the data length of the in packet. The second verification unit verifies the bulk out packet in the same way as the first verification unit verifies the data packet using mod63. The verification result is the batch test result of the USB host module and the USB slave module.

[0240] The above process implements the fixed-length ring bulk in and ring bulk out tests of two USB modules. The corresponding variable-length ring bulk in and ring bulk out tests follow the same procedure as the fixed-length tests, except that the lengths of the in and out packets are variable.

[0241] Please see Figure 3 In some embodiments, the device also includes a control module and a test module.

[0242] The test module can be an FPGA board, which is connected to the power / IO ports and DP / DM cables of the two USB modules respectively.

[0243] The control module is connected to the serial ports of both the USB host module and the USB device module.

[0244] The control module sends plug-in / plug-out commands to the test module, and then sends enumeration query commands to the USB host module and USB device module. Based on the plug-in / plug-out commands and the received serial port data, it obtains the enumeration test results.

[0245] Both the first transmitting unit of the USB host module and the second transmitting unit of the USB device module are used to respond to the received enumeration query command, generate serial port data according to the device information, and send it to the control module.

[0246] The test module is used to power on or off the USB host module and USB device module according to plug-in / plug-out commands.

[0247] The enumeration query command is specifically the `lsusb` command, used to request and display information about devices connected to the USB bus. When the enumeration is correct, the execution result of the `lsusb` command (i.e., the received serial port data) displays the device information of the two devices, for example:

[0248] Bus 001Device 001:ID 1d6b:0002

[0249] Bus 001Device 002:ID 007a:6052

[0250] The first is the USB host controller of the USB host module.

[0251] The second is the USB device module (usually the device board is simulated as a USB flash drive).

[0252] However, when an error occurs during execution, i.e. when the test fails, only device information from the USB host controller is received.

[0253] The above embodiments achieve enumeration testing under different power-on and power-off conditions through the control of plugging and unplugging commands, including: 1. The USB host module is not powered off, but the USB device module is powered off and then powered on again; 2. The USB host module is not powered off, and the USB device module is not powered off, but the DP / DM line between the two modules is disconnected and reconnected; 3. The USB host module is powered off and then powered on again, but the USB device module is not powered off; 4. The USB host board is powered off and then powered on again, and the USB device board is also powered off and then powered on again.

[0254] The above embodiments enable testing of whether the enumeration function can be correctly implemented under various working conditions of the USB device module and the USB host module, greatly improving the comprehensiveness of USB driver testing.

[0255] In some embodiments, the control module is further configured to send a driver control command to the USB host module or USB device module while sending the plugging / unplugging command; and to obtain an enumeration test result based on the driver control command, the plugging / unplugging command, and the received serial port data; the USB host module further includes a first execution unit, and the USB device module further includes a second execution unit; the first execution unit or the second execution unit is configured to unload or load the driver according to the driver control command.

[0256] Specifically, the enumeration test scenarios also include: 1. The USB host module does not lose power, the USB device module does not lose power, and the USB host module driver is unloaded and loaded; 2. The USB host module does not lose power, the USB device module does not lose power, and the USB device module driver is unloaded and loaded.

[0257] The above embodiments improve the correctness and stability of enumerating USB host modules and USB device modules under different conditions such as driver loading and unloading, further enhancing the comprehensiveness of USB testing.

[0258] In some embodiments, the control module is further configured to, after sending a level control command to the test module, monitor the serial port strings of the USB host module and the USB device module, and send system test commands to the USB host module and the USB device module; and obtain the level test results of the USB host module and the USB device module based on the command execution result and the monitored serial port strings. Specifically, the system test command is a LINUX command, and the control module determines whether the LINUX system corresponding to the USB module has crashed based on whether the system test command receives a response.

[0259] The first execution unit of the USB host module and the second execution unit of the USB device module are also used to execute the received system test instructions, generate instruction execution results, and send them to the control module.

[0260] Specifically, the instruction execution result is only generated when the instruction is successfully executed. If the system test instruction fails to be executed due to a system crash, the control module will not receive the instruction execution result. That is, if the control module does not receive the instruction execution result within the preset response time after sending the system test instruction, it will determine that the corresponding USB module system has crashed and put the determination result into the level test result.

[0261] The control module is also used to monitor the serial ports of the USB host module and the USB device module for error, oops, or backtrace strings to determine if the USB driver has crashed. If so, it means that the corresponding module has crashed.

[0262] In addition to the two judgment methods mentioned above, the control module can also execute the first test item mentioned above, i.e., case 1, by having the USB host module execute it normally. If it can be executed normally, i.e. the test result is pass, it means that the USB driver is normal; otherwise, it means that there is an error.

[0263] The test module is also used to raise or lower the digital interface levels of the USB host module and USB device module according to received level control commands. Specifically, the "digital interface levels" refer to the levels of the DP lines of the two USB modules.

[0264] Specifically, the level test in this application is for two situations: 1. Forcibly pulling the DP line of the USB host module and USB device module high; 2. Forcibly pulling the DP line of the USB host module and USB device module low.

[0265] After the control level enters the corresponding test condition, the control module uses system test commands and serial port string detection to determine whether the USB host module and USB device module are working properly and whether a crash or abnormality has occurred.

[0266] In some embodiments, the control module is further configured to respond to electrostatic interference commands or power replacement commands, monitor the serial port strings of the USB host module and the USB device module, and send system test commands to the USB host module and the USB device module; and obtain the interference test results of the USB host module and the USB device module based on the command execution results and the monitored serial port strings. The "electrostatic interference command" is input to the control module after electrostatic interference is introduced during the communication process between the USB host module and the USB device module. Specifically, different levels of electrostatic interference can be introduced multiple times, and the levels are included in the electrostatic interference command. The control module will obtain the electrostatic interference test results based on the electrostatic interference level in the electrostatic interference command and the monitoring results; that is, when the electrostatic interference is at a certain level or value, the test is normal or abnormal.

[0267] The "Power Replacement Command" is input to the control module after the power supply of the USB host module is replaced with an unstable power supply; the control module will also generate power interference test results based on the new power supply status in the power replacement command and the monitoring results.

[0268] In some embodiments, the control module is further configured to monitor the serial port strings of the USB host module and the USB device module after sending a handshake command to the USB device module, and obtain the abnormal test results of the USB host module and the USB device module based on the monitored serial port strings.

[0269] The second execution unit of the USB device module is also used to respond to handshake commands and control either endpoint to generate a handshake signal.

[0270] Specifically, the control module directly configures the USB device module via the serial port, causing one of its endpoints to continuously generate a NAK (handshake signal). Typically, two endpoints can be selected: endpoint 0 and any non-zero endpoint. At this time, the USB host module and the USB device module can execute Linux commands normally, which can only be determined by observing whether an error message string appears.

[0271] Furthermore, the various transmission type tests, plug-in / plug-out tests, interference tests, and anomaly tests in the above embodiments can be performed at different rate settings to test the correctness and stability of the USB host module driver and the USB device module driver at different rates. Specifically, the control module can control the speed of the USB host module driver and the USB device module to low speed, full speed, or high speed via serial port (the USB low speed, full speed, and high speed speeds have corresponding fixed parameters); then control the USB host module and the USB device module to communicate according to the test items in the above embodiments.

[0272] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0273] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A USB driver testing method, characterized in that, include: The USB host module sends test data packets, batch output data, and batch input requests to the USB device module, and then sends batch output data in a loop after sending is complete. The USB device module verifies the received batch output data and generates slave batch test results based on the verification results. And after receiving a batch input request, the received test data packet is sent to the USB host module; The USB host module verifies the received test data packet and determines whether the number of batch output data sent reaches a first preset number and whether the number of batch input requests sent reaches a second preset number. If yes, the USB host module stops sending the batch output data and generates host batch test results based on the verification results of the test data packets; if no, it sends the batch input request again.

2. The USB driver testing method according to claim 1, characterized in that, Also includes: The control module sends plugging / unplugging commands to the test module, and after sending the plugging / unplugging commands, sends enumeration query commands to the USB host module and the USB device module. The test module powers on or off the USB host module and USB device module according to the plugging / unplugging command. The USB host module and the USB device module respond to the received enumeration query command, generate serial port data based on the device information, and send it to the control module; The control module obtains the enumeration test results based on the plugging / unplugging command and the received serial port data.

3. The USB driver testing method according to claim 2, characterized in that, Also includes: When the control module sends the plugging / unplugging command, it sends a drive control command to the USB host module or USB device module. The USB host module or USB device module unloads or loads the driver according to the driver control command; The control module obtains the enumeration test results based on the drive control command, the plug-in / plug-out command, and the serial port data.

4. The USB driver testing method according to claim 3, characterized in that, Also includes: After sending a level control command to the test module, the control module monitors the serial port strings of the USB host module and the USB device module, and sends a system test command to the USB host module and the USB device module. The test module raises or lowers the digital interface level of the USB host module and the USB device module according to the received level control command; the USB host module and the USB device module execute the received system test command, generate the command execution result and send it to the control module; After sending the system test command, the control module obtains the level test results of the USB host module and the USB device module based on the command execution result and the monitored serial port string.

5. The USB driver testing method according to claim 4, characterized in that, Also includes: In response to an electrostatic interference command or a power replacement command, the control module monitors the serial port strings of the USB host module and the USB device module, and sends system test commands to the USB host module and the USB device module. Furthermore, based on the instruction execution results and serial port strings, the interference test results of the USB host module and USB device module are obtained.

6. The USB driver testing method according to claim 5, characterized in that, Also includes: After sending a handshake command to the USB device module, the control module monitors the serial port strings of the USB host module and the USB device module, and obtains the abnormal test results of the USB host module and the USB device module based on the serial port strings. In response to the handshake command, the USB device module controls either endpoint to generate a handshake signal.

7. A USB driver testing device, characterized in that, Includes USB host module and USB device module; The USB host module includes a first transmitting unit, a first verification unit, and a judgment unit; The first sending unit is used to send test data packets and batch input requests to the USB device module, and simultaneously send batch output data in a loop; and to stop sending the batch output data after receiving a stop command; The first verification unit is used to verify the received test data packet and resend the batch input request; and to stop sending the batch input request after receiving a stop command; The judgment unit is used to send a stop command to the first sending unit and the first verification unit when the number of batch output data sent reaches a first preset number and the number of batch input requests sent reaches a second preset number, and to generate host batch test results based on the verification results of the test data packets; The USB device module includes a second sending unit and a second verification unit; the second verification unit is used to verify the received batch output data and generate slave batch test results based on the verification results; the second sending unit is used to send the received test data packets to the USB host module after receiving a batch input request.

8. The USB driver testing device according to claim 7, characterized in that, It also includes a control module and a test module; the control module is used to send plugging / unplugging commands to the test module, and then send enumeration query commands to the USB host module and the USB device module, and obtain the enumeration test results based on the plugging / unplugging commands and the received serial port data; Both the first sending unit of the USB host module and the second sending unit of the USB device module are used to respond to the received enumeration query command, generate the serial port data according to the device information, and send it to the control module. The test module is used to power on or off the USB host module and USB device module according to the plugging and unplugging command.

9. The USB driver testing device according to claim 8, characterized in that, The control module is also configured to send a drive control command to the USB host module or USB device module while sending the plugging / unplugging command; and to obtain an enumeration test result based on the drive control command, the plugging / unplugging command, and the received serial port data. The USB host module further includes a first execution unit, and the USB device module further includes a second execution unit; The first execution unit or the second execution unit is used to unload or load the driver according to the driver control instruction.

10. The USB driver testing device according to claim 9, characterized in that, The control module is also used to monitor the serial port strings of the USB host module and the USB device module after sending a level control command to the test module, and to send a system test command to the USB host module and the USB device module. Additionally, the voltage level test results of the USB host module and USB device module are obtained based on the command execution results and the monitored serial port strings; The first execution unit of the USB host module and the second execution unit of the USB device module are also used to execute the received system test instructions, generate instruction execution results, and send them to the control module. The test module is also used to raise or lower the digital interface level of the USB host module and the USB device module according to the received level control command.

11. The USB driver testing device according to claim 10, characterized in that, The control module is also used to respond to electrostatic interference commands or power replacement commands, monitor the serial port strings of the USB host module and the USB device module, and send system test commands to the USB host module and the USB device module. Furthermore, based on the command execution results and the monitored serial port strings, the interference test results of the USB host module and the USB device module are obtained.

12. The USB driver testing device according to claim 11, characterized in that, The control module is also used to monitor the serial port strings of the USB host module and the USB device module after sending a handshake command to the USB device module, and obtain the abnormal test results of the USB host module and the USB device module based on the monitored serial port strings. The second execution unit of the USB device module is also used to respond to handshake commands and control either endpoint to generate a handshake signal.