CN113194448A - Bluetooth device testing method, testing terminal and readable storage medium - Google Patents

Bluetooth device testing method, testing terminal and readable storage medium Download PDF

Info

Publication number
CN113194448A
CN113194448A CN202110428539.7A CN202110428539A CN113194448A CN 113194448 A CN113194448 A CN 113194448A CN 202110428539 A CN202110428539 A CN 202110428539A CN 113194448 A CN113194448 A CN 113194448A
Authority
CN
China
Prior art keywords
bluetooth
test
test terminal
time
screenshot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110428539.7A
Other languages
Chinese (zh)
Other versions
CN113194448B (en
Inventor
黄威
孔坚
赵聘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Inc
Original Assignee
Goertek Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Inc filed Critical Goertek Inc
Priority to CN202110428539.7A priority Critical patent/CN113194448B/en
Publication of CN113194448A publication Critical patent/CN113194448A/en
Application granted granted Critical
Publication of CN113194448B publication Critical patent/CN113194448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention discloses a test method, a test terminal and a readable storage medium of Bluetooth equipment, which are applied to a first test terminal, wherein the first test terminal is connected with a second test terminal and the Bluetooth equipment, and the test method of the Bluetooth equipment comprises the following steps: sending a starting instruction to the Bluetooth equipment and acquiring starting time so as to enable the Bluetooth of the Bluetooth equipment to enter a discoverable state; sending a scanning instruction to the second test terminal so that the Bluetooth of the second test terminal enters a scanning state; acquiring discovery time of the second test terminal scanning the Bluetooth equipment; and determining the discoverable time of the Bluetooth device according to the discovery time and the time interval between the starting times, thereby improving the test efficiency of the Bluetooth device.

Description

Bluetooth device testing method, testing terminal and readable storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a testing method for a bluetooth device, a testing terminal, and a readable storage medium.
Background
With the rapid development of bluetooth technology, bluetooth has become a basic function of smart devices. When the intelligent device is produced, the Bluetooth performance of the intelligent device needs to be fully tested. The existing method for testing the bluetooth performance is usually a manual testing mode, that is, the bluetooth of the tested bluetooth device is manually enabled to enter a discoverable state, and then the timing time when the bluetooth of the tested bluetooth device appears on a bluetooth scan list of a testing terminal is obtained by a manual timing method.
However, the above method for testing bluetooth performance is time-consuming, labor-consuming and insufficient in testing, so that the testing efficiency is low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a test method, a test terminal and a readable storage medium of Bluetooth equipment, and aims to improve the test efficiency of the Bluetooth equipment.
In order to achieve the above object, the present invention provides a method for testing a bluetooth device, which is applied to a first test terminal, wherein the first test terminal is connected with a second test terminal and the bluetooth device, and the method for testing the bluetooth device comprises the following steps:
sending a starting instruction to the Bluetooth equipment and acquiring starting time so as to enable the Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so that the Bluetooth of the second test terminal enters a scanning state;
acquiring discovery time of the second test terminal scanning the Bluetooth equipment;
determining a Bluetooth discoverable time of the Bluetooth device according to the discovery time and a time interval between the turn-on times.
Optionally, the step of obtaining the discovery time that the second test terminal scans the bluetooth device includes:
sending a screenshot instruction to the second test terminal, and updating the cut-off time according to the current moment;
receiving an interface screenshot of a scanning interface sent by the second test terminal according to the screenshot instruction;
when the interface screenshot comprises the equipment identifier of the Bluetooth equipment, taking the current deadline as the discovery time;
and returning to execute the step of sending the screenshot instruction to the second test terminal and updating the deadline time according to the current moment when the interface screenshot does not include the equipment identifier of the Bluetooth equipment.
Optionally, after the step of receiving the interface screenshot of the scan interface sent by the second test terminal according to the screenshot instruction, the method further includes:
when the interface screenshot does not include the equipment identifier of the Bluetooth equipment, acquiring the scanning duration of the Bluetooth equipment which is not found according to the deadline and the starting time;
and outputting prompt information when the scanning duration reaches a preset duration.
Optionally, after the step of receiving the interface screenshot of the scan interface sent by the second test terminal according to the screenshot instruction, the method further includes:
saving the interface screenshot, and updating the screenshot times;
and generating the identification information of the interface screenshot according to the equipment identification of the Bluetooth equipment, the current test times and the screenshot times.
Optionally, after the step of determining the discoverable time of bluetooth of the bluetooth device according to the discovery time and the time interval between the on times, the method further includes:
and sending a scanning stopping instruction to the second test terminal.
Optionally, after the step of determining the discoverable time of bluetooth of the bluetooth device according to the discovery time and the time interval between the on times, the method further includes:
saving the discoverable time of the Bluetooth and updating the testing times;
when the test times are larger than or equal to preset times, acquiring the found average time of the Bluetooth according to the found time of each Bluetooth;
when the test times are less than the preset times, sending a closing instruction to the Bluetooth equipment so as to enable the Bluetooth of the Bluetooth equipment to exit the discoverable state;
and returning to the step of sending the starting instruction to the Bluetooth equipment.
Optionally, before the step of sending the scan instruction to the second test terminal, the method further includes:
and sending a clearing instruction to the second test terminal so that the second test terminal clears the Bluetooth pairing information.
In addition, in order to achieve the above object, the present invention further provides a test terminal, including: the test program of the Bluetooth device realizes the steps of the test method of the Bluetooth device when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a readable storage medium, which stores thereon a test program of a bluetooth device, and when the test program of the bluetooth device is executed by a processor, the steps of the test method of the bluetooth device as described above are implemented.
The test method, the test terminal and the readable storage medium of the Bluetooth device are applied to a first test terminal, wherein the first test terminal is connected with a second test terminal and the Bluetooth device, sends a starting instruction to the Bluetooth device and obtains starting time so that the Bluetooth of the Bluetooth device enters a discoverable state; sending a scanning instruction to the second test terminal so that the Bluetooth of the second test terminal enters a scanning state; acquiring discovery time of the second test terminal scanning the Bluetooth equipment; and determining the discoverable time of the Bluetooth device according to the discovery time and the time interval between the starting times, thereby improving the test efficiency of the Bluetooth device.
Drawings
Fig. 1 is a schematic diagram of a hardware architecture of a test terminal according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a testing method of a bluetooth device according to a first embodiment of the present invention;
fig. 3 is a direct connection relationship between a first test terminal, a second test terminal and a bluetooth device according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a testing method of a bluetooth device according to a second embodiment of the present invention;
fig. 5 is a flowchart illustrating a testing method of a bluetooth device according to a third embodiment of the present invention;
fig. 6 is a flowchart illustrating a testing method of a bluetooth device according to a fourth embodiment of the present invention;
fig. 7 is a flowchart illustrating a testing method of a bluetooth device according to a fifth embodiment of the present invention;
fig. 8 is a flowchart illustrating a testing method of a bluetooth device according to a sixth embodiment of the present invention;
fig. 9 is a flowchart illustrating a testing method of a bluetooth device according to a seventh embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
With the rapid development of bluetooth technology, bluetooth has become a basic function of smart devices. When the intelligent device is produced, the Bluetooth performance of the intelligent device needs to be fully tested. The existing method for testing the bluetooth performance is usually a manual testing mode, that is, the bluetooth of the tested bluetooth device is manually enabled to enter a discoverable state, and then the timing time when the bluetooth of the tested bluetooth device appears on a bluetooth scan list of a testing terminal is obtained by a manual timing method.
However, the above method for testing bluetooth performance is time-consuming, labor-consuming and insufficient in testing, so that the testing efficiency is low.
In order to solve the above-mentioned drawbacks, an embodiment of the present invention provides a testing method for a bluetooth device, a testing terminal, and a readable storage medium, which are applied to a first testing terminal, where the first testing terminal is connected to a second testing terminal and the bluetooth device, and the testing method for the bluetooth device mainly includes the following steps:
sending a starting instruction to the Bluetooth equipment and acquiring starting time so as to enable the Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so that the Bluetooth of the second test terminal enters a scanning state;
acquiring discovery time of the second test terminal scanning the Bluetooth equipment;
determining a Bluetooth discoverable time of the Bluetooth device according to the discovery time and a time interval between the turn-on times.
The Bluetooth of the Bluetooth equipment is scanned by controlling the Bluetooth of the second test terminal, the discovery time of the Bluetooth equipment scanned by the second test terminal is obtained, and then the discoverable time of the Bluetooth is obtained according to the discovery time and the starting time of the Bluetooth equipment, so that the process of automatic test of the Bluetooth equipment is realized, and the test efficiency of the Bluetooth equipment is improved.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware architecture of a test terminal according to an embodiment of the present invention.
The test terminal of the embodiment of the invention can be terminal equipment such as a smart phone, a tablet personal computer, a PC and the like.
As shown in fig. 1, the test terminal may include: a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as a keyboard, etc., and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
It will be appreciated by those skilled in the art that the hardware architecture of the test terminal shown in fig. 1 does not constitute a limitation of the test terminal, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein a test program of an operating system, a network communication module, a user interface module, and a bluetooth device.
In the test terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the processor 1001 may be configured to invoke a test program for a bluetooth device stored in the memory 1005 and perform the following operations:
sending a starting instruction to the Bluetooth equipment and acquiring starting time so as to enable the Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so that the Bluetooth of the second test terminal enters a scanning state;
acquiring discovery time of the second test terminal scanning the Bluetooth equipment;
determining a Bluetooth discoverable time of the Bluetooth device according to the discovery time and a time interval between the turn-on times.
Further, the processor 1001 may be configured to invoke a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
sending a screenshot instruction to the second test terminal, and updating the cut-off time according to the current moment;
receiving an interface screenshot of a scanning interface sent by the second test terminal according to the screenshot instruction;
when the interface screenshot comprises the equipment identifier of the Bluetooth equipment, taking the current deadline as the discovery time;
and returning to execute the step of sending the screenshot instruction to the second test terminal and updating the deadline time according to the current moment when the interface screenshot does not include the equipment identifier of the Bluetooth equipment.
Further, the processor 1001 may be configured to invoke a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
when the interface screenshot does not include the equipment identifier of the Bluetooth equipment, acquiring the scanning duration of the Bluetooth equipment which is not found according to the deadline and the starting time;
and outputting prompt information when the scanning duration reaches a preset duration.
Further, the processor 1001 may be configured to invoke a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
saving the interface screenshot, and updating the screenshot times;
and generating the identification information of the interface screenshot according to the equipment identification of the Bluetooth equipment, the current test times and the screenshot times.
Further, the processor 1001 may be configured to invoke a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
and sending a scanning stopping instruction to the second test terminal.
Further, the processor 1001 may be configured to invoke a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
saving the discoverable time of the Bluetooth and updating the testing times;
when the test times are larger than or equal to preset times, acquiring the found average time of the Bluetooth according to the found time of each Bluetooth;
when the test times are less than the preset times, sending a closing instruction to the Bluetooth equipment so as to enable the Bluetooth of the Bluetooth equipment to exit the discoverable state;
and returning to the step of sending the starting instruction to the Bluetooth equipment.
Further, the processor 1001 may be configured to invoke a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
and sending a clearing instruction to the second test terminal so that the second test terminal clears the Bluetooth pairing information.
As shown in fig. 2, in a first embodiment of the testing method of the bluetooth device of the present invention, the testing method of the bluetooth device includes the following steps:
step S010, sending a starting instruction to the Bluetooth equipment and acquiring starting time so as to enable the Bluetooth of the Bluetooth equipment to enter a discoverable state;
step S020, sending a scanning instruction to the second test terminal to enable the Bluetooth of the second test terminal to enter a scanning state;
step S030, acquiring discovery time of the second test terminal scanning the Bluetooth equipment;
and step S040, determining the Bluetooth discoverable time of the Bluetooth device according to the discovery time and the time interval between the starting times.
In this embodiment, the present invention is applied to a first test terminal, the first test terminal is connected to a second test terminal, and the first test terminal can control the second test terminal and a bluetooth device; specifically, the first test terminal and the second test terminal can be terminal devices such as a smart phone, a tablet computer and a Personal Computer (PC); the second test terminal has a Bluetooth function, and correspondingly, the Bluetooth equipment also has the Bluetooth function; preferably, the first test terminal may be a PC to ensure the control efficiency of the first test terminal.
For example, as shown in fig. 3, the first test terminal may be a PC, the second test terminal may be a test mobile phone, that is, a smart phone for testing, and the bluetooth device is a bluetooth product to be tested; the test PC is connected with the test mobile phone through a connecting wire such as a USB data wire; the test PC can also be connected with the Bluetooth product through a connecting line or a connecting line comprising a serial port board.
After the test mobile phone is connected with the test PC, a debugging permission, such as an adb permission (Android Debug Bridge permission), is opened, that is, an Android debugging Bridge is opened, and specifically, the test mobile phone can be controlled only after the test PC obtains the debugging permission of the test mobile phone. After the test PC is connected with the Bluetooth product, a control instruction, such as an AT instruction, is sent to the Bluetooth product, so that the test PC acquires the control authority of the Bluetooth product.
After the first test terminal, the second test terminal and the Bluetooth device are all started, a processor of the first test terminal acquires the debugging authority of the second test terminal, and after the control authority of the Bluetooth device is acquired, a starting instruction is firstly sent to the Bluetooth device so that the Bluetooth of the Bluetooth device enters a discoverable state, wherein the discoverable state is that the Bluetooth of the current device can be scanned by the Bluetooth of another device; simultaneously acquiring the current moment, and taking the current moment as the starting time of the Bluetooth equipment; then sending a scanning instruction to the second test terminal to enable the Bluetooth of the second test terminal to enter a scanning state so as to search corresponding Bluetooth equipment of the Bluetooth in a discoverable state; the processor of the first test terminal acquires the discovery time when the Bluetooth of the second test terminal scans the Bluetooth of the Bluetooth device, then calculates the time interval between the discovery time and the starting time, and takes the calculated time interval as the discoverable time of the Bluetooth device, wherein the discoverable time of the Bluetooth is the time length when the Bluetooth of another device can scan the Bluetooth of the Bluetooth device after the Bluetooth of the Bluetooth device is started.
In the technical scheme disclosed in this embodiment, the bluetooth of the bluetooth device is scanned by controlling the bluetooth of the second test terminal, the discovery time of the second test terminal for scanning the bluetooth device is obtained, and then the discoverable time of the bluetooth is obtained according to the discovery time and the start time of the bluetooth device, so that the process of automatic testing of the bluetooth device is realized, and the testing efficiency of the bluetooth device is improved.
Optionally, as shown in fig. 4, based on the first embodiment, in a second embodiment of the testing method for a bluetooth device of the present invention, the step S030 further includes:
step 031, send the screenshot command to the said second test terminal, and upgrade the deadline according to the present moment;
step S032, receiving an interface screenshot of the scanning interface sent by the second test terminal according to the screenshot instruction;
step 033, when the interface screenshot includes the device identifier of the bluetooth device, taking the current deadline as the discovery time;
and S034, when the interface screenshot does not include the equipment identifier of the Bluetooth equipment, returning to execute the step of sending the screenshot instruction to the second test terminal and updating the deadline according to the current moment.
In this embodiment, the device identifier may be a bluetooth address, or may be a unique identifier of a bluetooth device, which is not specifically limited herein; and the cut-off time is recording time for sending a screenshot instruction to the second test terminal so as to obtain the screenshot time when the second test terminal performs screenshot.
And the processor of the first test terminal sends a screenshot instruction to the second test terminal, and meanwhile, the deadline time in the memory is updated to the current time. And after receiving the screenshot command, the second test terminal performs screenshot on the current Bluetooth scanning interface and sends the acquired interface screenshot to the first test terminal. When the processor of the first test terminal receives the interface screenshot sent by the second test terminal, identifying the received interface screenshot to obtain text information in the interface screenshot, wherein the text information may include a plurality of text contents, such as device identifiers of different bluetooth devices, interface information of a scanning interface, and the like; then, the text information is compared with the equipment identification of the Bluetooth equipment, when text content consistent with the equipment identification exists, the current deadline is used as Bluetooth discovery time of the Bluetooth equipment, namely the discovery time of the Bluetooth equipment is discovered, and then the discoverable time of the Bluetooth is obtained according to the starting time and the discovery time of the Bluetooth equipment.
And when the word content consistent with the equipment identification does not exist, the processor of the first test terminal returns to execute the process of sending the screenshot instruction to the second test terminal until the equipment identification of the Bluetooth equipment is identified in the interface screenshot sent by the second test terminal.
In the technical scheme disclosed in this embodiment, the interface screenshot of the scanning interface of the second test terminal is obtained, and then the interface screenshot is identified to determine whether the second test terminal scans the bluetooth device, so as to determine the time that the bluetooth of the bluetooth device can be found, thereby realizing the automatic test process of the bluetooth device, and improving the test efficiency of the bluetooth device.
Optionally, as shown in fig. 5, based on the second embodiment, in a third embodiment of the testing method for a bluetooth device of the present invention, after step S032, the method further includes:
step S035, when the interface screenshot does not include the equipment identification of the Bluetooth equipment, acquiring the scanning duration of the Bluetooth equipment which is not found according to the deadline time and the starting time;
and S036, outputting prompt information when the scanning time reaches a preset time.
In this embodiment, when the device identifier of the bluetooth device cannot be identified in the interface screenshot, the processor of the first test terminal acquires the deadline time stored in the memory, calculates a time interval between the deadline time and the start time, and takes the time interval as a scanning duration of the second test terminal when the bluetooth device is not found, where the scanning duration is a duration of a bluetooth scan of the bluetooth device that has been scanned by the bluetooth of the second test terminal, and then compares the acquired scanning duration with a preset duration, where the preset duration is the longest scanning duration, that is, a determination condition for determining a bluetooth fault of the bluetooth device; and when the scanning duration is greater than or equal to the preset duration, outputting prompt information that the Bluetooth of the Bluetooth equipment has faults.
In the technical scheme disclosed in the embodiment, by setting the longest scanning time, the situation of scanning the bluetooth device indefinitely is avoided, and a tester is informed of the scanning result by outputting prompt information, so that a test error is discovered in time.
Optionally, as shown in fig. 6, based on the second embodiment, in a fourth embodiment of the testing method for a bluetooth device of the present invention, after step S032, the method further includes:
s037, saving the screenshot of the interface and updating the screenshot times;
and S038, generating identification information of the interface screenshot according to the equipment identification of the Bluetooth equipment, the current test times and the screenshot times.
In this embodiment, the memory of the first test terminal further stores the test times, and the current bluetooth device can be tested for multiple times, and correspondingly, the memory also stores the test times of the current bluetooth device to be tested; the identification information of the interface screenshot is a unique identification of the interface screenshot, and is used for querying the interface screenshot according to the identification information, optionally, the identification information may be a file name of the interface screenshot, and is composed of a device identification of the tested bluetooth device, such as a bluetooth address, a currently tested sequence of the tested bluetooth device, and a screenshot sequence in a current testing process, and may be exemplarily expressed as a "bluetooth address" _ "test times" _ "screenshot times".
After receiving the interface screenshot sent by the second test terminal, the processor of the first test terminal stores the received interface screenshot in a preset folder corresponding to the interface screenshot, specifically, the preset folder is created before testing, and the file name of the preset folder may include the test date of the bluetooth device; and then updating the screenshot times in the memory, specifically, adding one to the screenshot times, then generating identification information of the interface screenshot according to the equipment identification of the Bluetooth equipment, the current test times and the updated screenshot times, and renaming the interface screenshot according to the identification information so that the file name of the interface screenshot is the identification information for the user to inquire.
In the technical scheme disclosed in this embodiment, the user can query the corresponding interface screenshot according to the bluetooth address, the test times and/or the screenshot times by generating the identification information of the interface screenshot, so that the function of querying the interface screenshot is provided.
Optionally, as shown in fig. 7, based on the first embodiment, in a fifth embodiment of the testing method for a bluetooth device of the present invention, after step S040, the method further includes:
and step S050, sending a scanning stopping instruction to the second test terminal.
In this embodiment, after recognizing that the second test terminal has scanned the bluetooth device, the processor of the first test terminal sends a scan stop instruction to the second test terminal, so that the bluetooth of the second test terminal exits from the scan state, and energy consumption of the second test terminal is reduced.
Alternatively, as shown in fig. 8, based on the first embodiment, in a sixth embodiment of the testing method for a bluetooth device of the present invention, after step S040, the method further includes:
step S060, storing the discoverable time of the Bluetooth and updating the testing times;
step S070, when the test times are larger than or equal to the preset times, obtaining the found average time of the Bluetooth according to the found time of each Bluetooth;
step S080, when the test times are less than the preset times, sending a closing instruction to the Bluetooth device so as to enable the Bluetooth of the Bluetooth device to exit the discoverable state;
and S090, returning to the step of sending the starting instruction to the Bluetooth device.
In this embodiment, the first test terminal may perform multiple tests on the current bluetooth device, and correspondingly, the memory stores the test times of the current bluetooth device to be tested.
After acquiring the discoverable time of the currently tested bluetooth, the processor of the first test terminal stores the acquired discoverable time of the bluetooth in a preset folder corresponding to the discoverable time of the bluetooth, specifically, the preset folder is created before the test, and the file name of the preset folder may include the test date of the bluetooth device and the start time/discovery time of the current test process, or the test date and the current time, and related names are only used for querying test data, and are not particularly limited; then updating the number of tests in the memory, specifically, the number of tests may be increased by one; then comparing the test times with preset times, wherein the preset times are the maximum test times, namely when the test times reach the maximum test times, calculating more accurate discoverable time of the Bluetooth according to discoverable time of the Bluetooth obtained in all test processes; when the test times are more than or equal to the preset times, acquiring the discoverable time of the Bluetooth corresponding to the current tested Bluetooth equipment stored in the memory, and acquiring a corresponding average value according to all the discoverable time of the Bluetooth, namely the discoverable average time of the Bluetooth; and when the test times are less than the preset times, sending a closing instruction to the Bluetooth equipment so as to enable the Bluetooth of the Bluetooth equipment to exit the discoverable state, preparing for restarting the test process, and returning to execute the test process.
In the technical scheme disclosed in the embodiment, the found time of the bluetooth device is tested for many times, and the corresponding average value is used as the final found time of the bluetooth, so that the interference of accidental factors to the test result is avoided, and the accuracy of the test result is improved.
Optionally, as shown in fig. 9, based on the first embodiment, in a seventh embodiment of the testing method of a bluetooth device of the present invention, before the step S020, the method further includes:
and S100, sending a clearing instruction to the second test terminal so that the second test terminal clears the Bluetooth pairing information.
In this embodiment, since the paired bluetooth devices may exist in the second test terminal, in the bluetooth scanning process, when the paired bluetooth devices are scanned, the paired bluetooth devices may be automatically connected, so as to stop the bluetooth scanning process, thereby affecting the test process of the tested bluetooth device, and therefore, before the processor of the first test terminal sends the scan instruction to the second test terminal, the processor of the first test terminal needs to send a clear instruction to the second test terminal, so that the second test terminal clears the bluetooth device information stored in the memory thereof, and avoids affecting the test process of the tested bluetooth device.
In addition, an embodiment of the present invention further provides a test terminal, where the test terminal includes a memory, a processor, and a test program of a bluetooth device that is stored in the memory and can be run on the processor, and when the test program of the bluetooth device is executed by the processor, the steps of the test method of the bluetooth device according to the above embodiments are implemented.
In addition, an embodiment of the present invention further provides a readable storage medium, where a test program of a bluetooth device is stored on the readable storage medium, and the test program of the bluetooth device, when executed by a processor, implements the steps of the test method of the bluetooth device according to the above embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a testing terminal (e.g. PC, etc.) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A test method of Bluetooth equipment is characterized by being applied to a first test terminal, wherein the first test terminal is connected with a second test terminal and the Bluetooth equipment, and the test method of the Bluetooth equipment comprises the following steps:
sending a starting instruction to the Bluetooth equipment and acquiring starting time so as to enable the Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so that the Bluetooth of the second test terminal enters a scanning state;
acquiring discovery time of the second test terminal scanning the Bluetooth equipment;
determining a Bluetooth discoverable time of the Bluetooth device according to the discovery time and a time interval between the turn-on times.
2. The method for testing the bluetooth device according to claim 1, wherein the step of acquiring the discovery time that the second test terminal scans to the bluetooth device comprises:
sending a screenshot instruction to the second test terminal, and updating the cut-off time according to the current moment;
receiving an interface screenshot of a scanning interface sent by the second test terminal according to the screenshot instruction;
when the interface screenshot comprises the equipment identifier of the Bluetooth equipment, taking the current deadline as the discovery time;
and returning to execute the step of sending the screenshot instruction to the second test terminal and updating the deadline time according to the current moment when the interface screenshot does not include the equipment identifier of the Bluetooth equipment.
3. The method for testing the bluetooth device according to claim 2, wherein after the step of receiving the interface screenshot of the scan interface sent by the second test terminal according to the screenshot command, the method further comprises:
when the interface screenshot does not include the equipment identifier of the Bluetooth equipment, acquiring the scanning duration of the Bluetooth equipment which is not found according to the deadline and the starting time;
and outputting prompt information when the scanning duration reaches a preset duration.
4. The method for testing the bluetooth device according to claim 2, wherein after the step of receiving the interface screenshot of the scan interface sent by the second test terminal according to the screenshot command, the method further comprises:
saving the interface screenshot, and updating the screenshot times;
and generating the identification information of the interface screenshot according to the equipment identification of the Bluetooth equipment, the current test times and the screenshot times.
5. The method for testing a bluetooth device according to claim 1, wherein after the step of determining the bluetooth discoverable time of the bluetooth device according to the discovery time and the time interval between the on-times, further comprising:
and sending a scanning stopping instruction to the second test terminal.
6. The method for testing a bluetooth device according to claim 1, wherein after the step of determining the bluetooth discoverable time of the bluetooth device according to the discovery time and the time interval between the on-times, further comprising:
saving the discoverable time of the Bluetooth and updating the testing times;
when the test times are larger than or equal to preset times, acquiring the found average time of the Bluetooth according to the found time of each Bluetooth;
when the test times are less than the preset times, sending a closing instruction to the Bluetooth equipment so as to enable the Bluetooth of the Bluetooth equipment to exit the discoverable state;
and returning to the step of sending the starting instruction to the Bluetooth equipment.
7. The method for testing a bluetooth device according to claim 1, wherein the step of sending the scan command to the second test terminal is preceded by:
and sending a clearing instruction to the second test terminal so that the second test terminal clears the Bluetooth pairing information.
8. A test terminal, characterized in that the test terminal comprises: a memory, a processor and a test program for a bluetooth device stored on the memory and executable on the processor, the test program for a bluetooth device implementing the steps of the method for testing a bluetooth device as claimed in any one of claims 1 to 7 when executed by the processor.
9. A readable storage medium, on which a test program of a bluetooth device is stored, the test program of the bluetooth device implementing the steps of the test method of the bluetooth device according to any one of claims 1 to 7 when executed by a processor.
CN202110428539.7A 2021-04-20 2021-04-20 Bluetooth device testing method, testing terminal and readable storage medium Active CN113194448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110428539.7A CN113194448B (en) 2021-04-20 2021-04-20 Bluetooth device testing method, testing terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110428539.7A CN113194448B (en) 2021-04-20 2021-04-20 Bluetooth device testing method, testing terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN113194448A true CN113194448A (en) 2021-07-30
CN113194448B CN113194448B (en) 2023-04-25

Family

ID=76977979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110428539.7A Active CN113194448B (en) 2021-04-20 2021-04-20 Bluetooth device testing method, testing terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN113194448B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598401A (en) * 2022-05-09 2022-06-07 荣耀终端有限公司 Radio frequency test method, Bluetooth device, electronic device and radio frequency test system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160191358A1 (en) * 2014-03-20 2016-06-30 Huizhou Tcl Mobile Communication Co., Ltd Testing method for a smart wristband and testing system thereof
WO2017190519A1 (en) * 2016-05-04 2017-11-09 青岛歌尔声学科技有限公司 Nfc bluetooth adapter, and test system and test method for bluetooth product
CN109041023A (en) * 2018-08-14 2018-12-18 福建联迪商用设备有限公司 A kind of bluetooth equipment test method and system
CN109640353A (en) * 2019-01-17 2019-04-16 Tcl移动通信科技(宁波)有限公司 A kind of bluetooth equipment test method, intelligent terminal and storage medium
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
CN210431439U (en) * 2019-08-23 2020-04-28 北京华大智宝电子系统有限公司 Bluetooth test equipment
CN111106883A (en) * 2019-12-09 2020-05-05 惠州拓邦电气技术有限公司 Test method and Bluetooth equipment, control method and test device, and test system
CN111885580A (en) * 2020-07-10 2020-11-03 上海庆科信息技术有限公司 Bluetooth device test method, device and storage medium
CN112054822A (en) * 2020-08-01 2020-12-08 上海闻泰信息技术有限公司 Bluetooth test method and device, electronic equipment and storage medium
CN112235166A (en) * 2020-12-04 2021-01-15 歌尔科技有限公司 Bluetooth connection time detection method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160191358A1 (en) * 2014-03-20 2016-06-30 Huizhou Tcl Mobile Communication Co., Ltd Testing method for a smart wristband and testing system thereof
WO2017190519A1 (en) * 2016-05-04 2017-11-09 青岛歌尔声学科技有限公司 Nfc bluetooth adapter, and test system and test method for bluetooth product
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
CN109041023A (en) * 2018-08-14 2018-12-18 福建联迪商用设备有限公司 A kind of bluetooth equipment test method and system
CN109640353A (en) * 2019-01-17 2019-04-16 Tcl移动通信科技(宁波)有限公司 A kind of bluetooth equipment test method, intelligent terminal and storage medium
CN210431439U (en) * 2019-08-23 2020-04-28 北京华大智宝电子系统有限公司 Bluetooth test equipment
CN111106883A (en) * 2019-12-09 2020-05-05 惠州拓邦电气技术有限公司 Test method and Bluetooth equipment, control method and test device, and test system
CN111885580A (en) * 2020-07-10 2020-11-03 上海庆科信息技术有限公司 Bluetooth device test method, device and storage medium
CN112054822A (en) * 2020-08-01 2020-12-08 上海闻泰信息技术有限公司 Bluetooth test method and device, electronic equipment and storage medium
CN112235166A (en) * 2020-12-04 2021-01-15 歌尔科技有限公司 Bluetooth connection time detection method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598401A (en) * 2022-05-09 2022-06-07 荣耀终端有限公司 Radio frequency test method, Bluetooth device, electronic device and radio frequency test system

Also Published As

Publication number Publication date
CN113194448B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN109726134B (en) Interface test method and system
CN108776592B (en) Page construction method, device, equipment and storage medium
US20180376335A1 (en) Method and device for realizing wireless access point connection authentication
CN107341106B (en) Application compatibility detection method, development terminal and storage medium
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN113194448A (en) Bluetooth device testing method, testing terminal and readable storage medium
CN114661330A (en) Vehicle hardware program updating method, device, equipment and storage medium
CN111008148A (en) Code testing method and device and computer readable storage medium
CN112364187B (en) Automobile accessory database building method, device and equipment based on big data
CN107659933B (en) Bidirectional pairing connection method for wireless equipment, wireless equipment and storage medium
CN107340841B (en) Method for quickly initializing diagnostic instrument, terminal and computer readable storage medium
CN109347578B (en) Radio frequency performance test method and device, computer equipment and readable storage medium
CN117194259A (en) Interface testing method, system, electronic equipment and storage medium
CN103440455A (en) Mobile terminal software package safety detection method and system
CN111061637A (en) Interface test method, interface test device and storage medium
WO2019227454A1 (en) Ecu identifier and identification method, system, device and medium thereof
CN112265879B (en) Elevator control system, debugging method thereof, debugging equipment and readable storage medium
CN111151008B (en) Verification method and device for game operation data, configuration background and medium
CN114756183A (en) Data printing method, device, equipment and storage medium
CN110896333B (en) WiFi module testing method and system and storage medium
CN109673032B (en) Network switching method, device, computer readable storage medium and system
CN114003484A (en) Log output method, device and equipment for interface test and storage medium
CN113472611A (en) Method and device for acquiring WiFi signal strength and readable storage medium
CN110309000B (en) Application update prompting method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant