Automatic test method of Bluetooth device and electronic device

Through the automatic testing method, the problem of low performance testing efficiency of Bluetooth devices is solved, automated testing is realized, and testing efficiency and accuracy are improved.

CN120034272AActive Publication Date: 2025-05-23ROYPOW TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510506215.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-05-23
Estimated Expiration
2045-04-22

AI Technical Summary

Technical Problem

Performance testing of Bluetooth devices requires manual and low efficiency.

Method used

It provides an automatic testing method for Bluetooth devices, by automatically establishing Bluetooth connections, sending instructions and judging the equipment's pass level based on the response conditions, including first-class pass, second-class pass and unqualified.

Benefits of technology

Automatic testing of Bluetooth devices is realized, testing efficiency is improved, manual intervention is reduced, and the accuracy and efficiency of testing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034272A_ABST
    Figure CN120034272A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test method of Bluetooth equipment and electronic equipment. In the application, for each Bluetooth device, the Bluetooth connection can be automatically established and the test step is carried out, in the test step, according to the condition of the Bluetooth connection and the condition of the instruction response, the different qualified grades of the Bluetooth device are determined, and the Bluetooth connection is disconnected after the test step is completed. On the basis, automatic testing of the Bluetooth equipment can be realized, and the testing efficiency of the Bluetooth equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Bluetooth technology, and in particular to an automatic testing method for a Bluetooth device and an electronic device. Background Art

[0002] Bluetooth devices need to undergo performance testing before leaving the factory to ensure that qualified Bluetooth devices enter the market. Usually, the performance testing of Bluetooth devices needs to be done manually. However, this testing method is relatively inefficient. Summary of the invention

[0003] The embodiments of the present application provide an automatic testing method for a Bluetooth device and an electronic device to improve the testing efficiency of the Bluetooth device.

[0004] In a first aspect, an embodiment of the present application provides an automatic testing method for a Bluetooth device. For each Bluetooth device, the method includes: Automatically establish a Bluetooth connection with a Bluetooth device and perform test steps, and disconnect the Bluetooth connection after completing the test steps; The test steps include: When a Bluetooth connection is successfully established: Send specified instructions to the Bluetooth device; If the Bluetooth device successfully responds to the command, it is determined that the Bluetooth device is first-class qualified; Alternatively, if the Bluetooth device fails to respond to the command, a retransmission test is performed on the Bluetooth device to retest the command response of the Bluetooth device; If the Bluetooth device passes the retransmission test, it is determined that the Bluetooth device is second-class qualified; Alternatively, if the Bluetooth device fails the retransmission test, the Bluetooth device is determined to be unqualified; Or, in the case where the Bluetooth connection is lost after being established: Perform a reconnection and resend test on the Bluetooth device to retest the connection status and command response status of the Bluetooth device; If the Bluetooth device passes the reconnection and retransmission test, it is determined that the Bluetooth device is second-class qualified; Alternatively, if the Bluetooth device fails the reconnection and retransmission test, it is determined that the Bluetooth device is unqualified; Or, if the Bluetooth connection fails to establish successfully: Perform a reconnection test on the Bluetooth device to retest the connection status of the Bluetooth device; If the Bluetooth device passes the reconnection test, send a command to the Bluetooth device and determine whether the Bluetooth device is qualified based on the response of the Bluetooth device; Alternatively, if the Bluetooth device fails the reconnection test, it is determined that the Bluetooth device is unqualified.

[0005] Optionally, sending the specified instruction to the Bluetooth device includes: repeatedly sending the instruction to the Bluetooth device multiple times; If the Bluetooth device successfully responds to the command, determining that the Bluetooth device is first-class qualified includes: if the Bluetooth device successfully responds to the command multiple times, determining that the Bluetooth device is first-class qualified; If the Bluetooth device fails to respond to the command, a retransmission test is performed on the Bluetooth device, including: if the Bluetooth device fails to respond to the command at least once, a retransmission test is performed on the Bluetooth device.

[0006] Optionally, the retransmission test includes repeatedly sending instructions to the Bluetooth device multiple times at fixed time intervals; If the Bluetooth device successfully responds to multiple commands, it is determined that the Bluetooth device passes the retransmission test; Alternatively, if the Bluetooth device fails to respond to the command at least once, it is determined that the Bluetooth device fails the retransmission test.

[0007] Optionally, the method may further include: recording a response log of the Bluetooth device in the retransmission test, wherein the response log includes the response status of each instruction.

