Bluetooth test method, test device, test equipment and storage medium

Connect to Bluetooth through serial communication, send test files and receive feedback data, and automatically detect Bluetooth, solving the problem of existing Bluetooth testing that consumes a lot of manpower and low efficiency, and achieving efficient and accurate automated detection.

CN119109528APending Publication Date: 2024-12-10SHENZHEN H&T INTELLIGENT CONTROL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411138418.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Existing Bluetooth tests require manual editing of sending data and verifying received data, which consumes a lot of manpower, is inefficient and error-prone.

Method used

Provide a Bluetooth testing method, which connects the Bluetooth to be tested through serial communication, sends test files and receives feedback data, and automatically determines the test results based on the feedback data, and realizes automatic detection of the first Bluetooth and the second Bluetooth.

Benefits of technology

No manual editing and verification of data is required, which significantly saves manpower, improves detection efficiency and accuracy, and simplifies the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109528A_ABST
    Figure CN119109528A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of automatic testing of Bluetooth, and discloses a Bluetooth testing method which is applied to testing equipment, the testing equipment is in communication connection with a to-be-tested Bluetooth pair through a serial port, the to-be-tested Bluetooth pair comprises first Bluetooth and second Bluetooth, and the method comprises the following steps: acquiring a testing file; sending a test file to the to-be-tested Bluetooth pair in response to an operation of indicating to start a test; receiving feedback data sent by the to-be-tested Bluetooth pair, and determining a test result based on the feedback data; wherein the feedback data is data output after the to-be-tested Bluetooth pair executes the instruction in the test file. According to the method, automatic testing of the first Bluetooth and the second Bluetooth is achieved by importing the test file corresponding to the test item, manual data editing and data verification are not needed, and manpower and time are effectively saved; the test device performs verification analysis according to the received feedback data to obtain the test result, and compared with manual inspection, the accuracy of the test result can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of testing technology, and in particular to a Bluetooth testing method, a testing apparatus, a testing device, and a storage medium. Background Art

[0002] With the development of wireless communication technology, wireless communication technologies such as Bluetooth are being used more and more widely. For example, Bluetooth is used in Internet of Things products (i.e., IOT products) in the fields of smart home, security, and portable wearables. In IOT products, the microcontroller unit (MCU) and Bluetooth are mostly connected through serial port communication.

[0003] Before Bluetooth is applied to IoT products, it is necessary to test the wireless transceiver function and other functions of Bluetooth. At present, common Bluetooth tests require manual editing of the sent data and verification of the received data, and a Bluetooth test requires a lot of manpower. Summary of the invention

[0004] The main technical problem solved by the embodiments of the present application is how to realize automated testing of Bluetooth.

[0005] To solve the above technical problems, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a Bluetooth testing method, which is applied to a testing device, wherein the testing device is connected to a Bluetooth pair to be tested via a serial port communication, and the Bluetooth pair to be tested includes a first Bluetooth and a second Bluetooth, and the method includes:

[0007] Get the test file;

[0008] In response to an operation indicating to start a test, sending a test file to the Bluetooth pair to be tested;

[0009] Receive feedback data sent by the Bluetooth pair to be tested, and determine the test result based on the feedback data; wherein the feedback data is the data output after the Bluetooth pair to be tested executes the instructions in the test file.

[0010] In some embodiments, the test file includes an instruction set file, and sending the test file to the Bluetooth pair to be tested includes:

[0011] Sending the instruction set in the instruction set file to the first Bluetooth and the second Bluetooth respectively;

[0012] The feedback data includes first feedback data output after the first Bluetooth executes the instruction set and second feedback data output after the second Bluetooth executes the instruction set; and determining the test result based on the feedback data includes:

[0013] Compare the first feedback data with the preset rules to determine the first Bluetooth instruction test result;

[0014] The second feedback data is compared with the preset rule to determine the second Bluetooth instruction test result.

[0015] In some embodiments, the test file includes a transparent transmission file, and the transparent transmission file includes transparent transmission data, transparent transmission instructions, and communication connection instructions; sending the test file to the Bluetooth pair to be tested includes:

[0016] Acquire a protocol file, and determine, according to the protocol file, that one of the first Bluetooth and the second Bluetooth is a master Bluetooth and the other is a slave Bluetooth;

[0017] Send a communication connection instruction and a transparent transmission instruction to the master Bluetooth, so that the master Bluetooth establishes a Bluetooth communication connection with the slave Bluetooth after executing the communication connection instruction, and the master Bluetooth and the slave Bluetooth enter the transparent transmission mode after executing the transparent transmission instruction;

[0018] Send transparent data to the master Bluetooth, so that the master Bluetooth sends the transparent data to the slave Bluetooth, and the slave Bluetooth feeds back the transparent data to the test device;

[0019] The feedback data includes transparent transmission data fed back from Bluetooth;

[0020] Determine test results based on feedback data, including:

[0021] The transparent transmission data fed back by the slave Bluetooth is compared with the transparent transmission data sent to the master Bluetooth to determine the transparent transmission test result of the Bluetooth pair to be tested.

[0022] In some embodiments, the test file includes a firmware upgrade file, the firmware upgrade file includes firmware upgrade data and communication connection instructions, and sending the test file to the Bluetooth pair to be tested includes:

