A soft and hard combined bluetooth function test method and system

By employing a hardware-software integrated Bluetooth function testing method, and utilizing a test control module and auxiliary equipment to form a piconet, the problems of inaccurate device behavior judgment and fixed test platform in existing Bluetooth testing are solved. This achieves the accuracy and flexibility of multi-level testing and improves the user experience.

CN115694676BActive Publication Date: 2026-02-03SICHE TECH (CHONGQING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211376929.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-04
Publication Date
2026-02-03
Estimated Expiration
2042-11-04

AI Technical Summary

Technical Problem

Existing Bluetooth testing methods cannot comprehensively judge the correctness of device behavior, lack organic connections between devices, and the test platform is fixed and cannot be changed, making it difficult to quickly pinpoint the source of the problem.

Method used

A combined hardware and software testing approach is adopted. The test control module forms a piconet with the Bluetooth device under test and the auxiliary Bluetooth device. The verification unit extracts device information for logical mapping and comprehensive judgment. Multi-level testing is carried out by combining software and hardware.

Benefits of technology

It enables comprehensive behavior assessment of multiple Bluetooth devices, narrowing the scope of problem identification, improving the accuracy and flexibility of testing, dynamically adapting to different testing needs, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115694676B_ABST
    Figure CN115694676B_ABST
Patent Text Reader

Abstract

The application belongs to the field of Bluetooth communication, and particularly relates to a soft and hard combined Bluetooth function test method and system. The system comprises a test control module, a Bluetooth device under test, and one or more auxiliary Bluetooth devices. The test control module comprises a test script unit and a verification unit. The test script unit simulates an application program of the Bluetooth device under test, and interacts with a host of the Bluetooth device under test through a virtual serial port or a socket interface. The verification unit extracts information of the Bluetooth device under test and / or the auxiliary Bluetooth devices to verify the correctness of a flow, and is unidirectionally connected to the host of the Bluetooth device under test and / or the host of the auxiliary Bluetooth devices through the virtual serial port or the socket interface. The application takes multiple Bluetooth devices paired to form a piconet as test objects, and uses the auxiliary Bluetooth devices to help the Bluetooth device under test complete the function test, thereby improving the accuracy of test effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Bluetooth communication, specifically relating to a hardware and software combined Bluetooth function testing method and system. Background Technology

[0002] Bluetooth is a technology that uses low-power radio waves to transmit data between various consumer electronics (C) devices. Bluetooth operates in the globally common 2.4 GHz ISM (Industrial, Scientific, and Medical) band and uses the IEEE 802.15 protocol. As an emerging short-range wireless communication technology, Bluetooth is strongly driving the development of low-data-rate wireless personal area networks (WLANs).

[0003] Bluetooth device connections require pairing within a certain range. This pairing search is called Short Range Temporary Network (SLTN) mode, also known as a piconet, and can accommodate a maximum of eight devices. Once a Bluetooth device connection is successful, there is only one master device, but multiple slave devices can be connected. Bluetooth is a type of mobile communication, and traditional Bluetooth testing methods have the following characteristics:

[0004] Perform isolated end-device testing: that is, use a specific Bluetooth device as the test object;

[0005] Based on the Bluetooth device used as the test object, a black-box test was conducted on the entire device to observe whether its functional performance met expectations.

[0006] Based on the Bluetooth device used as the test object, pure software unit testing is performed. The input parameters of the function are entered, and the output is observed to see if it meets the expectations. This type of testing is usually called white-box testing.

[0007] Based on the Bluetooth device used as the test object, pure software subsystem testing is performed. According to the interface between the subsystem and the outside world, the input signal is observed through the interface, and whether the output of the interface meets the expectations. This type of testing is usually called gray box testing.

[0008] The shortcomings of existing technologies are mainly in the following aspects:

[0009] 1. When a Bluetooth device is tested in isolation, it is impossible to contact and refer to information from other paired Bluetooth devices to comprehensively judge the correctness of the device's behavior. Therefore, the judgment criteria for the test are inevitably relatively crude and one-sided.

[0010] 2. Black-box testing of Bluetooth devices is essentially a type of hardware testing. It only observes external behavior to determine whether it meets expectations. However, the granularity of the observed behavior is too high, making it difficult to quickly pinpoint the direction and scope of investigation once a problem is discovered.

[0011] 3. White-box unit testing of Bluetooth devices is actually a type of software unit testing. It can observe the behavior of the smallest unit of execution within a function, but it lacks organic connection with other parts.

[0012] 4. Subsystem testing of Bluetooth device gray boxes is actually a more granular unit test of software, but it also lacks organic connection with other modules related to the interface.

[0013] 5. Once the Bluetooth testing methods described in 2, 3, and 4 above are defined, the resulting test platform is fixed and cannot be changed. Summary of the Invention

[0014] To address the problems existing in the current technology, this invention provides a hardware and software integrated method and system for testing Bluetooth functionality.

[0015] In a first aspect, the present invention provides a hardware-software integrated Bluetooth function testing system, the system comprising a test control module, a Bluetooth device under test (DUT), and one or more auxiliary Bluetooth devices; the test control module comprising a test script unit and a verification unit; the test script unit simulating the application program of the DUT and interacting with the host of the DUT via a virtual serial port or socket interface; the verification unit extracting information from the DUT and / or the auxiliary Bluetooth devices to verify the correctness of the process, and unidirectionally connecting to the host of the DUT and / or the host of the auxiliary Bluetooth devices via the virtual serial port or socket interface.

[0016] In a second aspect, the present invention also provides a hardware-software combined Bluetooth function testing method, the method comprising:

[0017] The testing unit extracts the input and output parameters of the Bluetooth device under test and determines whether the output parameters conform to a predefined mapping relationship.

[0018] The verification module extracts the input and output signals of the test script unit, and determines whether the output signal and the internal key information are correct based on the internal correlation between the internal key information and the input and output signals.

[0019] The testing unit extracts the commands / events of the interaction between the host and controller of the Bluetooth device under test, and determines whether the testing process is correct based on the type of the command / event and the internal parameters.

[0020] The testing unit extracts the HCI interface information of the Bluetooth device under test and the auxiliary Bluetooth device, and determines whether the HCI interface information of the Bluetooth device under test is correct based on the correspondence between the Bluetooth device under test and the auxiliary Bluetooth device.

[0021] The beneficial effects of this invention are:

[0022] 1. This invention uses multiple Bluetooth devices that are paired to form a piconet as test objects, extracts information from multiple Bluetooth devices in the piconet, and performs logical mapping between the information of each Bluetooth device. It also uses other trusted auxiliary Bluetooth devices to comprehensively judge the correctness of the behavior of a certain Bluetooth device under test.

[0023] 2. When building the piconet multi-device testing system, this invention sets up the Bluetooth device under test and auxiliary Bluetooth devices (mature commercial devices) together. The processes of these auxiliary Bluetooth devices are always correct and reliable. In this way, when performing multi-device logic mapping through these reliable Bluetooth devices, the scope of judgment can be narrowed (if the information of the Bluetooth device under test and the information of the reliable Bluetooth devices are contradictory, it can be quickly determined that there is an anomaly in the corresponding process of the Bluetooth device under test).

[0024] 3. This invention logically divides the Bluetooth device under test into a test subsystem and an auxiliary subsystem. The auxiliary subsystem is programmed into hardware, while the test subsystem is built as a software project. The two are connected via a USB interface. This hardware-software combination allows observation of both the function-level and subsystem-level behavior within the test subsystem software, as well as the Bluetooth function-level behavior observed through the hardware.

[0025] 4. The hardware-software combined Bluetooth function testing method and system of the present invention can dynamically adjust the software-level modules triggered by the test script according to the requirements, and can also dynamically adjust the decision input information to be extracted, so as to dynamically adapt to the testing requirements of different software stages.

[0026] 5. In the application stage, the present invention can solidify the inspection unit of the test control module into the product, simplifying its function to: extract key abnormal information in the equipment to initiate background restart and recovery at different levels, thereby improving user satisfaction. Attached Figure Description

[0027] Figure 1 This is an architecture diagram of a hardware-software integrated Bluetooth function testing system according to an embodiment of the present invention;

[0028] Figure 2 This is a diagram of the architecture of the Bluetooth device under test according to an embodiment of the present invention;

[0029] Figure 3 This is an architecture diagram of an auxiliary Bluetooth device according to an embodiment of the present invention;

[0030] Figure 4 This is a flowchart of a hardware-software combined Bluetooth function testing method according to an embodiment of the present invention;

[0031] Figure 5 This is a flowchart of a hardware-software combined Bluetooth function testing method according to a preferred embodiment of the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] Figure 1 This is a hardware-software integrated Bluetooth function testing system according to an embodiment of the present invention, such as... Figure 1 As shown, the system includes a test control module, a Bluetooth device under test (BUT), and one or more auxiliary Bluetooth devices. The test control module includes a test script unit and a verification unit. The test script unit simulates the application program of the BUT and interacts with the host of the BUT via a virtual serial port or socket interface. The verification unit extracts information from the BUT and / or the auxiliary Bluetooth devices to verify the correctness of the process and connects unidirectionally to the host of the BUT and / or the host of the auxiliary Bluetooth devices via a virtual serial port or socket interface.