[0008] Optionally, the reconnection and retransmission test includes repeatedly re-establishing the Bluetooth connection, sending instructions, and automatically disconnecting the Bluetooth connection at fixed time intervals; If the Bluetooth connection is not interrupted for multiple times in a row, and the Bluetooth device successfully responds to multiple commands, it is determined that the Bluetooth device has passed the reconnection and retransmission test; Alternatively, if the Bluetooth connection is not interrupted for multiple consecutive times, but the Bluetooth device fails to respond to at least one command, it is determined that the Bluetooth device fails the reconnection and retransmission test; Alternatively, if the Bluetooth connection is interrupted at least once, it is determined that the Bluetooth device fails the reconnection retransmission test.

[0009] Optionally, the method may further include: recording a connection and response log of the Bluetooth device in the reconnection and retransmission test, wherein the connection and response log includes a connection status of each Bluetooth connection and a response status of each instruction.

[0010] Optionally, the reconnection test includes: repeatedly re-establishing the Bluetooth connection and automatically disconnecting the Bluetooth connection at fixed time intervals; If the Bluetooth connection is successfully established multiple times in a row without interruption, it is determined that the Bluetooth device has passed the reconnection test; Alternatively, if at least one of the multiple Bluetooth connections fails to be successfully established, or at least one of the multiple successfully established Bluetooth connections is interrupted, it is determined that the Bluetooth device fails the reconnection test.

[0011] Optionally, the method may further include: recording a connection log of the Bluetooth device in the reconnection test, wherein the connection log includes connection status of each Bluetooth connection.

[0012] In a second aspect, an embodiment of the present application provides an electronic device, including a module for executing the method described in any one of the above first aspects.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, at least one processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any one of the above first aspects is implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method described in any one of the above first aspects is implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is caused to execute the method described in any one of the above first aspects.

[0016] In the present application, for each Bluetooth device, a Bluetooth connection can be automatically established with it and a test step can be performed. In the test step, different qualification levels of the Bluetooth device are determined according to the situation of the Bluetooth connection and the situation of instruction response. After the test step is completed, the Bluetooth connection is disconnected. Based on this, automatic testing of Bluetooth devices can be realized, which helps to improve the testing efficiency of Bluetooth devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments.

[0018] Figure 1 is a schematic flowchart of the automatic testing method for Bluetooth devices provided by an embodiment of the present application.

[0019] Figure 2A-2C is a schematic diagram of the test step in the automatic testing method for Bluetooth devices provided by an embodiment of the present application.

[0020] Figure 3 is an example diagram of the automatic testing method for Bluetooth devices provided by an embodiment of the present application.

[0021] Figure 4 is a schematic structural diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] The following will describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.

[0023] The performance of Bluetooth devices will directly affect the user experience, so Bluetooth devices need to be tested before leaving the factory to ensure that qualified Bluetooth devices enter the market. Usually, the performance test of Bluetooth devices needs to be done manually. However, this testing method is relatively inefficient.

[0024] Based on this, Figure 1 The figure shows an automatic testing method for a Bluetooth device provided in an embodiment of the present application.

[0025] Exemplarily, the method may be executed by a smart terminal with a Bluetooth function, such as a mobile phone or a tablet, etc. Optionally, the method may be implemented by an application (APP) in the smart terminal.

[0026] Exemplarily, the Bluetooth device may be a Bluetooth headset, a watch, or the like.

[0027] See also Figure 1 For each Bluetooth device, in step S110, a Bluetooth connection is automatically established with the Bluetooth device, and a test step is performed. After the test step is completed, the Bluetooth connection is disconnected.

[0028] Optionally, the Bluetooth device may be a Bluetooth device with a specified name, and the specified name of the Bluetooth device helps to select the Bluetooth device from surrounding Bluetooth devices.

[0029] For each Bluetooth device, the test steps can be as follows Figure 2A-2C shown.

[0030] In the test steps, different test contents can be performed according to different situations of Bluetooth devices. Figure 2A-2C ,The different situations of the Bluetooth device may include three types, namely ,successfully establishing a Bluetooth connection with the Bluetooth device, interruption of the Bluetooth connection with the Bluetooth device after ,establishment, and failure to successfully establish a Bluetooth connection with the Bluetooth ,device (i.e., failure to establish the Bluetooth connection with the Bluetooth ,device).

[0031] If a Bluetooth connection is successfully established with a Bluetooth device, it can be determined that the Bluetooth connection performance of the Bluetooth device is normal, and the receiving and sending performance (i.e., the command response) of the Bluetooth device can be further tested. Figure 2A .

[0032] In step S201, a specified instruction is sent to a Bluetooth device.

[0033] Optionally, the specified instruction may be one or more instructions, and the data format, mode, etc. of the instruction are not limited.

[0034] Depending on the response of the Bluetooth device to the instruction, step S202 or step S203 may be performed.

[0035] In step S202, if the Bluetooth device successfully responds to the command sent to it, it is determined that the Bluetooth device is first-class qualified.

[0036] Here, the Bluetooth device successfully responds to the instruction sent to it, which may refer to receiving the response returned by the Bluetooth device to the instruction. Optionally, the response content of the Bluetooth device may be agreed in advance.

[0037] When the Bluetooth device successfully responds to the command sent to it, it can be determined that the transceiver performance of the Bluetooth device is also normal. Connection performance and transceiver performance are the more important performances of Bluetooth devices, so when the connection performance and transceiver performance are normal, the Bluetooth device can be determined to be first-class qualified.

[0038] Alternatively, in step S203, if the Bluetooth device fails to respond to the instruction sent to it, a retransmission test is performed on the Bluetooth device to retest the instruction response of the Bluetooth device.

[0039] Here, the failure of the Bluetooth device to respond to the instruction sent to it may refer to the failure to receive a response returned by the Bluetooth device for the instruction.

[0040] Optionally, not receiving a response from the Bluetooth device to the instruction may mean not receiving a response from the Bluetooth device to the instruction within a certain time interval. For example, the certain time interval may be 5 seconds.

[0041] If the Bluetooth device fails to respond to the command sent to it, it may be due to abnormal transceiver performance of the Bluetooth device, or it may be caused by accidental factors. Therefore, it is necessary to retest the command response of the Bluetooth device through a retransmission test.

[0042] Depending on whether the Bluetooth device passes the retransmission test, step S204 or step S205 may be performed.

[0043] In step S204, if the Bluetooth device passes the retransmission test, it is determined that the Bluetooth device is second-class qualified.

[0044] Through the retransmission test, the Bluetooth device can determine that the receiving and transmitting performance of the Bluetooth device is normal, that is, the failure of the Bluetooth device to respond to the command was caused by accidental factors. However, in view of the fact that there are accidental factors that cause the Bluetooth device to fail to respond to the command, it cannot be determined that the Bluetooth device is first-class qualified. Accordingly, it can be determined that the Bluetooth device is second-class qualified. It should be noted that the second-class qualified Bluetooth device can undergo further performance testing, which is not limited in this application.

[0045] Or in step S205, if the Bluetooth device fails the retransmission test, it is determined that the Bluetooth device is unqualified.

[0046] If the Bluetooth device fails the retransmission test, it means that there is indeed an abnormality in the receiving and transmitting performance of the Bluetooth device. Therefore, it can be determined that the Bluetooth device is unqualified.

[0047] In the case where the Bluetooth connection with the Bluetooth device is interrupted after being established, it is impossible to determine whether the connection performance of the Bluetooth device is normal. The connection interruption may be due to abnormal connection performance of the Bluetooth device, or it may also be caused by accidental factors. Therefore, it is necessary to re-confirm whether the connection performance of the Bluetooth device is normal, and then determine whether the receiving and sending performance of the Bluetooth device is normal. Correspondingly, for this situation, the test content can be seen in Figure 2B .

[0048] In step S206, a reconnection and retransmission test is performed on the Bluetooth device to retest the connection status and instruction response status of the Bluetooth device.

[0049] Depending on whether the Bluetooth device passes the reconnection and retransmission test, step S207 or step S208 may be performed.

[0050] In step S207, if the Bluetooth device passes the reconnection and retransmission test, it is determined that the Bluetooth device is second-class qualified.

[0051] The Bluetooth device can be determined to have normal connection performance and transceiver performance through the reconnection and retransmission test, which means that the previous Bluetooth connection interruption was caused by accidental factors. However, given that there are cases where the Bluetooth connection of the Bluetooth device is interrupted by accidental factors, it cannot be determined that the Bluetooth device is first-class qualified. Accordingly, it can be determined that the Bluetooth device is second-class qualified.

[0052] Or in step S208, if the Bluetooth device fails the reconnection and retransmission test, it is determined that the Bluetooth device is unqualified.

[0053] If the Bluetooth device fails the reconnection and retransmission test, it can be determined that the connection performance or the transceiver performance of the Bluetooth device is abnormal, and therefore the Bluetooth device can be determined to be unqualified.

