CN111107528A - Bluetooth test method and test machine - Google Patents

Bluetooth test method and test machine Download PDF

Info

Publication number
CN111107528A
CN111107528A CN201910952776.6A CN201910952776A CN111107528A CN 111107528 A CN111107528 A CN 111107528A CN 201910952776 A CN201910952776 A CN 201910952776A CN 111107528 A CN111107528 A CN 111107528A
Authority
CN
China
Prior art keywords
bluetooth
tested
test
unit
packet
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
CN201910952776.6A
Other languages
Chinese (zh)
Other versions
CN111107528B (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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli Technology Co Ltd
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 Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN201910952776.6A priority Critical patent/CN111107528B/en
Publication of CN111107528A publication Critical patent/CN111107528A/en
Application granted granted Critical
Publication of CN111107528B publication Critical patent/CN111107528B/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
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/69Spread spectrum techniques
    • H04B1/713Spread spectrum techniques using frequency hopping
    • H04B1/7156Arrangements for sequence synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • 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)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a Bluetooth test method and a test machine, wherein the Bluetooth test method of the Bluetooth test machine comprises the following steps of S101: the Bluetooth test machine starts out-of-band communication to establish connection with the Bluetooth equipment to be tested; s102: the Bluetooth test machine sends a Bluetooth address, a local clock and an appointed inquiry time T of the Bluetooth test machine to the Bluetooth equipment to be tested by adopting out-of-band communication; s103: the Bluetooth tester configures a current frequency hopping sequence according to a Bluetooth address and a local clock of the Bluetooth tester; s104: the Bluetooth test machine adopts a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence to carry out first packet communication with the Bluetooth equipment to be tested; s105: the Bluetooth test machine establishes Bluetooth connection with the Bluetooth equipment to be tested after the first packet communication is successful; s106: and the Bluetooth tester establishes a HOST layer link with the Bluetooth equipment to be tested, and transmits data for function test. The invention adopts out-of-band communication to exchange frequency hopping information and the first packet time, thereby improving the efficiency of establishing the Bluetooth connection and further improving the efficiency of batch testing.

Description