[0023] Acquire a protocol file, and determine, according to the protocol file, that one of the first Bluetooth and the second Bluetooth is a master Bluetooth and the other is a slave Bluetooth;

[0024] Sending a communication connection instruction to the master Bluetooth, so that the master Bluetooth executes the communication connection instruction and establishes a Bluetooth communication connection with the slave Bluetooth;

[0025] Sending firmware upgrade data to the master Bluetooth, so that the master Bluetooth sends the firmware upgrade data to the slave Bluetooth, the master Bluetooth and the slave Bluetooth respectively use the firmware upgrade data for upgrading, and feedback the firmware version information to the test device;

[0026] The feedback data includes the first firmware version information fed back by the master Bluetooth and the second firmware version information fed back by the slave Bluetooth;

[0027] Determine test results based on feedback data, including:

[0028] Determine the firmware upgrade test result of the master Bluetooth according to the first firmware version information;

[0029] According to the second firmware version information, a firmware upgrade test result from Bluetooth is determined.

[0030] In some embodiments, obtaining a test file includes:

[0031] Displaying a first interface, the first interface including a file import control;

[0032] In response to an operation on a file import control, displaying a file list;

[0033] In response to an operation of selecting a file from the file list, a test file is acquired.

[0034] In some embodiments, the first interface further includes a test parameter configuration window, the test parameter configuration window including test item options;

[0035] The method also includes:

[0036] In response to the operation of configuring the test parameters, determining the test items;

[0037] Get the test files, including:

[0038] Get the test file corresponding to the test project.

[0039] In some embodiments, the method further comprises:

[0040] Save test results and feedback data as log files.

[0041] In a second aspect, an embodiment of the present application provides a testing device, which includes:

[0042] A communication module, configured to send a test file to the Bluetooth pair to be tested in response to an operation indicating starting the test; and receive feedback data sent by the Bluetooth pair to be tested;

[0043] The analysis module is used to determine the test result based on the feedback data; wherein the feedback data is the data output after the Bluetooth pair to be tested executes the instructions in the test file.

[0044] The test apparatus, when in use, is capable of performing the method of the first aspect.

[0045] In a third aspect, an embodiment of the present application provides a testing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method of the first aspect can be implemented when the processor executes the computer program.

[0046] To solve the above technical problems, in a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method of the first aspect can be implemented.

[0047] Beneficial effects of the embodiments of the present application: Different from the prior art, the embodiments of the present application provide a Bluetooth test method, which is applied to a test device, the test device is connected to the Bluetooth pair to be tested through serial communication, the Bluetooth pair to be tested includes a first Bluetooth and a second Bluetooth, the method includes: obtaining a test file; in response to an operation indicating to start the test, sending the test file to the Bluetooth pair to be tested; receiving feedback data sent by the Bluetooth pair to be tested, and determining the test result based on the feedback data; wherein the feedback data is the data output after the Bluetooth pair to be tested executes the instructions in the test file. In the above embodiment, it is only necessary to import the test file corresponding to the test item to automatically detect the first Bluetooth and the second Bluetooth. On the one hand, there is no need to manually edit the sending data and verify the receiving data, which can effectively save manpower; on the other hand, the two Bluetooths are detected at the same time, which can effectively improve the detection efficiency. In addition, the test device determines the test result based on the feedback data analysis, which can improve the accuracy of the test result compared with manual inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0049] Figure 1 A schematic diagram of a Bluetooth hardware structure provided in one embodiment of the present application;

[0050] Figure 2 A data display interface of a conventional Bluetooth test device provided in one embodiment of the present application;

[0051] Figure 3 A schematic diagram of an application environment of a Bluetooth testing method provided in some embodiments of the present application;

[0052] Figure 4 A schematic diagram of the structure of a Bluetooth test device provided in some embodiments of the present application;

[0053] Figure 5 A schematic diagram of a Bluetooth test process provided in some embodiments of the present application;

[0054] Figure 6 A window interface diagram of a Bluetooth test device provided in some embodiments of the present application;

[0055] Figure 7 A schematic diagram of the log file content of a Bluetooth testing device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0056] The present application is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements can also be made without departing from the concept of the present application. These all belong to the protection scope of the present application.

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. In addition, the words "first", "second", "third", etc. used herein do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0059] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.

[0060] In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0061] Bluetooth, also known as a Bluetooth chip, is an integrated circuit that can achieve wireless communication connections. In some embodiments, such as Figure 1 As shown, the Bluetooth 100 includes a radio frequency transceiver 101, a digital signal processor (DSP) 102, a micro control unit (MCU) 103, a memory 104, a timer 105, an antenna interface 106, a serial port 107, and the like.

[0062] Among them, the radio frequency transceiver 101 is used to send and receive radio signals; the digital signal processor 102 is used to process digital signal processing tasks in the Bluetooth protocol stack; the micro control unit 103 is used to manage the operation of Bluetooth, and the memory 104 is used to store the Bluetooth protocol stack, firmware, configuration data and temporary data; the timer 105 is used for timing and synchronization operations; the antenna interface 106 is used to connect an external antenna; and the serial port 107 is used to communicate with other chips or devices. In some examples, the serial port 107 can be a UART interface, an IIC interface, an SPI interface, a CAN interface, or a USB interface.