[0054] If a Bluetooth connection cannot be established successfully with a Bluetooth device, it cannot be determined that the connection performance of the Bluetooth device is normal. Failure to successfully establish a Bluetooth connection with a Bluetooth device may be due to abnormal connection performance of the Bluetooth device, or it may be caused by accidental factors. Therefore, it is necessary to re-determine whether the connection performance of the Bluetooth device is normal, and then determine whether the receiving and sending performance of the Bluetooth device is normal. Correspondingly, for this situation, the test content can be found in Figure 2C .

[0055] In step S209, a reconnection test is performed on the Bluetooth device to retest the connection status of the Bluetooth device.

[0056] Depending on whether the Bluetooth device passes the reconnection test, step S210 or step S211 may be performed.

[0057] In step S210, if the Bluetooth device passes the reconnection test, a specified instruction is sent to the Bluetooth device and whether the Bluetooth device is qualified is determined based on the response of the Bluetooth device.

[0058] The Bluetooth device can determine that the connection performance of the Bluetooth device is normal through the reconnection test, and needs to send a command to the Bluetooth device to determine whether the receiving and sending performance of the Bluetooth device is normal. For the response of the command of the Bluetooth device, the above-mentioned step S202 or step S203 can be performed, which will not be repeated here.

[0059] Or in step S211, if the Bluetooth device fails the reconnection test, it is determined that the Bluetooth device is unqualified.

[0060] If the Bluetooth device fails the reconnection test, it means that the connection performance of the Bluetooth device is abnormal, so it can be determined that the Bluetooth device is unqualified.

[0061] It should be noted that in Figure 1 In the method shown, step S110 may be performed for each Bluetooth device one by one, or may be performed for multiple Bluetooth devices at the same time.

[0062] In this application, a Bluetooth connection can be automatically established with each Bluetooth device and a test step can be performed. In the test step, different qualification levels of the Bluetooth device are determined according to the Bluetooth connection status and the command response status. After the test step is completed, the Bluetooth connection is disconnected. Based on this, automatic testing of Bluetooth devices can be achieved, which helps to improve the testing efficiency of Bluetooth devices.

[0063] Optionally, in step S201, sending a specified instruction to the Bluetooth device may include repeatedly sending the instruction to the Bluetooth device for multiple times.

[0064] There is no limit on the number of times the command is repeatedly sent. For example, the command may be repeatedly sent to the Bluetooth device 10 times.

[0065] It should be noted that, if there are multiple specified instructions, sending the instruction once may refer to sending all of the multiple instructions. If there is only one specified instruction, sending the instruction once may refer to sending the instruction.

[0066] Accordingly, in step S202, if the Bluetooth device successfully responds to the instruction sent to it, determining that the Bluetooth device is first-class qualified may include: if the Bluetooth device successfully responds to the instructions sent to it multiple times, determining that the Bluetooth device is first-class qualified.

[0067] Exemplarily, the Bluetooth device successfully responding to multiple instructions may mean that a response from the Bluetooth device can be received within a fixed time interval after the Bluetooth device sends an instruction each time.

[0068] Alternatively, in step S203, if the Bluetooth device fails to respond to the instruction sent to it, performing a retransmission test on the Bluetooth device may include: if the Bluetooth device fails to respond to the instruction sent to it at least once, performing a retransmission test on the Bluetooth device.

[0069] Exemplarily, the failure of the Bluetooth device to respond to at least one instruction may refer to the failure to receive a response from the Bluetooth device within a fixed time interval after the Bluetooth device sends an instruction once.

[0070] If the Bluetooth device can respond to multiple commands, it can be determined that the receiving and transmitting performance of the Bluetooth device is normal. If the Bluetooth device fails to respond to one of the multiple commands, it cannot be determined that the receiving and transmitting performance of the Bluetooth device is normal, so a retransmission test is required.

[0071] Based on this, when testing the receiving and transmitting performance of a Bluetooth device, instructions can be sent multiple times, which helps to improve the accuracy of the test.

[0072] Optionally, the retransmission test may include repeatedly sending instructions to the Bluetooth device multiple times at fixed time intervals. Exemplarily, the instructions sent here may be designated instructions previously sent to the Bluetooth device.

[0073] The fixed time interval is not limited, for example, it can be fixed at 2 seconds. In other words, a command can be sent to the Bluetooth device every 2 seconds.

[0074] There is no limit to the number of times the message is sent repeatedly, for example, the message can be sent repeatedly 10 times.

[0075] Accordingly, if the Bluetooth device successfully responds to multiple instructions, it is determined that the Bluetooth device passes the retransmission test. Exemplarily, the Bluetooth device successfully responds to multiple instructions can refer to the Bluetooth device receiving a response within a fixed time interval (the time interval can be the same as the time interval for sending multiple instructions) after each instruction is sent by the Bluetooth device.