Bluetooth test method and test machine
Technical Field
The invention relates to the technical field of Bluetooth communication, in particular to a Bluetooth testing method and a Bluetooth testing machine.
Background
Before the Bluetooth equipment leaves a factory, the performance of Bluetooth connection is required to be tested. For example, before a manufacturer who produces earphones delivers finished bluetooth earphones, the bluetooth earphones need to be connected with a bluetooth test machine to perform function tests such as music playing. However, the bluetooth connection between the bluetooth tester and the bluetooth headset is currently established by classical inquiry or paging, but the process takes a long time for a single connection because of the asynchronous frequency hopping and other steps. The cumulative time consumption is more obvious for mass production. To improve this point, CN102833021A in the prior art discloses a scheme of transmitting a bluetooth address by using a UART connection, but this method only omits a process of acquiring a bluetooth address of a bluetooth peripheral device by a bluetooth query (inquiry), and performs pairing after acquiring the bluetooth address, where the pairing process should include connection, and a test machine is required to initiate a page (page) of a bluetooth module in a page scan (page scan) state, and the connection state can be entered only after the page is successfully paged. The time saved thereby is relatively limited and the efficiency of the bluetooth test is still low.
Disclosure of Invention
Based on the above situation, the main objective of the present invention is to provide a bluetooth testing method and a bluetooth testing machine capable of improving the bluetooth testing efficiency.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a Bluetooth test method is provided, which is applied to a Bluetooth tester and comprises the following steps:
s101: the Bluetooth test machine starts out-of-band communication to establish connection with the Bluetooth equipment to be tested;
s102: the Bluetooth test machine sends a Bluetooth address, a local clock and an appointed inquiry time T of the Bluetooth test machine to the Bluetooth device to be tested by adopting out-of-band communication;
s103: the Bluetooth tester configures a current frequency hopping sequence according to a Bluetooth address and a local clock of the Bluetooth tester;
s104: the Bluetooth tester adopts a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence to carry out first packet communication with the Bluetooth equipment to be tested;
s105: the Bluetooth test machine establishes Bluetooth connection with the Bluetooth equipment to be tested after the first packet communication is successful;
s106: the Bluetooth tester and the Bluetooth equipment to be tested establish a HOST layer link and transmit data for function test;
preferably, when the bluetooth test machine sends the bluetooth address of the bluetooth test machine to the bluetooth device to be tested by using out-of-band communication, the local clock value of the bluetooth test machine is a synchronization time clkn (sync), and the agreed inquiry time T is delayed by a plurality of bluetooth clock minimum timing units on the basis of the synchronization time clkn (sync).
Preferably, the contract query time T ═ clkn (sync) + (clkn (sync)% 2+2n) × TunitWherein "%" is a remainder operator, TunitA Bluetooth clock minimum timing unit; if clkn (sync)% 2 ═ 0, then n ═ 2, and if clkn (sync)% 2 ═ 1, then n ═ 1.
Preferably, the step S104 specifically includes the steps of:
s104 a: the Bluetooth test machine sends an inquiry packet to the Bluetooth equipment to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
s104 b: the Bluetooth test machine judges whether a response packet of the to-be-tested Bluetooth equipment for confirming the inquiry packet is received or not;
s104 c: the Bluetooth test machine confirms that the first packet communication is successful when receiving the response packet;
the Bluetooth test method further comprises the following steps:
s107: and jumping to S102 when the Bluetooth test machine does not receive the response packet.
Preferably, the bluetooth test method further comprises the steps of:
s108: and after the Bluetooth connection with the Bluetooth equipment to be tested is established, the Bluetooth tester is disconnected from the out-of-band communication connection with the Bluetooth equipment to be tested.
Preferably, the step S102 further includes receiving, by using out-of-band communication, a bluetooth address of the bluetooth device to be tested, where the bluetooth address is sent by the bluetooth device to be tested.
Preferably, the bluetooth test method further comprises the steps of:
s109: detecting whether the function test of the current Bluetooth equipment to be tested is finished;
s110: when the bluetooth test machine has completed testing the functions of the bluetooth device to be tested, the bluetooth test machine disconnects the bluetooth connection with the bluetooth device to be tested, starts out-of-band communication to establish connection with another bluetooth device to be tested, and goes to S102
Preferably, the bluetooth test method further comprises the steps of:
s111: detecting whether all the Bluetooth equipment to be tested which establishes Bluetooth connection with the Bluetooth test machine has completed function test;
s112: if not, selecting one Bluetooth tester to establish an HOST layer link with the remaining Bluetooth equipment to be tested which does not finish the function test, and transmitting data for the function test;
s113: detecting whether the number of the to-be-detected Bluetooth devices connected with the Bluetooth test machine exceeds an upper limit or not;
s114: if not, the Bluetooth tester starts out-of-band communication to establish connection with other Bluetooth equipment to be tested while performing function test on the current Bluetooth equipment to be tested or in an idle time slot, and the process goes to S102;
s115: if yes, the Bluetooth device to be tested is disconnected from the Bluetooth device to be tested which has completed the function test, and the process goes to S101.
The technical scheme adopted by the invention also comprises the following steps:
the Bluetooth test method is applied to Bluetooth equipment to be tested and comprises the following steps:
s901: the Bluetooth device to be tested starts out-of-band communication to establish out-of-band communication connection with a Bluetooth test machine;
s902: the Bluetooth device to be tested receives the Bluetooth address, the local clock and the appointed inquiry time T of the Bluetooth tester sent by the Bluetooth tester by adopting out-of-band communication;
s903: the Bluetooth device to be tested configures a current frequency hopping sequence according to a local clock, the offset of the local clock relative to the local clock of the Bluetooth tester and a Bluetooth address of the Bluetooth tester;
s904: the Bluetooth device to be tested starts a scanning window by taking the appointed inquiry time T as a reference, and performs first packet communication with the Bluetooth tester by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
s905: the Bluetooth device to be tested establishes Bluetooth connection with the Bluetooth test machine after the first packet communication is successful;
s906: and the Bluetooth device to be tested establishes a HOST layer link with the Bluetooth tester and receives data for function test.
Preferably, the scanning window is [ T- (T)unit+|Δt|),T+(Tunit+|Δt|)]Where T is the contract query time, TunitFor the bluetooth clock minimum timing unit, | Δ t | is a compensation amount considering the out-of-band communication delay.
Preferably, the scanning window size is 625 μ s-1250 μ s.
Preferably, the step S904 specifically includes the steps of:
s904 a: the Bluetooth device to be tested starts a scanning window by taking the appointed inquiry time T as a reference, and receives an inquiry packet sent by the Bluetooth tester by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
s904 b: the Bluetooth device to be tested judges whether an inquiry packet sent by the Bluetooth test machine is received or not;
s904 c: when receiving the inquiry packet sent by the Bluetooth test machine, the Bluetooth device to be tested replies a response packet for confirming the inquiry packet to the Bluetooth test machine;
s904 d: the Bluetooth device to be tested confirms that the first packet communication is successful when the Bluetooth test machine receives the response packet;
the Bluetooth test method further comprises the following steps:
s907: and the to-be-tested Bluetooth equipment skips to S902 when not receiving the inquiry packet sent by the Bluetooth test machine.
The technical scheme adopted by the invention also comprises the following steps:
there is provided a bluetooth test machine, characterized in that,
the Bluetooth tester comprises an out-of-band communication module and a Bluetooth module, wherein the out-of-band communication module comprises an out-of-band communication connection unit and an out-of-band information sending unit; the Bluetooth module comprises a frequency hopping configuration unit, a first packet communication unit, a Bluetooth communication connection unit and a function test unit, wherein,
the out-of-band communication connection unit is used for establishing out-of-band communication connection with the Bluetooth device to be tested when the Bluetooth connection with the Bluetooth device to be tested is required to be established;
the out-of-band information sending unit is used for sending the Bluetooth address of the Bluetooth tester, a local clock and an appointed inquiry time T to the Bluetooth equipment to be tested by adopting out-of-band communication;
the frequency hopping configuration unit is used for configuring a current frequency hopping sequence according to the Bluetooth address of the Bluetooth tester and a local clock;
the first packet communication unit is used for performing first packet communication with the Bluetooth device to be tested by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
the Bluetooth communication connection unit is used for establishing Bluetooth connection with the Bluetooth device to be tested after the first packet communication is successful;
the function test unit is used for establishing a HOST layer link with the Bluetooth device to be tested and transmitting data for function test.
Preferably, the out-of-band communication module further includes an out-of-band information receiving unit, where the out-of-band information receiving unit is configured to receive, by using out-of-band communication, a bluetooth address of the bluetooth device to be tested, where the bluetooth address is sent by the bluetooth device to be tested.
Preferably, the bluetooth module further comprises a test detection unit, wherein the test detection unit is used for detecting whether the function test of the bluetooth device to be tested is completed;
when the Bluetooth test machine finishes the function test of the Bluetooth equipment to be tested, the Bluetooth communication connection unit is also used for disconnecting the Bluetooth connection with the Bluetooth equipment to be tested, and the out-of-band communication connection unit is also used for starting out-of-band communication to establish connection with other Bluetooth equipment to be tested.
Preferably, the bluetooth module further comprises a test detection unit and a bluetooth connection detection unit,
the test detection unit is used for detecting whether all the Bluetooth equipment to be tested which establishes Bluetooth connection with the Bluetooth test machine has completed function test;
the function test unit is also used for selecting one link to establish an HOST layer link with the rest Bluetooth equipment to be tested which does not finish the function test, and transmitting data for the function test;
the Bluetooth connection detection unit detects whether the number of the Bluetooth devices to be detected connected with the Bluetooth test machine exceeds an upper limit or not;
when the detection result of the Bluetooth connection detection unit is negative, the out-of-band communication connection unit is also used for establishing out-of-band communication connection with the Bluetooth device to be detected when Bluetooth connection with another Bluetooth device to be detected is required to be established;
and when the detection result of the Bluetooth connection detection unit is yes, the Bluetooth communication connection unit is also used for disconnecting the Bluetooth connection with the to-be-detected Bluetooth equipment which has completed the function test.
The first packet communication unit comprises an inquiry unit and a packet receiving confirmation unit, wherein,
the inquiry unit is used for sending an inquiry packet to a Bluetooth connecting device of the Bluetooth equipment to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
the packet receiving confirmation unit is used for judging whether a response packet of the Bluetooth device to be detected for confirming the inquiry packet is received or not;
the out-of-band information sending unit is further configured to send the bluetooth address of the bluetooth tester, the local clock and the agreed inquiry time T to the bluetooth device to be tested by adopting out-of-band communication again when the packet receiving confirmation unit determines that the response packet is not received.
The technical scheme adopted by the invention also comprises the following steps:
there is provided a bluetooth testing machine comprising a bluetooth module, an out-of-band communication module, a processor, and a computer readable storage medium having a bluetooth connection program stored thereon, the bluetooth connection program when executed by the processor implementing the bluetooth testing method as described above as applied to a bluetooth testing machine.
According to the Bluetooth testing method and the Bluetooth testing machine, firstly, the Bluetooth address and the clock of the Bluetooth equipment are obtained in an out-of-band communication mode, so that the master Bluetooth equipment and the slave Bluetooth equipment adopt the same frequency hopping sequence to hop frequency; meanwhile, the first packet communication time, namely the inquiry time, is appointed, so that the master and slave devices can conveniently and accurately confirm each other on the same frequency hopping frequency, namely, the first packet communication is directly carried out on a basic frequency hopping channel for phase synchronization, the traditional inquiry and paging processes are saved, the time required for establishing the Bluetooth connection is shortened, the efficiency of establishing the Bluetooth connection is improved, and the test efficiency of a Bluetooth test machine in batch test of the Bluetooth devices to be tested is improved.
Drawings
Preferred embodiments of a bluetooth test method and a bluetooth test machine according to the present invention will be described below with reference to the accompanying drawings. In the figure:
fig. 1 is a flowchart of a first preferred embodiment of a bluetooth test method applied to a bluetooth test machine according to the present invention;
fig. 2 is a flowchart of a second preferred embodiment of a bluetooth test method applied to a bluetooth test machine according to the present invention;
fig. 3 is a flowchart of a third preferred embodiment of a bluetooth test method applied to a bluetooth tester according to the present invention;
fig. 4 is a flowchart of a fourth preferred embodiment of a bluetooth test method applied to a bluetooth tester according to the present invention;
FIG. 5 is a flowchart of a first preferred embodiment of a Bluetooth test method applied to a Bluetooth device under test according to the present invention;
FIG. 6 is a flowchart of a second preferred embodiment of a Bluetooth test method applied to a Bluetooth device under test according to the present invention;
FIG. 7 is a block diagram of a first preferred embodiment of a Bluetooth tester according to the invention;
FIG. 8 is a block diagram of a second preferred embodiment of a Bluetooth tester according to the invention;
fig. 9 is a schematic block diagram of a bluetooth testing machine according to a third preferred embodiment of the present invention.
Detailed Description
Aiming at the problem that the Bluetooth test method in the prior art is low in efficiency, the invention provides a Bluetooth test method and a Bluetooth test machine.
First, a bluetooth testing method provided by the present invention is introduced, which is applied to a bluetooth testing machine, please refer to fig. 1, where fig. 1 is a flowchart of a first preferred embodiment of a bluetooth testing method applied to a bluetooth testing machine according to the present invention, and the bluetooth testing method includes the steps of:
s101: the Bluetooth test machine starts out-of-band communication to establish connection with the Bluetooth equipment to be tested;
the interface for establishing out-of-band communication between the Bluetooth tester and the Bluetooth device to be tested can be in a wired mode or a wireless mode, and communication interfaces adopted in the wired mode comprise serial ports, single bus interfaces, IIC interfaces and the like. The wireless mode may be infrared wireless communication or NFC or other contactless communication. It will be appreciated that, for purposes of the present invention, the establishment of out-of-band communications and the transmission of information should be less time consuming and more reliable than the inquiry, inquiry scan, page and page scan of conventional bluetooth.
S102: the Bluetooth test machine sends a Bluetooth address, a local clock and an appointed inquiry time T of the Bluetooth test machine to the Bluetooth device to be tested by adopting out-of-band communication;
the BLUETOOTH address and local clock can be used to generate a frequency hopping sequence, for example, as can be seen in BLUETOOTH SPECIFICATION Version 5.0, Part 2, volume 2 (BLUETOOTH SPECIFICATION Version 5.0| Vol 2, Part B), page 374, figure 2.12. The Bluetooth test machine sends the Bluetooth address and the local clock to the Bluetooth device to be tested, so that the Bluetooth device to be tested can calculate clock offset conveniently, and the Bluetooth device to be tested can generate the same frequency hopping sequence of the Bluetooth test machine conveniently. The appointed inquiry time T is the time when the master and slave Bluetooth devices perform first packet communication, and corresponds to a specific communication frequency point of a specific frequency hopping sequence.
S103: the Bluetooth tester configures a current frequency hopping sequence according to a Bluetooth address and a local clock of the Bluetooth tester;
the Bluetooth tester generates a frequency hopping sequence according to a Bluetooth address and a local clock, and determines a frequency point of first packet communication by combining with an appointed inquiry time T.
S104: and the Bluetooth tester adopts the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence to carry out first packet communication with the Bluetooth equipment to be tested.
S105: the Bluetooth test machine establishes Bluetooth connection with the Bluetooth equipment to be tested after the first packet communication is successful;
and the Bluetooth test machine receives the response packet of the Bluetooth equipment to be tested, and the result shows that the phase is aligned and the Bluetooth test machine has the condition for establishing the Bluetooth communication connection. So far, the HOST layer link (A2DP, HFP, etc.) can be established between the bluetooth test machine and the bluetooth device to be tested, and bluetooth data transmission is performed, so that functional tests such as music playing are performed.
S106: and the Bluetooth tester establishes a HOST layer link with the Bluetooth equipment to be tested, and transmits data for function test.
The step can be implemented by referring to the existing general standard, and the transmitted data is determined according to the specific functional test, for example, the test music playing is transmitted as audio data.
Further, when the bluetooth test machine sends the bluetooth address of the bluetooth test machine to the bluetooth device to be tested by using out-of-band communication, the local clock value of the bluetooth test machine is the synchronization time clkn (sync), and the agreed inquiry time T is delayed by a plurality of bluetooth clock minimum timing units on the basis of the synchronization time clkn (sync).
In this embodiment, the appointed inquiry time is set after being delayed relative to the local clock of the bluetooth test machine, so that the time window for receiving the inquiry packet by the radio frequency of the bluetooth device to be tested is expanded, the bluetooth device to be tested has enough time to open the scanning window in advance, the probability that the bluetooth device to be tested hits the first packet of communication data packets, for example, the inquiry packet sent by the bluetooth test machine, is improved, and the bluetooth test machine and the bluetooth device to be tested are prevented from losing synchronization. Since the bluetooth device between the bluetooth tester and the bluetooth device to be tested is not precisely synchronized before step S105, and the accuracy of clkn (sync) is only 312.5 μ S, an error of maximum plus or minus 312.5 μ S may occur between the bluetooth tester and the bluetooth device to be tested, and the received and transmitted data of different out-of-band communications also have a certain time delay, which is long or short, so that, preferably, the predetermined inquiry time T is clkn (sync) + (clkn (sync)% 2+2 n)% TunitWherein "%" is a remainder operator, TunitA Bluetooth clock minimum timing unit; if clkn (sync)% 2 ═ 0, then n ═ 2, and if clkn (sync)% 2 ═ 1, then n ═ 1.
Further, referring to fig. 2, fig. 2 is a flowchart of a second preferred embodiment of a bluetooth testing method applied to a bluetooth testing machine according to the present invention; in the present embodiment, it is preferred that,
the step S104 specifically includes:
s104 a: the Bluetooth test machine sends an inquiry packet to the Bluetooth equipment to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
the stages of this step may illustratively be referred to as "step 5" of figure8.3 of volume 2 Part B (bluetooth specification Version 5.0) Version 5.0| Vol 2, Part B) page 451. The bluetooth test method of this embodiment omits inquiry, inquiry scan, paging and page scan, and specifically may omit steps 1 to 4 in configuration 8.3. Preferably, the query Packet may be a "POLL Packet," but is not limited thereto, and other packets with an acknowledgement mechanism may be used as long as they can mutually receive the data Packet of the other party. The POLL Packet has no Payload, but requires an acknowledgement from the receiving end. In this step, the bluetooth test machine directly sends an inquiry packet for first packet communication on the basic frequency hopping channel.
S104 b: the Bluetooth test machine judges whether a response packet of the to-be-tested Bluetooth equipment for confirming the inquiry packet is received or not;
the bluetooth device to be tested immediately replies the response packet after receiving the inquiry packet, and it can be understood that, in the process, the bluetooth device to be tested will start the corresponding scanning window by using the appointed inquiry time T. Preferably, the response Packet may adopt a "NULL Packet," but is not limited thereto, and other packets with an acknowledgement mechanism may also be used as long as they can mutually receive the data Packet of the other party. The NULL Packet also has no Payload, only has Access Code (CAC) and Header, has a fixed length of 126bits, and is used for returning link information to the transmitting end through fields such as ARQN, FLOW and the like; NULL packets need no acknowledgement. In which the bluetooth tester determines whether a response packet for acknowledgement is received to confirm whether the phases are aligned.
S104 c: the Bluetooth test machine confirms that the first packet communication is successful when receiving the response packet;
and the Bluetooth test machine receives the response packet of the Bluetooth equipment to be tested, and the result shows that the phase is aligned and the Bluetooth test machine has the condition for establishing the Bluetooth communication connection. So far, a HOST layer link (A2DP, HFP, etc.) can be established between the bluetooth tester and the bluetooth device to be tested, and function tests such as music playing can be performed.
The Bluetooth test method further comprises the following steps:
s107: and jumping to S102 when the Bluetooth test machine does not receive the response packet.
In this embodiment, the skipping S107 is set, so that even in an extreme case, when the bluetooth test machine does not receive the response packet, the steps of generating the same hopping sequence and appointing the inquiry time T may be restarted, thereby ensuring the reliability of the bluetooth connection.
Further, referring to fig. 2, the bluetooth testing method further includes the steps of:
s108: and after the Bluetooth connection with the Bluetooth equipment to be tested is established, the Bluetooth tester is disconnected from the out-of-band communication connection with the Bluetooth equipment to be tested.
In this embodiment, after the bluetooth connection is established, the bluetooth connection between the bluetooth test machine and other bluetooth devices to be tested can be conveniently established in the same manner by disconnecting the out-of-band communication connection, and the bluetooth test is performed, which is very useful in a scene where the bluetooth test machine needs to test a large number of bluetooth devices to be tested. The manner in which the out-of-band communication is disconnected may be a program-controlled manner or may be implemented by mechanical plugging, for example, in the case of the out-of-band communication implemented by a wired connection.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a bluetooth testing method applied to a bluetooth testing machine according to a third preferred embodiment of the present invention. Step S102 further includes receiving, by using out-of-band communication, a bluetooth address of the bluetooth device to be tested, where the bluetooth address is sent by the bluetooth device to be tested.
In this embodiment, by receiving the bluetooth address of the device under test in step S102, different devices under test or operations controlled by software can be distinguished conveniently. Preferably, in an embodiment where the testing machine has a display screen, the bluetooth address of the bluetooth device to be tested which has established the bluetooth connection or is performing the work function test, or the bluetooth device number or name corresponding to the bluetooth address can be displayed on the display screen of the testing machine.
Further, referring to fig. 3, the bluetooth testing method further includes the steps of:
s109: detecting whether the function test of the current Bluetooth equipment to be tested is finished;
in this step, the criterion for whether to complete the function test may be determined according to a specific application, for example, a certain file has been transmitted, or a certain audio has been played for a predetermined time.
S110: when the bluetooth test machine has completed testing the functions of the bluetooth device to be tested, the bluetooth test machine disconnects the bluetooth connection with the bluetooth device to be tested, starts out-of-band communication to establish connection with another bluetooth device to be tested, and goes to S102
By setting the step, the Bluetooth connection with other Bluetooth equipment to be tested can be conveniently and automatically established and the function test can be automatically carried out.
Further, referring to fig. 4, fig. 4 is a flowchart of a fourth preferred embodiment of a bluetooth testing method applied to a bluetooth testing machine according to the present invention, wherein the bluetooth testing method further includes the steps of:
s111: detecting whether all the Bluetooth equipment to be tested which establishes Bluetooth connection with the Bluetooth test machine has completed function test;
because the bluetooth tester can establish bluetooth connection with a plurality of bluetooth devices to be tested simultaneously, for example, according to the existing bluetooth communication standard, a bluetooth module of a bluetooth tester can establish connection with 7 bluetooth slave devices at most. The test progress of a plurality of Bluetooth devices to be tested can be detected by setting the step.
S112: if not, selecting one Bluetooth tester to establish an HOST layer link with the remaining Bluetooth equipment to be tested which does not finish the function test, and transmitting data for the function test;
the Bluetooth tester which is set in the step can automatically perform the function test on the to-be-tested Bluetooth equipment which is not subjected to the function test.
S113: detecting whether the number of the to-be-detected Bluetooth devices connected with the Bluetooth test machine exceeds an upper limit or not;
the upper limit may be the maximum number of connections minus one, e.g., the maximum number of connections is 7, the upper limit may be set to 7-1, i.e., 6; the number of the Bluetooth devices to be tested connected with the Bluetooth tester is monitored, so that a basis can be provided for subsequent Bluetooth connection decision-making.
S114: if not, the Bluetooth tester starts out-of-band communication to establish connection with other Bluetooth equipment to be tested while performing function test on the current Bluetooth equipment to be tested or in an idle time slot, and the process goes to S102;
if the number of the connected Bluetooth devices to be tested does not reach the upper limit, more Bluetooth devices to be tested can be connected simultaneously through multiplexing in function test time, and more time for establishing Bluetooth connection can be saved. For example, assuming that 8s is required for the function test of a single bluetooth device, and the time for establishing bluetooth connection between a pair of bluetooth devices is 1s, compared with the case where bluetooth connection is established between one bluetooth device to be tested and other bluetooth devices to be tested after the function test of the bluetooth device to be tested is completed, by adopting the test method of the present invention, 6s can be saved in the case where a bluetooth test machine establishes bluetooth connection with 7 bluetooth devices to be tested, because 8s required for the function test can be reused from 6s of the 2 nd bluetooth device to be tested.
S115: if yes, the Bluetooth device to be tested is disconnected from the Bluetooth device to be tested which has completed the function test, and the process goes to S101.
If the upper limit of the Bluetooth connection is reached, the Bluetooth device to be tested which has finished the function test is disconnected, so that the Bluetooth test machine can conveniently establish the Bluetooth connection with other Bluetooth devices which need to be subjected to the function test and perform the Bluetooth function test.
The technical scheme adopted by the invention also comprises the following steps:
referring to fig. 5, fig. 5 is a flowchart of a first preferred embodiment of a bluetooth testing method applied to a bluetooth device to be tested according to the present invention, where the bluetooth testing method includes the steps of:
s901: the Bluetooth device to be tested starts out-of-band communication to establish out-of-band communication connection with the Bluetooth test machine;
the interface for establishing out-of-band communication between the Bluetooth tester and the Bluetooth device to be tested can be in a wired mode or a wireless mode, and communication interfaces adopted in the wired mode comprise serial ports, single bus interfaces, IIC interfaces and the like. The wireless mode may be infrared wireless communication or NFC or other contactless communication. It will be appreciated that, for purposes of the present invention, the establishment of out-of-band communications and the transmission of information should be less time consuming and more reliable than the inquiry, inquiry scan, page and page scan of conventional bluetooth.
S902: the Bluetooth device to be tested receives the Bluetooth address, the local clock and the appointed inquiry time T of the Bluetooth tester sent by the Bluetooth tester by adopting out-of-band communication;
the BLUETOOTH address and local clock can be used to generate a frequency hopping sequence, for example, as can be seen in BLUETOOTH SPECIFICATION Version 5.0, Part 2, volume 2 (BLUETOOTH SPECIFICATION Version 5.0| Vol 2, Part B), page 374, figure 2.12. The Bluetooth test machine sends the Bluetooth address and the local clock to the Bluetooth device to be tested, so that the Bluetooth device to be tested can calculate clock offset conveniently, and the Bluetooth device to be tested can generate the same frequency hopping sequence of the Bluetooth test machine conveniently. The appointed inquiry time T is the time when the master and slave Bluetooth devices perform first packet communication, and corresponds to a specific communication frequency point of a specific frequency hopping sequence.
S903: the Bluetooth device to be tested configures a current frequency hopping sequence according to a local clock, the offset of the local clock relative to the local clock of the Bluetooth tester and a Bluetooth address of the Bluetooth tester;
in this step, the bluetooth device to be tested may generate a frequency hopping sequence consistent with the frequency hopping sequence of the bluetooth tester.
S904: and the Bluetooth device to be tested starts a scanning window by taking the appointed inquiry time T as a reference, and performs first packet communication with the Bluetooth tester by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence.
S905: the Bluetooth device to be tested establishes Bluetooth connection with the Bluetooth test machine after the first packet communication is successful;
and the Bluetooth test machine receives the response packet of the Bluetooth equipment to be tested, and the result shows that the phase is aligned and the Bluetooth test machine has the condition for establishing the Bluetooth communication connection. So far, the HOST layer link (A2DP, HFP, etc.) can be established between the bluetooth test machine and the bluetooth device to be tested, and bluetooth data transmission is performed, so that functional tests such as music playing are performed.
S906: and the Bluetooth device to be tested establishes a HOST layer link with the Bluetooth tester and receives data for function test.
The step can be implemented by referring to the existing general standard, and the transmitted data is determined according to the specific functional test, for example, the test music playing is transmitted as audio data.
Further, the scan window is [ T- (T)unit+|Δt|),T+(Tunit+|Δt|)]Where T is agreed to be the time of inquiry, TunitFor the bluetooth clock minimum timing unit, it can be understood that |. at | is a compensation amount considering the out-of-band communication delay. By expanding the time window of the first packet of communication data packet received by the Bluetooth device to be tested, such as the inquiry packet of the Bluetooth test machine, the Bluetooth device to be tested has enough time to open the scanning window in advance, the probability of the Bluetooth device to be tested hitting the inquiry packet is improved, and the Bluetooth test machine and the Bluetooth device to be tested are prevented from losing synchronization. Similarly, the scan window size is preferably 625 μ s-1250 μ s, considering that the accuracy of the clock is only 312.5 μ s, and the clock error that may be caused by the delay of out-of-band communication.
Further, referring to fig. 6, fig. 6 is a flowchart of a second preferred embodiment of a bluetooth testing method applied to a bluetooth device under test according to the present invention, in this embodiment,
the step S904 specifically includes the steps of:
s904 a: the Bluetooth device to be tested starts a scanning window by taking the appointed inquiry time T as a reference, and receives an inquiry packet sent by the Bluetooth tester by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
because the Bluetooth test machine and the Bluetooth equipment to be tested generate the consistent frequency hopping sequence, the Bluetooth equipment to be tested can adopt the frequency point scanning inquiry packet consistent with the sending frequency point of the Bluetooth test machine. Preferably, the query packet may be a "poll packet," but is not limited thereto, and other packets with an acknowledgement mechanism may be used as long as they can mutually receive the data packet of the other party. The POLL Packet has no Payload, but requires an acknowledgement from the receiving end.
S904 b: the Bluetooth device to be tested judges whether an inquiry packet sent by the Bluetooth test machine is received or not;
the arrangement of this step is beneficial to triggering the subsequent steps in time.
S904 c: when receiving the inquiry packet sent by the Bluetooth test machine, the Bluetooth device to be tested replies a response packet for confirming the inquiry packet to the Bluetooth test machine;
the stages of this step may illustratively be referred to as "step 6" of figure8.3 of page 451 of bluetooth specification Version 5.0 Part 2, volume B (bluetooth @ speed change Version 5.0| Vol 2, Part B). The bluetooth device to be tested immediately replies the response packet after receiving the inquiry packet, and it can be understood that, in the process, the bluetooth device to be tested will start the corresponding scanning window by using the appointed inquiry time T. Preferably, the response Packet may adopt a "NULL Packet," but is not limited thereto, and other packets with an acknowledgement mechanism may also be used as long as they can mutually receive the data Packet of the other party. NULLPackage does not have Payload, only Contains Access Code (CAC) and Header, has a fixed length of 126bits, and is used for returning link information to a transmitting end through fields such as ARQN, FLOW and the like; NULL packets need no acknowledgement. In which the bluetooth tester determines whether a response packet for acknowledgement is received to confirm whether the phases are aligned.
S904 d: the Bluetooth device to be tested confirms that the first packet communication is successful when the Bluetooth test machine receives the response packet;
and the Bluetooth test machine receives the response packet of the Bluetooth equipment to be tested, and the result shows that the phase is aligned and the Bluetooth test machine has the condition for establishing the Bluetooth communication connection. It is understood that the method for determining that the bluetooth test machine receives the response packet may be determined by determining whether an acknowledgement message corresponding to the response packet is received or whether a subsequent communication handshake message is received.
The Bluetooth test method further comprises the following steps:
s907: and the Bluetooth device to be tested skips to S602 when not receiving the inquiry packet sent by the Bluetooth test machine.
In this embodiment, the skipping step S907 is set, so that even in an extreme case, when the bluetooth device to be tested does not receive the inquiry packet, the steps of generating the same frequency hopping sequence and appointing the inquiry time T may be restarted, thereby ensuring the reliability of the bluetooth connection.
The technical scheme adopted by the invention also comprises the following steps:
referring to fig. 7, fig. 7 is a schematic block diagram of a bluetooth tester according to a first preferred embodiment of the present invention, in an embodiment, the bluetooth tester includes an out-of-band communication module and a bluetooth module, where the out-of-band communication module includes an out-of-band communication connection unit and an out-of-band information sending unit; the Bluetooth module comprises a frequency hopping configuration unit, a first packet communication unit, a Bluetooth communication connection unit and a function test unit, wherein,
the out-of-band communication connection unit is used for establishing out-of-band communication connection with the Bluetooth device to be tested when the Bluetooth connection with the Bluetooth device to be tested is required to be established;
the interface for establishing out-of-band communication between the Bluetooth test machine and the Bluetooth connecting device of the Bluetooth equipment to be tested can be in a wired mode or a wireless mode, and the communication interface adopted in the wired mode comprises a serial port, a single bus interface, an IIC interface and the like. The wireless mode may be infrared wireless communication or NFC or other contactless communication. It will be appreciated that, for purposes of the present invention, the establishment of out-of-band communications and the transmission of information should be less time consuming and more reliable than the inquiry, inquiry scan, page and page scan of conventional bluetooth.
The out-of-band information sending unit is used for sending the Bluetooth address of the Bluetooth tester, a local clock and an appointed inquiry time T to the Bluetooth equipment to be tested by adopting out-of-band communication;
the BLUETOOTH address and local clock can be used to generate a frequency hopping sequence, for example, as can be seen in BLUETOOTH SPECIFICATION Version 5.0, Part 2, volume 2 (BLUETOOTH SPECIFICATION Version 5.0| Vol 2, Part B), page 374, figure 2.12. The Bluetooth connecting device of the Bluetooth test machine sends the Bluetooth address and the local clock to the Bluetooth connecting device of the Bluetooth equipment to be tested, so that the Bluetooth connecting device of the Bluetooth equipment to be tested can calculate clock offset conveniently, and the Bluetooth connecting device of the Bluetooth equipment to be tested can generate the same frequency hopping sequence of the Bluetooth connecting device of the Bluetooth test machine conveniently. The appointed inquiry time T is the time when the master and slave Bluetooth devices perform first packet communication, and corresponds to a specific communication frequency point of a specific frequency hopping sequence.
The frequency hopping configuration unit is used for configuring a current frequency hopping sequence according to the Bluetooth address of the Bluetooth tester and a local clock;
the frequency hopping configuration unit of the Bluetooth connecting device of the Bluetooth tester generates a frequency hopping sequence according to the Bluetooth address of the Bluetooth connecting device and a local clock of the Bluetooth connecting device at the side, and determines a frequency point of first packet communication by combining with an appointed inquiry time T.
And the first packet communication unit is used for performing first packet communication with the Bluetooth device to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence.
The Bluetooth communication connection unit is used for establishing Bluetooth connection with the Bluetooth device to be tested after the first packet communication is successful;
and the Bluetooth connecting device of the Bluetooth test machine receives the response packet of the Bluetooth connecting device of the Bluetooth equipment to be tested, and the phase alignment is indicated, so that the Bluetooth communication is successfully established.
The function test unit is used for establishing a HOST layer link with the Bluetooth device to be tested and transmitting data for function test.
For example, when the bluetooth connection device of the bluetooth test machine is a bluetooth test machine and the bluetooth connection device of the bluetooth device to be tested is a device to be tested, the bluetooth test machine establishes a HOST layer link with the bluetooth device to be tested to perform function tests such as music playing.
Further, please refer to fig. 7, the out-of-band communication module further includes an out-of-band information receiving unit, and the out-of-band information receiving unit is configured to receive, by using out-of-band communication, the bluetooth address of the bluetooth device to be tested, which is sent by the bluetooth device to be tested.
In this embodiment, the out-of-band information receiving unit receives the bluetooth address of the device to be tested, so that different devices to be tested can be conveniently distinguished. Preferably, in the embodiment where the testing machine has a display screen, the bluetooth device under test that has established the bluetooth connection or is performing the work function test may be displayed on the display screen of the testing machine
Further, please refer to fig. 8, fig. 8 is a schematic block diagram illustrating a bluetooth module according to a second preferred embodiment of the present invention, in an embodiment, the bluetooth module further includes a test detection unit, and the test detection unit is configured to detect whether a function test of a bluetooth device to be tested is completed; when the Bluetooth test machine finishes the function test of the Bluetooth equipment to be tested, the Bluetooth communication connection unit is also used for disconnecting the Bluetooth connection with the Bluetooth equipment to be tested, and the out-of-band communication connection unit is also used for starting out-of-band communication to establish connection with other Bluetooth equipment to be tested.
In this embodiment, the criterion for whether to complete the function test may be determined according to a specific application, for example, a certain file has been transmitted, or a certain audio has been played for a predetermined time. The trigger condition setting of the implementation can be convenient for automatically establishing Bluetooth connection with other Bluetooth equipment to be tested and automatically carrying out function test
Further, referring to fig. 9, fig. 9 is a schematic block diagram of a bluetooth tester according to a third preferred embodiment of the present invention, in an embodiment, the bluetooth module further includes a test detection unit and a bluetooth connection detection unit,
the test detection unit is used for detecting whether all the Bluetooth equipment to be tested which establishes Bluetooth connection with the Bluetooth test machine has completed function test;
the function test unit is also used for selecting one link to establish an HOST layer link with the rest Bluetooth equipment to be tested which does not finish the function test, and transmitting data for the function test;
the Bluetooth connection detection unit detects whether the number of the Bluetooth devices to be detected connected with the Bluetooth test machine exceeds an upper limit or not;
when the detection result of the Bluetooth connection detection unit is negative, the out-of-band communication connection unit is also used for establishing out-of-band communication connection with the Bluetooth device to be detected when Bluetooth connection with another Bluetooth device to be detected is required to be established;
and when the detection result of the Bluetooth connection detection unit is yes, the Bluetooth communication connection unit is also used for disconnecting the Bluetooth connection with the to-be-detected Bluetooth equipment which has completed the function test.
In this embodiment, the bluetooth test machine may establish bluetooth connections with a plurality of bluetooth devices to be tested at the same time, for example, according to the existing bluetooth communication standard, a bluetooth module of one bluetooth test machine may establish connections with at most 7 bluetooth slave devices. The test progress of a plurality of Bluetooth devices to be tested can be detected by setting the S. The upper limit of the number of bluetooth connections may be the maximum number of connections minus one, e.g. the maximum number of connections is 7, the upper limit may be set to 7-1, i.e. 6; the number of the Bluetooth devices to be tested connected with the Bluetooth tester is monitored, so that a basis can be provided for subsequent Bluetooth connection decision-making. If the number of connected Bluetooth devices to be tested does not reach the upper limit, more time for establishing Bluetooth connection can be saved by multiplexing the Bluetooth devices with the function test in time. For example, assuming that 8s is required for the function test of a single bluetooth device, and the time for establishing bluetooth connection between a pair of bluetooth devices using the test method of the present invention is 1s, through this step, in the case where one bluetooth test machine establishes bluetooth connection with 7 bluetooth devices under test, 6s can be saved, because 8s required for the function test can be reused from 6s of the 2 nd bluetooth device under test. If the upper limit of the Bluetooth connection is reached, the Bluetooth device to be tested which has completed the function test is disconnected, so that the Bluetooth connection can be conveniently established with more Bluetooth devices to be tested which are not established with the Bluetooth connection and the function test is carried out, and the Bluetooth test time of the Bluetooth devices to be tested in batches is shortened. The embodiment of the bluetooth test machine of this embodiment can carry out the function test to the bluetooth equipment that awaits measuring that has not carried out the function test automatically to time through the function test is connected with the bluetooth time multiplex, has further promoted the efficiency of test.
Further, referring to fig. 9 again, in one embodiment, the first packet communication unit includes an inquiry unit and a packet receiving confirmation unit, wherein,
the inquiry unit is used for sending an inquiry packet to a Bluetooth connecting device of the Bluetooth equipment to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
the function of the interrogation unit may exemplarily refer to "step 5" of figure8.3 of page 451 of bluetooth specification Version 5.0 Part 2 (bluetooth specification Version 5.0| Vol 2, Part B). The bluetooth tester of the embodiment omits inquiry, inquiry scan, paging and page scan, and specifically omits step 1 to step 4 in configuration 8.3. Preferably, the query Packet may be a "POLL Packet," but is not limited thereto, and other packets with an acknowledgement mechanism may be used as long as they can mutually receive the data Packet of the other party. The POLL Packet has no Payload, but requires an acknowledgement from the receiving end. Through the inquiry unit, the bluetooth tester can directly send an inquiry packet for the first packet communication on the basic frequency hopping channel.
The packet receiving confirmation unit is used for judging whether a response packet of the Bluetooth device to be detected for confirming the inquiry packet is received or not;
the bluetooth device to be tested immediately replies the response packet after receiving the inquiry packet, and it can be understood that the bluetooth device to be tested will open the corresponding scanning window at the appointed inquiry time T in the process. Preferably, the response Packet may adopt a "NULL Packet," but is not limited thereto, and other packets with an acknowledgement mechanism may also be used as long as they can mutually receive the data Packet of the other party. The NULL Packet also has no Payload, only has Access Code (CAC) and Header, has a fixed length of 126bits, and is used for returning link information to the transmitting end through fields such as ARQN, FLOW and the like; NULL packets need no acknowledgement. In which the bluetooth tester determines whether a response packet for acknowledgement is received to confirm whether the phases are aligned.
The out-of-band information sending unit is further configured to send the bluetooth address of the bluetooth tester, the local clock and the agreed inquiry time T to the bluetooth device to be tested by adopting out-of-band communication again when the packet receiving confirmation unit determines that the response packet is not received.
By arranging the packet receiving confirmation unit, feedback monitoring can be performed on the Bluetooth device to be tested, so that for example, even in an extreme case, when the Bluetooth test machine does not receive a response packet, the steps of generating the same frequency hopping sequence and appointing an inquiry time T can be restarted, and the reliability of Bluetooth connection is ensured.
The technical scheme adopted by the invention also comprises the following steps:
a bluetooth testing machine comprising a bluetooth module, an out-of-band communication module, a processor, and a computer readable storage medium having a bluetooth connection program stored thereon, the bluetooth connection program when executed by the processor implementing the bluetooth testing method as described above as applied to a bluetooth testing machine. Since the bluetooth test machine adopts all the technical solutions of all the embodiments of the bluetooth test method applied to the bluetooth test machine as described above, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and are not described in detail herein.
According to the Bluetooth testing method and the Bluetooth testing machine, firstly, the Bluetooth address and the clock of the Bluetooth equipment are obtained in an out-of-band communication mode, so that the master Bluetooth equipment and the slave Bluetooth equipment adopt the same frequency hopping sequence to hop frequency; meanwhile, the first packet communication time, namely the inquiry time, is appointed, so that the master and slave devices can conveniently and accurately confirm each other on the same frequency hopping frequency, namely, the first packet communication is directly carried out on a basic frequency hopping channel for phase synchronization, the traditional inquiry and paging processes are saved, the time required for establishing the Bluetooth connection is shortened, the efficiency of establishing the Bluetooth connection is improved, and the test efficiency of a Bluetooth test machine in batch test of the Bluetooth devices to be tested is improved.
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.
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 terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
It will be appreciated by those skilled in the art that the above-described preferred embodiments may be freely combined, superimposed, without conflict.
It will be understood that the embodiments described above are illustrative only and not restrictive, and that various obvious and equivalent modifications and substitutions for details described herein may be made by those skilled in the art without departing from the basic principles of the invention.