[0063] Bluetooth 100 is widely used in Internet of Things products (i.e., IOT products) in the fields of smart home, security, and portable wearables. Before Bluetooth 100 is applied to IOT products, it is necessary to test the wireless transceiver function of Bluetooth 100 and its serial port 107. Most of the Bluetooth testing methods known to the inventor of this application use open test equipment to realize the customized transmission of data serial ports, and automatically print the data received by the serial port 107 to the computer. Figure 2 The data display area of ​​the test equipment shown in the figure. However, in this test process, it is necessary to manually edit the content of the sent data and manually verify the received data, which often requires a lot of manpower.

[0064] Based on the above technical problems, some embodiments of the present application provide a Bluetooth testing method, which can realize automated testing for Bluetooth, effectively improve testing efficiency and save labor costs.

[0065] See also Figure 3 , Figure 3 Schematic diagram of the application environment of the Bluetooth test method provided in the embodiment of the present application. Figure 3 As shown, the test device 200 is provided with at least two physical serial ports (COM, serial communication port). Exemplarily, the physical serial port can be a universal serial bus (USB) interface. The test device 200 is connected to the Bluetooth pair to be tested by wired communication through the physical serial port. The Bluetooth pair to be tested includes a first Bluetooth 100a and a second Bluetooth 100b.

[0066] It can be understood that the first Bluetooth 100a and the second Bluetooth 100b are both two Bluetooths waiting to be tested, wherein the first and the second are only used to distinguish two different Bluetooths and do not impose any limitation on Bluetooth.

[0067] Among them, the test equipment 200 can send instructions to at least one of the first Bluetooth 100a and the second Bluetooth 100b, control the establishment of a Bluetooth connection between the first Bluetooth 100a and the second Bluetooth 100b, and control the data interaction between the first Bluetooth 100a and the second Bluetooth 100b, so as to realize the test of the first Bluetooth 100a and the second Bluetooth 100b.

[0068] During the test process, the test device 200 acts as a control terminal to control the test of the Bluetooth pair (100a, 100b) to be tested. The test device 200 may be a computing terminal, such as a computer, a smart phone, or a tablet computer.

[0069] See also Figure 4 The test device 200 includes a processor 201 and a memory 202 connected in communication. Here, the communication connection can be connected via a bus. Figure 4 The bus connection is used as an example. It can be understood that Figure 4 The test device 200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0070] Wherein, the processor 201 is configured to support the test device 200 to execute the corresponding functions in the Bluetooth test method. The processor 201 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above-mentioned hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a general array logic (GAL) or any combination thereof.

[0071] The memory 202 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the Bluetooth test method in the embodiment of the present application. The processor 201 can implement the Bluetooth test method in any of the following method embodiments by running the non-transient software programs, instructions and modules stored in the memory 202.

[0072] The memory 202 may include a volatile memory (VM), such as a random access memory (RAM); the memory 202 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 202 may also include a combination of the above types of memory.

[0073] It is understandable that the test equipment 200 also includes other hardware and software that support operation. The hardware may include a display, various sensors, an input device, etc. Among them, the input device may include a keyboard or a mouse, etc. The software may include an operating system, etc., and the operating system is a program that manages and controls the hardware and software resources of the test equipment. The software may also include various application programs (app li cat i on, app). Here, the other parts of the improved test equipment that are not related to the embodiment of the present application are no longer described. It is worth noting that in the embodiment of the present application, the form of the test equipment is not restricted in any way, and it is sufficient to have at least two physical serial ports and computing processing capabilities.

[0074] The following is a detailed description of the Bluetooth testing method provided by the embodiment of the present invention, based on the exemplary application and implementation of the testing device provided by the embodiment of the present application. Figure 5 , the method S100 includes but is not limited to the following steps:

[0075] S10: Get a test file.

[0076] The test file records the data and / or instructions required to complete the test. Specifically, the test file can be set according to the functional items to be tested.

[0077] Exemplarily, when testing the function of executing a Bluetooth instruction, the test file includes an instruction set file, wherein the instruction set file records an instruction set including a plurality of instructions.

[0078] Exemplarily, when testing the function of transparent transmission of Bluetooth data, the test file includes a transparent transmission file. The transparent transmission file records transparent transmission data, transparent transmission instructions, and communication connection instructions. It can be understood that transparent transmission data refers to data to be transmitted, and the transparent transmission data can be any string or value, etc. The transparent transmission instruction is an instruction to instruct data transparent transmission, and the communication connection instruction is an instruction to instruct Bluetooth pairing to achieve communication connection.

[0079] Exemplarily, when testing the function of Bluetooth firmware upgrade, the test file includes a firmware upgrade file. The firmware upgrade file includes firmware upgrade data and a communication connection instruction. It is understandable that the firmware upgrade data is used to upgrade the firmware in the Bluetooth memory. The communication connection instruction is an instruction to instruct Bluetooth pairing to achieve communication connection.

[0080] It can be seen that, based on the fact that the test file records the data and / or instructions required for the test, the pre-edited test file is imported into the memory of the test device, and the processor of the test device can call and obtain the test file multiple times to complete multiple tests for multiple Bluetooth. That is, during each test, there is no need for manual editing of the test data and no need for manual operation in the subsequent test process, which can effectively save manpower and improve test efficiency.

[0081] In some embodiments, the above step S10 specifically includes:

[0082] S11: Displaying a first interface, where the first interface includes a file import control.

[0083] S12: In response to the operation on the file import control, display a file list.

[0084] S13: In response to the operation of selecting a file from the file list, a test file is obtained.

[0085] The first interface is a window interface displayed by the test device. It can be understood that the test device is loaded with test software related to the test method, and the first interface can be the main interface or sub-interface of the test software. Figure 6 As shown, the first interface 6 includes a file import window 6a, and the file import window includes a file import control 6b. Exemplarily, the operator clicks a file import control with a mouse, and the processor of the test device responds to the click operation on the file import control and controls the display to display a list of files under a predetermined address path. The operator selects a file in the file list by clicking the mouse, and the processor of the test device responds to the operation of selecting the file, so that the processor obtains the test file.

[0086] In this embodiment, the operator clicks the file import control, and the test device displays a list of files under the predetermined address path for the operator to select. After the operator selects the file, the processor can obtain the test file. Compared with the operator selecting the file from the folder and importing it by dragging, the above method can effectively control the file, facilitate space cleaning and file addition. In addition, simplifying the operation is conducive to improving test efficiency.

[0087] In some embodiments, Figure 6 As shown, the first interface also includes a test parameter configuration window 6c, and the test parameter configuration window includes test item options.

[0088] The parameter configuration window is provided by the test equipment to the operator to customize the test content to be performed. Figure 6 As shown, the parameter configuration window 6c includes not only input boxes such as the number of tests and the data transmission interval, but also test item options such as "AT command test", "transparent data test" and "OTA upgrade test".

[0089] In some embodiments, the method further comprises:

[0090] S14: In response to the operation of configuring the test parameters, determine the test items.

[0091] The operation of configuring the test parameters includes checking the test item options and / or inputting the test or data transmission interval. After the operator performs these operations, the processor of the test equipment can respond to these operations and determine the test items.

[0092] In some embodiments, the test item options selected by the operator include single test items and multiple test items, that is, the operator can select at least one item at a time. If the test item selected by the operator through the parameter configuration window of the first interface is a single item, the test item is executed; if the test item selected by the operator through the parameter configuration window of the first interface is multiple items, the selected test items are executed in sequence.

[0093] Through the test parameter configuration window provided by the above-mentioned test equipment, the operator can configure the test parameters according to his own needs, and conduct tests by configuring different test parameter combinations to obtain different test results, which is convenient for comprehensive evaluation of the wireless transceiver function, performance and stability of the Bluetooth pair to be tested.

[0094] In this embodiment, the aforementioned step S10 specifically includes:

[0095] S15: Obtain the test file corresponding to the test item.

[0096] The processor of the test device obtains the corresponding test file according to the determined test items.

[0097] Exemplarily, if the test item includes "AT command test", the test file includes an instruction set file. For example, the instruction set file includes multiple AT commands. These AT commands can be used to query device information, set Bluetooth name, pairing password, transmission power, connection mode, etc.

[0098] Exemplarily, if the test item includes "transparent transmission function test", the test file includes a transparent transmission file. The transparent transmission file records transparent transmission data, transparent transmission instructions and communication connection instructions. Among them, transparent transmission data refers to the data to be transmitted, and the transparent transmission data may include Arabic numerals, uppercase and lowercase English letters or special characters. The transparent transmission instruction is an instruction to instruct data transparent transmission, and the communication connection instruction is an instruction to instruct Bluetooth pairing to achieve communication connection.

[0099] Exemplarily, the test items include "OTA upgrade test", i.e., wireless remote (over the ai r, OTA) firmware upgrade test. The test file includes a firmware upgrade file. The firmware upgrade file includes firmware upgrade data and communication connection instructions. It can be understood that the firmware upgrade data is used to upgrade the firmware in the Bluetooth memory. The communication connection instruction is an instruction to instruct Bluetooth pairing to achieve communication connection.

[0100] It is understandable that the test items checked by the operator can be single or multiple. Therefore, after the test equipment determines the test items based on the operator's settings, it imports one or more test files. When the file is imported, the test equipment verifies the content or file name of the imported test file according to the predetermined verification rules. For example, if the operator clicks on the "AT command file import control" in the first interface to import the test file, the test equipment performs a content search on the imported test file to retrieve whether it is named with AT at the beginning. For another example, if the operator clicks on the "OTA upgrade file import control" in the first interface to import the test file, the test equipment performs a content search on the imported test file to retrieve whether it is all binary content; or, the test equipment performs a file name check on the imported test file to check whether its suffix format is .bin, .hex, .hexf or .zip, etc.

[0101] If the test file import control clicked by the operator is different from the test file actually imported, for example, if the operator clicks the "AT command file import control" but selects the transparent file for import, the test device cannot import the test file selected by the operator and outputs an error. If the test item checked by the operator is inconsistent with the test file actually imported, for example, the operator checked the "AT command test" but imported the transparent file through the "transparent file import control", the test tool searches and imports the test file to be imported according to the predetermined address path and the predetermined verification rules. If the test device cannot find the required test file at the predetermined address path, the test cannot start and an error is output.

[0102] In this embodiment, the test device verifies the file content of the imported test file to avoid the operator being unable to conduct the test due to problems with file import when using the test device. At the same time, the test device self-searches the test files required for the operator to check the test items, which can facilitate the retrieval and import of files under the preset address path when the required test files are missing, and execute the test items checked by the user.

[0103] S20: In response to the operation of instructing to start the test, sending a test file to the Bluetooth pair to be tested.

[0104] Please continue reading Figure 6 , the first interface includes a "start / stop test" control 6e. Before the test starts, the operator clicks the "start / stop test" control 6e with a mouse, and the processor responds to the operation, starts the test, and sends the test file to the Bluetooth pair to be tested. That is, the test device responds to the operation of instructing to start the test and sends the test file to the Bluetooth pair to be tested (including the first Bluetooth and the second Bluetooth).

[0105] S30: receiving feedback data sent by the Bluetooth pair to be tested, and determining a test result based on the feedback data; wherein the feedback data is data outputted after the Bluetooth pair to be tested executes instructions in the test file.

[0106] It is understandable that after receiving the test file, the Bluetooth pair to be tested executes the instructions in the test file and sends feedback data to the test device. Thus, the test device receives the feedback data and determines the test result according to the feedback data.

[0107] It is understandable that the test results have a corresponding relationship with the test files and test items, and different test items correspond to different test files and test results. Detailed description is given below.

[0108] In some embodiments, the test item includes "AT command test", and the test file includes an instruction set file. Exemplarily, the instruction set file includes multiple AT commands.

[0109] In this embodiment, the above step S20 specifically includes:

[0110] S21: Send the instruction set in the instruction set file to the first Bluetooth and the second Bluetooth respectively.

[0111] The first Bluetooth and the second Bluetooth are connected to the test device via a serial port. Figure 6 The first interface 6 includes a serial port configuration area 6d, which includes a variety of basic serial port setting parameters, such as serial port number, baud rate and check bit, etc. The operator can set the serial port communication between the first Bluetooth and the second Bluetooth and the test device respectively in the window configuration area 6d. The test device sends the instruction set in the instruction set file to the first Bluetooth and the second Bluetooth respectively through the serial port.

[0112] It can be understood that after receiving the instruction set, the first Bluetooth executes the instructions in the instruction set, outputs the first feedback data, and sends the first feedback data to the test device through the serial port. After receiving the instruction set, the second Bluetooth executes the instructions in the instruction set, outputs the second feedback data, and sends the second feedback data to the test device through the serial port. In this embodiment, the feedback data includes the first feedback data output after the first Bluetooth executes the instruction set and the second feedback data output after the second Bluetooth executes the instruction set.

[0113] In this embodiment, the aforementioned step S30 specifically includes:

[0114] S31: Compare the first feedback data with a preset rule to determine a first Bluetooth instruction test result.

[0115] The preset rules include a predetermined data format and / or a predetermined return command. For example, if the AT command sent by the test device is AT+CK?, then under normal circumstances, the feedback data received by the test device should be a MAC address of 12 bytes or more; for another example, if the AT command sent by the test device is AT+?, then under normal circumstances, the feedback data received by the test device is an OK command.

[0116] Thus, the preset rule can be set in advance based on multiple AT commands in the command set. The first feedback data is compared with the preset rule. If the data format and / or return command in the first feedback data conforms to the data format and / or return command in the preset rule, the command test result of the first Bluetooth is a test pass; if the first feedback data contains data with a data format and / or return command that does not conform, the command test result of the first Bluetooth is a test fail.

[0117] S32: Compare the second feedback data with the preset rule to determine the second Bluetooth instruction test result.

[0118] Similarly, the second feedback data is compared with the aforementioned preset rules. If the data format and / or return command in the second feedback data conforms to the data format and / or return command in the preset rules, the command test result of the second Bluetooth is the test passed; if the second feedback data contains data whose data format and / or return command do not conform to the preset rules, the command test result of the second Bluetooth is the test failed.

[0119] In this embodiment, through the above steps S21 and S31, the command function test can be implemented, and it can be verified whether the Bluetooth pair to be tested can correctly respond to the command, and confirm whether its configuration and function are normal, so as to ensure that Bluetooth can work normally before being deployed to the IOT product. The feedback data after the Bluetooth pair to be tested executes the command is verified and analyzed using a predetermined data format and / or command, so that the stability of the Bluetooth pair to be tested regarding the sending and receiving of the command can be accurately detected.

[0120] In some embodiments, the test items include a "transparent transmission function test", and the test file includes a transparent transmission file, which includes transparent transmission data, transparent transmission instructions, and communication connection instructions. Among them, transparent transmission data refers to data that needs to be transmitted, and the transparent transmission data can be any string or value, etc. The transparent transmission instruction is an instruction to instruct data transparent transmission, and the communication connection instruction is an instruction to instruct Bluetooth pairing to achieve communication connection.

[0121] It is understandable that when performing the transparent transmission function test, wireless communication needs to be established between the first Bluetooth and the second Bluetooth, so the transparent transmission file not only includes transparent transmission data for transmission, but also includes a communication connection instruction for indicating the establishment of wireless communication between the first Bluetooth and the second Bluetooth, and a transparent transmission instruction for indicating entering the transparent transmission mode. In some embodiments, the communication connection instruction and the transparent transmission instruction can both be AT instructions.

[0122] In this embodiment, the aforementioned step S20 specifically includes:

[0123] S22: Acquire a protocol file, and determine, according to the protocol file, that one of the first Bluetooth and the second Bluetooth is a master Bluetooth and the other is a slave Bluetooth.

[0124] Among them, the protocol file stipulates that one of the first Bluetooth and the second Bluetooth is the master Bluetooth, and the other is the slave Bluetooth. Exemplarily, the protocol file defines that the one connected to the serial port COM1 of the test device is the master Bluetooth, and the one connected to the serial port COM2 of the test device is the slave Bluetooth. If the first Bluetooth is connected to the serial port COM1 and the second Bluetooth is connected to the serial port COM2, the first Bluetooth is the master Bluetooth and the second Bluetooth is the slave Bluetooth; if the first Bluetooth is connected to the serial port COM1 and the second Bluetooth is connected to the serial port COM2, the second Bluetooth is the master Bluetooth and the first Bluetooth is the slave Bluetooth.

[0125] S23: Sending a communication connection instruction and a transparent transmission instruction to the master Bluetooth, so that the master Bluetooth establishes a Bluetooth communication connection with the slave Bluetooth after executing the communication connection instruction, and the master Bluetooth and the slave Bluetooth enter the transparent transmission mode after executing the transparent transmission instruction.

[0126] After the test device obtains the transparent transmission file, it first sends the communication connection instruction and transparent transmission instruction to the master Bluetooth through the serial port. After receiving the communication connection instruction and transparent transmission instruction, the master Bluetooth establishes a wireless communication connection with the slave Bluetooth and sends the transparent transmission instruction to the slave Bluetooth. The master Bluetooth and the slave Bluetooth enter the transparent transmission mode after executing the transparent transmission instruction respectively.

[0127] In transparent transmission mode, the master Bluetooth and the slave Bluetooth respectively turn off their own command parsing functions, and will not parse the received data. All received data will be directly forwarded to the connected device without any processing or modification.

[0128] S24: Send the transparent transmission data to the master Bluetooth, so that the master Bluetooth sends the transparent transmission data to the slave Bluetooth, and the slave Bluetooth feeds back the transparent transmission data to the test device.

[0129] After the above communication connection instruction and transparent transmission instruction are executed, the test device sends the transparent transmission data to the master Bluetooth, and the master Bluetooth sends the transparent transmission data to the slave Bluetooth one by one through wireless communication. The slave Bluetooth forwards the received transparent transmission data to the test device.

[0130] In this embodiment, the feedback data includes transparent transmission data fed back from Bluetooth.

[0131] In the aforementioned step S30, “determining the test result based on the feedback data” specifically includes:

[0132] S33: Compare the transparent transmission data fed back by the slave Bluetooth with the transparent transmission data sent to the master Bluetooth to determine the transparent transmission test result of the Bluetooth pair to be tested.

[0133] Exemplarily, the test device can determine the transparent transmission test result of the Bluetooth pair to be tested by comparing the effective transmission number, effective reception number and loss rate of the two (transparent transmission data fed back from the slave Bluetooth and transparent transmission data sent to the master Bluetooth). For example, if the effective transmission number and the effective reception number are roughly the same, or the loss rate is less than a preset threshold, the transparent transmission test result is determined to be a pass, otherwise, the transparent transmission test result is determined to be a fail.

[0134] In this embodiment, through the above steps S22-S24 and S33, the transparent transmission function test can be implemented, and the relevant string types supported by the tested Bluetooth pair regarding wireless transmission can be detected, such as text strings, binary strings, and hexadecimal strings. At the same time, the wireless transceiver of the tested Bluetooth pair can be automatically proofread through the imported transparent transmission file, which can effectively test the stability and reliability of Bluetooth wireless transceiver. In addition, the test equipment determines the transparent transmission test results by itself from the transparent transmission data fed back by Bluetooth and the transparent transmission data sent to the main Bluetooth, which can effectively save manpower and increase the convenience of using the test equipment.

[0135] In some embodiments, the test items include an "OAT upgrade test", i.e., an over the air (OTA) firmware upgrade test. The test file includes a firmware upgrade file. The test file includes a firmware upgrade file, which includes firmware upgrade data and a communication connection instruction. Among them, the firmware upgrade data is used to upgrade the firmware in the Bluetooth memory. The communication connection instruction is an instruction to instruct Bluetooth pairing to achieve a communication connection.

[0136] It is understandable that when performing the OAT upgrade test, wireless communication needs to be established between the first Bluetooth and the second Bluetooth, so the firmware upgrade file not only includes firmware upgrade data for firmware upgrade, but also includes a communication connection instruction for instructing the first Bluetooth to establish wireless communication with the second Bluetooth. In some embodiments, the communication connection instruction can be an AT instruction.

[0137] The aforementioned step S20 further includes:

[0138] S25: Acquire a protocol file, and determine, according to the protocol file, that one of the first Bluetooth and the second Bluetooth is a master Bluetooth and the other is a slave Bluetooth.

[0139] Among them, the protocol file stipulates that one of the first Bluetooth and the second Bluetooth is the master Bluetooth, and the other is the slave Bluetooth. Exemplarily, the protocol file defines that the one connected to the serial port COM1 of the test device is the master Bluetooth, and the one connected to the serial port COM2 of the test device is the slave Bluetooth. If the first Bluetooth is connected to the serial port COM1 and the second Bluetooth is connected to the serial port COM2, the first Bluetooth is the master Bluetooth and the second Bluetooth is the slave Bluetooth; if the first Bluetooth is connected to the serial port COM1 and the second Bluetooth is connected to the serial port COM2, the second Bluetooth is the master Bluetooth and the first Bluetooth is the slave Bluetooth.

[0140] S26: Sending a communication connection instruction to the master Bluetooth, so that the master Bluetooth executes the communication connection instruction and establishes a Bluetooth communication connection with the slave Bluetooth.

[0141] After the test device obtains the firmware upgrade file, it first sends a communication connection instruction to the master Bluetooth. The master Bluetooth receives the communication connection instruction and establishes a wireless communication connection with the slave Bluetooth.

[0142] S27: Sending firmware upgrade data to the master Bluetooth, so that the master Bluetooth sends the firmware upgrade data to the slave Bluetooth, the master Bluetooth and the slave Bluetooth respectively use the firmware upgrade data for upgrading, and feedback the firmware version information to the test device.

[0143] After the above communication connection instruction is executed, the test device sends the firmware upgrade data to the master Bluetooth, and the master Bluetooth sends the firmware upgrade data to the slave Bluetooth through wireless communication. Therefore, both the master Bluetooth and the slave Bluetooth can obtain the firmware upgrade data.

[0144] After the master Bluetooth recognizes the firmware upgrade data including the Bluetooth model, hardware version, firmware version, file size and other upgrade information, it enters the upgrade mode and uses the firmware upgrade data to upgrade the original stored firmware. After the upgrade is completed, the firmware version information is sent to the test device. It can be understood that if the master Bluetooth is successfully upgraded, the firmware version information it feedbacks is the new firmware version information in the firmware upgrade data; if the master Bluetooth fails to upgrade, the firmware version information it feedbacks is the original firmware version information.

[0145] Similarly, after the firmware upgrade data including the Bluetooth model, hardware version, firmware version, file size and other upgrade information is obtained from Bluetooth recognition, the upgrade mode is entered, and the firmware upgrade data is used to upgrade the original stored firmware. After the upgrade is completed, the firmware version information is sent to the test device. It can be understood that if the upgrade from Bluetooth is successful, the firmware version information fed back is the new firmware version information in the firmware upgrade data; if the upgrade from Bluetooth fails, the firmware version information fed back is the original firmware version information.

[0146] In this embodiment, the feedback data includes first firmware version information fed back by the master Bluetooth and second firmware version information fed back by the slave Bluetooth.

[0147] In the aforementioned step S30, “determining the test result based on the feedback data” includes:

[0148] S34: Determine a firmware upgrade test result of the master Bluetooth according to the first firmware version information.

[0149] S35: Determine a firmware upgrade test result from Bluetooth according to the second firmware version information.

[0150] It is understandable that the test device compares the first firmware version information with the firmware version information in the firmware upgrade data sent to the master Bluetooth. If the first firmware version information is the firmware version information in the firmware upgrade data, then the firmware upgrade test result of the master Bluetooth is determined to be a successful upgrade, indicating that the firmware upgrade function of the master Bluetooth is normal. If the first firmware version information is inconsistent with the firmware version information in the firmware upgrade data, then the firmware upgrade test result of the master Bluetooth is determined to be an upgrade failure, indicating that the firmware upgrade function of the master Bluetooth is abnormal.

[0151] Similarly, the test device compares the second firmware version information with the firmware version information in the firmware upgrade data sent to the master Bluetooth. If the second firmware version information is the firmware version information in the firmware upgrade data, the firmware upgrade test result of the slave Bluetooth is determined to be a successful upgrade, indicating that the firmware upgrade function of the slave Bluetooth is normal. If the second firmware version information is inconsistent with the firmware version information in the firmware upgrade data, the firmware upgrade test result of the slave Bluetooth is determined to be a failed upgrade, indicating that the firmware upgrade function of the slave Bluetooth is abnormal.

[0152] In this embodiment, through the above steps S25 to S27 and steps S34 to S35, the OTA upgrade test can be automatically implemented without manual verification of the received feedback data in sequence, which saves manpower and increases the convenience of using the test equipment.

[0153] In some embodiments, the method S100 further includes:

[0154] S40: Save the test results and feedback data as a log file.

[0155] For example, Figure 7 As shown, the log file includes feedback data and test results. In some embodiments, the above log files have a one-to-one correspondence with the test items provided by the test equipment, such as AT instruction set test data and result log files, transparent transmission function test data and result log files, and OTA upgrade test data and result log files.

[0156] The above log files not only record the test results, but also the feedback data, which is convenient for users to quickly understand the entire test process when exporting log files. At the same time, the one-to-one correspondence between the above log files and test items can help developers locate problems more quickly and effectively and solve problems encountered by users.

[0157] In summary, in the embodiment of the present application, only the test file corresponding to the test item needs to be imported to automatically detect the first Bluetooth and the second Bluetooth. On the one hand, there is no need to manually edit the sending data and verify the receiving data, which can effectively save manpower; on the other hand, the two Bluetooths can be tested at the same time, which can effectively improve the detection efficiency. In addition, the test equipment determines the test results based on the feedback data analysis, which can improve the accuracy of the test results compared to manual inspection.

[0158] In some embodiments, the operator can customize the test items through the window interface of the test device, so as to comprehensively evaluate the wireless transceiver function, upgrade performance and stability of the Bluetooth pair to be tested. In some embodiments, the above test device can store the feedback data and test results in a log file, which not only saves manpower but also facilitates the user to locate and analyze the problem through the log file.