[0076] Alternatively, if the Bluetooth device fails to respond to at least one instruction, it is determined that the Bluetooth device fails to pass the retransmission test. Exemplarily, the failure of the Bluetooth device to respond to at least one instruction may refer to the failure to receive a response from the Bluetooth device within a fixed time interval (the time interval may be the same as the time interval for sending multiple instructions) after the Bluetooth device sends an instruction once.

[0077] That is to say, if the Bluetooth device can respond to the instructions sent multiple times in the retransmission test, it can be determined that the transceiver performance of the Bluetooth device is normal, that is, the Bluetooth device passes the retransmission test. As long as the Bluetooth device fails to respond once, it can be determined that the transceiver performance of the Bluetooth device is abnormal, that is, the Bluetooth device fails the retransmission test.

[0078] Based on the retransmission test, whether the receiving and transmitting performance of the Bluetooth device is normal can be re-determined when the Bluetooth device fails to respond to a command, which helps to improve the accuracy of the test.

[0079] Optionally, Figure 1 The method shown may also include: recording a response log of the Bluetooth device in the retransmission test, and the response log may include the response status of each instruction.

[0080] For example, the response log may include a media access control (MAC) address of the Bluetooth device, the number of times a command is sent to the Bluetooth device, and the number of times the Bluetooth device successfully responds to the command.

[0081] The response log can be used as a basis for studying the performance anomalies of Bluetooth devices and helps locate the anomalies of Bluetooth devices.

[0082] Optionally, the reconnection and retransmission test may include repeating the operations of reestablishing the Bluetooth connection, sending instructions, and automatically disconnecting the Bluetooth connection multiple times at fixed time intervals.

[0083] The fixed time interval is not limited, for example, it can be fixed at 3 seconds. That is to say, the Bluetooth device can be operated to re-establish the Bluetooth connection, send instructions, and automatically disconnect the Bluetooth connection every 3 seconds.

[0084] There is no limit to the number of times the above operation is repeated on the Bluetooth device, for example, it can be repeated 20 times.

[0085] It should be noted that the reconnection and retransmission test can be performed based on the MAC address of the Bluetooth device. The MAC address of the Bluetooth device can be obtained and saved when the Bluetooth connection is first established with the Bluetooth device. When the Bluetooth connection with the Bluetooth device is interrupted, a Bluetooth connection can be established with the Bluetooth device again based on the MAC address of the Bluetooth device.

[0086] In the case where multiple Bluetooth connections are successfully established, if the Bluetooth connection is not interrupted for multiple consecutive times and the Bluetooth device successfully responds to multiple commands, it is determined that the Bluetooth device has passed the reconnection and retransmission test.

[0087] Or in the case where multiple Bluetooth connections are successfully established, if the Bluetooth connection is not interrupted for multiple consecutive times, but the Bluetooth device fails to respond to at least one instruction, it is determined that the Bluetooth device fails the reconnection and retransmission test.

[0088] Or in the case where multiple Bluetooth connections are successfully established, if the Bluetooth connection is interrupted at least once, it is determined that the Bluetooth device fails the reconnection and retransmission test.

[0089] Or, for a situation where at least one Bluetooth connection is not successfully established, it is determined that the Bluetooth device fails to pass a reconnection retransmission test.

[0090] That is to say, in the reconnection and retransmission test, if multiple Bluetooth connections are not interrupted and the Bluetooth device successfully responds to multiple commands, it can be determined that the connection performance and transceiver performance of the Bluetooth device are normal, that is, the Bluetooth device passes the reconnection and retransmission test.

[0091] On the contrary, as long as one of the multiple Bluetooth connections is interrupted or at least one Bluetooth connection is not successfully established, it can be determined that the connection performance of the Bluetooth device is abnormal, that is, the Bluetooth device fails to pass the reconnection and retransmission test. And as long as the Bluetooth device does not respond to one of the multiple commands, it can be determined that the receiving and sending performance of the Bluetooth device is abnormal, that is, the Bluetooth device fails to pass the reconnection and retransmission test.

[0092] It should be noted that the meanings of the Bluetooth device successfully responding to multiple instructions and the Bluetooth device failing to respond to at least one instruction here may be the same as the meanings in the above retransmission test, which will not be repeated here.

[0093] Based on the reconnection and retransmission test, when the Bluetooth connection with the Bluetooth device is interrupted, it is possible to re-determine whether the connection performance and the receiving and sending performance of the Bluetooth device are normal, which helps to improve the accuracy of the test.

[0094] Optionally, Figure 1 The method shown may also include: recording a connection and response log of the Bluetooth device in the reconnection and retransmission test, wherein the connection and response log includes a connection status of each Bluetooth connection and a response status of each instruction.

[0095] Exemplarily, the connection and response log may include the MAC address of the Bluetooth device, the number of Bluetooth connection interruptions with the Bluetooth device, the time node, the number of instructions sent to the Bluetooth device, and the number of times the Bluetooth device successfully responds to instructions.

[0096] Connection and response logs can be used as a basis for studying abnormal performance of Bluetooth devices and help locate abnormalities in Bluetooth devices.

[0097] Optionally, the reconnection test may include repeatedly performing the operations of re-establishing a Bluetooth connection to the Bluetooth device and automatically disconnecting the Bluetooth connection at fixed time intervals.

[0098] The fixed time interval is not limited, for example, it can be fixed to 3 seconds. That is to say, the Bluetooth device can be re-established and automatically disconnected from the Bluetooth connection every 3 seconds.

[0099] There is no limit to the number of times the above operation is repeated on the Bluetooth device, for example, it can be repeated 3 times.

[0100] It should be noted that the reconnection test can also be performed based on the MAC address of the Bluetooth device. The MAC address of the Bluetooth device can be obtained and saved when the Bluetooth connection is first established with the Bluetooth device. When the Bluetooth connection with the Bluetooth device fails to be successfully established, the Bluetooth connection can be established with the Bluetooth device again according to the MAC address of the Bluetooth device.

[0101] Accordingly, if the Bluetooth connection is successfully established multiple times in succession without interruption, it is determined that the Bluetooth device passes the reconnection test.

[0102] Alternatively, if at least one of the multiple Bluetooth connections fails to be successfully established, or at least one of the multiple successfully established Bluetooth connections is interrupted, it is determined that the Bluetooth device fails the reconnection test.

[0103] That is to say, in the reconnection test, if multiple Bluetooth connections with the Bluetooth device are successfully established and not interrupted, it can be determined that the connection performance of the Bluetooth device is normal, that is, the Bluetooth device passes the reconnection test.

[0104] On the contrary, if one of the multiple Bluetooth connections with the Bluetooth device fails to be successfully established or one of the Bluetooth connections is interrupted, it can be determined that the connection performance of the Bluetooth device is abnormal, that is, the Bluetooth device fails the reconnection test.

[0105] Based on the reconnection test, when a Bluetooth connection cannot be successfully established with the Bluetooth device, it is possible to re-determine whether the connection performance of the Bluetooth device is normal, which helps to improve the accuracy of the test.

[0106] Optionally, Figure 1 The method shown may also include: recording a connection log of the Bluetooth device during the reconnection test, wherein the connection log includes connection status of each Bluetooth connection.

[0107] Exemplarily, the connection log may include the MAC address of the Bluetooth device, the number of times a Bluetooth connection is established with the Bluetooth device, and whether the Bluetooth connection is successful.

[0108] Connection logs can be used as a basis for studying abnormal performance of Bluetooth devices and help locate abnormalities in Bluetooth devices.

[0109] Combine the following Figure 3 , an example is given to introduce the automatic testing method of the Bluetooth device in the embodiment of the present application. For example, the user can implement the automatic testing method of the Bluetooth device through the APP in the mobile phone. The steps of the method can be referred to Figure 3 .

[0110] In step S310, the APP scans the surrounding Bluetooth devices and automatically connects to the Bluetooth device with the specified name after finding it. According to the connection status of the Bluetooth device, the APP goes to one of steps S320, S330, and S340.

[0111] If a Bluetooth connection is successfully established with the Bluetooth device, the APP may proceed to step S320.

[0112] In step S320, the APP sends a specified instruction to the Bluetooth device, and continues to send and receive 10 times.

[0113] If the Bluetooth device successfully responds to each instruction, the APP can determine that the Bluetooth device is first-class qualified and can enter step S360 accordingly.

[0114] If the Bluetooth device fails to respond to the instruction at least once, the process proceeds to step S350.

[0115] In step S350, the APP resends the instruction to the Bluetooth device 10 times at a time interval of 2 seconds (ie, performs a retransmission test) and records a retransmission log.

[0116] If the Bluetooth device successfully responds to each instruction, that is, the Bluetooth device passes the retransmission test, the APP can determine that the Bluetooth device is second-class qualified and can enter step S360 accordingly.

