[go: up one dir, main page]

CN116131969B - Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function - Google Patents

Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function

Info

Publication number
CN116131969B
CN116131969B CN202310085764.4A CN202310085764A CN116131969B CN 116131969 B CN116131969 B CN 116131969B CN 202310085764 A CN202310085764 A CN 202310085764A CN 116131969 B CN116131969 B CN 116131969B
Authority
CN
China
Prior art keywords
test
bluetooth
tws
tested
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310085764.4A
Other languages
Chinese (zh)
Other versions
CN116131969A (en
Inventor
徐若佳
许伟明
周锦嵩
陈水秀
陈智德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Guoxin Microtechnology Co ltd
Guoxin Technology Guangzhou Co ltd
Original Assignee
Guangzhou Guoxin Microtechnology Co ltd
Guoxin Technology Guangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Guoxin Microtechnology Co ltd, Guoxin Technology Guangzhou Co ltd filed Critical Guangzhou Guoxin Microtechnology Co ltd
Priority to CN202310085764.4A priority Critical patent/CN116131969B/en
Publication of CN116131969A publication Critical patent/CN116131969A/en
Application granted granted Critical
Publication of CN116131969B publication Critical patent/CN116131969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种蓝牙TWS功能的验证测试平台及验证测试方法。本发明的蓝牙TWS功能的验证测试平台包括一台测试主机和一个或多个被测平台。每个被测平台包括一个测试机、两个被测机和三个USB转串口模块,每个USB转串口模块具备唯一的串口特征值。测试主机包括存储器、处理器、测试工具和硬件接口,内设测试脚本。测试机和被测机为蓝牙设备,测试机作为手机的角色,两个被测机分别作为左、右耳机的角色,其中一个作为主耳机,另一个作为副耳机,测试机和被测机具有搜索蓝牙设备、与其他蓝牙设备建立连接、数据传输的功能。本发明实现对蓝牙TWS功能的验证测试,简化了繁琐的人工测试流程,提高了测试效率,降低了测试成本。

The present invention discloses a verification test platform and a verification test method for Bluetooth TWS functions. The verification test platform for Bluetooth TWS functions of the present invention includes a test host and one or more tested platforms. Each tested platform includes a test machine, two tested machines and three USB-to-serial port modules, and each USB-to-serial port module has a unique serial port characteristic value. The test host includes a memory, a processor, a test tool and a hardware interface, and a built-in test script. The test machine and the tested machine are Bluetooth devices, the test machine acts as a mobile phone, and the two tested machines act as the left and right earphones respectively, one of which acts as the main earphone and the other as the auxiliary earphone. The test machine and the tested machine have the functions of searching for Bluetooth devices, establishing connections with other Bluetooth devices, and transmitting data. The present invention realizes verification testing of Bluetooth TWS functions, simplifies the tedious manual testing process, improves testing efficiency, and reduces testing costs.

Description

Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function
Technical Field
The invention belongs to the technical field of Bluetooth, and particularly relates to a verification test platform and a verification test method for a Bluetooth TWS (time varying signal) function, which are suitable for verification test of a Bluetooth TWS hardware function and a TWS protocol function.
Background
Bluetooth headset, namely the Bluetooth technology is applied to the headset for between earphone and the sound source equipment (usually possess bluetooth wireless communication function's such as cell-phone equipment), need not physical cable connection, can realize audio data's transmission.
The stereo Bluetooth earphone such as neck hanging type and head wearing type still has physical connection between the left earphone and the right earphone, and the flexibility and the convenience of the Bluetooth earphone are limited to a certain extent. The advent of TWS technology enabled Bluetooth handsets to implement true wireless stereo.
In order to realize the application of the TWS technology, chip manufacturers often need to carry out certain digital design modification on the Bluetooth baseband on the basis of the traditional Bluetooth chip, and meanwhile, corresponding algorithms are also needed to be added on software to realize the TWS function.
At present, the verification test of the Bluetooth TWS function is mainly performed by a manual test method. The method comprises the steps of simulating a target RTL code by a digital designer, verifying the feasibility of a designed module, running a designed TWS application program on Bluetooth equipment by a software designer, designating one platform as a main earphone, designating the other platform as an auxiliary earphone, setting a Bluetooth address of the other platform, and needing a mobile phone. When testing, the connection between the main earphone and the auxiliary earphone is established, and then the connection between the main earphone and the mobile phone is established, so that a TWS connection topology is formed, a tester needs to perform specific operation on the mobile phone, and whether the TWS application program runs normally is judged according to log printing of a hardware platform. Software and hardware designers may also be required to combine to test and analyze the problems existing in TWS software and hardware designs in cooperation with tools such as Bluetooth protocol analyzers, bluetooth comprehensive testers and the like. The whole test process is complex, the efficiency is low, the cost is high, the conventional manual test is not completely controllable, the coverage range of the test content is small, and the working condition of the chip digital logic design in the real environment can not be further verified.
Disclosure of Invention
The first object of the invention is to provide a verification test platform for Bluetooth TWS function.
The verification test platform for the Bluetooth TWS function comprises a test host and one or more tested platforms. Each tested platform comprises a testing machine, two tested machines and three USB-to-serial port modules, each USB-to-serial port module is provided with a unique serial port characteristic value, and the USB-to-serial port modules are mapped into designated equipment numbers through specific serial port characteristic values and are used for distinguishing connected Bluetooth equipment.
The test host comprises:
the memory is used for storing the test tool, log information output in the execution process of the test tool and test analysis results;
The processor is used for executing the testing tool and analyzing the testing result;
The testing tool is written by using the python language and is packaged into an executable file, and a pre-written testing script is selected by running the executable file on the processor to automatically complete the test;
The test tool comprises test scripts, wherein the test scripts are written and contained in engineering projects of the test tool before being packaged into executable files, the test scripts contain TWS function points to be tested, and corresponding code description is adopted for each test function point, and the code description is used for controlling the flow of the test;
And the hardware interface is used for connecting with external equipment.
The testing machine is a Bluetooth device, is used as a mobile phone, has the functions of searching the Bluetooth device, establishing connection with other Bluetooth devices and transmitting data, and is provided with a UART interface and a radio frequency module, wherein the testing machine is connected with one USB-to-serial port module through the UART interface, the USB-to-serial port module is connected with a processor of a testing host through a hardware interface, and the testing machine is used for receiving and transmitting radio frequency data through the radio frequency module and is used for establishing Bluetooth connection and interacting data between the Bluetooth devices.
The device to be tested is provided with a UART interface and a radio frequency module, the two test machines are respectively connected with the other two USB-to-serial port modules through the UART interface, the USB-to-serial port modules are connected with a processor of a test host through a hardware interface, the test machines are used for receiving and transmitting radio frequency data through the radio frequency module, and the device to be tested is used for establishing Bluetooth connection and interacting data between Bluetooth devices.
Furthermore, the tester is an FPGA development platform, a digital design file with a classical Bluetooth function is preloaded, the digital design file is used for describing the hardware function of the tester, and before testing, module design items are compiled and downloaded into the FPGA platform, so that the digital design file has the classical Bluetooth function.
Further, the testing machine is a development board with a Bluetooth chip, and the Bluetooth chip has a classical Bluetooth function.
Furthermore, the tested machine is an FPGA development platform, a digital design file with TWS hardware functions is preloaded, the digital design file is used for describing the hardware functions of the tested machine, and module design items are compiled and downloaded into the FPGA platform before testing, so that the tested machine has Bluetooth TWS functions.
Further, the tested machine is a development board with a Bluetooth chip, and the Bluetooth chip has a TWS hardware function.
Further, the testing tool and the tested platform carry out HCI instructions, event interaction and data transmission through the USB to serial port module.
It is another object of the present invention to provide a method for testing bluetooth TWS functions using the platform verification described above.
The method comprises the steps that (1) a processor executes a testing tool, one or more testing scripts to be executed are selected, the testing tool issues HCI instructions to a testing machine and a tested machine in a group of tested platforms, and the instructions are used for reading testing roles of Bluetooth equipment;
Step (2), after the testing machine and the tested machine receive the HCI instruction, analyzing the HCI instruction, executing corresponding operation, and sending an execution result to the testing tool in the form of an HCI event, wherein the execution result contains the role of the equipment itself, and indicates that the equipment is the testing machine or the tested machine;
step (3) if the Bluetooth device is a tested machine, the testing tool sends an HCI instruction for reading the TWS role to the Bluetooth device, and the Bluetooth device returns to the TWS role to indicate that the Bluetooth device is a main earphone or an auxiliary earphone;
Step (4), the testing tool respectively sends HCI instructions for reading Bluetooth addresses to three Bluetooth devices, and the Bluetooth devices return the Bluetooth addresses of the testing tool and are used for establishing Bluetooth connection between the Bluetooth devices;
Step (5), according to the test requirement, the test tool controls the test machine to be actively connected with the main earphone or controls the main earphone to be actively connected with the test machine, and the test machine and the main earphone establish a classical Bluetooth link;
If the testing machine is actively connected with the main earphone, the testing machine is used as a Bluetooth master in a Bluetooth network, the main earphone is used as a Bluetooth slave, and then the TWS slave function is tested;
if the main earphone is actively connected with the tester, the tester is used as a Bluetooth slave in a Bluetooth network, the main earphone is used as a Bluetooth master, and then TWS MASTER functions are tested;
step (6), the testing tool controls the auxiliary earphone to monitor the data of the testing machine, establishes TWS connection topology, establishes SCO/eSCO connection between the testing machine and the main earphone according to the testing requirement, or enters a sniff mode;
the TWS connection topology is that a classical Bluetooth link is established between a testing machine and a main earphone, a classical Bluetooth link is established between the main earphone and an auxiliary earphone, and a nonstandard monitoring link is established between the auxiliary earphone and the testing machine;
According to the TWS mode type, the test direction and the specific test details in each direction, the test tool issues different test commands and test parameters to the tested platform, and the tested platform executes corresponding test operation;
the TWS mode types comprise TWS slave mode and TWS MASTER mode;
the test type comprises TWS bottom hardware function test and TWS protocol behavior test;
the test direction comprises ACL, eSCO, SCO, sniff, error;
The specific test details are the receiving and transmitting test of the appointed data packet type, or the receiving and transmitting test of the random data packet type, or the processing of errors, or the data receiving and transmitting test of the specific frame arrangement position during eSCO/sniff, or the test of TWS function feature of the upper protocol/Bluetooth firmware;
step (7), if TWS bottom hardware function test is carried out, the test tool issues an instruction to the tested platform, and all frame arranging operations of the test platform are suspended, namely all link data transmission in the Bluetooth network is stopped;
Generating random data by a testing tool, and sending the random data to a testing machine and a tested machine, wherein the random data is used as the testing data to be transmitted between Bluetooth devices, and is used as the original data by a data receiver for data integrity comparison;
Restarting the frame arranging by the tested platform, only maintaining the link data transmission between the testing machine and the main earphone, and monitoring the testing machine by the auxiliary earphone, wherein the link data transmission between the main earphone and the auxiliary earphone is not restored;
The tested platform executes corresponding operation according to specific test details;
step (8), if TWS protocol behavior test is carried out, directly carrying out test according to TWS application scenes set by test scripts;
Step (9), after the TWS bottom hardware function test or/and TWS protocol behavior test is finished, the tested platform reports a test result to the test tool, wherein the test result comprises the number of data packet receiving and transmitting in the test process, the number of data packets monitored by the auxiliary earphone, the integrity comparison result of data received by the Bluetooth device and original data, error condition in the data receiving and transmitting process, radio frequency receiving and transmitting quality and the processing condition of the upper protocol/Bluetooth firmware on TWS application scene;
the test tool compares and analyzes the received test result with the expected test result to obtain a conclusion that the test passes/fails;
And (10) the HCI data interaction condition of the whole test process, which comprises the original data of the test result and the analysis conclusion, is stored in a memory, and finally a test report is generated.
The invention can realize verification test of the Bluetooth TWS function through simple hardware connection and flexible script configuration. The automatic test mode simplifies the complicated manual test flow, improves the test efficiency, and enables the research and development personnel to put more time and effort into other works. When the invention is used, the testing scene can be modified and combined according to the needs, the TWS function of the upper protocol/Bluetooth firmware can be tested more comprehensively and variously, and when the invention is used, expensive testing tools such as a Bluetooth protocol analyzer, a Bluetooth comprehensive tester and the like are not required to be matched, so that the testing cost can be reduced well.
Drawings
FIG. 1 is a schematic diagram of a verification test platform of the present invention;
fig. 2 is a schematic diagram of bluetooth device connection during the testing process of the present invention.
Detailed Description
As shown in fig. 1, a verification test platform for bluetooth TWS functions includes a test host 1 and one or more platforms under test. Each tested platform comprises a testing machine 2, two tested machines 3 and three USB-to-serial port modules 4, each USB-to-serial port module 4 is provided with a unique serial port characteristic value, and the USB-to-serial port modules are mapped into designated equipment numbers through specific serial port characteristic values and are used for distinguishing connected Bluetooth equipment.
(1) The test host 1 includes:
The memory 11 is used for storing the test tool, log information output in the execution process of the test tool and test analysis results;
a processor 12 for executing the test tool and analyzing the test results;
A test tool 13 written in python language and packaged into an executable file, and automatically completing the test by running the executable file on a processor, selecting a test script written in advance;
The test tool comprises test scripts, wherein the test scripts are written and contained in engineering projects of the test tool before being packaged into executable files, the test scripts contain TWS function points to be tested, and corresponding code description is adopted for each test function point, and the code description is used for controlling the flow of the test;
a hardware interface 14 for connecting to an external device, in particular a USB interface.
(2) The testing machine 2 is a Bluetooth device, is an FPGA development platform or a development board with a Bluetooth chip, and is provided with a UART interface 21 and a radio frequency module 22, the FPGA platform is preloaded with a digital design file with classical Bluetooth functions, the digital design file is used for describing hardware functions of the testing machine, module design items are compiled and downloaded into the FPGA platform before testing to enable the module design items to have classical Bluetooth functions, the Bluetooth chip has classical Bluetooth functions if the testing machine is the development board with the Bluetooth chip, the testing machine 2 is used as a mobile phone and has the functions of searching Bluetooth devices, establishing connection with other Bluetooth devices and transmitting data, the testing machine is provided with a UART interface 21 and a radio frequency module 22, the testing machine is connected with one USB-to-serial port module 4 through the UART interface 21, the USB-to-serial port module 4 is connected with a processor 12 of a testing host through the hardware interface 14, and the testing machine is used for receiving and transmitting radio frequency data through the radio frequency module 22 and establishing Bluetooth connection between the Bluetooth devices and exchanging data. During testing, firstly, a Bluetooth driving code with a classical Bluetooth function is downloaded to the testing machine 2 and used for controlling and using the classical Bluetooth hardware function.
(3) The tested machine 3 is a Bluetooth device, is an FPGA development platform or a development board with a Bluetooth chip, the FPGA platform is preloaded with a digital design file with TWS hardware functions if the FPGA development platform is used for describing the hardware functions of the tested machine, module design projects are compiled and downloaded into the FPGA platform before testing to enable the tested machine to have the Bluetooth TWS functions, the Bluetooth chip is provided with the TWS hardware functions if the development board with the Bluetooth chip is used for the development board, the two tested machines 3 respectively serve as left and right earphones, one serves as a main earphone, the other serves as a secondary earphone, the functions of searching Bluetooth devices, establishing connection and data transmission with other Bluetooth devices are achieved, the tested machine 3 is provided with a UART interface 31 and a radio frequency module 32, the two tested machines 3 are respectively connected with the other two USB serial port modules 4 through the UART interface 31, the USB serial port modules 4 are connected with a processor 12 of a testing host through the hardware interface 14, and the tested machine 3 realizes the receiving and transmitting of radio frequency data through the radio frequency module 32 for establishing Bluetooth connection and interaction data between the Bluetooth devices. In the test, firstly, the Bluetooth driving code with TWS function is downloaded to the tested machine 3 for controlling and using TWS hardware function.
As shown in fig. 2, the method for verifying and testing the bluetooth TWS function by using the platform specifically comprises the following steps:
Step (1) the processor 12 executes a test tool, selects one or more test scripts 14 to be executed, and the test tool issues HCI instructions to the test machines 2 and 3 in a set of platforms under test, the instructions being used to read the test roles of the bluetooth device.
And (2) after the testing machine 2 and the tested machine 3 receive the HCI instruction, analyzing the HCI instruction, executing corresponding operation, and sending an execution result to the testing tool in the form of an HCI event, wherein the execution result comprises the role of the equipment, and the role is indicated to be the testing machine or the tested machine.
And (3) if the Bluetooth device is a tested machine, the testing tool sends an HCI instruction for reading the TWS role to the Bluetooth device, the Bluetooth device returns to the TWS role to indicate that the Bluetooth device is a main earphone or an auxiliary earphone, and if the Bluetooth device is the testing machine, the testing tool does not operate.
And the testing tool and the tested platform carry out HCI instructions, event interaction and data transmission through the USB-to-serial port module.
And (4) the testing tool respectively sends HCI instructions for reading the Bluetooth addresses to the three Bluetooth devices, and the Bluetooth devices return the Bluetooth addresses of the testing tool and are used for establishing Bluetooth connection between the Bluetooth devices.
After the testing tool obtains the basic information of the Bluetooth device, the Bluetooth device does not need to search for other devices in the discovery environment, but controls the auxiliary earphone to be directly connected with the main earphone, so that the connection flow is simplified, and the testing time is saved.
Step (5), according to the test requirement, the test tool controls the test machine to be actively connected with the main earphone or controls the main earphone to be actively connected with the test machine, and the test machine and the main earphone establish a classical Bluetooth link;
If the testing machine is actively connected with the main earphone, the testing machine is used as a Bluetooth master in a Bluetooth network, the main earphone is used as a Bluetooth slave, and then the TWS slave function is tested;
if the main earphone is actively connected with the tester, the tester is used as Bluetooth slave in the Bluetooth network, the main earphone is used as Bluetooth master, and then TWS MASTER functions are tested.
Step (6), the testing tool controls the auxiliary earphone to monitor the data of the testing machine, establishes TWS connection topology, establishes SCO/eSCO connection between the testing machine and the main earphone according to the testing requirement, or enters a sniff mode;
the TWS connection topology is that a classical Bluetooth link is established between the testing machine and the main earphone, a classical Bluetooth link is established between the main earphone and the auxiliary earphone, and a nonstandard monitoring link is established between the auxiliary earphone and the testing machine.
According to the TWS mode type, the test direction and the specific test details in each direction, the test tool issues different test commands and test parameters to the tested platform, and the tested platform executes corresponding test operation.
The TWS mode types comprise TWS slave mode and TWS MASTER mode;
the test type comprises TWS bottom hardware function test and TWS protocol behavior test;
The test direction includes ACL, eSCO, SCO, sniff, error.
The specific test details are a transceiving test of a specified data packet type, a transceiving test of a random data packet type, a processing of errors (including but not limited to lt_addr error and crc error), a data transceiving test of a specific frame arrangement position (including but not limited to eSCO retransmission window arrangement frame and SNIFF ATTEMPT/timeout window arrangement frame) or a test of TWS function feature of upper layer protocol/Bluetooth firmware when eSCO/sniff is processed.
And (7) if the TWS bottom hardware function test is carried out, the test tool issues an instruction to the tested platform, and all frame arranging operations of the test platform are suspended, namely all link data transmission in the Bluetooth network is stopped.
Random data is generated by the testing tool and is sent to the testing machine and the tested machine, the random data is transmitted between Bluetooth devices as the testing data, and the random data is used as the original data by a data receiving party for data integrity comparison.
The tested platform restarts the frame arranging, only keeps the link data transmission between the testing machine and the main earphone, monitors the testing machine by the auxiliary earphone, and does not recover the link data transmission between the main earphone and the auxiliary earphone.
And the tested platform executes corresponding operation according to the specific test details.
And (8) if the TWS protocol behavior test is carried out, testing is directly carried out according to the TWS application scene set by the test script 14. And the tested platform executes corresponding operation according to the specific test details.
And (9) after the TWS bottom hardware function test or/and TWS protocol behavior test is finished, the tested platform reports the test result to the test tool.
The test result comprises the number of data packet receiving and transmitting in the test process, the number of data packets monitored by the auxiliary earphone, the integrity comparison result of the data received by the Bluetooth device and the original data, error conditions in the data receiving and transmitting process, the quality of radio frequency receiving and transmitting, and the processing condition of the upper protocol/Bluetooth firmware on TWS application scenes.
And the test tool compares and analyzes the received test result with the expected test result to obtain a conclusion that the test passes/fails.
And (10) the HCI data interaction condition of the whole test process, which comprises the original data of the test result and the analysis conclusion, is stored in a memory, and finally a test report is generated. The chip designer or software developer can further analyze, locate and solve the problems existing in the research and development process according to the test report.
The above embodiments are described in further detail below using a specific test scenario:
and executing the testing tool at the PC end, and selecting one testing case.
The testing tool reads the configuration information of the USB-to-serial port module, so that the testing tool can normally communicate with Bluetooth equipment.
The test tool reads the device address, test role and TWS role of the Bluetooth device.
The test equipment controls the secondary earpiece page master earpiece and then the tester page master earpiece, the tester becomes master in the piconet and the master earpiece becomes slave in the piconet.
The headset enters listening, forming the TWS connection topology shown in fig. 2.
The tester sends a request to enter the sniff mode to the main earphone, wherein the sniff parameter is attempt =3 and the timeout=2.
The tester and the master earphone enter the sniff mode and the slave earphone also starts to monitor the tester in the sniff mode.
Suspending all frame scheduling operations of the test platform, and stopping link data transmission in all piconets.
The test tool respectively sends random data packets and specific scenes of the sniff test to the Bluetooth device. The test scenario requires that the main and auxiliary earphones receive the data packet in the third attempt window of SNIFF INTERVAL, and receive the data packet in the second timeout window after the end of the attempt window, the main earphone replies the same data packet to the tester after receiving the data packet (the information carried by the data packet contains the case of TWS monitoring), and after 1000 pieces of SNIFF INTERVAL, the test case is ended, and the test result is sent to the test tool.
The tester sends the data packet in the third attempt window fixed at SNIFF INTERVAL and sends the data packet in the second timeout window after the end of the attempt window. After the testing machine sends out the data packet, the data packet replied by the main earphone is waited to be received, and the data packet is checked after the data packet is received. After 1000 SNIFF INTERVAL test cases are finished, the test results are sent to the test tool.
After the test tool receives the test result, comparing with the expected test result set in the test case, if the result accords with the expected one or the deviation from the expected one is in the set range, judging that the test is passed, otherwise, not passing.
After all the test cases are completed, a test report of the test is generated.

Claims (10)

1. The utility model provides a verification test platform of bluetooth TWS function which characterized in that:
each tested platform comprises a testing machine, two tested machines and three USB-to-serial port modules, wherein each USB-to-serial port module is provided with a unique serial port characteristic value, and the USB-to-serial port module is mapped into a designated equipment number through the serial port characteristic value and is used for distinguishing connected Bluetooth equipment;
The test host comprises:
the memory is used for storing the test tool, log information output in the execution process of the test tool and test analysis results;
The processor is used for executing the testing tool and analyzing the testing result;
The testing tool is written by using the python language and is packaged into an executable file, and a pre-written testing script is selected by running the executable file on the processor to automatically complete the test;
The test tool comprises test scripts, wherein the test scripts are written and contained in engineering projects of the test tool before being packaged into executable files, the test scripts contain TWS function points to be tested, and corresponding code description is adopted for each test function point, and the code description is used for controlling the flow of the test;
the hardware interface is used for connecting external equipment;
The testing machine is a Bluetooth device, is used as a mobile phone, has the functions of searching the Bluetooth device, establishing connection with other Bluetooth devices and transmitting data, is provided with a UART interface and a radio frequency module, is connected with one USB-to-serial port module through the UART interface, is connected with a processor of a testing host through a hardware interface, realizes the receiving and transmitting of radio frequency data through the radio frequency module, and is used for establishing Bluetooth connection and interacting data between the Bluetooth devices;
The device to be tested is provided with a UART interface and a radio frequency module, the two test machines are respectively connected with the other two USB-to-serial port modules through the UART interface, the USB-to-serial port modules are connected with a processor of a test host through a hardware interface, the test machines realize the receiving and transmitting of radio frequency data through the radio frequency module, and the device to be tested is used for establishing Bluetooth connection and interacting data between Bluetooth devices;
If TWS bottom hardware function test is carried out, the test tool issues an instruction to the tested platform, and all frame arranging operations of the test platform are suspended, namely all link data transmission in the Bluetooth network is stopped;
Generating random data by a testing tool, and sending the random data to a testing machine and a tested machine, wherein the random data is used as the testing data to be transmitted between Bluetooth devices, and is used as the original data by a data receiver for data integrity comparison;
Restarting the frame arranging by the tested platform, only maintaining the link data transmission between the testing machine and the main earphone, and monitoring the testing machine by the auxiliary earphone, wherein the link data transmission between the main earphone and the auxiliary earphone is not restored;
The tested platform executes corresponding operation according to the test steps;
If TWS protocol behavior test is carried out, the test is directly carried out according to TWS application scenes set by the test script, and the tested platform executes corresponding operation according to the test steps.
2. The test platform for verifying the Bluetooth TWS function according to claim 1, wherein the tester is an FPGA development platform, a digital design file with a classical Bluetooth function is preloaded, the digital design file is used for describing hardware functions of the tester, and module design items are compiled and downloaded into the FPGA platform before testing, so that the digital design file has the classical Bluetooth function.
3. The test platform for verifying the Bluetooth TWS function of claim 1, wherein the tester is a development board with a Bluetooth chip, and the Bluetooth chip has a classical Bluetooth function.
4. The verification test platform of the Bluetooth TWS function of claim 1, wherein the tested machine is an FPGA development platform, a digital design file with the TWS hardware function is preloaded, the digital design file is used for describing the hardware function of the tested machine, and before testing, module design items are compiled and downloaded into the FPGA platform to enable the module design items to have the Bluetooth TWS function.
5. The test platform for verifying the Bluetooth TWS function of claim 1, wherein the tested machine is a development board with a Bluetooth chip, and the Bluetooth chip has TWS hardware function.
6. The test platform for verifying the Bluetooth TWS function of claim 1, wherein the test tool and the tested platform perform HCI instructions, event interaction and data transmission through the USB-to-serial port module.
7. A method for testing bluetooth TWS functions using the platform of claim 1, 2, 3, 4, 5 or 6, characterized by:
The method comprises the steps that (1) a processor executes a testing tool, one or more testing scripts to be executed are selected, the testing tool issues HCI instructions to a testing machine and a tested machine in a group of tested platforms, and the instructions are used for reading testing roles of Bluetooth equipment;
Step (2), after the testing machine and the tested machine receive the HCI instruction, analyzing the HCI instruction, executing corresponding operation, and sending an execution result to the testing tool in the form of an HCI event, wherein the execution result contains the role of the equipment itself, and indicates that the equipment is the testing machine or the tested machine;
step (3) if the Bluetooth device is a tested machine, the testing tool sends an HCI instruction for reading the TWS role to the Bluetooth device, and the Bluetooth device returns to the TWS role to indicate that the Bluetooth device is a main earphone or an auxiliary earphone;
Step (4), the testing tool respectively sends HCI instructions for reading Bluetooth addresses to three Bluetooth devices, and the Bluetooth devices return the Bluetooth addresses of the testing tool and are used for establishing Bluetooth connection between the Bluetooth devices;
Step (5), according to the test requirement, the test tool controls the test machine to be actively connected with the main earphone or controls the main earphone to be actively connected with the test machine, and the test machine and the main earphone establish a classical Bluetooth link;
If the testing machine is actively connected with the main earphone, the testing machine is used as a Bluetooth master in a Bluetooth network, the main earphone is used as a Bluetooth slave, and then the TWS slave function is tested;
if the main earphone is actively connected with the tester, the tester is used as a Bluetooth slave in a Bluetooth network, the main earphone is used as a Bluetooth master, and then TWS MASTER functions are tested;
step (6), the testing tool controls the auxiliary earphone to monitor the data of the testing machine, establishes TWS connection topology, establishes SCO/eSCO connection between the testing machine and the main earphone according to the testing requirement, or enters a sniff mode;
According to the TWS mode type, the test direction and the test steps in each direction, the test tool issues different test commands and test parameters to the tested platform, and the tested platform executes corresponding test operation;
step (7) performing TWS bottom hardware function test;
Step (8) performing TWS protocol behavior test;
step (9), after the TWS bottom hardware function test or/and TWS protocol behavior test is finished, the tested platform reports a test result to the test tool;
the test tool compares and analyzes the received test result with the expected test result to obtain a conclusion that the test passes/fails;
And (10) the HCI data interaction condition of the whole test process, which comprises the original data of the test result and the analysis conclusion, is stored in a memory, and finally a test report is generated.
8. The method of verifying the function of the TWS of claim 7, wherein the test result in the step (9) includes the number of data packet transmissions and receptions in the current test process, the number of data packets monitored by the auxiliary earphone, the integrity comparison result of the data received by the Bluetooth device and the original data, the error condition in the data transmission and reception process, the quality of radio frequency transmission and reception, and the processing condition of the upper protocol/Bluetooth firmware on the TWS application scene.
9. The method of verifying the function of Bluetooth TWS of claim 7, wherein the TWS connection topology of step (6) is to establish a classical Bluetooth link between the tester and the master earphone, a classical Bluetooth link between the master earphone and the slave earphone, and a non-standard monitoring link between the slave earphone and the tester;
the TWS mode types comprise TWS slave mode and TWS MASTER mode;
the test type comprises TWS bottom hardware function test and TWS protocol behavior test;
the test direction comprises ACL, eSCO, SCO, sniff, error;
The test step is to send and receive test of appointed data packet type, or send and receive test of random data packet type, or process error, or data send and receive test of frame arranging position when eSCO/sniff, or test of TWS function feature of upper protocol/Bluetooth firmware.
10. The method of validating bluetooth TWS functions of claim 7, wherein:
step (7), if TWS bottom hardware function test is carried out, the test tool issues an instruction to the tested platform, and all frame arranging operations of the test platform are suspended, namely all link data transmission in the Bluetooth network is stopped;
Generating random data by a testing tool, and sending the random data to a testing machine and a tested machine, wherein the random data is used as the testing data to be transmitted between Bluetooth devices, and is used as the original data by a data receiver for data integrity comparison;
Restarting the frame arranging by the tested platform, only maintaining the link data transmission between the testing machine and the main earphone, and monitoring the testing machine by the auxiliary earphone, wherein the link data transmission between the main earphone and the auxiliary earphone is not restored;
The tested platform executes corresponding operation according to the test steps;
and (8) if TWS protocol behavior test is carried out, testing is directly carried out according to TWS application scenes set by the test script, and the tested platform executes corresponding operation according to the test step.
CN202310085764.4A 2023-01-16 2023-01-16 Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function Active CN116131969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310085764.4A CN116131969B (en) 2023-01-16 2023-01-16 Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310085764.4A CN116131969B (en) 2023-01-16 2023-01-16 Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function

Publications (2)

Publication Number Publication Date
CN116131969A CN116131969A (en) 2023-05-16
CN116131969B true CN116131969B (en) 2025-07-29

Family

ID=86300726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310085764.4A Active CN116131969B (en) 2023-01-16 2023-01-16 Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function

Country Status (1)

Country Link
CN (1) CN116131969B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020249098A1 (en) * 2019-06-14 2020-12-17 华为技术有限公司 Bluetooth communication method, tws bluetooth headset, and terminal
CN112153552A (en) * 2020-09-10 2020-12-29 海菲曼(天津)科技有限公司 Self-adaptive stereo system based on audio analysis

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513737A (en) * 2022-02-18 2022-05-17 通力科技股份有限公司 TWS headset testing system, method, device, and computer-readable storage medium
CN114640940B (en) * 2022-03-01 2023-05-16 深圳市百泰实业股份有限公司 Automatic intelligent TWS Bluetooth headset testing system
CN115550828B (en) * 2022-11-25 2023-04-04 杭州兆华电子股份有限公司 Construction method suitable for TWS Bluetooth headset adaptation test system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020249098A1 (en) * 2019-06-14 2020-12-17 华为技术有限公司 Bluetooth communication method, tws bluetooth headset, and terminal
CN112153552A (en) * 2020-09-10 2020-12-29 海菲曼(天津)科技有限公司 Self-adaptive stereo system based on audio analysis

Also Published As

Publication number Publication date
CN116131969A (en) 2023-05-16

Similar Documents

Publication Publication Date Title
WO2019090454A1 (en) Bluetooth test system and method
JP5485201B2 (en) Analysis device, acceptance test method, and acceptance test device
KR101084012B1 (en) Apparatus and method for determining voice and / or data processing performance of a wireless device
US20180368010A1 (en) Device-based diagnostic network testing
CN114390574B (en) Wireless network throughput test method, device and computer readable storage medium
KR20140106857A (en) Protocol conformity verification method, apparatus performing the same and systme performing the same
CN114257470A (en) Vehicle Bluetooth function test system and test method
US7623856B2 (en) Method for testing communication protocol having collection of internal information of a mobile communication terminal by an external module
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
CN112954575A (en) Wireless earphone fault detection method, fault detection equipment and wireless earphone
CN112333019A (en) Router configuration and test method and system and readable storage medium
CN116131969B (en) Verification test platform and verification test method for Bluetooth TWS (time and wavelength service) function
CN118283254B (en) Security camera function test system and method based on 4G network
EP1647156B1 (en) Radio device testing system
CN113938943B (en) Method, system, equipment and medium for testing coexistence performance of wireless communication
CN108009086A (en) System automation test method with function study is decomposed based on use-case
US12143833B2 (en) Method and system for post-construction check-out processing
CN113630802A (en) NR user plane service test method and device
CN114630343B (en) 5G access network test system and test method for multi-type terminals
CN115988524A (en) Network equipment compatibility testing method, device, equipment and storage medium
KR101497896B1 (en) method for automatically setting wireless cmmunication testing equipment with multi port
CN114630364B (en) Bluetooth communication detection method, device, terminal and medium
KR20150059673A (en) method for automatically obtaining mobile terminal information for wireless communication testing
CN111586732A (en) Terminal test method, terminal test device, test equipment and storage medium
CN110377463A (en) Interface test method, device, terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 510700 room 1109, 1110, No. 60, Kexue Avenue, Huangpu District, Guangzhou, Guangdong

Applicant after: Guangzhou Guoxin Microtechnology Co.,Ltd.

Address before: 510700 room 1109, 1110, No. 60, Kexue Avenue, Huangpu District, Guangzhou, Guangdong

Applicant before: Guoxin Technology (Guangzhou) Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant