A verification test platform and verification test method for Bluetooth TWS function
Patent Information
- Application Number
- CN202310085764.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-16
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-01-16
AI Technical Summary
整个测试过程较为繁琐,效率低,成本高,且常规的人工测试,测试流程不完全可控,测试内容覆盖范围较小,无法进一步验证芯片数字逻辑设计在真实环境下的工作情况
[0044] The present invention can realize the verification test of Bluetooth TWS function through relatively simple hardware connection and flexible script configuration. The automated test method simplifies the cumbersome manual test process, improves the test efficiency, and enables R & D personnel to invest more time and energy in other work. When using the present invention, the test scenarios can be modified and combined according to needs, enabling more comprehensive and diversified testing of the TWS function of the upper-layer protocol/Bluetooth firmware. Moreover, when using the present invention, there is no need to cooperate with expensive test tools such as Bluetooth protocol analyzers and Bluetooth comprehensive testers, which can well reduce the test cost.
Smart Images

Figure CN116131969B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Bluetooth, and particularly relates to a verification and test platform for Bluetooth TWS (True Wireless Stereo) function and a verification and test method, which are applicable to the verification and test of Bluetooth TWS hardware function and TWS protocol function. Background Art
[0002] A Bluetooth headset applies Bluetooth technology to the headset, enabling the transmission of audio data between the headset and a sound source device (usually a device with Bluetooth wireless communication function such as a mobile phone) without a physical cable connection.
[0003] For stereo Bluetooth headsets such as neck-worn and head-worn types, there is still a physical connection between the left and right headsets, which restricts the flexibility and convenience of the Bluetooth headset to a certain extent. The emergence of TWS technology enables Bluetooth headsets to achieve true wireless stereo.
[0004] In order to implement the application of TWS technology, chip manufacturers often need to make certain digital design modifications to the Bluetooth baseband on the basis of traditional Bluetooth chips, and corresponding algorithms also need to be added in software to achieve TWS function.
[0005] Currently, the verification and test of Bluetooth TWS function mainly rely on manual testing methods. Specifically: digital designers simulate the target RTL code to verify the feasibility of the designed module; software designers run the designed TWS application program on the Bluetooth device, specify one platform as the main headset and the other platform as the sub-headset, and set their Bluetooth addresses. In addition, a mobile phone is also required. During the test, a connection is established between the main and sub-headsets, and then a connection is established between the main headset and the mobile phone to form a TWS connection topology. The tester needs to perform specific operations on the mobile phone and judge whether the TWS application program is running normally according to the log printing of the hardware platform. It may also be necessary for software and hardware designers to cooperate and use tools such as Bluetooth protocol analyzers and Bluetooth comprehensive testers to test and analyze problems existing in TWS software and hardware designs. The entire test process is relatively cumbersome, with low efficiency and high cost. Moreover, for conventional manual testing, the test process is not completely controllable, the coverage of test content is relatively small, and it is impossible to further verify the working conditions of the chip digital logic design in a real environment. Summary of the Invention
[0006] The first object of the present invention is to provide a verification and test platform for Bluetooth TWS function.
[0007] The verification test platform for the Bluetooth TWS function of the present invention includes a test host and one or more platforms under test. Each platform under test includes a test machine, two devices under test, and three USB-to-serial port modules. Each USB-to-serial port module has a unique serial port characteristic value, and the USB-to-serial port module is mapped to a specified device number through the specific serial port characteristic value for distinguishing the connected Bluetooth devices.
[0008] The described test host includes:
[0009] A memory for storing test tools, as well as log information and test analysis results output during the execution of the test tools;
[0010] A processor for executing test tools and analyzing test results;
[0011] The test tool is written in the Python language and packaged into an executable file. By running the executable file on the processor and selecting a pre-written test script, the test can be automatically completed;
[0012] The described test tool includes test scripts. Before the test tool is packaged into an executable file, the test scripts have been written and included in the engineering project of the test tool; the described test scripts include the TWS function points to be tested, and corresponding code descriptions are used for each test function point, and the code descriptions are used to control the test process;
[0013] A hardware interface for connecting external devices.
[0014] The described test machine is a Bluetooth device. Acting as the role of a mobile phone, the test machine has the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and data transmission; the test machine has a UART interface and a radio frequency module. The test machine connects to one of the USB-to-serial port modules through the UART interface, and the USB-to-serial port module connects to the processor of the test host through the hardware interface. The test machine realizes the reception and transmission of radio frequency data through the radio frequency module for establishing Bluetooth connections and interacting data between Bluetooth devices.
[0015] The described devices under test are Bluetooth devices. The two devices under test act as the roles of the left and right earphones respectively, one as the main earphone and the other as the secondary earphone, and have the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and data transmission; the devices under test have UART interfaces and radio frequency modules. The two test machines respectively connect to the other two USB-to-serial port modules through the UART interfaces, and the USB-to-serial port modules connect to the processor of the test host through the hardware interfaces. The test machines realize the reception and transmission of radio frequency data through the radio frequency modules for establishing Bluetooth connections and interacting data between Bluetooth devices.
[0016] Further, the testing machine is an FPGA development platform, which pre-loads a digital design file with classic Bluetooth function. The digital design file is used to describe the hardware functions of the testing machine. Before the test, the module design project is compiled and downloaded to the FPGA platform to enable it to have the classic Bluetooth function.
[0017] Further, the testing machine is a development board with a Bluetooth chip, and the Bluetooth chip has the classic Bluetooth function.
[0018] Further, the device under test is an FPGA development platform, which pre-loads a digital design file with TWS hardware function. The digital design file is used to describe the hardware functions of the device under test. Before the test, the module design project is compiled and downloaded to the FPGA platform to enable it to have the Bluetooth TWS function.
[0019] Further, if the device under test is a development board with a Bluetooth chip, then the Bluetooth chip has the TWS hardware function.
[0020] Further, the testing tool and the device under test platform perform HCI instruction, event interaction, and data transmission through a USB to serial port module.
[0021] Another object of the present invention is to provide a method for verifying and testing the Bluetooth TWS function using the above platform.
[0022] Step (1): The processor executes the testing tool and selects one or more test scripts to be executed. The testing tool sends HCI instructions to the testing machine and the device under test in a group of devices under test platforms. The instructions are used to read the test roles of Bluetooth devices.
[0023] Step (2): After receiving the HCI instructions, the testing machine and the device under test parse the HCI instructions, perform corresponding operations, and send the execution results to the testing tool in the form of HCI events. The execution results include the roles of the devices themselves, indicating whether they are the testing machine or the device under test.
[0024] Step (3): If the Bluetooth device is the device under test, the testing tool sends an HCI instruction to the Bluetooth device to read the TWS role, and the Bluetooth device returns its own TWS role, indicating whether it is the main earphone or the sub-earphone. If the Bluetooth device is the testing machine, no operation is performed.
[0025] Step (4): The testing tool sends HCI instructions to read the Bluetooth addresses to three Bluetooth devices respectively, and the Bluetooth devices return their own Bluetooth addresses, which are used to establish a Bluetooth connection between the Bluetooth devices.
[0026] Step (5): According to the test requirements, the testing tool controls the testing machine to actively connect to the main earphone, or controls the main earphone to actively connect to the testing machine, and the testing machine establishes a classic Bluetooth link with the main earphone.
[0027] If the test device actively connects to the main headset, then in the Bluetooth network, the test device acts as the Bluetooth master and the main headset acts as the Bluetooth slave, and then the TWS slave function is tested;
[0028] If the main headset actively connects to the test device, then in the Bluetooth network, the test device acts as the Bluetooth slave and the main headset acts as the Bluetooth master, and then the TWS master function is tested;
[0029] In step (6), the test tool controls the secondary headset to monitor the data of the test device, establish a TWS connection topology, and according to the test requirements, establish an SCO / eSCO connection between the test device and the main headset, or enter the sniff mode;
[0030] The described TWS connection topology is to establish a classic Bluetooth link between the test device and the main headset, a classic Bluetooth link between the main headset and the secondary headset, and a non-standard listening link between the secondary headset and the test device;
[0031] According to the TWS mode type, test type, test direction, and the specific test details in each direction, the test tool issues different test commands and test parameters to the device under test, and the device under test executes the corresponding test operations;
[0032] The described TWS mode types include the TWS slave mode and the TWS master mode;
[0033] The described test types include TWS underlying hardware function tests and TWS protocol behavior tests;
[0034] The described test directions include ACL, eSCO, SCO, sniff, error;
[0035] The specific test details are the transmission and reception tests of specified data packet types, or the transmission and reception tests of random data packet types, or the handling of errors, or the data transmission and reception tests at specific framing positions during eSCO / sniff, or the tests of the TWS function features of the upper-layer protocol / Bluetooth firmware;
[0036] In step (7), if TWS underlying hardware function tests are to be performed, the test tool issues an instruction to the device under test to pause all framing operations of the test platform, that is, to stop all link data transmissions within the Bluetooth network;
[0037] The test tool generates random data and issues it to the test device and the device under test. This random data will be used as test data and transmitted between Bluetooth devices, and at the same time, it will be used by the data receiver as the original data for data integrity comparison;
[0038] The DUT restarts frame arrangement, only maintaining the link data transmission between the test machine and the main earphone, as well as the monitoring of the test machine by the sub-earphone, without restoring the link data transmission between the main earphone and the sub-earphone;
[0039] The DUT performs corresponding operations according to specific test details;
[0040] In step (8), if TWS protocol behavior testing is performed, directly test according to the TWS application scenarios set in the test script; the DUT performs corresponding operations according to specific test details;
[0041] After the TWS underlying hardware function testing and / or TWS protocol behavior testing in step (9), the DUT reports the test results to the test tool; the test results include the number of data packets sent and received during this test, the number of data packets monitored by the sub-earphone, the integrity comparison result between the data received by the Bluetooth device and the original data, the error situation during data transmission and reception, the quality of radio frequency transmission and reception, and the processing situation of the upper-layer protocol / Bluetooth firmware for the TWS application scenario;
[0042] The test tool compares the received test results with the expected test results for analysis, and draws a conclusion on whether this test passes / fails;
[0043] In step (10), the HCI data interaction situation during the entire test process, including the original data of the test results and the analysis conclusion, is stored in the memory, and finally a test report is generated.
[0044] The present invention can realize the verification test of Bluetooth TWS function through relatively simple hardware connection and flexible script configuration. The automated test method simplifies the cumbersome manual test process, improves the test efficiency, and enables R & D personnel to invest more time and energy in other work. When using the present invention, the test scenarios can be modified and combined according to needs, enabling more comprehensive and diversified testing of the TWS function of the upper-layer protocol / Bluetooth firmware. Moreover, when using the present invention, there is no need to cooperate with expensive test tools such as Bluetooth protocol analyzers and Bluetooth comprehensive testers, which can well reduce the test cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the verification test platform of the present invention;
[0046] Figure 2 It is a schematic diagram of Bluetooth device connection during the test process of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0047] Such as Figure 1As shown in the figure, a verification test platform for Bluetooth TWS function includes a test host 1 and one or more platforms under test. Each platform under test includes a test machine 2, two devices under test 3, and three USB-to-serial port modules 4. Each USB-to-serial port module 4 has a unique serial port characteristic value. The USB-to-serial port module is mapped to a specified device number through the specific serial port characteristic value, which is used to distinguish the connected Bluetooth devices.
[0048] (1) The test host 1 described above includes:
[0049] A memory 11, which is used to store test tools, as well as log information and test analysis results output during the execution of the test tools;
[0050] A processor 12, which is used to execute test tools and analyze test results;
[0051] A test tool 13, which is written in the Python language and packaged into an executable file. By running the executable file on the processor, a pre-written test script is selected to automatically complete the test;
[0052] The test tool described above includes test scripts. Before the test tool is packaged into an executable file, the test scripts have been written and included in the engineering project of the test tool; the test scripts include the TWS function points to be tested, and corresponding code descriptions are used for each test function point. The code descriptions are used to control the test process;
[0053] A hardware interface 14, which is used to connect external devices, specifically a USB interface.
[0054] (2) The test machine 2 is a Bluetooth device, which is an FPGA development platform or a development board with a Bluetooth chip. If it is an FPGA development platform, the FPGA platform is pre-loaded with a digital design file with classic Bluetooth function. The digital design file is used to describe the hardware functions of the test machine. Before the test, the module design project is compiled and downloaded into the FPGA platform to make it have classic Bluetooth function; if it is a development board with a Bluetooth chip, the Bluetooth chip has classic Bluetooth function; the test machine 2 acts as the role of a mobile phone and has the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and data transmission. The test machine has a UART interface 21 and a radio frequency module 22. The test machine connects to one of the USB-to-serial port modules 4 through the UART interface 21, and the USB-to-serial port module 4 connects to the processor 12 of the test host through the hardware interface 14. The test machine realizes the reception and transmission of radio frequency data through the radio frequency module 22, which is used to establish Bluetooth connections between Bluetooth devices and interact data. During the test, first, the Bluetooth driver code with classic Bluetooth function is downloaded to the test machine 2 to control and use the classic Bluetooth hardware function.
[0055] (3) The device under test 3 is a Bluetooth device, an FPGA development platform, or a development board with a Bluetooth chip. If it is an FPGA development platform, the FPGA platform is pre-loaded with a digital design file with TWS hardware functions, and the digital design file is used to describe the hardware functions of the device under test. Before testing, the module design project is compiled and downloaded into the FPGA platform to enable it to have Bluetooth TWS functions. If it is a development board with a Bluetooth chip, the Bluetooth chip has TWS hardware functions. The two devices under test 3 respectively act as the roles of the left and right earphones, one of which is the master earphone and the other is the slave earphone, and has the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and data transmission. The device under test 3 has a UART interface 31 and a radio frequency module 32. The two test devices 3 are respectively connected to the other two USB-to-serial port modules 4 through the UART interface 31. The USB-to-serial port module 4 is connected to the processor 12 of the test host through the hardware interface 14. The test device 3 receives and transmits radio frequency data through the radio frequency module 32 for establishing Bluetooth connections and interacting data between Bluetooth devices. During testing, first, the Bluetooth driver code with TWS functions is downloaded to the device under test 3 for controlling and using the TWS hardware functions.
[0056] As Figure 2 shown, the method for verifying and testing the Bluetooth TWS function using this platform is specifically as follows:
[0057] Step (1) The processor 12 executes the test tool, selects one or more test scripts 14 to be executed. The test tool sends HCI instructions to the test device 2 and the device under test 3 in a group of test platforms, and the instructions are used to read the test roles of Bluetooth devices.
[0058] Step (2) After receiving the HCI instructions, the test device 2 and the device under test 3 parse the HCI instructions, perform corresponding operations, and send the execution results to the test tool in the form of HCI events. The execution results include the roles of the devices themselves, indicating whether they are test devices or devices under test.
[0059] Step (3) If the Bluetooth device is a device under test, the test tool sends an HCI instruction to read the TWS role to the Bluetooth device, and the Bluetooth device returns its own TWS role, indicating whether it is the master earphone or the slave earphone. If the Bluetooth device is a test device, no operation is performed.
[0060] The test tool and the test platform perform HCI instruction, event interaction, and data transmission through the USB-to-serial port module.
[0061] Step (4) The test tool sends HCI instructions to read the Bluetooth addresses to three Bluetooth devices respectively, and the Bluetooth devices return their own Bluetooth addresses for establishing Bluetooth connections between the Bluetooth devices.
[0062] After the test tool obtains the basic information of the Bluetooth device, the Bluetooth device does not need to search for other devices in the environment, but directly controls the secondary earphone to connect to the primary earphone, thereby simplifying the connection process and saving test time.
[0063] Step (5) According to the test requirements, the test tool controls the test machine to actively connect to the primary earphone, or controls the primary earphone to actively connect to the test machine, and the test machine and the primary earphone establish a classic Bluetooth link;
[0064] If the test machine actively connects to the primary earphone, then in the Bluetooth network, the test machine acts as a Bluetooth master, and the primary earphone acts as a Bluetooth slave, and the TWS slave function test is carried out subsequently;
[0065] If the primary earphone actively connects to the test machine, then in the Bluetooth network, the test machine acts as a Bluetooth slave, and the primary earphone acts as a Bluetooth master, and the TWS master function test is carried out subsequently.
[0066] Step (6) The test tool controls the secondary earphone to monitor the data of the test machine, establishes a TWS connection topology, and according to the test requirements, an SCO / eSCO connection is established between the test machine and the primary earphone, or enters the sniff mode;
[0067] The described TWS connection topology is that a classic Bluetooth link is established between the test machine and the primary earphone, a classic Bluetooth link is established between the primary earphone and the secondary earphone, and a non-standard monitoring link is established between the secondary earphone and the test machine.
[0068] According to the TWS mode type, test type, test direction, and specific test details in each direction, the test tool issues different test commands and test parameters to the device under test, and the device under test performs corresponding test operations.
[0069] The described TWS mode types include the TWS slave mode and the TWS master mode;
[0070] The described test types include TWS underlying hardware function tests and TWS protocol behavior tests;
[0071] The described test directions include ACL, eSCO, SCO, sniff, error.
[0072] The specific test details described above are for the transmission and reception tests of specified data packet types, or the transmission and reception tests of random data packet types, or the handling of errors (including but not limited to lt_addr error, crc error), or the data transmission and reception tests at specific frame arrangement positions (including but not limited to eSCO retransmission window frame arrangement, sniff attempt / timeout window frame arrangement) during eSCO / sniff, or the tests on the TWS function features of the upper layer protocol / Bluetooth firmware.
[0073] In step (7), if the TWS underlying hardware function test is to be performed, the test tool sends instructions to the platform under test to pause all frame arrangement operations of the test platform, that is, to stop all link data transmissions within the Bluetooth network.
[0074] The test tool generates random data and sends it to the test machine and the machine under test. This random data will be used as test data for transmission between Bluetooth devices and will also be used by the data receiver as the original data for data integrity comparison.
[0075] The platform under test restarts frame arrangement, only maintaining the link data transmission between the test machine and the main headset, and the sub-headset's monitoring of the test machine, without restoring the link data transmission between the main headset and the sub-headset.
[0076] The platform under test performs corresponding operations according to the specific test details.
[0077] In step (8), if the TWS protocol behavior test is to be performed, the test is directly carried out according to the TWS application scenarios set in test script 14. The platform under test performs corresponding operations according to the specific test details.
[0078] After the TWS underlying hardware function test or / and the TWS protocol behavior test in step (9) are completed, the platform under test reports the test results to the test tool.
[0079] The test results described above include the number of data packets transmitted and received during this test process, the number of data packets monitored by the sub-headset, the integrity comparison results of the data received by the Bluetooth device and the original data, the error conditions during data transmission and reception, the quality of radio frequency transmission and reception, and the handling of the TWS application scenarios by the upper layer protocol / Bluetooth firmware.
[0080] The test tool compares the received test results with the expected test results for analysis and draws a conclusion on whether this test passes or fails.
[0081] The HCI data interaction situation during the entire testing process in step (10), including the original data of the test results and the analysis conclusions, is stored in the memory, and finally a test report is generated. Chip designers or software developers can further analyze, locate, and solve the problems existing in the R & D process based on this test report.
[0082] The following uses a specific test scenario to further elaborate on the above embodiments in detail:
[0083] Execute the test tool on the PC side and select a test case.
[0084] The test tool reads the configuration information of the USB to serial port module, so as to be able to communicate with the Bluetooth device normally.
[0085] The test tool reads the device address, test role, and TWS role of the Bluetooth device.
[0086] The test device controls the slave earphone to page the master earphone, and then controls the test machine to page the master earphone. The test machine becomes the master in the piconet, and the master earphone becomes the slave in the piconet.
[0087] The slave earphone enters the listening state, forming Figure 2 the TWS connection topology shown.
[0088] The test machine sends a request to the master earphone to enter the sniff mode, and the sniff parameters are attempt = 3 and timeout = 2.
[0089] The test machine and the master earphone enter the sniff mode, and the slave earphone also starts to listen to the test machine in the sniff mode.
[0090] Suspend all frame arrangement operations of the test platform and stop the link data transmission in all piconets.
[0091] The test tool sends random data packets to the Bluetooth device respectively, as well as the specific scenarios of the sniff test. This test scenario requires that the master and slave earphones receive the data packets in the third attempt window of the sniff interval and receive the data packets in the second timeout window after the end of the attempt window. After the master earphone receives the data packet, it replies the same data packet to the test machine (the information carried by the data packet includes the situation of TWS listening). After 1000 sniff intervals, this test case ends and the test result is sent to the test tool.
[0092] The test machine will send data packets in the third attempt window of the sniff interval and send data packets in the second timeout window after the end of the attempt window. After the test machine sends out the data packets, it waits to receive the data packets replied by the main headset and checks the data after receiving the packets. End this test case after 1000 sniff intervals and send the test results to the test tool.
[0093] After the test tool receives the test results, it compares them with the expected test results set in the test case. If the results meet the expectations or the deviation from the expectations is within the set range, it is determined that the test passes; otherwise, it fails.
[0094] After all test cases are completed, generate a test report for this test.
Claims
1. A verification test platform for Bluetooth TWS function, characterized in that: It includes a test host and one or more platforms under test; each platform under test includes a test machine, two devices under test, and three USB-to-serial port modules. Each USB-to-serial port module has a unique serial port characteristic value, and the USB-to-serial port module is mapped to a specified device number through the serial port characteristic value for distinguishing the connected Bluetooth devices; The test host described above includes: A memory for storing test tools, as well as log information and test analysis results output during the execution of the test tools; A processor for executing test tools and analyzing test results; Test tools, written in Python language and packaged into executable files. By running the executable files on the processor and selecting pre-written test scripts, the tests are automatically completed; The test tools include test scripts. Before the test tools are packaged into executable files, the test scripts have been written and included in the engineering project of the test tools; the test scripts contain the TWS function points to be tested, and corresponding code descriptions are used for each test function point, and the code descriptions are used to control the test process; A hardware interface for connecting external devices; The test machine is a Bluetooth device, acting as the role of a mobile phone, having the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and data transmission; the test machine has a UART interface and a radio frequency module. The test machine is connected to one of the USB-to-serial port modules through the UART interface, and the USB-to-serial port module is connected to the processor of the test host through the hardware interface. The test machine realizes the reception and transmission of radio frequency data through the radio frequency module for establishing Bluetooth connections and interacting data between Bluetooth devices; The devices under test are Bluetooth devices. The two devices under test act as the roles of the left and right earphones respectively, one as the main earphone and the other as the secondary earphone, having the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and data transmission; the devices under test have UART interfaces and radio frequency modules. The two test machines are respectively connected to the other two USB-to-serial port modules through the UART interfaces, and the USB-to-serial port modules are connected to the processor of the test host through the hardware interface. The test machines realize the reception and transmission of radio frequency data through the radio frequency modules for establishing Bluetooth connections and interacting data between Bluetooth devices; If performing TWS underlying hardware function tests, the test tools send instructions to the platforms under test to pause all frame arrangement operations of the test platforms, that is, stop all link data transmissions within the Bluetooth network; Random data is generated by the test tools and sent to the test machine and the devices under test. This random data will be used as test data for transmission between Bluetooth devices and will also be used as the original data by the data receiving party for data integrity comparison; The platforms under test restart frame arrangement, only maintaining the link data transmission between the test machine and the main earphone, as well as the monitoring of the test machine by the secondary earphone, without restoring the link data transmission between the main earphone and the secondary earphone; The platforms under test perform corresponding operations according to the test steps; If a TWS protocol behavior test is to be conducted, directly conduct the test according to the TWS application scenarios set in the test script; the device under test performs corresponding operations according to the test steps.
2. The verification and test platform for the Bluetooth TWS function according to claim 1, wherein: The test machine is an FPGA development platform that pre-loads a digital design file with classic Bluetooth capabilities. The digital design file is used to describe the hardware functions of the test machine. Before the test, the module design project is compiled and downloaded to the FPGA platform to enable it to have classic Bluetooth capabilities.
3. The verification test platform for a Bluetooth TWS function according to claim 1, characterized in that: The test machine is a development board with a Bluetooth chip that has classic Bluetooth capabilities.
4. The verification test platform for a Bluetooth TWS function according to claim 1, characterized in that: The device under test is an FPGA development platform that pre-loads a digital design file with TWS hardware functions. The digital design file is used to describe the hardware functions of the device under test. Before the test, the module design project is compiled and downloaded to the FPGA platform to enable it to have Bluetooth TWS capabilities.
5. A verification test platform for Bluetooth TWS function according to claim 1, characterized in that: If the device under test is a development board with a Bluetooth chip, then the Bluetooth chip has TWS hardware functions.
6. The verification test platform for a Bluetooth TWS function according to claim 1, characterized in that: The test tool and the device under test perform HCI instruction, event interaction, and data transmission through a USB-to-serial port module.
7. A method for verifying and testing the Bluetooth TWS function using the platform described in claims 1, 2, 3, 4, 5, or 6, characterized in that: Step (1) The processor executes the test tool and selects one or more test scripts to be executed. The test tool sends HCI instructions to the test machine and the device under test in a group of devices under test. The instructions are used to read the test roles of the Bluetooth devices. Step (2) After receiving the HCI instructions, the test machine and the device under test parse the HCI instructions, perform corresponding operations, and send the execution results to the test tool in the form of HCI events. The execution results include the roles of the devices themselves, indicating whether they are the test machine or the device under test. Step (3) If the Bluetooth device is the device under test, the test tool sends an HCI instruction to the Bluetooth device to read the TWS role. The Bluetooth device returns its own TWS role, indicating whether it is the master earphone or the slave earphone. If the Bluetooth device is the test machine, no operation is performed. Step (4) The test tool sends HCI instructions to three Bluetooth devices respectively to read their Bluetooth addresses. The Bluetooth devices return their own Bluetooth addresses, which are used to establish a Bluetooth connection between the Bluetooth devices. Step (5) According to the test requirements, the test tool controls the test machine to actively connect to the master earphone, or controls the master earphone to actively connect to the test machine. The test machine and the master earphone establish a classic Bluetooth link. If the test machine actively connects to the master earphone, then in the Bluetooth network, the test machine acts as the Bluetooth master, and the master earphone acts as the Bluetooth slave. Subsequently, the TWS slave function is tested. If the master earphone actively connects to the test machine, then in the Bluetooth network, the test machine acts as the Bluetooth slave, and the master earphone acts as the Bluetooth master. Subsequently, the TWS master function is tested. Step (6) The test tool controls the slave earphone to monitor the data of the test machine, establishes a TWS connection topology. According to the test requirements, an SCO / eSCO connection is established between the test machine and the master earphone, or the sniff mode is entered. According to the TWS mode type, test type, test direction, and test steps in each direction, the test tool sends different test commands and test parameters to the platform under test, and the platform under test executes the corresponding test operations; Step (7) conducts TWS underlying hardware function tests; Step (8) conducts TWS protocol behavior tests; After step (9), when the TWS underlying hardware function test and / or the TWS protocol behavior test is completed, the platform under test reports the test results to the test tool; The test tool compares and analyzes the received test results with the expected test results to draw a conclusion on whether the test passes or fails; Step (10) The HCI data interaction during the entire test process, including the raw data of the test results and the analysis conclusion, is stored in the memory, and finally a test report is generated.
8. The method for verifying the Bluetooth TWS function in the verification test according to claim 7, wherein: The test results described in step (9) include the number of data packets sent and received during this test process, the number of data packets monitored by the secondary earphone, the integrity comparison result of the data received by the Bluetooth device and the raw data, the error situation during the data sending and receiving process, the quality of radio frequency sending and receiving, and the processing of the TWS application scenario by the upper layer protocol / Bluetooth firmware.
9. The method for verifying the Bluetooth TWS function in the verification test according to claim 7, characterized in that: The TWS connection topology described in step (6) is to establish a classic Bluetooth link between the test machine and the main earphone, a classic Bluetooth link between the main earphone and the secondary earphone, and a non-standard listening link between the secondary earphone and the test machine; The TWS mode type includes the TWS slave mode and the TWS master mode; The test type includes the TWS underlying hardware function test and the TWS protocol behavior test; The test direction includes ACL, eSCO, SCO, sniff, error; The test steps are the sending and receiving tests of specified data packet types, or the sending and receiving tests of random data packet types, or the handling of errors, or the data sending and receiving tests at the framing position during eSCO / sniff, or the test of the TWS function feature of the upper layer protocol / Bluetooth firmware.
10. The method for verifying the Bluetooth TWS function according to claim 7, characterized in that: In step (7), if a TWS underlying hardware function test is to be conducted, the test tool sends an instruction to the platform under test to pause all framing operations of the test platform, that is, to stop the link data transmission within all Bluetooth networks; The test tool generates random data and sends it to the test machine and the machine under test. This random data will be used as test data to be transmitted between Bluetooth devices and will also be used by the data receiving party as raw data for data integrity comparison; The platform under test restarts framing, only maintaining the link data transmission between the test machine and the main earphone, and the monitoring of the test machine by the secondary earphone, without resuming the link data transmission between the main earphone and the secondary earphone; The platform under test performs corresponding operations according to the test steps; In step (8), if a TWS protocol behavior test is to be conducted, the test is directly carried out according to the TWS application scenario set by the test script; The platform under test performs corresponding operations according to the test steps.
Citation Information
Patent Citations
Adaptive stereo system based on audio analysis
CN112153552A
Bluetooth communication method, TWS bluetooth headset, and terminal
WO2020249098A1