[0034] Understandably, this is for the sake of ease of display. Figure 1 The test system with only one auxiliary Bluetooth device is shown, which should not be construed as a limitation of the present invention. When there are multiple auxiliary Bluetooth devices, they can be connected to the inspection unit through their respective virtual serial ports or socket interfaces, so that the inspection unit can process the information of the auxiliary Bluetooth devices.

[0035] Figure 2 This is a diagram of the architecture of the Bluetooth device under test according to an embodiment of the present invention, such as... Figure 2 As shown, the Bluetooth device under test includes a test subsystem and an auxiliary subsystem; the test subsystem, as the host of the Bluetooth device under test, is built into the software system; the auxiliary subsystem, as the controller of the Bluetooth device under test, is programmed into the hardware system; the test subsystem and the auxiliary subsystem interact with each other through a USB interface.

[0036] It's understandable that Bluetooth devices, from a software perspective, can be divided into two main parts: the host and the controller. The Host Controller Interface (HCI) between the host and controller is a standard interface. Therefore, for example, if you want to verify the host's functionality, you would use a mature controller as a trusted object, i.e., as an auxiliary subsystem, and program it into the hardware; while the host would be used as a test subsystem, built as a software system. The software system and hardware would interact via a USB interface.

[0037] Figure 3 This is an auxiliary Bluetooth device architecture diagram according to an embodiment of the present invention, such as... Figure 3 As shown, the auxiliary Bluetooth device utilizes a human-machine interface and / or a general application to cooperate with the Bluetooth device under test to trigger behavior. For example, common general applications such as NFC Connect can be used to cooperate with behavior triggering. At the same time, the HCI interface information or other internal key information is extracted from the auxiliary Bluetooth device through the control switch (e.g., a mobile phone with Bluetooth function, which can open developer mode) and sent to the test control module, for example, to assist it in making judgments.

