CN113194448B - 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
CN113194448B
CN113194448B CN202110428539.7A CN202110428539A CN113194448B CN 113194448 B CN113194448 B CN 113194448B CN 202110428539 A CN202110428539 A CN 202110428539A CN 113194448 B CN113194448 B CN 113194448B
Authority
CN
China
Prior art keywords
bluetooth
time
test
test terminal
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.)
Active
Application number
CN202110428539.7A
Other languages
Chinese (zh)
Other versions
CN113194448A (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 testing method, a testing terminal and a readable storage medium of Bluetooth equipment, which are applied to a first testing terminal, wherein the first testing terminal is connected with a second testing terminal and the Bluetooth equipment, and the testing method of the Bluetooth equipment comprises the following steps: sending an opening instruction to the Bluetooth equipment, and acquiring opening time so as to enable Bluetooth of the Bluetooth equipment to enter a discoverable state; sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state; obtaining the discovery time from the second test terminal to the Bluetooth equipment; and determining the Bluetooth discoverable time of the Bluetooth equipment according to the discovery time and the time interval between the starting times, thereby improving the testing efficiency of the Bluetooth equipment.

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, a testing terminal, and a readable storage medium for a bluetooth device.
Background
With the rapid development of bluetooth technology, bluetooth has become a basic function of smart devices. When intelligent equipment is produced, the Bluetooth performance of the intelligent equipment needs to be fully tested. The existing method for testing bluetooth performance is usually a manual testing mode, i.e. bluetooth of a bluetooth device to be tested is manually brought into a discoverable state, and then the timing time of the bluetooth device to be tested appearing on a bluetooth scan list of a test terminal is obtained by a manual timing method.
However, the above-mentioned bluetooth performance test method is time-consuming and laborious and insufficient in test, so that the test efficiency is low.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a testing method, a testing terminal and a readable storage medium of Bluetooth equipment, aiming at improving the testing efficiency of the Bluetooth equipment.
In order to achieve the above object, the present invention provides a method for testing bluetooth equipment, which is applied to a first test terminal, wherein the first test terminal is connected with a second test terminal and bluetooth equipment, and the method for testing bluetooth equipment comprises the following steps:
sending an opening instruction to the Bluetooth equipment, and acquiring opening time so as to enable Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state;
obtaining the discovery time from the second test terminal to the Bluetooth equipment;
and determining the Bluetooth discoverable time of the Bluetooth device according to the discovery time and the time interval between the starting times.
Optionally, the step of obtaining the discovery time of the second test terminal scanning for the bluetooth device includes:
sending a screenshot instruction to the second test terminal, and updating the deadline 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 when the equipment identifier of the Bluetooth equipment is not included in the interface screenshot, returning to execute the step of sending a screenshot instruction to the second test terminal and updating the expiration time according to the current moment.
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 comprise the equipment identifier of the Bluetooth equipment, acquiring the scanning time length of the equipment without finding the Bluetooth equipment according to the cut-off time and the starting time;
and outputting prompt information when the scanning time length reaches a preset time length.
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:
storing 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 bluetooth discoverable time 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 bluetooth discoverable time of the bluetooth device according to the discovery time and the time interval between the on times, the method further includes:
storing the discoverable time of the Bluetooth and updating the test times;
when the test times are greater than or equal to the preset times, acquiring average time of the discoverable Bluetooth according to each discoverable Bluetooth time;
when the test times are smaller than 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 a 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 also provides a test terminal, which includes: the Bluetooth device testing device comprises a memory, a processor and a Bluetooth device testing program stored in the memory and capable of running on the processor, wherein the Bluetooth device testing program realizes the steps of the Bluetooth device testing method when being executed by the processor.
In addition, in order to achieve the above object, the present invention also proposes a readable storage medium having stored thereon a test program of a bluetooth device, which when executed by a processor, implements the steps of the test method of a bluetooth device as described above.
The test method, the test terminal and the readable storage medium of the Bluetooth device are applied to a first test terminal, the first test terminal is connected with a second test terminal and the Bluetooth device, an opening instruction is sent to the Bluetooth device, and the opening time is acquired, so that Bluetooth of the Bluetooth device can enter a discoverable state; sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state; obtaining the discovery time from the second test terminal to the Bluetooth equipment; and determining the Bluetooth discoverable time of the Bluetooth equipment according to the discovery time and the time interval between the starting times, thereby improving the testing efficiency of the Bluetooth equipment.
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 of a first embodiment of a testing method of a bluetooth device according to 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 of a second embodiment of a testing method of the bluetooth device according to the present invention;
fig. 5 is a flowchart of a third embodiment of a testing method of a bluetooth device according to the present invention;
fig. 6 is a flowchart of a fourth embodiment of a testing method of the bluetooth device according to the present invention;
fig. 7 is a flowchart of a fifth embodiment of a testing method of a bluetooth device according to the present invention;
fig. 8 is a flowchart of a sixth embodiment of a testing method of a bluetooth device according to the present invention;
fig. 9 is a flowchart of a seventh embodiment of a testing method of a bluetooth device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
With the rapid development of bluetooth technology, bluetooth has become a basic function of smart devices. When intelligent equipment is produced, the Bluetooth performance of the intelligent equipment needs to be fully tested. The existing method for testing bluetooth performance is usually a manual testing mode, i.e. bluetooth of a bluetooth device to be tested is manually brought into a discoverable state, and then the timing time of the bluetooth device to be tested appearing on a bluetooth scan list of a test terminal is obtained by a manual timing method.
However, the above-mentioned bluetooth performance test method is time-consuming and laborious and insufficient in test, so that the test efficiency is low.
In order to solve the above-mentioned drawbacks, an embodiment of the present invention provides a testing method, a testing terminal and a readable storage medium for a bluetooth device, which are applied to a first testing terminal, wherein the first testing terminal is connected with a second testing terminal and the bluetooth device, and the testing method for the bluetooth device mainly includes the following steps:
sending an opening instruction to the Bluetooth equipment, and acquiring opening time so as to enable Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state;
obtaining the discovery time from the second test terminal to the Bluetooth equipment;
and determining the Bluetooth discoverable time of the Bluetooth device according to the discovery time and the time interval between the starting times.
The Bluetooth of the Bluetooth equipment is scanned by controlling the Bluetooth of the second test terminal, the discovery time from the second test terminal to the Bluetooth equipment is obtained, then the Bluetooth discoverable time is obtained according to the discovery time and the Bluetooth opening time of the Bluetooth equipment, and the automatic test process of the Bluetooth equipment is realized, so that 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 the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a keyboard, etc., and the optional user interface 1003 may also include 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 stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate 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 fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a test program of a bluetooth device may be included in a memory 1005 as one type of computer storage medium.
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 call a test program of the bluetooth device stored in the memory 1005, and perform the following operations:
sending an opening instruction to the Bluetooth equipment, and acquiring opening time so as to enable Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state;
obtaining the discovery time from the second test terminal to the Bluetooth equipment;
and determining the Bluetooth discoverable time of the Bluetooth device according to the discovery time and the time interval between the starting times.
Further, the processor 1001 may be configured to call 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 deadline 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 when the equipment identifier of the Bluetooth equipment is not included in the interface screenshot, returning to execute the step of sending a screenshot instruction to the second test terminal and updating the expiration time according to the current moment.
Further, the processor 1001 may be configured to call a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
when the interface screenshot does not comprise the equipment identifier of the Bluetooth equipment, acquiring the scanning time length of the equipment without finding the Bluetooth equipment according to the cut-off time and the starting time;
and outputting prompt information when the scanning time length reaches a preset time length.
Further, the processor 1001 may be configured to call a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
storing 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 call 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 call a test program of the bluetooth device stored in the memory 1005, and further perform the following operations:
storing the discoverable time of the Bluetooth and updating the test times;
when the test times are greater than or equal to the preset times, acquiring average time of the discoverable Bluetooth according to each discoverable Bluetooth time;
when the test times are smaller than 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 call 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 an opening instruction to the Bluetooth equipment, and acquiring opening time so as to enable Bluetooth of the Bluetooth equipment to enter a discoverable state;
step S020, sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state;
step S030, obtaining a discovery time from the second test terminal to the bluetooth device;
step S040, determining a bluetooth discoverable time of the bluetooth device according to the discovery time and the time interval between the on times.
In this embodiment, the invention is applied to the first test terminal, the first test terminal is connected with the second test terminal, and the first test terminal can control the second test terminal and the bluetooth device; specifically, the first test terminal and the second test terminal can be terminal devices such as a smart phone, a tablet personal computer, a PC (personal computer) and the like; 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, so as to ensure control efficiency of the first test terminal.
As shown in fig. 3, the first test terminal may be a PC, the second test terminal may be a test mobile phone, i.e. a smart mobile 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 may also be connected to the bluetooth product via a connection line or a connection line comprising a serial board.
After the test mobile phone is connected with the test PC, a debugging authority, such as adb authority (Android Debug Bridge authority), namely an android debugging bridge is started, and specifically, the test mobile phone can be controlled after the test PC acquires the debugging authority 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 obtains 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 processor acquires the control authority of the Bluetooth device, an opening instruction is sent to the Bluetooth device so that Bluetooth of the Bluetooth device can enter a discoverable state, wherein the discoverable state is that Bluetooth of the current device can be scanned by Bluetooth of another device; simultaneously acquiring the current time and taking the current time as the Bluetooth starting time of the Bluetooth equipment; then sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state to search for a corresponding Bluetooth device in a Bluetooth state which can be found; the processor of the first test terminal obtains the discovery time of the Bluetooth of the second test terminal from the Bluetooth of the Bluetooth device, 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 is the time length of the Bluetooth of the other device from being capable of scanning the Bluetooth of the Bluetooth device after the Bluetooth of the Bluetooth device is started.
In the technical scheme disclosed in the embodiment, the bluetooth of the bluetooth device is scanned by controlling the bluetooth of the second test terminal, the discovery time of the bluetooth device scanned by the second test terminal is obtained, and then the bluetooth discoverable time is obtained according to the discovery time and the starting time of the bluetooth device, so that the automatic test process of the bluetooth device is realized, and the test 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 of the bluetooth device of the present invention, the step S030 further includes:
step S031, a screenshot instruction is sent to the second test terminal, and the deadline is updated according to the current moment;
step S032, receiving an interface screenshot of a scanning interface sent by the second test terminal according to the screenshot instruction;
step S033, when the interface screenshot includes the device identifier of the bluetooth device, taking the current deadline as the discovery time;
and step S034, when the equipment identifier of the Bluetooth equipment is not included in the interface screenshot, returning to execute the step of sending the screenshot instruction to the second test terminal and updating the expiration time 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 the record time of 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 in the memory is updated to be the current time. After receiving the screenshot instruction, the second test terminal performs screenshot on the current Bluetooth scanning interface and sends the obtained 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 can comprise a plurality of text contents, such as equipment identifiers of different Bluetooth equipment, interface information of a scanning interface and the like; and comparing the text information with the equipment identifier of the Bluetooth equipment, taking the current deadline as the Bluetooth discovery time of the Bluetooth equipment when the text content consistent with the equipment identifier exists, namely the discovery time of the Bluetooth equipment, and acquiring the discoverable time of the Bluetooth according to the starting time and the discovery time of the Bluetooth equipment.
And when the processor of the first test terminal does not have the text content consistent with the equipment identifier, returning to execute the process of sending the screenshot instruction to the second test terminal until the equipment identifier of the Bluetooth equipment is identified in the interface screenshot sent by the second test terminal.
In the technical scheme disclosed by the 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 that the Bluetooth discoverable time of the Bluetooth device is determined, 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. 5, in a third embodiment of the testing method of the bluetooth device according to the present invention, after the step S032, the method further includes:
step S035, when the interface screenshot does not include the equipment identifier of the Bluetooth equipment, acquiring the scanning time length of the equipment without finding the Bluetooth equipment according to the cut-off time and the opening time;
step S036, outputting prompt information when the scanning time length reaches a preset time length.
In this embodiment, when the processor of the first test terminal does not recognize the device identifier of the bluetooth device in the interface screenshot, acquiring the deadline stored in the memory, calculating a time interval between the deadline and the opening time, using the time interval as a scanning time length of the second test terminal without finding the bluetooth device, where the scanning time length is a time length of bluetooth of the bluetooth scanned bluetooth device of the second test terminal, and comparing the acquired scanning time length with a preset time length, where the preset time length is the longest scanning time, that is, determining conditions of bluetooth failure of the bluetooth device; and outputting prompt information of the Bluetooth failure of the Bluetooth equipment when the scanning time length is longer than or equal to the preset time length.
In the technical scheme disclosed in the embodiment, the condition of infinitely scanning the Bluetooth equipment is avoided by setting the longest scanning time, and a tester is informed by outputting prompt information to discover testing errors in time.
Optionally, as shown in fig. 6, in a fourth embodiment of the testing method of the bluetooth device according to the present invention, after the step S032, the method further includes:
step S037, saving the interface screenshot and updating screenshot times;
step S038, 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.
In this embodiment, the memory of the first test terminal also 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, alternatively, the identification information may be a file name of the interface screenshot, and the identification information is composed of a device identification of the tested bluetooth device, such as a bluetooth address, a current tested order of the tested bluetooth device, and a screenshot order in a current testing process, and may be represented as a "bluetooth address" _number of tests "_number of screenshots" by way of example.
After the processor of the first test terminal receives the interface screenshot sent by the second test terminal, the received interface screenshot is stored in a preset folder corresponding to the interface screenshot, specifically, the preset folder is created before the test, and the file name of the preset folder can comprise the test date of the Bluetooth device; and updating the screenshot times in the memory, specifically, adding one to the screenshot times, generating the 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 by the embodiment, the function of inquiring the interface screenshot is provided by generating the identification information of the interface screenshot so that a user inquires the corresponding interface screenshot according to the Bluetooth address, the test times and/or the screenshot times.
Optionally, as shown in fig. 7, in a fifth embodiment of the testing method of the bluetooth device according to the present invention, after the step S040, the method further includes:
and 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 stopping instruction to the second test terminal, so that bluetooth of the second test terminal exits the scan state, and energy consumption of the second test terminal is reduced.
Optionally, as shown in fig. 8, in a sixth embodiment of the testing method of the bluetooth device according to the present invention, after the step S040, the method further includes:
step S060, saving the discoverable time of the Bluetooth and updating the test times;
step S070, when the test times are greater than or equal to preset times, obtaining average time of the discoverable Bluetooth according to each discoverable Bluetooth time;
step S080, when the test times are smaller 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;
step S090, returning to the step of executing the starting instruction sent to the Bluetooth device.
In this embodiment, the first test terminal may perform multiple tests on the current bluetooth device, and correspondingly, the number of tests of the current bluetooth device to be tested is stored in the memory.
After acquiring the discoverable time of the Bluetooth in the current test, the processor of the first test terminal saves 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, the file name of the preset folder can comprise the test date of the Bluetooth device and the starting time/discovery time of the current test process, or the test date and the current time, and the related naming is only used for inquiring the test data and is not particularly limited; the number of tests in the memory is then updated, and in particular, the number of tests may be incremented by one; 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, more accurate Bluetooth discoverable time can be calculated according to the Bluetooth discoverable time obtained in all the test processes; when the test times are greater than or equal to the preset times, acquiring the discoverable time of the Bluetooth corresponding to the current tested Bluetooth device 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 smaller than the preset times, sending a closing instruction to the Bluetooth equipment so that the Bluetooth of the Bluetooth equipment exits the discoverable state, preparing for a re-starting test process, and returning to execute the test process.
In the technical scheme disclosed by the embodiment, the Bluetooth discoverable time of the Bluetooth equipment is tested for multiple times, and the corresponding average value is used as the final Bluetooth discoverable time, so that the interference of accidental factors on the test result is avoided, and the accuracy of the test result is improved.
Optionally, as shown in fig. 9, in a seventh embodiment of the testing method of a bluetooth device according to the present invention, before the step S020, the method further includes:
and step S100, sending a clearing instruction to the second test terminal so that the second test terminal clears the Bluetooth pairing information.
In this embodiment, because the second test terminal may have paired bluetooth devices, in the bluetooth scanning process, when the paired bluetooth devices are scanned, the paired bluetooth devices are automatically connected, so as to stop the bluetooth scanning process, thereby affecting the testing process of the bluetooth devices under test, and therefore, before sending a scanning instruction to the second test terminal, the processor of the first test terminal also needs to send a clearing instruction to the second test terminal, so that the second test terminal clears the bluetooth device information stored in the memory of the second test terminal, and avoids affecting the testing process of the bluetooth devices under test.
In addition, the embodiment of the invention also provides a test terminal, which comprises a memory, a processor and a test program of the Bluetooth device, wherein the test program of the Bluetooth device is stored in the memory and can run on the processor, and the test program of the Bluetooth device is executed by the processor to realize the steps of the test method of the Bluetooth device in each embodiment.
In addition, the embodiment of the invention also provides a readable storage medium, wherein the readable storage medium stores a test program of the Bluetooth device, and the test program of the Bluetooth device realizes the steps of the test method of the Bluetooth device in each embodiment when being executed by a processor.
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 one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a test terminal (which may be a PC or the like) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. The test method of the Bluetooth device 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 device, and the test method of the Bluetooth device comprises the following steps:
sending an opening instruction to the Bluetooth equipment, and acquiring opening time so as to enable Bluetooth of the Bluetooth equipment to enter a discoverable state;
sending a scanning instruction to the second test terminal so as to enable Bluetooth of the second test terminal to enter a scanning state;
sending a screenshot instruction to the second test terminal, and updating the cut-off time according to the current time, wherein the cut-off time is the screenshot time when the second test terminal performs screenshot by sending the screenshot instruction record time to the second test terminal;
receiving an interface screenshot of a scanning interface sent by the second test terminal according to the screenshot instruction, wherein the interface screenshot comprises a plurality of text contents;
when text content consistent with the equipment identifier of the Bluetooth equipment exists in the interface screenshot, taking the current deadline as the discovery time;
determining a bluetooth discoverable time of the bluetooth device according to the discovery time and the time interval between the on times;
storing the discoverable time of the Bluetooth and updating the test times;
and when the test times are greater than or equal to the preset times, acquiring the average time of the discoverable Bluetooth according to each discoverable Bluetooth time, and updating the discoverable Bluetooth time by adopting the average time of the discoverable Bluetooth.
2. The method for testing a bluetooth device according to claim 1, wherein when the interface screenshot includes a device identifier of the bluetooth device, the step of taking the current deadline as a discovery time further includes:
and when the equipment identifier of the Bluetooth equipment is not included in the interface screenshot, returning to execute the step of sending a screenshot instruction to the second test terminal and updating the expiration time according to the current moment.
3. The method for testing bluetooth device according to claim 1, wherein after the step of receiving the interface screenshot of the scanning interface sent by the second test terminal according to the screenshot instruction, the method further comprises:
when the interface screenshot does not comprise the equipment identifier of the Bluetooth equipment, acquiring the scanning time length of the equipment without finding the Bluetooth equipment according to the cut-off time and the starting time;
and outputting prompt information when the scanning time length reaches a preset time length.
4. The method for testing bluetooth device according to claim 1, wherein after the step of receiving the interface screenshot of the scanning interface sent by the second test terminal according to the screenshot instruction, the method further comprises:
storing 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 a 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 saving the bluetooth discoverable time and updating the number of tests, further comprising:
when the test times are smaller than 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 bluetooth device according to claim 1, wherein before the step of transmitting the scan command to the second test terminal, further comprising:
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, the test terminal comprising: memory, a processor and a test program for a bluetooth device stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method for testing a bluetooth device according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that the readable storage medium has stored thereon a test program of a bluetooth device, which when executed by a processor, implements the steps of the test method of a bluetooth device according to any of claims 1 to 7.
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 CN113194448A (en) 2021-07-30
CN113194448B true 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)

Families Citing this family (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109041023A (en) * 2018-08-14 2018-12-18 福建联迪商用设备有限公司 A kind of bluetooth equipment test method and system
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103913656A (en) * 2014-03-20 2014-07-09 惠州Tcl移动通信有限公司 Testing method and system for smart wristband
CN105848196A (en) * 2016-05-04 2016-08-10 青岛歌尔声学科技有限公司 NFC bluetooth adapter and bluetooth product test system and test method
CN109640353B (en) * 2019-01-17 2023-10-03 Tcl移动通信科技(宁波)有限公司 Bluetooth equipment testing 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
CN112235166B (en) * 2020-12-04 2022-06-21 歌尔科技有限公司 Bluetooth connection time detection method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN113194448A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
CN109558320B (en) System testing method, device, system, equipment and computer readable storage medium
CN104978263A (en) Mobile terminal application program test method and mobile terminal application program test system
CN113194448B (en) Bluetooth device testing method, testing terminal and readable storage medium
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN112566156B (en) Method for automatically testing WiFi module compatibility and electronic equipment
CN107341106B (en) Application compatibility detection method, development terminal and storage medium
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN114661330B (en) Vehicle hardware program updating method, device, equipment and storage medium
CN109347578B (en) Radio frequency performance test method and device, computer equipment and readable storage medium
CN111008148A (en) Code testing method and device and computer readable storage medium
WO2019227454A1 (en) Ecu identifier and identification method, system, device and medium thereof
CN108304203B (en) Multi-meter firmware upgrading method and device
KR20090127304A (en) Control of mobile terminals
CN115985382A (en) Flash memory test method, device, equipment and storage medium
CN113676496B (en) Data transmission method, system, readable storage medium and computer equipment
CN111061637B (en) Interface testing method, interface testing device and storage medium
CN111756931B (en) Private number automatic calling test method and system based on trunk line
CN110896333B (en) WiFi module testing method and system and storage medium
CN109673032B (en) Network switching method, device, computer readable storage medium and system
CN108632957B (en) Network connection method, equipment and storage medium based on voice control
CN107992335B (en) Method for automatically identifying type of board card of receiver
CN111078571A (en) Test method for simulation response, terminal device and computer readable storage medium
CN113132961B (en) Internet of things complete machine equipment debugging method and device, computer equipment and storage medium
CN116390052A (en) Vehicle safety detection method, device, equipment and storage medium
CN112345999A (en) Electric energy meter, load record generation method thereof and computer readable storage medium

Legal Events

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