[0159] An embodiment of the present application also provides a testing device, which includes: a communication module, used to send a test file to the Bluetooth pair to be tested in response to an operation indicating the start of a test; and to receive feedback data sent by the Bluetooth pair to be tested; an analysis module, used to determine the test result based on the feedback data; wherein the feedback data is data output after the Bluetooth pair to be tested executes the instructions in the test file.

[0160] In this embodiment, the testing device has the same features and functions as any of the above-mentioned Bluetooth testing method embodiments, which will not be described in detail here.

[0161] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are used to enable an electronic device to execute a Bluetooth testing method provided by an embodiment of the present application.

[0162] In some embodiments, the storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EE PROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0163] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0164] As an example, executable instructions may, but need not necessarily, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0165] As an example, executable instructions may be deployed to be executed on one computing device (including devices such as smart terminals and servers), or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected by a communication network.

[0166] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A Bluetooth testing method, applied to a testing device, wherein the testing device is connected to a Bluetooth pair to be tested via serial communication, wherein the Bluetooth pair to be tested includes a first Bluetooth and a second Bluetooth, and is characterized in that: The method comprises: Get the test file; In response to an operation indicating to start a test, sending the test file to the Bluetooth pair to be tested; Receive feedback data sent by the Bluetooth pair to be tested, and determine a test result based on the feedback data; wherein the feedback data is data output by the Bluetooth pair to be tested after executing instructions in the test file.

2. The method according to claim 1, characterized in that: The test file includes an instruction set file, and sending the test file to the Bluetooth pair to be tested includes: Sending the instruction set in the instruction set file to the first Bluetooth and the second Bluetooth respectively; The feedback data includes first feedback data output after the first Bluetooth executes the instruction set and second feedback data output after the second Bluetooth executes the instruction set; and determining the test result based on the feedback data includes: Comparing the first feedback data with a preset rule to determine a command test result of the first Bluetooth; The second feedback data is compared with the preset rule to determine the instruction test result of the second Bluetooth.

3. The method according to claim 1, characterized in that The test file includes a transparent transmission file, and the transparent transmission file includes transparent transmission data, transparent transmission instructions, and communication connection instructions; and sending the test file to the Bluetooth pair to be tested includes: Acquire a protocol file, and determine, according to the protocol file, that one of the first Bluetooth and the second Bluetooth is a master Bluetooth and the other is a slave Bluetooth; Sending the communication connection instruction and the transparent transmission instruction to the master Bluetooth, so that the master Bluetooth establishes a Bluetooth communication connection with the slave Bluetooth after executing the communication connection instruction, and the master Bluetooth and the slave Bluetooth enter the transparent transmission mode after executing the transparent transmission instruction; Sending the transparent transmission data to the master Bluetooth, so that the master Bluetooth sends the transparent transmission data to the slave Bluetooth, and the slave Bluetooth feeds back the transparent transmission data to the test device; Wherein, the feedback data includes the transparent transmission data fed back from Bluetooth; The determining of the test result based on the feedback data comprises: The transparent transmission data fed back by the slave Bluetooth is compared with the transparent transmission data sent to the master Bluetooth to determine the transparent transmission test result of the Bluetooth pair to be tested.

4. The method according to claim 1, characterized in that: The test file includes a firmware upgrade file, the firmware upgrade file includes firmware upgrade data and a communication connection instruction, and the sending of the test file to the Bluetooth pair to be tested includes: Acquire a protocol file, and determine, according to the protocol file, that one of the first Bluetooth and the second Bluetooth is a master Bluetooth and the other is a slave Bluetooth; Sending the communication connection instruction to the master Bluetooth, so that the master Bluetooth establishes a Bluetooth communication connection with the slave Bluetooth after executing the communication connection instruction; Sending the firmware upgrade data to the master Bluetooth, so that the master Bluetooth sends the firmware upgrade data to the slave Bluetooth, the master Bluetooth and the slave Bluetooth respectively use the firmware upgrade data for upgrading, and feedback firmware version information to the test device; The feedback data includes the first firmware version information fed back by the master Bluetooth and the second firmware version information fed back by the slave Bluetooth; The determining of the test result based on the feedback data comprises: Determine a firmware upgrade test result of the master Bluetooth according to the first firmware version information; The firmware upgrade test result of the slave Bluetooth is determined according to the second firmware version information.

5. The method according to claim 1, characterized in that The obtaining of the test file comprises: Displaying a first interface, wherein the first interface includes a file import control; In response to an operation on the file import control, displaying a file list; In response to an operation of selecting a file from the file list, the test file is acquired.

6. The method according to claim 5, characterized in that The first interface also includes a test parameter configuration window, and the test parameter configuration window includes test item options; The method further comprises: In response to the operation of configuring the test parameters, determining the test items; The obtaining of the test file comprises: Obtain a test file corresponding to the test item.

7. The method according to claim 1, characterized in that The method further comprises: The test results and the feedback data are saved as a log file.

8. A testing device, characterized in that: include: File import module, used to import test files; A communication module, configured to send the test file to the Bluetooth pair to be tested in response to an operation indicating starting the test; And, receiving feedback data sent by the Bluetooth pair to be tested; An analysis module is used to determine the test result based on the feedback data; wherein the feedback data is the data output after the Bluetooth pair to be tested executes the instructions in the test file.

9. A test device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.