[0038] In this embodiment of the invention, the test script unit includes a first memory, a second memory, a test unit, and a control unit; the first memory stores initialization files for various Bluetooth functions, the second memory stores trigger script files for various Bluetooth functions, and the control unit is used to dynamically control one or more initialization files in the first memory and one or more trigger script files in the second memory according to the Bluetooth function to be tested; the test unit is used to test the Bluetooth function module of the Bluetooth device under test according to the initialization files and trigger script files of the control unit; wherein, the Bluetooth function module may include a GAP module, an L2CAP module, etc. in the host.

[0039] In this embodiment of the invention, the control unit includes dynamically triggering tests at different levels by dynamically triggering different trigger script files in the second memory; the tests at different levels include: function-level tests, module-level tests, subsystem-level tests, and system-level tests.

[0040] In this embodiment of the invention, the verification unit includes a function-level testing subunit, a module testing subunit, a subsystem testing subunit, and a system-wide testing subunit. The function-level testing subunit is used to test the correctness of the input / output mapping relationship at the function level. The module testing subunit is used to test whether the logical mapping between the module interface input signals and output signals and internal key information is correct. The subsystem testing subunit is used to test the logical mapping process between the subsystem interface input signals and output signals and internal key information. The system-wide testing subunit is used to test the correctness of the overall function of the Bluetooth device under test by detecting the HCI interface information of the Bluetooth device under test and / or the auxiliary Bluetooth device.

[0041] Figure 4 This is a hardware-software combined Bluetooth function testing method according to an embodiment of the present invention, such as... Figure 4 As shown, the method includes:

[0042] 101. The testing unit extracts the input and output parameters of the Bluetooth device under test and determines whether the output parameters conform to a predefined mapping relationship;

[0043] In this embodiment of the invention, the verification unit performs function-level testing on the Bluetooth device under test, extracts the input parameters and output parameters of a certain function in the Bluetooth device under test, and determines whether the output parameters conform to the predefined mapping relationship based on the predefined mapping relationship. If they conform to the predefined mapping relationship, the function-level test is passed; otherwise, the function-level test is failed.

[0044] 102. The verification module extracts the input and output signals of the test script unit, and determines whether the output signal and the internal key information are correct based on the internal correlation between the internal key information and the input and output signals.

[0045] In this embodiment of the invention, the testing unit performs module-level testing on the Bluetooth device under test. During the module-level testing phase, the function of the module under test in the Bluetooth device under test is first defined. The prerequisite information for the function of the module under test is determined as script initialization information. The initialization file for the corresponding function is retrieved from the first memory of the test script unit. The control unit of the test script unit uses the trigger script file in the second memory as the trigger signal, i.e., the input signal. The testing unit uses the input signal to test the Bluetooth function module of the Bluetooth device under test, extracting the output signal generated by the corresponding module under test. Combining this with the internal key information of the module under test at each stage of its function completion, and based on the mapping relationship between the output signal and the input signal, and the internal association between the internal key information and the input and output signals, the correctness of the output signal and the internal key information is determined. The correctness of the output signal and the internal key information is used to determine whether the module-level test has passed.

[0046] 103. The inspection unit extracts the commands / events of the interaction between the host and controller of the Bluetooth device under test, and determines whether the testing process is correct based on the type of command / event and the internal parameters.

[0047] In this embodiment of the invention, the detection unit performs subsystem testing on the Bluetooth device under test. During the subsystem testing phase, it is first necessary to extract the HCI interface information and the commands / events between the host and the controller from the Bluetooth device under test. Based on the type of the commands / events and their internal parameters, it is determined whether the detection process is correct.

[0048] 104. The testing unit extracts the HCI interface information of the Bluetooth device under test and the auxiliary Bluetooth device, and determines whether the HCI interface information of the Bluetooth device under test is correct based on the correspondence between the Bluetooth device under test and the auxiliary Bluetooth device.

[0049] In this embodiment of the invention, the detection unit performs a complete system test on the Bluetooth device under test. During the complete system test, the HCI interface information of the Bluetooth device under test and the HCI interface information of the auxiliary Bluetooth device are extracted. The HCI interface information of the two devices are combined, and the logical relationship between them is predefined. By using the HCI interface information of the auxiliary Bluetooth device and the predefined logical relationship, it is determined whether the HCI interface information of the Bluetooth device under test is correct. The complete system test is determined by judging whether the HCI interface information of the Bluetooth device under test and / or the auxiliary Bluetooth device is correct. If the HCI interface information is correct, it indicates that the complete system test has passed; otherwise, it indicates that the complete system test has failed.

[0050] Figure 5 This is a hardware-software combined Bluetooth function testing method according to an embodiment of the present invention, such as... Figure 5 As shown, the method includes:

[0051] 201. The testing unit extracts the input and output parameters of the Bluetooth device under test and determines whether the output parameters conform to the predefined mapping relationship;

[0052] 202. The verification module extracts the input and output signals of the test script unit, and determines whether the output signal and the internal key information are correct based on the internal correlation between the internal key information and the input and output signals.

[0053] 203. The inspection unit extracts the commands / events of the interaction between the host and controller of the Bluetooth device under test, and determines whether the testing process is correct based on the type of command / event and the internal parameters.

[0054] 204. The inspection unit extracts the HCI interface information of the Bluetooth device under test and the auxiliary Bluetooth device, and determines whether the HCI interface information of the Bluetooth device under test is correct based on the correspondence between the Bluetooth device under test and the auxiliary Bluetooth device.

[0055] 205. Extract internal key information from the test subsystem of the Bluetooth device under test, and comprehensively judge whether the output signal and the key information are correct, whether the detection process is correct, and whether the HCI interface information of the Bluetooth device under test is correct.

[0056] In this embodiment of the invention, an extended testing phase is added to the Bluetooth device under test. This extended testing phase can span the entire module testing, subsystem testing, and whole-device testing. Compared to protocol function conformance testing, which typically only covers basic mainstream functions, this invention can also extract some information to extend test cases and perform extended testing, thereby enhancing the coverage of software testing.

[0057] Specifically, based on the above embodiments, an additional process is added to extract some internal key information from the test subsystem of the Bluetooth device under test and make a comprehensive judgment. The key information includes, but is not limited to: local and peer addresses, the current GAP connection status, the currently started profile, and specific information of the profile of interest (e.g., in the HFP process, STATU represents the telephone phase).

[0058] In a preferred embodiment of the present invention, the inspection unit of the test control module can also be embedded in the product, simplifying its function to: extract key abnormal information from the device (e.g., whether a profile-level connection exists or a GAP-level connection exists. The profile-level connection is based on the GAP-level connection. Therefore, if the GAP connection does not exist, but the profile connection exists, an abnormality must have occurred), to initiate background restart and recovery at different levels, thereby improving user satisfaction.

[0059] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include ROM, RAM, disk, or optical disk, etc.