Claims (18)

1. A Bluetooth test method is applied to a Bluetooth tester, and is characterized by comprising the following steps:
s101: the Bluetooth test machine starts out-of-band communication to establish out-of-band communication connection with the Bluetooth equipment to be tested;
s102: the Bluetooth test machine sends a Bluetooth address, a local clock and an appointed inquiry time T of the Bluetooth test machine to the Bluetooth device to be tested by adopting out-of-band communication;
s103: the Bluetooth tester configures a current frequency hopping sequence according to a Bluetooth address and a local clock of the Bluetooth tester;
s104: the Bluetooth tester adopts a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence to carry out first packet communication with the Bluetooth equipment to be tested;
s105: the Bluetooth test machine establishes Bluetooth connection with the Bluetooth equipment to be tested after the first packet communication is successful;
s106: and the Bluetooth tester establishes a HOST layer link with the Bluetooth equipment to be tested, and transmits data for function test.
2. The method as claimed in claim 1, wherein the local clock value of the bluetooth tester is a synchronization time clkn (sync) when the bluetooth tester sends the bluetooth address of the bluetooth tester to the bluetooth device to be tested by using out-of-band communication, and the appointed inquiry time T is delayed by a plurality of bluetooth clock minimum timing units based on the synchronization time clkn (sync).
3. The Bluetooth test method of claim 2,
the contract query time T ═ CLKN (sync) + (CLKN (sync)% 2+2n) × TunitWherein, in the step (A),
"%" is the remainder operator, TunitIs the minimum timing unit of the Bluetooth clock; if clkn (sync)% 2 ═ 0, then n ═ 2, and if clkn (sync)% 2 ═ 1, then n ═ 1.
4. The Bluetooth test method according to any one of claims 1 to 3,
the step S104 specifically includes the steps of:
s104 a: the Bluetooth test machine sends an inquiry packet to the Bluetooth equipment to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
s104 b: the Bluetooth test machine judges whether a response packet of the to-be-tested Bluetooth equipment for confirming the inquiry packet is received or not;
s104 c: the Bluetooth test machine confirms that the first packet communication is successful when receiving the response packet;
the Bluetooth test method further comprises the following steps:
s107: and jumping to S102 when the Bluetooth test machine does not receive the response packet.
5. The bluetooth test method according to any of claims 1-4, further comprising the steps of:
s108: and after the Bluetooth connection with the Bluetooth equipment to be tested is established, the Bluetooth tester is disconnected from the out-of-band communication connection with the Bluetooth equipment to be tested.
6. The bluetooth test method according to any one of claims 1-5, wherein the S102 further comprises receiving the bluetooth address of the bluetooth device under test transmitted by the bluetooth device under test using out-of-band communication.
7. The bluetooth test method according to claim 6, wherein the bluetooth test method further comprises the steps of:
s109: detecting whether the function test of the current Bluetooth equipment to be tested is finished;
s110: when the bluetooth test machine has completed testing the functions of the bluetooth device to be tested, the bluetooth test machine disconnects the bluetooth connection with the bluetooth device to be tested, starts out-of-band communication to establish connection with another bluetooth device to be tested, and goes to S102.
8. The bluetooth test method according to claim 6, wherein the bluetooth test method further comprises the steps of:
s111: detecting whether all the Bluetooth equipment to be tested which establishes Bluetooth connection with the Bluetooth test machine has completed function test;
s112: if not, selecting one Bluetooth tester to establish an HOST layer link with the remaining Bluetooth equipment to be tested which does not finish the function test, and transmitting data for the function test;
s113: detecting whether the number of the to-be-detected Bluetooth devices connected with the Bluetooth test machine exceeds an upper limit or not;
s114: if not, the Bluetooth tester starts out-of-band communication to establish connection with other Bluetooth equipment to be tested while performing function test on the current Bluetooth equipment to be tested or in an idle time slot, and the process goes to S102;
s115: if yes, the Bluetooth device to be tested is disconnected from the Bluetooth device to be tested which has completed the function test, and the process goes to S101.
9. A Bluetooth test method is applied to Bluetooth equipment to be tested, and is characterized by comprising the following steps:
s901: the Bluetooth device to be tested starts out-of-band communication to establish out-of-band communication connection with a Bluetooth test machine;
s902: the Bluetooth device to be tested receives the Bluetooth address, the local clock and the appointed inquiry time T of the Bluetooth tester sent by the Bluetooth tester by adopting out-of-band communication;
s903: the Bluetooth device to be tested configures a current frequency hopping sequence according to a local clock, the offset of the local clock relative to the local clock of the Bluetooth tester and a Bluetooth address of the Bluetooth tester;
s904: the Bluetooth device to be tested starts a scanning window by taking the appointed inquiry time T as a reference, and performs first packet communication with the Bluetooth tester by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
s905: the Bluetooth device to be tested establishes Bluetooth connection with the Bluetooth test machine after the first packet communication is successful;
s906: and the Bluetooth device to be tested establishes a HOST layer link with the Bluetooth tester and receives data for function test.
10. The bluetooth test method according to claim 9, wherein the scan window is [ T- (T-) ]unit+|Δt|),T+(Tunit+|Δt|)]Where T is the contract query time, TunitFor the bluetooth clock minimum timing unit, | Δ t | is a compensation amount considering the out-of-band communication delay.
11. The bluetooth testing method according to claim 10, wherein the scan window size is 625 μ β to 1250 μ β.
12. The Bluetooth test method according to any one of claims 9 to 11,
the step S904 specifically includes the steps of:
s904 a: the Bluetooth device to be tested starts a scanning window by taking the appointed inquiry time T as a reference, and receives an inquiry packet sent by the Bluetooth tester by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
s904 b: the Bluetooth device to be tested judges whether an inquiry packet sent by the Bluetooth test machine is received or not;
s904 c: when receiving the inquiry packet sent by the Bluetooth test machine, the Bluetooth device to be tested replies a response packet for confirming the inquiry packet to the Bluetooth test machine;
s904 d: the Bluetooth device to be tested confirms that the first packet communication is successful when the Bluetooth test machine receives the response packet;
the Bluetooth test method further comprises the following steps:
s907: and the to-be-tested Bluetooth equipment skips to S902 when not receiving the inquiry packet sent by the Bluetooth test machine.
13. A Bluetooth tester is characterized in that a Bluetooth tester is provided,
the Bluetooth tester comprises an out-of-band communication module and a Bluetooth module, wherein the out-of-band communication module comprises an out-of-band communication connection unit and an out-of-band information sending unit; the Bluetooth module comprises a frequency hopping configuration unit, a first packet communication unit, a Bluetooth communication connection unit and a function test unit, wherein,
the out-of-band communication connection unit is used for establishing out-of-band communication connection with the Bluetooth device to be tested when the Bluetooth connection with the Bluetooth device to be tested is required to be established;
the out-of-band information sending unit is used for sending the Bluetooth address of the Bluetooth tester, a local clock and an appointed inquiry time T to the Bluetooth equipment to be tested by adopting out-of-band communication;
the frequency hopping configuration unit is used for configuring a current frequency hopping sequence according to the Bluetooth address of the Bluetooth tester and a local clock;
the first packet communication unit is used for performing first packet communication with the Bluetooth device to be tested by adopting a frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
the Bluetooth communication connection unit is used for establishing Bluetooth connection with the Bluetooth device to be tested after the first packet communication is successful;
the function test unit is used for establishing a HOST layer link with the Bluetooth device to be tested and transmitting data for function test.
14. The bluetooth test machine according to claim 13, wherein the out-of-band communication module further comprises an out-of-band information receiving unit, and the out-of-band information receiving unit is configured to receive, by out-of-band communication, the bluetooth address of the bluetooth device under test sent by the bluetooth device under test.
15. The Bluetooth test machine as set forth in claim 14,
the Bluetooth module also comprises a test detection unit, and the test detection unit is used for detecting whether the function test of the Bluetooth equipment to be tested is completed;
when the Bluetooth test machine finishes the function test of the Bluetooth equipment to be tested, the Bluetooth communication connection unit is also used for disconnecting the Bluetooth connection with the Bluetooth equipment to be tested, and the out-of-band communication connection unit is also used for starting out-of-band communication to establish connection with other Bluetooth equipment to be tested.
16. The Bluetooth test machine as set forth in claim 14,
the Bluetooth module also comprises a test detection unit and a Bluetooth connection detection unit,
the test detection unit is used for detecting whether all the Bluetooth equipment to be tested which establishes Bluetooth connection with the Bluetooth test machine has completed function test;
the function test unit is also used for selecting one link to establish an HOST layer link with the rest Bluetooth equipment to be tested which does not finish the function test, and transmitting data for the function test;
the Bluetooth connection detection unit detects whether the number of the Bluetooth devices to be detected connected with the Bluetooth test machine exceeds an upper limit or not;
when the detection result of the Bluetooth connection detection unit is negative, the out-of-band communication connection unit is also used for establishing out-of-band communication connection with the Bluetooth device to be detected when Bluetooth connection with another Bluetooth device to be detected is required to be established;
and when the detection result of the Bluetooth connection detection unit is yes, the Bluetooth communication connection unit is also used for disconnecting the Bluetooth connection with the to-be-detected Bluetooth equipment which has completed the function test.
17. The Bluetooth tester of claim 13,
the first packet communication unit comprises an inquiry unit and a packet receiving confirmation unit, wherein,
the inquiry unit is used for sending an inquiry packet to a Bluetooth connecting device of the Bluetooth equipment to be tested by adopting the frequency point corresponding to the appointed inquiry time T in the frequency hopping sequence;
the packet receiving confirmation unit is used for judging whether a response packet of the Bluetooth device to be detected for confirming the inquiry packet is received or not;
the out-of-band information sending unit is further configured to send the bluetooth address of the bluetooth tester, the local clock and the agreed inquiry time T to the bluetooth device to be tested by adopting out-of-band communication again when the packet receiving confirmation unit determines that the response packet is not received.
18. A bluetooth testing machine comprising a bluetooth module, an out-of-band communication module, a processor, and a computer readable storage medium having a bluetooth connection program stored thereon, the bluetooth connection program when executed by the processor implementing the bluetooth testing method as described in any one of 1-8 applied to a bluetooth testing machine.
CN201910952776.6A 2019-10-09 2019-10-09 Bluetooth testing method and testing machine Active CN111107528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910952776.6A CN111107528B (en) 2019-10-09 2019-10-09 Bluetooth testing method and testing machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910952776.6A CN111107528B (en) 2019-10-09 2019-10-09 Bluetooth testing method and testing machine

Publications (2)

Publication Number Publication Date
CN111107528A true CN111107528A (en) 2020-05-05
CN111107528B CN111107528B (en) 2023-05-02

Family

ID=70421358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910952776.6A Active CN111107528B (en) 2019-10-09 2019-10-09 Bluetooth testing method and testing machine

Country Status (1)

Country Link
CN (1) CN111107528B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112020047A (en) * 2020-09-02 2020-12-01 上海富芮坤微电子有限公司 Bluetooth communication method, medium, bluetooth device and communication system
CN112564825A (en) * 2020-12-08 2021-03-26 北京华大智宝电子系统有限公司 Method, device, equipment and system for detecting functions of Bluetooth equipment
CN112770245A (en) * 2020-12-29 2021-05-07 华勤技术股份有限公司 Detection device and test method
CN113726467A (en) * 2021-07-29 2021-11-30 黎兴荣 Electronic product data transmission method, system, storage medium and program product
CN115086855A (en) * 2022-07-20 2022-09-20 荣耀终端有限公司 Test system, method and related device
WO2022228248A1 (en) * 2021-04-27 2022-11-03 华为技术有限公司 Bluetooth communication method and system, and electronic device
US20230058684A1 (en) * 2021-08-18 2023-02-23 Rohde & Schwarz Gmbh & Co. Kg System and method for testing a Bluetooth low energy implementation under test
CN116405968A (en) * 2023-06-07 2023-07-07 深圳市百泰实业股份有限公司 Bluetooth test system with programmable user

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105848196A (en) * 2016-05-04 2016-08-10 青岛歌尔声学科技有限公司 NFC bluetooth adapter and bluetooth product test system and test method
CN205754881U (en) * 2016-05-04 2016-11-30 青岛歌尔声学科技有限公司 A kind of NFC Bluetooth adapter and the test system of blue tooth products
CN106851678A (en) * 2017-02-15 2017-06-13 Tcl通力电子(惠州)有限公司 Blue tooth productses method of testing and device
CN106878926A (en) * 2017-02-08 2017-06-20 泰凌微电子(上海)有限公司 A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system
CN108616849A (en) * 2016-12-13 2018-10-02 中国电信股份有限公司 Bluetooth connecting method, Bluetooth system and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105848196A (en) * 2016-05-04 2016-08-10 青岛歌尔声学科技有限公司 NFC bluetooth adapter and bluetooth product test system and test method
CN205754881U (en) * 2016-05-04 2016-11-30 青岛歌尔声学科技有限公司 A kind of NFC Bluetooth adapter and the test system of blue tooth products
CN108616849A (en) * 2016-12-13 2018-10-02 中国电信股份有限公司 Bluetooth connecting method, Bluetooth system and equipment
CN106878926A (en) * 2017-02-08 2017-06-20 泰凌微电子(上海)有限公司 A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system
CN106851678A (en) * 2017-02-15 2017-06-13 Tcl通力电子(惠州)有限公司 Blue tooth productses method of testing and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112020047A (en) * 2020-09-02 2020-12-01 上海富芮坤微电子有限公司 Bluetooth communication method, medium, bluetooth device and communication system
CN112564825A (en) * 2020-12-08 2021-03-26 北京华大智宝电子系统有限公司 Method, device, equipment and system for detecting functions of Bluetooth equipment
CN112770245A (en) * 2020-12-29 2021-05-07 华勤技术股份有限公司 Detection device and test method
WO2022228248A1 (en) * 2021-04-27 2022-11-03 华为技术有限公司 Bluetooth communication method and system, and electronic device
CN113726467A (en) * 2021-07-29 2021-11-30 黎兴荣 Electronic product data transmission method, system, storage medium and program product
US20230058684A1 (en) * 2021-08-18 2023-02-23 Rohde & Schwarz Gmbh & Co. Kg System and method for testing a Bluetooth low energy implementation under test
CN115086855A (en) * 2022-07-20 2022-09-20 荣耀终端有限公司 Test system, method and related device
CN115086855B (en) * 2022-07-20 2022-12-27 荣耀终端有限公司 Test system, method and related device
CN116405968A (en) * 2023-06-07 2023-07-07 深圳市百泰实业股份有限公司 Bluetooth test system with programmable user
CN116405968B (en) * 2023-06-07 2023-08-29 深圳市百泰实业股份有限公司 Bluetooth test system with programmable user