[0117] If the Bluetooth device fails to respond to at least one instruction, that is, the Bluetooth device fails the retransmission test, the APP can determine that the Bluetooth device is unqualified and can enter step S360 accordingly.

[0118] Alternatively, if the Bluetooth connection is disconnected after successfully establishing a Bluetooth connection with the Bluetooth device, the APP may proceed to step S330.

[0119] In step S330, the APP reestablishes the Bluetooth connection, sends instructions, and automatically disconnects the Bluetooth connection for 20 times at a time interval of 3 seconds (i.e., performs a reconnection and retransmission test) for the Bluetooth device, and records a reconnection and retransmission log.

[0120] If the Bluetooth connection is not interrupted for 20 times and the Bluetooth device successfully responds to the instructions for 20 times, that is, the Bluetooth device passes the reconnection and retransmission test, the APP can determine that the Bluetooth device is second-class qualified and accordingly proceed to step S360.

[0121] If at least one of the 20 Bluetooth connections is interrupted, or the Bluetooth device does not respond to at least one instruction in 20 instructions, that is, the Bluetooth device fails the reconnection and resending test, the APP can determine that the Bluetooth device is unqualified and can enter step S360 accordingly.

[0122] Alternatively, if the Bluetooth connection with the Bluetooth device is not successfully established, the APP may proceed to step S340.

[0123] In step S340, the APP performs 10 operations of re - establishing and automatically disconnecting the Bluetooth connection for the Bluetooth device at an interval of 2 seconds (i.e., performing a re - connection test), and records the re - connection log.

[0124] If all 10 Bluetooth connections are successfully established and not interrupted, that is, the Bluetooth device passes the re - connection test. Then the APP can determine that the Bluetooth device is second - class qualified, and accordingly can enter step S360.

[0125] If at least one of the 10 Bluetooth connections fails to be successfully established, or at least one of the 10 Bluetooth connections is interrupted, that is, the Bluetooth device fails the re - connection test. Then the APP can determine that the Bluetooth device is unqualified, and accordingly can enter step S360.

[0126] So far, the APP has completed the test of the Bluetooth device.

[0127] In step S360, the APP disconnects the Bluetooth connection with the Bluetooth device and connects to the next Bluetooth device.

[0128] According to the above steps, the APP can complete the test of each Bluetooth device. It should be noted that the APP can perform the tests of multiple Bluetooth devices simultaneously at one time, or test multiple Bluetooth devices one by one.

[0129] Based on Figure 3 the method shown, the automatic test of Bluetooth devices can be realized, avoiding cumbersome test steps, helping to improve the test efficiency and reduce the labor cost.

[0130] The method provided by the embodiments of the present application has been introduced in detail above. Next, the device provided by the embodiments of the present application will be introduced in detail with reference to the accompanying drawings.

[0131] The embodiments of the present application provide an electronic device, and the electronic device may include modules for performing the steps in the above - mentioned various method embodiments.

[0132] The embodiments of the present application also provide an electronic device. As Figure 4 shown, the electronic device 400 includes: at least one processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the at least one processor 401. When the processor 401 executes the computer program 403, the method provided by the present application is implemented.

[0133] Exemplarily, the computer program 403 may be divided into one or more modules / units, one or more modules / units are stored in the memory 402, and executed by the processor 401 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 400.

[0134] Those skilled in the art will understand that Figure 4 It is only an example of the electronic device 400 and does not constitute a limitation of the electronic device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 400 may also include input and output devices, network access devices, buses, etc.

[0135] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0136] The memory 402 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. The memory 402 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 400. Further, the memory 402 may also include both an internal storage unit of the electronic device 400 and an external storage device. The memory 402 is used to store computer programs and other programs and data required by the electronic device 400. The memory 402 may also be used to temporarily store data that has been output or is to be output.

[0137] The electronic device 400 provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0138] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0139] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above method embodiments, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, ROM (read-only memory), RAM (random access memory), CD-ROM (compact disc read-only memory), magnetic tape, floppy disk and optical data storage device. The computer-readable storage medium mentioned in the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.

[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0142] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0143] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0144] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0145] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0146] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0147] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0148] 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 it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An automatic testing method for a Bluetooth device, characterized in that: For each Bluetooth device, the method includes: Automatically establish a Bluetooth connection with the Bluetooth device and perform a test step, and disconnect the Bluetooth connection after completing the test step; The testing steps include: In case the Bluetooth connection is successfully established: Sending a specified instruction to the Bluetooth device; If the Bluetooth device successfully responds to the instruction, determining that the Bluetooth device is first-class qualified; Alternatively, if the Bluetooth device fails to respond to the instruction, a retransmission test is performed on the Bluetooth device to retest the instruction response of the Bluetooth device; If the Bluetooth device passes the retransmission test, the Bluetooth device is determined to be second-class qualified; Alternatively, if the Bluetooth device fails the retransmission test, determining that the Bluetooth device is unqualified; Alternatively, in the event that the Bluetooth connection is disconnected after being established: Performing a reconnection and retransmission test on the Bluetooth device to retest the connection status and instruction response status of the Bluetooth device; If the Bluetooth device passes the reconnection and retransmission test, it is determined that the Bluetooth device is second-class qualified; Alternatively, if the Bluetooth device fails the reconnection and retransmission test, the Bluetooth device is determined to be unqualified; Or, in the event that the Bluetooth connection cannot be established successfully: Performing a reconnection test on the Bluetooth device to retest the connection status of the Bluetooth device; If the Bluetooth device passes the reconnection test, sending the instruction to the Bluetooth device and judging whether the Bluetooth device is qualified according to the response of the Bluetooth device; Alternatively, if the Bluetooth device fails the reconnection test, it is determined that the Bluetooth device is unqualified.

2. The method according to claim 1, characterized in that The sending of a specified instruction to the Bluetooth device comprises: Repeating sending the instruction to the Bluetooth device multiple times; If the Bluetooth device successfully responds to the instruction, determining that the Bluetooth device is first-class qualified includes: If the Bluetooth device successfully responds to the command multiple times, the Bluetooth device is determined to be first-class qualified; If the Bluetooth device fails to respond to the instruction, performing a retransmission test on the Bluetooth device includes: If the Bluetooth device fails to respond to the instruction at least once, a retransmission test is performed on the Bluetooth device.

3. The method according to claim 1 or 2, characterized in that: The retransmission test includes repeatedly sending the instruction to the Bluetooth device multiple times at fixed time intervals; If the Bluetooth device successfully responds to the instruction multiple times, it is determined that the Bluetooth device passes the retransmission test; Alternatively, if the Bluetooth device fails to respond to the instruction at least once, it is determined that the Bluetooth device fails the retransmission test.

4. The method according to claim 3, characterized in that The method further comprises: A response log of the Bluetooth device is recorded in the retransmission test, wherein the response log includes the response status of each instruction.

5. The method according to claim 1 or 2, characterized in that: The reconnection and retransmission test includes repeatedly reestablishing the Bluetooth connection, sending the instruction, and automatically disconnecting the Bluetooth connection at fixed time intervals; If the Bluetooth connection is not interrupted for multiple consecutive times, and the Bluetooth device successfully responds to the instructions multiple times, it is determined that the Bluetooth device passes the reconnection and retransmission test; Alternatively, if the Bluetooth connection is not interrupted for multiple consecutive times, but the Bluetooth device fails to respond to the instruction at least once, it is determined that the Bluetooth device fails to pass the reconnection and retransmission test; Alternatively, if the Bluetooth connection is interrupted at least once, it is determined that the Bluetooth device fails the reconnection and retransmission test.

6. The method according to claim 5, characterized in that The method further comprises: The connection and response log of the Bluetooth device is recorded in the reconnection and retransmission test, and the connection and response log includes the connection status of each Bluetooth connection and the response status of each instruction.

7. The method according to claim 1 or 2, characterized in that: The reconnection test includes: Repeat the operations of re-establishing the Bluetooth connection and automatically disconnecting the Bluetooth connection multiple times at fixed time intervals; If the Bluetooth connection is successfully established multiple times in a row without interruption, it is determined that the Bluetooth device passes the reconnection test; Alternatively, if at least one of the multiple Bluetooth connections fails to be successfully established, or at least one of the multiple successfully established Bluetooth connections is interrupted, it is determined that the Bluetooth device fails the reconnection test.

8. The method according to claim 7, characterized in that The method further comprises: A connection log of the Bluetooth device is recorded in the reconnection test, wherein the connection log includes the connection status of each Bluetooth connection.

9. An electronic device, characterized in that: Comprising modules for executing the method as claimed in any one of claims 1 to 8.

10. An electronic device comprising a memory, at least one 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 8 is implemented.

Citation Information

Patent Citations

  • Bluetooth pairing method and system in test

    CN102833021A

  • Testing method and testing device

    CN106255141A

  • Test method, Bluetooth device, control method, test device and test system

    CN111106883A

  • Automatic test method and device based on Bluetooth and Bluetooth test terminal

    CN112996020A

  • Bluetooth connection test method and device

    CN114501286A