[0060] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A hardware-software integrated Bluetooth function testing system, characterized in that, The system includes a test control module, a Bluetooth device under test (BUT), and one or more auxiliary Bluetooth devices. The test control module includes a test script unit and a verification unit. The test script unit simulates the application program of the BUT and interacts with the host of the BUT via a virtual serial port or socket interface. The verification unit extracts information from the BUT and auxiliary Bluetooth devices to verify the correctness of the process and connects unidirectionally to the host of the BUT and the host of the auxiliary Bluetooth devices via a virtual serial port or socket interface. The testing unit includes a function-level testing subunit, a module testing subunit, a subsystem testing subunit, and a complete system testing subunit. The function-level testing subunit is used to test the correctness of the input / output mapping relationship at the function level. The module testing subunit is used to test whether the logical mapping between the module interface input signals and output signals and internal key information is correct. The subsystem testing subunit is used to test the logical mapping process between the subsystem interface input signals and output signals and internal key information. The complete system testing subunit is used to test the correctness of the overall function of the Bluetooth device under test by detecting the HCI interface information of the Bluetooth device under test and the auxiliary Bluetooth device.

2. The hardware-software integrated Bluetooth function testing system according to claim 1, characterized in that, The Bluetooth device under test includes a test subsystem and an auxiliary subsystem; the test subsystem, as the host of the Bluetooth device under test, is built into the software system; the auxiliary subsystem, as the controller of the Bluetooth device under test, is programmed into the hardware system; the test subsystem and the auxiliary subsystem interact with each other via a USB interface.

3. The hardware-software integrated Bluetooth function testing system according to claim 1, characterized in that, The auxiliary Bluetooth device utilizes a human-machine interface and / or a general application to interact with the Bluetooth device under test. The auxiliary Bluetooth device's behavior triggers the HCI interface information or other key internal information and transmits it to the test control module via its control switch to assist in the judgment.

4. The hardware-software integrated Bluetooth function testing system according to claim 1, characterized in that, The test script unit includes a first memory, a second memory, a test unit, and a control unit. The first memory stores initialization files for various Bluetooth functions, and the second memory stores trigger script files for various Bluetooth functions. The control unit is used to dynamically control one or more initialization files in the first memory and one or more trigger script files in the second memory according to the Bluetooth function to be tested. The test unit is used to test the Bluetooth function module of the Bluetooth device under test according to the initialization files and trigger script files of the control unit.

5. The hardware-software integrated Bluetooth function testing system according to claim 4, characterized in that, The control unit includes dynamically triggering different levels of tests by dynamically triggering different trigger script files in the second memory; The different levels of testing include: function-level testing, module-level testing, subsystem-level testing, and system-level testing.

6. A hardware-software integrated Bluetooth function testing method, characterized in that, The method includes: The verification unit extracts the input and output parameters of the Bluetooth device under test and determines whether the output parameters conform to a predefined mapping relationship; the verification unit extracts the input and output signals of the test script unit and determines whether the output signals and the internal key information are correct based on the internal correlation between the internal key information and the input and output signals. The verification unit extracts the input and output signals of the test script unit. Based on the internal correlation between the internal key information and the input and output signals, it determines whether the output signal and the internal key information are correct. This includes obtaining the initialization text and trigger script file from the test script unit, using the trigger script text as the input signal to extract the output signal, and combining the internal key information of each internal stage. Based on the mapping relationship between the input and output signals, and the internal correlation between the internal key information and the input and output signals respectively, it determines whether the output signal and the internal key information are correct. The testing unit extracts the commands / events of the interaction between the host and controller of the Bluetooth device under test, and determines whether the testing process is correct based on the type of the command / event and the internal parameters. The testing unit extracts the HCI interface information of the Bluetooth device under test and the auxiliary Bluetooth device, and determines whether the HCI interface information of the Bluetooth device under test is correct based on the correspondence between the Bluetooth device under test and the auxiliary Bluetooth device.

7. The hardware-software combined Bluetooth function testing method according to claim 6, characterized in that, The method further includes extracting internal key information from the test subsystem of the Bluetooth device under test, and comprehensively judging whether the output signal and the key information are correct, whether the detection process is correct, and whether the HCI interface information of the Bluetooth device under test is correct.

8. A hardware-software integrated Bluetooth function testing method according to claim 6 or 7, characterized in that, The key internal information includes the local and peer addresses of the Bluetooth device, the current GAP connection status, the currently running profile, and specific information about the profiles of interest.

Citation Information

Patent Citations

  • A Bluetooth device testing method and a system

    CN109041023A