Also Published As

Publication number Publication date
CN111107528B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN111107528B (en) Bluetooth testing method and testing machine
EP3242511B1 (en) Systems and methods for implementing multiple band service discovery
US10595347B2 (en) Systems and methods for coupling wireless devices
CN112020048B (en) Bluetooth device pairing method, device and storage medium
US10681123B2 (en) Responding to a ranging request from a peer device in a wireless network
CN111132100B (en) Bluetooth connection method and device, bluetooth equipment and Bluetooth system
CN101860941B (en) Wireless communications device, system, method and program
CN108781473B (en) Method and equipment for sharing files among different terminals
CN106982423B (en) Communication device and control method
KR20210020542A (en) Method for supporting multiple links in bluetooth network environment and electronic device thereof
CN109005532A (en) A kind of Bluetooth connecting method, bluetooth master and Bluetooth slave devices
CN111050306A (en) Extended connection method and extended connection system for Bluetooth device
KR20170137617A (en) Method and apparatus for setup of wireless connection
CN112437371B (en) BLE link switching method, equipment, earphone pair, chip and medium
CN104918296A (en) Network connection assistance system and method
CN107820229B (en) Terminal detection method and communication equipment
CN102149188B (en) Method for synchronizing nodes
CN109392078B (en) Signal detection and transmission method and device, and remote user equipment
US20200389767A1 (en) Identification and location of personal area network device
CN111885571A (en) Bluetooth device pairing method, device and storage medium
JP3278505B2 (en) Digital radio telephone equipment
CN105991163B (en) Communication method and device based on Bluetooth application
CN107027126B (en) Data communication method and system, terminal equipment and control equipment
CN115885573A (en) Audio output apparatus wirelessly receiving data from electronic device and method of operating the same
KR20110053696A (en) Apparatus and method for determinating ping interval of activesync service in wireless communication terminal

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519075 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Applicant before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant