CN111885553A - Bluetooth device communication method and related device - Google Patents

Bluetooth device communication method and related device Download PDF

Info

Publication number
CN111885553A
CN111885553A CN202010331020.2A CN202010331020A CN111885553A CN 111885553 A CN111885553 A CN 111885553A CN 202010331020 A CN202010331020 A CN 202010331020A CN 111885553 A CN111885553 A CN 111885553A
Authority
CN
China
Prior art keywords
bluetooth
link
bluetooth device
time slot
master
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
CN202010331020.2A
Other languages
Chinese (zh)
Other versions
CN111885553B (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 CN202010331020.2A priority Critical patent/CN111885553B/en
Publication of CN111885553A publication Critical patent/CN111885553A/en
Application granted granted Critical
Publication of CN111885553B publication Critical patent/CN111885553B/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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0055Transmission or use of information for re-establishing the radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • 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 relates to a Bluetooth device communication method and a related device. According to the method, through adjusting the time slot relationship of two Bluetooth links, under the condition that extra communication bandwidth is not increased, a second Bluetooth device monitors two link data packets at the same time, a first Bluetooth device is switched to a second Bluetooth link forwarded by audio, the second Bluetooth device is triggered to follow switching according to a convention trigger mode, communication link switching is completely dominated by the first Bluetooth device, and the two devices can continue to communicate according to a Bluetooth standard protocol after link switching, so that the problems that asynchronous switching cannot be conducted in synchronous communication or preset timing switching causes low communication link bandwidth utilization rate, large communication delay, high power consumption and the like are solved, meanwhile, the whole link switching process is conducted under the Bluetooth standard protocol, and communication with a sound source device is not affected at all.

Description

Bluetooth device communication method and related device
Technical Field
The present invention relates to the field of wireless communications, and in particular, to a bluetooth device communication method, apparatus, system, device, chip, and storage medium.
Background
With the gradual development of the bluetooth technology, the bluetooth devices are applied in different fields, especially audio frequency, and are widely available, in some application scenarios, a data output source needs to be transmitted to two or more devices through bluetooth, for example, a stereo headset needs to receive signals of the data source from both left and right channels of playing devices, so as to achieve the effect of synchronous playing, which is the dual-wireless bluetooth communication in audio frequency playing. The dual-wireless bluetooth communication includes three bluetooth devices, one of which is a bluetooth sound source device (such as a mobile phone and a notebook computer), and two bluetooth devices playing simultaneously (such as a bluetooth dual-earphone and a dual-speaker box), and it is a common practice at present that one bluetooth device is connected with the bluetooth sound source device as a master receiving device, and the other bluetooth device is connected with the master receiving device as a slave receiving device and monitors the bluetooth sound source device. The slave receiving equipment establishes a monitoring link for monitoring the communication between the master receiving equipment and the Bluetooth sound source equipment through the information exchanged by the master receiving equipment, realizes the acquisition of sound source audio data to achieve the function of playing the master receiving equipment and the slave receiving equipment simultaneously, and simultaneously, because the receiving performance and the interference difference of the master receiving equipment and the slave receiving equipment exist, the master receiving equipment forwards the sound source audio data to the slave receiving equipment to repair the audio data with wrong receiving of the monitoring link.
For realizing the above dual wireless audio, the master and slave receiving devices need to switch between two links, and the current switching modes generally include the following two types:
1. the two communication links are switched by the agreed timing. In this case, because the difference between the receiving performance of the master receiving device and the receiving performance of the slave receiving device and the interference is sometimes good or the interference is little, the audio data of the sound source device can be received quickly, but if a preset timing mode is used, the switching can be performed only when the timing arrives, so that the communication bandwidth is wasted and the problem of large communication delay exists.
2. The two communication links are switched according to the audio condition of the receiving Bluetooth sound source device. If a mode of switching according to the audio condition of the Bluetooth sound source equipment is used, switching is performed immediately after the master receiving equipment and the slave receiving equipment respectively receive the audio data of the Bluetooth sound source equipment, the master receiving equipment and the slave receiving equipment are not switched to corresponding links at the same time due to the difference of receiving performance and interference of the master receiving equipment and the slave receiving equipment, communication is not performed, data needs to be continued, and the problems of waste of communication bandwidth, high power consumption and the like exist
The communication link switching mode can cause the problems of low bandwidth utilization rate, large communication delay, high power consumption and the like, so that the communication between the double wireless Bluetooth equipment and the sound source equipment is influenced, and the user experience is influenced.
Disclosure of Invention
Based on the above situation, a main object of the present invention is to provide a communication method, apparatus, system, device, chip and storage medium for bluetooth devices, where a bluetooth master receiving device actively controls link switching, and a slave receiving device follows the link switching, so as to avoid problems of low bandwidth utilization rate, large communication delay, and high power consumption of a communication link caused by independent switching or preset timing switching.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a communication method of Bluetooth equipment is applied to a first Bluetooth equipment; the first Bluetooth device is used for forming a double wireless Bluetooth device pair with a second Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code; the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link, the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of the listening link, the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number; the method comprises the following steps:
s101, when the Bluetooth device is in the first Bluetooth link, sequentially receiving audio data sent by the sound source device in each master-slave time slot;
s102, when the communication state meets the forwarding condition, switching the current link to the second Bluetooth link, and sending a first data packet to the second Bluetooth device in the master-slave time slot of the second Bluetooth link to trigger the second Bluetooth device to switch from the monitoring link to the second Bluetooth link.
Preferably, after step S102, the method further comprises:
s103, receiving sound source monitoring feedback information sent by the second Bluetooth device through a second Bluetooth link to determine that the audio data to be forwarded is audio data to be sent;
and S104, sending the audio data to be sent to the second Bluetooth equipment through the second Bluetooth link.
Preferably, in step S102, the first bluetooth device performs link switching at an idle time of a master-slave time slot of the first bluetooth link to enter the second bluetooth link before a start of a next time slot.
Preferably, in step S102, when audio data sent by the audio source device is not received within a preset number of consecutive time slots, it is determined that the communication status satisfies the forwarding condition.
Preferably, in step S102, when the maximum timing time is reached, it is determined that the communication state satisfies the transfer condition.
Preferably, the second bluetooth device is capable of receiving an additional packet for triggering link switching sent by the first bluetooth device according to the first frequency hopping sequence and a preset access code at a preset position of a master-slave time slot of the second bluetooth link, and after step S104, the method further includes:
s105, when the communication state meets the monitoring condition, switching the current link to the first Bluetooth link;
s106, sending the additional packet to the second Bluetooth device according to the preset access code at the preset position of the idle time of the first slave-master time slot of the first Bluetooth link after switching so as to trigger the second Bluetooth device to switch from the second Bluetooth link to the monitoring link.
Preferably, before step S105, the method further comprises:
s100, agreeing a sending mode of the additional packet with the second Bluetooth device through a second Bluetooth link, wherein the sending mode is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
Preferably, the method further comprises:
transmitting the additional packet to the second Bluetooth device at the preset location of idle time of each slave-to-master slot while in the first Bluetooth link.
Preferably, in step S105, the first bluetooth device performs link switching at an idle time of a slave-to-master time slot of the second bluetooth link to enter the first bluetooth link before a start of a next time slot.
Preferably, in step S105, when the audio data is completely transferred, it is determined that the communication state satisfies the listening condition.
Preferably, in step S105, when the maximum forwarding time is reached, it is determined that the communication state satisfies the listening condition.
Preferably, the first bluetooth device and the second bluetooth device are paired wireless bluetooth headsets or wireless bluetooth speakers.
Preferably, the master-slave time slot of the first bluetooth link is an even number of time slots, the slave-master time slot of the first bluetooth link is an odd number of time slots, the master-slave time slot of the second bluetooth link is an odd number of time slots, and the slave-master time slot of the second bluetooth link is an even number of time slots.
The invention also provides a communication method of the Bluetooth equipment, which is applied to the second Bluetooth equipment; the second Bluetooth device is used for forming a double-wireless Bluetooth device pair with the first Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code; the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, and the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link; the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of a listening link, and the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number; the method comprises the following steps:
s201, when the Bluetooth device is in the monitoring link, monitoring audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code at the time slot N1, and monitoring data sent by the second Bluetooth device according to the second frequency hopping sequence and the second channel access code at the time slot N2;
and S202, when a first data packet which is sent by the first Bluetooth device and used for triggering link switching is received in any N2 time slot, switching from the listening link to the second Bluetooth link.
Preferably, after step S202, the method further comprises:
s203, sending sound source monitoring feedback information to the first Bluetooth equipment through the second Bluetooth link;
s204, receiving audio data to be sent by the first Bluetooth device; and the audio data to be sent is determined by the first Bluetooth equipment according to the sound source monitoring feedback information.
Preferably, after step S204, the method further comprises:
s205, when a data packet sent by the first Bluetooth device is not received at a receiving position of any master-slave time slot of the second Bluetooth link, detecting whether an additional packet for triggering link switching sent by the first Bluetooth device is received or not at a preset position of idle time of the same time slot according to the first frequency hopping sequence and a preset access code, if so, executing a step S206, and if not, continuing to stay in the second Bluetooth link;
and S206, switching to a monitoring link.
The invention also provides a Bluetooth device communication method, which is applied to a double-wireless Bluetooth device pair consisting of a first Bluetooth device and a second Bluetooth device, wherein the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link and forward the audio data to the second Bluetooth device through a second Bluetooth link; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code; the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, and the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link; the second Bluetooth device can monitor the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link at the N1 time slot of the monitoring link, and the second Bluetooth device can monitor the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link at the N2 time slot of the monitoring link, wherein N1+ N2 is an odd number; the method comprises the following steps:
s01, when the first Bluetooth device is in the first Bluetooth link, the first Bluetooth device receives the audio data sent by the sound source device in each master-slave time slot in sequence; meanwhile, the second Bluetooth device is positioned in the monitoring link;
s02, when the second Bluetooth device is in the listening link, the second Bluetooth device listens to the audio data sent by the sound source device through the first frequency hopping sequence and the first channel access code in N1 time slot, and listens to the data sent by the first Bluetooth device through the second frequency hopping sequence and the second channel access code in N2 time slot;
s03, if the first bluetooth device determines that the current communication status satisfies the forwarding condition, switching the current link to the second bluetooth link, and sending a first data packet to the second bluetooth device in the master-slave time slot of the second bluetooth link to trigger the second bluetooth device to switch from the monitoring link to the second bluetooth link;
s04, when the second bluetooth device receives the first packet on the listening link, switching from the listening link to the second bluetooth link.
Preferably, in step S03, the first bluetooth device performs link switching at an idle time of a master-slave time slot of the first bluetooth link to enter onto the second bluetooth link before the start of the next time slot.
Preferably, the method further comprises:
s05, when the communication state of the first Bluetooth device meets the monitoring condition, switching the current link to the first Bluetooth link;
s06, the first bluetooth device sends, according to the preset access code, an additional packet for triggering link switching to the second bluetooth device at a preset position of the switched first slave-master timeslot, so as to trigger the second bluetooth device to switch from the second bluetooth link to the listening link;
s07, when the second bluetooth device does not receive the data packet sent by the first bluetooth device at the receiving position of any master-slave time slot of the second bluetooth link, receiving the additional packet at the preset position of the idle time of the same time slot according to the first blue-hopping sequence and the preset access code;
s08, the second bluetooth device switches from the second bluetooth link to the listening link after receiving the additional packet.
Preferably, before step S05, the method further comprises:
s05', the first bluetooth device and the second bluetooth device agree on a sending method of the additional packet through the second bluetooth link, where the sending method is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
Preferably, in step S05, the first bluetooth device performs link switching at an idle time of a slave-to-master time slot of the second bluetooth link to enter onto the first bluetooth link before the start of the next time slot.
The invention also provides a Bluetooth device communication device, which is applied to a first Bluetooth device, wherein the first Bluetooth device is used for forming a double-wireless Bluetooth device pair with a second Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code; the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link, the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of the listening link, the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number; the bluetooth device communication apparatus includes:
the first transceiver module is used for receiving the audio data sent by the sound source equipment at each master-slave time slot in sequence when the first transceiver module is positioned in the first Bluetooth link;
and the forwarding triggering module is used for switching the current link to the second Bluetooth link when the communication state meets the forwarding condition, and sending a first data packet to the second Bluetooth device in the master-slave time slot of the second Bluetooth link so as to trigger the second Bluetooth device to switch from the monitoring link to the second Bluetooth link.
The invention also provides a Bluetooth device communication device, which is applied to the second Bluetooth device; the second Bluetooth device is used for forming a double-wireless Bluetooth device pair with the first Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code; the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, and the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link; the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of a listening link, and the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number; the bluetooth device communication apparatus includes:
a link monitoring module, configured to monitor, when the bluetooth device is in the monitored link, audio data sent by the audio source device according to the first frequency hopping sequence and the first channel access code at N1 time slot, and monitor, at N2 time slot, data sent by the second bluetooth device according to the second frequency hopping sequence and the second channel access code;
and the forwarding following module is used for switching from the monitoring link to the second Bluetooth link when receiving a first data packet which is sent by the first Bluetooth device and used for triggering link switching at any N2 time slot.
The present invention also provides a bluetooth device, wherein the bluetooth device comprises: a processor for implementing the bluetooth communication as applied to the first bluetooth device or the second bluetooth device as previously described.
The invention also provides a pair of dual wireless Bluetooth devices, which comprises a first Bluetooth device and a second Bluetooth device, wherein the first Bluetooth device and the second Bluetooth device communicate by adopting the Bluetooth device communication method applied to the first Bluetooth device and the second Bluetooth device.
The invention also provides a Bluetooth communication system, which comprises an audio source device for providing audio data and a first Bluetooth device and a second Bluetooth device for playing the audio data of the audio source device, wherein the first Bluetooth device and the second Bluetooth device communicate by adopting the Bluetooth device communication method applied to the first Bluetooth device and the second Bluetooth device
The invention also provides a chip for a bluetooth device having an integrated circuit thereon, said integrated circuit being designed for enabling said bluetooth communication as applied to a first bluetooth device or a second bluetooth device as described above.
The invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the bluetooth communication as described above as applied to a first bluetooth device or a second bluetooth device.
Has the advantages that:
according to the embodiment of the invention, through adjusting the time slot relationship of two Bluetooth links, under the condition of not increasing extra communication bandwidth, the second Bluetooth device monitors two link data packets at the same time, the first Bluetooth device is switched to the second Bluetooth link forwarded by audio, and the second Bluetooth device is triggered to follow the switching according to an appointed triggering mode, the communication link switching is completely dominated by the first Bluetooth device, and the two devices can continue to communicate according to a Bluetooth standard protocol after the link switching, so that the problems of low bandwidth utilization rate, large communication delay, high power consumption and the like of the communication link caused by asynchronous switching incapable synchronous communication or preset timing switching are avoided, meanwhile, the whole link switching process is carried out under the Bluetooth standard protocol, and the communication between the sound source device and the sound source device is not influenced at all.
Other advantages of the present invention will be described in the detailed description, and those skilled in the art will understand the technical features and technical solutions presented in the description.
Drawings
Preferred embodiments according to the present invention will be described below with reference to the accompanying drawings. In the figure:
FIG. 1 is a schematic diagram of a communication link for dual wireless Bluetooth communication in accordance with the present invention;
fig. 2 is a schematic flow chart illustrating a bluetooth device communication method of a first bluetooth device side according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating link switching in a communication process of each bluetooth device according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating another link switching in the communication process of each bluetooth device according to another embodiment of the present invention;
fig. 5 is a schematic flowchart illustrating a bluetooth device communication method of a second bluetooth device according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a bluetooth device communication method applied to a first bluetooth device and a second bluetooth device according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating functional modules of a bluetooth device communication apparatus on a first bluetooth device side according to an embodiment of the present invention;
fig. 8 is a schematic functional block diagram of a bluetooth device communication apparatus on a second bluetooth device side according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a bluetooth communication system according to an embodiment of the present invention.
Detailed Description
In order to describe the technical solutions of the present invention in more detail to facilitate further understanding of the present invention, the following describes specific embodiments of the present invention with reference to the accompanying drawings. It should be understood, however, that all of the illustrative embodiments and descriptions thereof are intended to illustrate the invention and are not to be construed as the only limitations of the invention.
In the bluetooth standard protocol, a bluetooth master device and a bluetooth slave device are included in the same bluetooth network, the bluetooth network provides a local clock as a network common clock from the bluetooth master device, and the bluetooth slave device generally adds an offset to its own local clock to synchronize with the common clock. Bluetooth masters and bluetooth slaves typically use 1600 hops per second for frequency hopping communications. The definition of the bluetooth specification includes the concept of time slots, one time slot being 1/1600 seconds, i.e. 625us, in a bluetooth link, the time slots include a master-slave time slot and a slave-master time slot which alternate in sequence, the bluetooth master transmitting a data packet to the bluetooth slave at each master-slave transmission position (i.e. the start position of each time slot), and the bluetooth master receiving a data packet responded by the bluetooth slave at each slave-master time slot reception position (typically the start position of the time slot). In a bluetooth network, data transmission is always initiated by a bluetooth master device transmitting data to a bluetooth slave device in a master-slave time slot, the bluetooth slave device responds data in a slave-master time slot, and the bluetooth slave device only needs to respond in the slave-master time slot after receiving the data transmitted by the bluetooth master device. In bluetooth communications, a master device typically transmits in even slots and a slave device responds in odd slots, i.e., the even slots are master-slave slots and the odd slots are slave-master slots. The Bluetooth data packet has data packets of single time slot, 3 time slot and 5 time slot, for the data packet of 3 time slot and the data packet of 5 time slot, the data packet can be sent across the time slot, 3 or 5 continuous time slots are all master-slave time slots, however, after the sending is finished, the next time slot is still slave-master time slot and still is an odd time slot, and the rule that the master device usually sends in the even time slot and the slave device responds in the odd time slot is not damaged.
The invention is applied to various wireless Bluetooth devices, such as Bluetooth playing devices, Bluetooth headsets, Bluetooth loudspeaker boxes and the like, and the invention does not limit the specific type and representation form of the Bluetooth devices.
In the present invention, a first bluetooth device and a second bluetooth device form a pair of dual wireless bluetooth devices, and acquire audio data from a sound source device and play the audio data, as shown in fig. 1, a communication link diagram of dual wireless bluetooth communication in the present invention is shown. In the first bluetooth link, the sound source device 100 is a bluetooth master device, and the first bluetooth device 101 is a bluetooth slave device. In the second bluetooth link, the first bluetooth device 101 is a bluetooth master device, and the second bluetooth device 102 is a bluetooth slave device. The first bluetooth device 101 and the second bluetooth device 102 form a pair of dual wireless bluetooth devices, the first bluetooth device 101 can be used as a network slave device to receive audio data sent by the sound source device 100 through a first bluetooth link, and can be used as a network master device to send a first communication parameter of the first bluetooth link and forward the audio data to the second bluetooth device 102 through a second bluetooth link, and the second bluetooth device 102 can monitor the audio data sent on the first bluetooth link through a monitoring link, so as to obtain the audio data of the sound source device 100. In this embodiment, the slot divisions and changes of the first bluetooth link, the second bluetooth link, and the listening link are synchronized. The master-slave time slot of the first Bluetooth link corresponds to the slave-master time slot of the second Bluetooth link, the slave-slave time slot of the first Bluetooth link corresponds to the master-slave time slot of the second Bluetooth link, the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link, N1 and N2 are integers not less than 0, and N1+ N2 is an odd number. The second bluetooth device 102 can listen to the audio data transmitted by the audio source device 100 according to the first frequency hopping sequence and the first channel access code of the first bluetooth link at the N1 time slot of the listening link, and listen to the data transmitted by the first bluetooth device 101 according to the second frequency hopping sequence and the second channel access code of the second bluetooth link at the N2 time slot.
Group one of the embodiments:
referring to fig. 2, a flowchart of a bluetooth device communication method of a first bluetooth device side according to an embodiment of the present invention is shown. In this embodiment, the bluetooth device communication method includes the following steps S101 to S102:
s101, when the Bluetooth device is in the first Bluetooth link, sequentially receiving audio data sent by the sound source device in each master-slave time slot;
s102, when the communication state meets the forwarding condition, switching the current link to the second Bluetooth link, and sending a first data packet to the second Bluetooth device in the master-slave time slot of the second Bluetooth link to trigger the second Bluetooth device to switch from the monitoring link to the second Bluetooth link.
Specifically, in this embodiment, the second bluetooth device 102 can listen to the audio data transmitted by the audio source device 100 according to the first frequency hopping sequence and the first channel access code of the first bluetooth link at the N1 time slot of the listening link, and listen to the data transmitted by the first bluetooth device 101 according to the second frequency hopping sequence and the second channel access code of the second bluetooth link at the N2 time slot. The master-slave time slot of the first Bluetooth link corresponds to the slave-master time slot of the second Bluetooth link, the slave-slave time slot of the first Bluetooth link corresponds to the master-slave time slot of the second Bluetooth link, the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link, N1 and N2 are integers not less than 0, and N1+ N2 is an odd number. The time slot divisions and changes of the first bluetooth link, the second bluetooth link, and the listening link are synchronized.
For the second bluetooth device 102, when it establishes the second bluetooth link, it has obtained the second communication parameters of the second bluetooth link, including the second frequency hopping sequence, the second channel access code and in which time slot data transmission and reception are performed, and so on, and at the same time, after the first bluetooth device 101 establishes the second bluetooth link, it sends the first communication parameters of the first bluetooth link and the audio source device 100 to the second bluetooth device 102, and the second bluetooth device 102 also obtains the first communication parameters of the first bluetooth link, including the second frequency hopping sequence, the second channel access code and in which time slot data transmission and reception are performed, and so on.
Thus, when the audio source device 100 transmits audio data in the master-slave time slot of the first bluetooth link, the first bluetooth device 101 may receive the audio data, and the second bluetooth device 102 may listen to the audio data just in the N1 time slot, and may listen to the first bluetooth device 101 through the second frequency hopping sequence and the second channel access code to determine whether the first bluetooth device 100 has switched to the second bluetooth link when the audio source device 100 waits for the next time slot, i.e., the slave-master time slot, for the first bluetooth device 101 to respond to.
If the first bluetooth link is a slave-to-master slot with the even slots and the odd slots are slave-to-master slots, the second bluetooth link is a slave-to-master slot with the even slots and the odd slots being master-to-slave slots, and while listening to the link, the second bluetooth device 102 needs to listen to the audio source device 100 in the even slots and to listen to the first bluetooth device 101 in the odd slots, where N1 is even and N2 is odd. If the first bluetooth link is a slave-to-master slot in the even slots and a master-to-slave slot in the odd slots, the second bluetooth link is a master-to-slave slot in the even slots and a master-to-slave slot in the odd slots, and while listening to the link, the second bluetooth device 102 needs to listen to the audio source device 100 in the odd slots and listen to the first bluetooth device 101 in the even slots, where N1 is odd and N2 is even. When monitoring the sound source device 100, the second bluetooth device 102 needs to use the first frequency hopping sequence of the first bluetooth link to perform frequency hopping and use the first channel access code as the access code, and when monitoring the first sound source device 101, the second bluetooth device 102 needs to use the second frequency hopping sequence of the second bluetooth link to perform frequency hopping and use the second channel access code as the access code. Thus, the second bluetooth device 102 hops using the first hopping sequence and listens using the first channel access code as an access code at N1 time slots and hops using the second hopping sequence and listens using the second channel access code as an access code at N2 time slots.
Optionally, in a preferred embodiment, the master-slave time slots of the first bluetooth link are even time slots, the slave-master time slots of the first bluetooth link are odd time slots, the master-slave time slots of the second bluetooth link are odd time slots, and the slave-master time slots of the second bluetooth link are even time slots. Since the network master device is an audio source device in the first bluetooth link, and the network master device usually transmits in even slots in the bluetooth standard protocol, the audio source device generally complies with the bluetooth standard protocol, at this time, the master-slave slots of the first bluetooth link are even slots, and the slave-master slots of the first bluetooth link are odd slots, and correspondingly, the second bluetooth device needs to adjust the second bluetooth link so that the master-slave slots of the second bluetooth link are odd slots, and the slave-master slots of the second bluetooth link are even slots.
When the first bluetooth device 101 is in the first bluetooth link, according to the bluetooth standard protocol, the audio source device 100 will transmit audio data to the first bluetooth device 102 at the transmission position of each master-slave time slot in turn, and the first bluetooth device 102 will wait and receive audio data transmitted by the audio source device 100 at the same position of each master-slave time slot in turn, while for the second bluetooth device, it listens and receives audio data transmitted by the audio source device 100 at the N1 time slot corresponding to the master-slave time slot of the first bluetooth link. Meanwhile, at the time slot N2 corresponding to the slave-to-master time slot of the first bluetooth link, which is also the master-to-slave time slot of the second bluetooth link, the second bluetooth device 102 will listen to the first bluetooth device 101 to determine whether the first bluetooth device 101 has switched to the second bluetooth link, and if the second bluetooth device 102 receives the first data packet sent by the first bluetooth device 101 at this time slot, it indicates that the first bluetooth device 101 is currently in the second bluetooth link, and at this time, the second bluetooth device 102 will switch from the listening link to the second bluetooth link.
Referring to fig. 3, a schematic diagram of link switching in a communication process of each bluetooth device is shown, which is a communication interaction diagram among the sound source device, the first bluetooth device, and the second bluetooth device in a process of switching the first bluetooth device from the first bluetooth link to the second bluetooth link. As shown in fig. 3, it is assumed that in the first bluetooth link, k +2 … … slots are used as master-slave slots, and k +1, k +3 … … are used as slave-master slots, in this case, N1 slots correspond to k, k +2 … … slots, N2 slots correspond to k +1, k +3 … … slots, and k is an arbitrary integer greater than 0. At the start position 300 of the k time slot, the sound source device 100 sends out a data packet carrying audio data, and the first bluetooth device receives the data packet at the corresponding position 311 of the k time slot. For the second bluetooth device 102, what the k slot needs to listen to is the audio source device 100, and at the corresponding position 320, the second bluetooth device 102 will listen to the audio data sent by the audio source device 100. In the next time slot, i.e. time slot 2, at this time, for the first bluetooth link slave-master time slot, the first bluetooth device 101 needs to send an acknowledgement packet to the audio source device 100 at the slave-master time slot position 312 in response to the data packet received in the previous time slot, and for the second bluetooth device 102, in the time slot 2, the second bluetooth device 102 may listen to the first bluetooth device 101 at the position 321 to confirm whether the first bluetooth device 101 has performed link switching, as shown in the figure, since the first bluetooth device 101 is still on the first bluetooth link at this time, at the position 321, the second bluetooth device 102 cannot listen to the data packet at the position 321, and thus it can be determined that link switching has not occurred, and stays on the listening link.
For the first bluetooth device 101, audio data from the audio source device 100 is sequentially received on the first bluetooth link, and when the current communication state satisfies the forwarding condition, the first bluetooth device 101 will switch from the first bluetooth link to the second bluetooth link, and directly transmit data to the second bluetooth device 102 at the master-slave time slot position of the second bluetooth link. At this time, the second bluetooth device 102 is still in the listening link, since different time slots N1 and N2 of the listening link correspond to the master-slave time slot of the first bluetooth link and the master-slave time slot of the second bluetooth link, respectively, and the master-slave time slot of the second bluetooth link corresponds to the slave-master time slot of the first bluetooth link, and the second bluetooth device 102 listens to the audio source device 100 and the first bluetooth device 101 at different time slots of the listening link, respectively, at which time, the second bluetooth device 102 listens to the first bluetooth device 101 at the N2 time slot of the listening link, thereby receiving the data transmitted by the first bluetooth device 101. In this embodiment, when the second bluetooth device 102 listens to the listening link for the first data packet sent by the first bluetooth device, the second bluetooth device 102 immediately switches from the listening link to the second bluetooth link, and at this time, the first bluetooth device 101 and the second bluetooth device 102 are both on the second bluetooth link, and from the next master-slave time slot, the second bluetooth device 101 and the second bluetooth device 102 will communicate according to the bluetooth standard protocol.
Continuing with the example of fig. 3, as shown, the first bluetooth device 101 has switched to the second bluetooth link in the k + n +1 slot and transmits a first packet to the second bluetooth device 102 in the master-slave slot position 314 of the second bluetooth link, at which time the second bluetooth device 102 receives the first packet at the 322 position of the listening link and begins to switch from the listening link to the second bluetooth link at the same time, whereby the switching time difference between the first bluetooth device 102 and the second bluetooth device 103 is only negligible, depending on the switching time required by the second bluetooth device, and in the next slot, i.e., the k + n +2 slot, which is the slave-master slot, the second bluetooth device 102 does not begin to receive data on the second bluetooth link, so the first bluetooth device 101 does not receive an acknowledgement packet at the slave-master slot position 315, and bluetooth communication between the first bluetooth device 101 and the second bluetooth device 102 continues to communicate in the bluetooth standard protocol starting at the next master-slave time slot, i.e., the k + n +3 time slot.
It is to be understood that the present embodiment is not particularly limited as to how to switch back from the second bluetooth link to the first bluetooth link. However, obviously, due to the special relationship of the communication time slots between the first bluetooth link and the second bluetooth link, regardless of the switching manner, after switching back to the first bluetooth link, the second bluetooth device can still receive the audio data transmitted by the audio source device in the master-slave time slots following the time slot relationship of the first bluetooth link.
In the embodiment of the present invention, the first bluetooth device 101 may actively determine whether to switch from the first bluetooth link to the second bluetooth link according to the communication state, may forward the data in a time period when the sound source device 100 does not send the data, or may set a fixed time for switching, for example, switching is performed at intervals of a preset duration. Alternatively, a maximum communication timing is determined as a critical time for switching to avoid the second bluetooth device 102 from playing. Here, the maximum communication timing time is a critical time for the audio playing of the second bluetooth device 102 to be stuck if the audio playing is determined not to be switched to the second bluetooth link for forwarding the audio source data according to the audio playing code rate, the maximum packet loss rate of the bluetooth performance, and the maximum buffer of the audio data. This time is generally used for the master receiving device in the dual wireless bluetooth device, that is, the first bluetooth device 101 always receives a certain data packet of the audio source device 100 and needs to switch to the forwarding link, and negotiate and forward the previously received audio data with the slave receiving device, that is, the second bluetooth device 102, so as to prevent the slave receiving device from ending up consuming the buffered data due to not receiving the audio data that has been received with errors.
It can be understood that, regarding the forwarding condition of the link switching, the situations listed in this embodiment are not used to limit the implementation of the present invention, and the first bluetooth device may actively switch according to actual needs, and does not affect the specific link switching process in the present invention.
For the sound source device 100, after the audio data is compressed by the compression algorithm of the bluetooth standard specification, a certain data code rate, generally 328Kbps, exists, and does not occupy the entire bluetooth communication bandwidth, and the audio data only needs to send a certain amount of data at a certain time interval to meet the transmission requirement of the audio code rate, and does not need to send data all the time. Therefore, as long as the first bluetooth device 101 switches back to the first bluetooth link before the audio data is transmitted again before the audio source device 100, it can continue to receive the audio data transmitted from the audio source data. After switching back to the first bluetooth link, due to the special relationship of the communication time slots between the first bluetooth link and the second bluetooth link, the first bluetooth device 102 may continue to communicate with the audio source device 100 according to the bluetooth standard protocol, and the switching of the links does not affect the transmission of the audio data of the audio source device.
In this embodiment, when the first bluetooth device 101 actively switches from the first bluetooth link to the second bluetooth link, the second bluetooth device 102 will immediately follow the switching from the listening link to the second bluetooth link, and the switching time difference between the two will not exceed one timeslot. By adjusting the time slot relationship of two Bluetooth links, under the condition of not increasing extra communication bandwidth, the second Bluetooth device monitors two link data packets at the same time, the first Bluetooth device is switched to the second Bluetooth link forwarded by audio, and the second Bluetooth device is triggered to follow the switching according to an appointed triggering mode, the communication link switching is completely dominated by the first Bluetooth device, and the two devices can continue to communicate according to a Bluetooth standard protocol after the link switching, so that the problems of low communication link bandwidth utilization rate, large communication delay, high power consumption and the like caused by asynchronous switching and incapability of synchronous communication or preset timing switching are avoided.
In this embodiment, in the second bluetooth link, the first bluetooth device and the second bluetooth device may continue to communicate to determine the audio data that needs to be forwarded and to correct the audio data that the second bluetooth device 102 listens for errors. After step S102, the method further comprises:
s103, receiving sound source monitoring feedback information sent by the second Bluetooth device through a second Bluetooth link to determine that the audio data to be forwarded is audio data to be sent;
and S104, sending the audio data to be sent to the second Bluetooth equipment through the second Bluetooth link.
After the second bluetooth device 102 switches to the second bluetooth link, the second bluetooth device 102 continues to communicate with the first bluetooth device 101 according to the bluetooth standard protocol, and monitors feedback information to the sound source, where the sound source monitoring feedback information carries information of audio data that the second bluetooth device 102 fails to monitor or makes mistakes, and thus, the first bluetooth device 101 may determine, according to the feedback information, that the audio data that needs to be forwarded is used as the audio data to be forwarded, and continue to send the audio data to be forwarded to the second bluetooth device 102 through the second bluetooth link.
It is understood that the first data packet transmitted first may or may not carry audio data. In a preferred embodiment, the data packet may be an ID packet.
It will be appreciated that the first bluetooth device 101 may switch between slave-to-master time slots of the first bluetooth link and master-to-slave time slots, but must switch between idle time slots and switch to a new link before the next time slot begins.
Optionally, in a preferred embodiment, in step S102, the first bluetooth device 101 performs link switching at the idle time of the master-slave time slot of the first bluetooth link to enter the second bluetooth link before the start of the next time slot.
Herein, the idle time refers to a slot idle time outside of receiving or transmitting a bluetooth standard packet. In the Bluetooth standard protocol, in each time slot, not all time slot duration is occupied for transmitting data packets, but only a period of time after the time slot starts is occupied for data transmission, and after the transmission is finished, the rest time in the time slot is the time slot idle time. Therefore, regardless of whether the bluetooth device performs packet transmission or reception, slot idle time is inevitably present in each slot, the slot idle time depends on the bluetooth transmission rate, and the longest packet is an EDR2EV3 type packet if considered by the number of bytes of different packets, so the smallest slot idle time occurs when transmitting an EDR2EV3 type packet. The first bluetooth device 101 performs link switching in the master-slave time slot of the first bluetooth link, and can enter the second bluetooth link before the next time slot starts, and at this time, the time slot after switching is also the master-slave time slot of the second bluetooth link, so that the first data packet is sent just at the master-slave time slot position, and the second bluetooth device 102 can follow the switching immediately after monitoring the first data packet, and the switching time difference between the two can be basically controlled in one time slot, as shown in fig. 3. Therefore, the switching can be faster, and the bandwidth utilization rate can be further improved.
If the slave-master time slot of the first bluetooth link is switched, and at this time, when the second bluetooth link enters after the switching, the slave-master time slot of the second bluetooth link is just the slave-master time slot of the second bluetooth link, the first bluetooth device 101 will start to send the first data packet in the next time slot, and the second bluetooth device 102 switches accordingly, and the switching time difference between the two does not exceed two time slots.
Preferably, in an alternative embodiment, in step S102, when audio data sent by the audio source device is not received in a consecutive preset number of time slots, it is determined that the communication status satisfies the forwarding condition.
Specifically, as described above, for the sound source device 100, the sending of the audio data does not occupy the entire bluetooth communication bandwidth, and the audio data only needs to send a certain amount of data at a certain time interval to meet the requirement of audio code rate transmission, and does not need to send data all the time. Therefore, when the first bluetooth device 101 does not receive the audio data sent by the audio source device 100 in the consecutive preset time slots, it may be determined that the forwarding condition is currently satisfied, and then a link switch may be performed, after the switch, the first data packet is sent in the first master-slave time slot, thereby triggering the second bluetooth device to follow the switch to the second bluetooth link.
Preferably, in an optional embodiment, in step S102, when audio data sent by the audio source device is not received within a preset number of consecutive time slots, it is determined that the communication status satisfies the forwarding condition.
Specifically, the maximum communication timing time refers to a critical time for the audio playing of the second bluetooth device 102 to be blocked if the audio playing is determined not to be switched to the second bluetooth link for forwarding the audio source data according to the audio playing code rate, the maximum packet loss rate of the bluetooth performance, and the maximum buffer of the audio data. This time is generally used for the master receiving device in the dual wireless bluetooth device, that is, the first bluetooth device 101 always receives a certain data packet of the audio source device 100 and needs to switch to the forwarding link, and negotiate and forward the previously received audio data with the slave receiving device, that is, the second bluetooth device 102, so as to prevent the slave receiving device from ending up consuming the buffered data due to not receiving the previous audio data. Therefore, when the maximum timing time arrives, the first bluetooth device 101 may determine that the forwarding condition is currently satisfied, and then perform link switching.
Preferably, in an optional embodiment, the second bluetooth device is capable of receiving, at a preset position of a master-slave timeslot of the second bluetooth link, an additional packet sent by the first bluetooth device for triggering link switching according to the first frequency hopping sequence and a preset access code, and after step S104, the method further includes:
s105, when the communication state meets the monitoring condition, switching the current link to the first Bluetooth link;
s106, sending an additional packet to the second Bluetooth device according to the preset access code at the preset position of the idle time of the first slave-master time slot of the first Bluetooth link after switching so as to trigger the second Bluetooth device to switch from the second Bluetooth link to the monitoring link.
Specifically, in the second bluetooth link, when the communication state satisfies the monitoring condition, the first bluetooth device 101 needs to switch to the first bluetooth device to continue receiving the data sent by the sound source device 100, and at this time, the second bluetooth device also needs to monitor the data sent by the sound source device 100. In this embodiment, after the first bluetooth device 101 switches back to the first bluetooth link, an additional packet is sent to the second bluetooth device 102 at the preset position of the idle time of the first slave-master timeslot of the first bluetooth link to trigger the second bluetooth device to perform link switching, as long as the second bluetooth device does not receive any data packet at the receiving position of the same timeslot, the second bluetooth device receives the additional packet at the preset position in an agreed manner, and after receiving the additional packet, the first bluetooth device switches back to the listening link from the second bluetooth link to listen to the audio data sent by the audio source device 100 at the phase of N1 timeslots of the listening link. The transmission mode of the additional packet may be previously agreed by the first bluetooth device 101 and the first bluetooth device 101.
It will be appreciated that the first bluetooth device 101 may switch during idle times of the master-slave time slots of the second bluetooth link, and may also switch during idle times of the slave-master time slots.
Meanwhile, referring to fig. 4, a schematic diagram of link switching in a communication process of each bluetooth device is shown, which is an interactive communication diagram among the sound source device, the first bluetooth device, and the second bluetooth device in a process that the first bluetooth device switches from the second bluetooth link to the first bluetooth link. As shown in fig. 4, it is assumed that in the first bluetooth link, k +2 … … slots are used as master-slave slots, and k +1, k +3 … … are used as slave-master slots, in this case, N1 slots correspond to k, k +2 … … slots, N2 slots correspond to k +1, k +3 … … slots, and k is an arbitrary integer greater than 0. At the position 410 of the k slot, the first bluetooth device 101 sends out a data packet carrying audio data, the first bluetooth device 101 receives the data packet at the corresponding position 420 of the k slot, and then at the position 421 of the next k +1 slot, the second bluetooth device sends out an acknowledgement packet, and the first bluetooth device 101 receives at the position 411. It is assumed that the first bluetooth device performs link switching during the idle time of the k +1 timeslot, that is, the first bluetooth device 101 has already switched to the first bluetooth link at the beginning of the k +2 timeslot, which is the slave-master timeslot, but the first bluetooth device 101 does not need to transmit an acknowledgement packet to the audio source device 100 because it does not start receiving data in the first bluetooth link. Before receiving audio data at the next master-slave slot position 413, the first bluetooth device 101 may send an additional packet to the second bluetooth device 102, as shown, the additional packet is sent at position 412, and the second bluetooth device 102 receiving the additional packet at position 423 switches to the listening link immediately to listen to the audio data sent by the audio source device 100 at the next master-slave slot position 424 of the first bluetooth link.
It will be appreciated that if the second bluetooth device 102 can switch back to listening for the link before the start of the k +3 time slot, the audio data sent by the audio source device may be listened to during the k +3 time slot. The speed of link switching depends on the execution and coordination capabilities of the software and hardware of different devices, but the switching speed does not limit the implementation of the embodiment.
Preferably, in an optional embodiment, the method before step S105 further includes:
s100, agreeing a sending mode of the additional packet with the second Bluetooth device through a second Bluetooth link, wherein the sending mode is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
The first bluetooth device 101 and the second bluetooth device 102 also need to agree on a transmission mode of the additional packet through the second bluetooth link, and since the first bluetooth device 101 transmits the additional packet in the first bluetooth link, a channel frequency point when transmitting the additional packet is changed along with the first frequency hopping sequence, and an access code may arbitrarily agree on a preset access code, preferably an access code of the first bluetooth device or the second bluetooth device, so that the transmission mode is as follows: and the channel frequency point takes the access code as the preset access code according to the conversion, and the sending position is the preset position.
It should be noted that, for the bluetooth master device and the bluetooth slave device, in order to meet the specification of the bluetooth standard protocol, the same frequency point is opened in the same time slot for communication, and it is usually necessary to stabilize the communication frequency point in the time slot before the next time slot starts, therefore, it is usually necessary to calculate the frequency point in advance and stabilize the frequency point by a Phase Locked Loop (PLL), the stabilization time of the PLL depends on different devices, the stabilization time usually occupies the idle time of the previous time slot, and it is most desirable to just reach the start point of the next time slot while stabilizing. Since the transmission of the additional packet occupies idle time, obviously, the communication frequency point of the additional packet is the frequency point of the next timeslot calculated in advance, and thus, after the additional packet is transmitted, the first bluetooth device does not need to perform frequency point switching any more, and therefore, the time from the transmission position of the additional packet to the starting point of the next timeslot is generally: the settling time of the PLL + the reserved delay or jitter time. The reception delay or jitter time is here the reception time reserved for the second bluetooth device 102 so that the second bluetooth device has time to receive the additional packet after the first bluetooth device 101 has transmitted until the start of the next time slot.
In this embodiment, when the first bluetooth device 101 actively switches from the second bluetooth link to the first bluetooth link, the second bluetooth device 102 will immediately switch from the second bluetooth link to the listening link following the switching.
In this embodiment, by further adding an additional packet in the bluetooth standard protocol timeslot, the first bluetooth device switches back to the first bluetooth link first and then sends the additional packet, and when the second bluetooth device cannot receive the standard data packet on the second bluetooth link, the second bluetooth device receives the additional packet in an agreed manner and performs link switching when the reception is successful, and under the condition that no additional communication bandwidth is added, the communication link switching is completely dominated by the first bluetooth device, and the time difference between the two devices in link switching is very small, so that the problems of low communication link bandwidth utilization rate, large communication delay, high power consumption and the like caused by asynchronous switching or switching in a preset time are avoided.
Preferably, in an optional embodiment, in step S102, the first bluetooth device 101 performs link switching at an idle time of a slave-to-master time slot of the second bluetooth link to enter the second bluetooth link before the start of the next time slot.
If the master-slave time slot of the second bluetooth link is switched, and then the master-slave time slot of the first bluetooth link is switched, the first bluetooth device 101 will need to wait for the next time slot to send the additional packet, and the second bluetooth device 102 will switch accordingly, and the switching time difference between the two time slots does not exceed two time slots. However, in the master-slave time slot after the switching, the audio source device 101 may transmit audio data while the second bluetooth device 102 still cannot hear the audio data in the second bluetooth link, which may result in the missed reception of an audio data packet. Therefore, it is preferable to perform link switching in the slave-to-master slot of the second bluetooth link. In this case, the time slot is also the slave-master time slot of the first bluetooth link after the switch, the first bluetooth device 101 may send an additional packet in the master-slave time slot, and the second bluetooth device 102 follows the switch, which is less than one time slot during the switch, as shown in fig. 4. In the next time slot, the first bluetooth device 101 and the second bluetooth device 102 start receiving audio data of the audio source device, and the switching time difference between the two is almost negligible. As shown in fig. 4. Therefore, the switching can be faster, the bandwidth utilization rate is further improved, the reduction of audio data required to be forwarded by the first Bluetooth device can be avoided, and the power consumption is reduced.
It is to be understood that fig. 3 and fig. 4 are only examples of the switching of the bluetooth link, and are not intended to limit the actual definition of whether the time slot is a master-slave time slot or a slave-master time slot in the present invention and the actual transmission of the data packet in a specific scenario. In a specific scenario, the data packet may be a multi-slot packet and is not limited to a single-slot packet, but the link switching situation is not different.
Preferably, in an optional embodiment, the bluetooth device communication method further includes:
transmitting the additional packet to the second Bluetooth device at the preset location of idle time of each slave-to-master slot while in the first Bluetooth link.
Specifically, in order to avoid that the second bluetooth device 102 cannot receive the additional packet and therefore cannot switch to the monitoring link in time, when the first bluetooth device 101 is in the first bluetooth link, the additional packet may be continuously sent to the second bluetooth device at a preset position in the slave-master time slot before the master-slave time slot before the audio data is received each time, so that the second bluetooth device 102 may be prevented from receiving the additional packet, and the reliability of communication is enhanced.
Preferably, in an optional embodiment, in step S105, the first bluetooth device performs link switching at an idle time of a slave-to-master time slot of the second bluetooth link to enter the first bluetooth link before a next time slot starts.
Preferably, in an optional embodiment, in step S105, when the audio data is completely forwarded, it is determined that the communication status satisfies the listening condition.
Here, the maximum forwarding time refers to a critical time for the audio playing of the first bluetooth device 101 to be stuck if the audio playing is determined not to be switched back to the link of the first bluetooth link according to the audio playing code rate, the maximum packet loss rate of the bluetooth performance, and the maximum buffer of the audio data. This time is generally used for the situation that the master receiving device in the dual wireless bluetooth device forwards a certain data packet that is not successful all the time in the second bluetooth link, so that the first bluetooth device 101 is stuck due to the fact that the buffered data is about to be consumed.
Preferably, in an optional embodiment, the first bluetooth device 101 and the second bluetooth device 102 are paired bluetooth headsets or bluetooth speakers.
Example set two:
fig. 5 is a flowchart illustrating a bluetooth device communication method of a second bluetooth device according to an embodiment of the present invention. In this embodiment, the bluetooth device communication method includes the following steps S201 to S202:
s201, when the Bluetooth device is in the monitoring link, monitoring audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code at the time slot N1, and monitoring data sent by the second Bluetooth device according to the second frequency hopping sequence and the second channel access code at the time slot N2;
and S202, when a first data packet which is sent by the first Bluetooth device and used for triggering link switching is received in any N2 time slot, switching from the listening link to the second Bluetooth link.
Please refer to the description of the first bluetooth device side in the above embodiment, and details are not repeated here.
Preferably, in an optional embodiment, after S202, the method further includes:
s203, sending sound source monitoring feedback information to the first Bluetooth equipment through a second Bluetooth link;
s204, receiving the audio data to be sent, which is sent by the first Bluetooth device; and the audio data to be sent is determined by the first Bluetooth equipment according to the sound source monitoring feedback information.
Please refer to the description of the first bluetooth device side in the above embodiment for the sending of the audio data to be forwarded, which is not described herein again.
Preferably, in an optional embodiment, after S204, the method further includes:
s205, when a data packet sent by the first Bluetooth device is not received at a receiving position of any master-slave time slot of the second Bluetooth link, whether an additional packet for triggering link switching sent by the first Bluetooth device is received or not is detected at a preset position of idle time of the current time slot according to the first frequency hopping sequence and a preset access code, if yes, step S206 is executed, and if not, the second Bluetooth link is continuously stopped;
s206, switching to a monitoring link;
here, please refer to the description of the first bluetooth device side in the above embodiment for the process of switching from the second bluetooth link to the monitoring link, which is not described herein again.
Example group three:
fig. 6 is a flowchart illustrating a bluetooth device communication method applied to a second bluetooth device and a first bluetooth device according to an embodiment of the present invention. In the present embodiment, the Bluetooth device communication method includes the following steps S01-S04:
s01, when the first Bluetooth device is in the first Bluetooth link, the first Bluetooth device receives the audio data sent by the sound source device in each master-slave time slot in sequence; meanwhile, the second Bluetooth device is positioned in the monitoring link;
s02, when the second Bluetooth device is in the link listening, the second Bluetooth device listens to the audio data sent by the sound source device through the first frequency hopping sequence and the first channel access code in N1 time slot, and listens to the data sent by the first Bluetooth device through the second frequency hopping sequence and the second channel access code in N2 time slot;
s03, if the first bluetooth device determines that the current communication status satisfies the forwarding condition, switching the current link to a second bluetooth link, and sending a first data packet to the second bluetooth device in a master-slave time slot of the second bluetooth link to trigger the second bluetooth device to switch from the monitoring link to the second bluetooth link;
s04, when the second bluetooth device receives the first packet on the listening link, switching from the listening link to the second bluetooth link.
Preferably, in an embodiment, in step S03, the first bluetooth device performs link switching at an idle time of a master-slave time slot of the first bluetooth link to enter onto the second bluetooth link before the start of the next time slot.
Please refer to the description of the first bluetooth device in the first embodiment, which is not repeated herein.
Preferably, in an optional embodiment, the method further comprises:
s05, when the communication state of the first Bluetooth device meets the monitoring condition, switching the current link to the first Bluetooth link;
s06, the first bluetooth device sends, according to the preset access code, an additional packet for triggering link switching to the second bluetooth device at a preset position of the switched first slave-master timeslot, so as to trigger the second bluetooth device to switch from the second bluetooth link to the listening link;
s07, when the second bluetooth device does not receive the data packet sent by the first bluetooth device at the receiving position of any master-slave time slot of the second bluetooth link, receiving the additional packet at the preset position of the idle time of the same time slot according to the first blue-hopping sequence and the preset access code;
s08, the second bluetooth device switches from the second bluetooth link to the listening link after receiving the additional packet.
Preferably, in an embodiment, before the step S05, the method further includes:
s05', the first bluetooth device and the second bluetooth device agree on a sending method of the additional packet through the second bluetooth link, where the sending method is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
Preferably, in an embodiment, in step S05, the first bluetooth device performs link switching at an idle time of a slave-to-master time slot of the second bluetooth link to enter onto the first bluetooth link before a next time slot starts.
Here, please refer to the description of the first bluetooth device in the first embodiment, and details thereof are not repeated herein.
Example group four:
the invention further provides a Bluetooth device communication device which is applied to the first Bluetooth device. As shown in fig. 7, in an embodiment, the bluetooth device communication apparatus 10 includes a first transceiver module 11 and a forwarding trigger module 12.
The first transceiver module 11 is configured to receive, when the first bluetooth link is in the first bluetooth link, audio data sent by the audio source device sequentially in master-slave time slots;
and a forwarding triggering module 12, configured to switch the current link to the second bluetooth link when the communication state satisfies a forwarding condition, and send a first data packet to the second bluetooth device in a master-slave time slot to trigger the second bluetooth device to switch the second bluetooth link from the monitoring link.
Preferably, in an optional embodiment, the bluetooth device communication apparatus 10 further comprises a second transceiver module 13, configured to:
receiving sound source monitoring feedback information sent by the second Bluetooth equipment through a second Bluetooth link to determine that the audio data to be forwarded is audio data to be sent;
and sending the audio data to be sent to the second Bluetooth equipment through the second Bluetooth link.
Preferably, in an alternative embodiment, the forwarding trigger module 12 performs link switching at the idle time of the master-slave time slot of the first bluetooth link to enter onto the second bluetooth link before the start of the next time slot.
Preferably, in an optional embodiment, when the forwarding triggering module 12 does not receive the audio data sent by the audio source device within a continuous preset number of time slots, it is determined that the communication state satisfies the forwarding condition.
Preferably, in an optional embodiment, the forwarding triggering module determines that the communication status satisfies the forwarding condition when the maximum timing time is reached.
Preferably, in an optional embodiment, the second bluetooth device can receive, at a preset position of a master-slave slot of the second bluetooth link, an additional packet sent by the first bluetooth device for triggering link switching according to the first frequency hopping sequence and a preset access code, and the bluetooth device communication apparatus 10 further includes:
a second link switching module 14, configured to switch the current link to the first bluetooth link when the communication state satisfies the monitoring condition;
and the monitoring triggering module 15 is configured to send the additional packet to the second bluetooth device according to the preset access code at a preset position of the idle time of the first slave-master time slot of the first bluetooth link after the switching, so as to trigger the second bluetooth device to switch from the second bluetooth link to the monitoring link.
Preferably, in an optional embodiment, the bluetooth device communication apparatus 10 further comprises:
a link adjusting module 16, configured to agree with the second bluetooth device through a second bluetooth link to send the additional packet, where the sending method is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
Preferably, in an optional embodiment, the listening triggering module 14 is further configured to send the additional packet to the second bluetooth device at the preset position of the idle time of each slave-master timeslot when in the first bluetooth link.
Preferably, in an optional embodiment, the second link switching module 14 performs link switching at an idle time of a slave-to-master time slot of the second bluetooth link to enter the first bluetooth link before the start of the next time slot.
Preferably, in an optional embodiment, the interception triggering module 15 determines that the communication status satisfies the interception condition when the audio data is completely forwarded.
Preferably, in an optional embodiment, the interception triggering module 15 determines that the communication status satisfies the interception condition when the maximum forwarding time is reached.
Preferably, in an optional embodiment, the first bluetooth device 101 and the second bluetooth device 102 are paired bluetooth headsets or bluetooth speakers.
Preferably, in an alternative embodiment, the master-slave time slots of the first bluetooth link are even time slots, the slave-master time slots of the first bluetooth link are odd time slots, the master-slave time slots of the second bluetooth link are odd time slots, and the slave-master time slots of the second bluetooth link are even time slots.
The specific process of implementing bluetooth device communication by each module in the bluetooth device communication apparatus 10 is described with reference to the bluetooth device communication method on the first bluetooth device side.
Example group five:
the invention further provides a Bluetooth device communication device which is applied to the second Bluetooth device. Referring to fig. 8, in an embodiment, the bluetooth device communication apparatus 20 includes a link listening module 21 and a forwarding following module 22.
The link monitoring module 21 is configured to monitor, when the bluetooth device is in the monitored link, audio data sent by the audio source device according to the first frequency hopping sequence and the first channel access code at N1 time slot, and data sent by the second bluetooth device according to the second frequency hopping sequence and the second channel access code at N2 time slot;
and the forwarding following module 22 is used for switching from the listening link to the second bluetooth link when receiving a first data packet which is sent by the first bluetooth device and used for triggering link switching at any N2 time slot.
Preferably, in an optional embodiment, the bluetooth device communication apparatus 20 further includes a feedback forwarding module 23, configured to:
sending sound source monitoring feedback information to the first Bluetooth equipment through a second Bluetooth link;
receiving audio data to be sent by the first Bluetooth device; and the audio data to be sent is determined by the first Bluetooth equipment according to the sound source monitoring feedback information.
Preferably, in an optional embodiment, the bluetooth device communication apparatus 20 further includes:
a monitoring following module 24, configured to detect, at a preset position of idle time in the same timeslot, whether an additional packet for triggering link switching is received, where the additional packet is sent by the first bluetooth device, and if so, switch to a monitoring link, where the additional packet is sent by the first bluetooth device, and the monitoring following module is used to detect whether the additional packet is sent by the first bluetooth device; if not, continuing to stay in the second Bluetooth link.
The specific process of implementing bluetooth device communication by each module in the bluetooth device communication apparatus 20 is described with reference to the bluetooth device communication method on the second bluetooth device side.
Example set six:
the present invention further provides a bluetooth device, which includes a processor for implementing the bluetooth device communication method of the first bluetooth device side or the second bluetooth device side as described in the foregoing embodiments.
Example set seven:
the present invention further provides a pair of dual wireless bluetooth devices, as shown in fig. 9, the pair 1 of dual wireless bluetooth devices includes a first bluetooth device 101 and a second bluetooth device 102, and the first bluetooth device 101 and the second bluetooth device 102 communicate by using the bluetooth device communication method for the first bluetooth device and the second bluetooth device as described in the foregoing embodiment.
Example group eight:
the present invention further provides a bluetooth communication system, as shown in fig. 9, the bluetooth communication system includes an audio source device for providing audio data and two first bluetooth devices 101 and two second bluetooth devices 102 for playing the audio data of the audio source device, and the first bluetooth device 101 and the second bluetooth devices 102 form a pair 1 of dual wireless bluetooth devices. The first bluetooth device 101 and the second bluetooth device 102 communicate using the bluetooth device communication method for the first bluetooth device and the second bluetooth device as described in the foregoing embodiments
Example set nine:
the present invention further provides a chip for a bluetooth device having thereon an integrated circuit designed to implement the bluetooth device communication method on the first bluetooth device side or the bluetooth device communication method on the second bluetooth device side as described in the foregoing embodiments.
Example group ten:
the present invention further provides a storage medium storing a computer program that, when executed by a processor, executes the bluetooth device communication method on the first bluetooth device side or the bluetooth device communication method on the second bluetooth device side according to the foregoing embodiments.
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 (28)

1. A communication method of Bluetooth equipment is applied to a first Bluetooth equipment; the first Bluetooth device is used for forming a double wireless Bluetooth device pair with a second Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code;
the method is characterized in that:
the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link, the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of the listening link, the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number;
the method comprises the following steps:
s101, when the Bluetooth device is in the first Bluetooth link, sequentially receiving audio data sent by the sound source device in each master-slave time slot;
s102, when the communication state meets the forwarding condition, switching the current link to the second Bluetooth link, and sending a first data packet to the second Bluetooth device in the master-slave time slot of the second Bluetooth link to trigger the second Bluetooth device to switch from the monitoring link to the second Bluetooth link.
2. The bluetooth device communication method according to claim 1, wherein after step S102, the method further comprises:
s103, receiving sound source monitoring feedback information sent by the second Bluetooth device through a second Bluetooth link to determine that the audio data to be forwarded is audio data to be sent;
and S104, sending the audio data to be sent to the second Bluetooth equipment through the second Bluetooth link.
3. The bluetooth device communication method according to claim 1, wherein in step S102, the first bluetooth device performs link switching at an idle time of a master-slave slot of a first bluetooth link to enter the second bluetooth link before a start of a next slot.
4. The bluetooth device communication method according to claim 1, wherein in step S102, when the audio data transmitted from the audio source device is not received within a predetermined number of consecutive time slots, it is determined that the communication status satisfies the forwarding condition.
5. The bluetooth device communication method according to claim 1, wherein in step S102, when the maximum timing time is reached, it is determined that the communication state satisfies the forwarding condition.
6. The bluetooth device communication method according to claim 2, wherein the second bluetooth device is capable of receiving an additional packet for triggering link switching from the first bluetooth device at a preset position of a master-slave slot of the second bluetooth link according to the first frequency hopping sequence and a preset access code, and after step S104, the method further comprises:
s105, when the communication state meets the monitoring condition, switching the current link to the first Bluetooth link;
s106, sending the additional packet to the second Bluetooth device according to the preset access code at the preset position of the idle time of the first slave-master time slot of the first Bluetooth link after switching so as to trigger the second Bluetooth device to switch from the second Bluetooth link to the monitoring link.
7. The bluetooth device communication method according to claim 6, wherein before step S105, the method further comprises:
s100, agreeing a sending mode of the additional packet with the second Bluetooth device through a second Bluetooth link, wherein the sending mode is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
8. The bluetooth device communication method according to claim 6, characterized in that the method further comprises:
transmitting the additional packet to the second Bluetooth device at the preset location of idle time of each slave-to-master slot while in the first Bluetooth link.
9. The bluetooth device communication method according to claim 6, wherein in step S105, the first bluetooth device performs link switching at an idle time of a slave-to-master slot of the second bluetooth link to enter the first bluetooth link before a start of a next slot.
10. The bluetooth device communication method according to claim 6, wherein in step S105, when the audio data is forwarded, it is determined that the communication status satisfies the listening condition.
11. The bluetooth device communication method according to claim 6, wherein in step S105, when the maximum forwarding time is reached, it is determined that the communication state satisfies the listening condition.
12. The bluetooth device communication method according to any one of claims 1 to 11, wherein the first bluetooth device and the second bluetooth device are paired wireless bluetooth headsets or wireless bluetooth speakers.
13. The bluetooth device communication method according to any of claims 1-11, wherein the master-slave time slot of the first bluetooth link is an even time slot, the slave-master time slot of the first bluetooth link is an odd time slot, the master-slave time slot of the second bluetooth link is an odd time slot, and the slave-master time slot of the second bluetooth link is an even time slot.
14. A Bluetooth device communication method is applied to a second Bluetooth device; the second Bluetooth device is used for forming a double-wireless Bluetooth device pair with the first Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code;
it is characterized in that the preparation method is characterized in that,
the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, and the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link; the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of a listening link, and the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number;
the method comprises the following steps:
s201, when the Bluetooth device is in the monitoring link, monitoring audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code at the time slot N1, and monitoring data sent by the second Bluetooth device according to the second frequency hopping sequence and the second channel access code at the time slot N2;
and S202, when a first data packet which is sent by the first Bluetooth device and used for triggering link switching is received in any N2 time slot, switching from the listening link to the second Bluetooth link.
15. The bluetooth device communication method according to claim 14, wherein after step S202, the method further comprises:
s203, sending sound source monitoring feedback information to the first Bluetooth equipment through the second Bluetooth link;
s204, receiving audio data to be sent by the first Bluetooth device; and the audio data to be sent is determined by the first Bluetooth equipment according to the sound source monitoring feedback information.
16. The bluetooth device communication method according to claim 15, wherein after step S204, the method further comprises:
s205, when a data packet sent by the first Bluetooth device is not received at a receiving position of any master-slave time slot of the second Bluetooth link, detecting whether an additional packet for triggering link switching sent by the first Bluetooth device is received or not at a preset position of idle time of the same time slot according to the first frequency hopping sequence and a preset access code, if so, executing a step S206, and if not, continuing to stay in the second Bluetooth link;
and S206, switching to a monitoring link.
17. A Bluetooth device communication method is applied to a double-wireless Bluetooth device pair consisting of a first Bluetooth device and a second Bluetooth device, wherein the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link and forward the audio data to the second Bluetooth device through a second Bluetooth link; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code;
it is characterized in that the preparation method is characterized in that,
the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, and the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link; the second Bluetooth device can monitor the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link at the N1 time slot of the monitoring link, and the second Bluetooth device can monitor the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link at the N2 time slot of the monitoring link, wherein N1+ N2 is an odd number;
the method comprises the following steps:
s01, when the first Bluetooth device is in the first Bluetooth link, the first Bluetooth device receives the audio data sent by the sound source device in each master-slave time slot in sequence; meanwhile, the second Bluetooth device is positioned in the monitoring link;
s02, when the second Bluetooth device is in the listening link, the second Bluetooth device listens to the audio data sent by the sound source device through the first frequency hopping sequence and the first channel access code in N1 time slot, and listens to the data sent by the first Bluetooth device through the second frequency hopping sequence and the second channel access code in N2 time slot;
s03, if the first bluetooth device determines that the current communication status satisfies the forwarding condition, switching the current link to the second bluetooth link, and sending a first data packet to the second bluetooth device in the master-slave time slot of the second bluetooth link to trigger the second bluetooth device to switch from the monitoring link to the second bluetooth link;
s04, when the second bluetooth device receives the first packet on the listening link, switching from the listening link to the second bluetooth link.
18. The bluetooth device communication method according to claim 17, wherein in step S03, the first bluetooth device performs link switching at an idle time of a master-slave time slot of a first bluetooth link to enter the second bluetooth link before a start of a next time slot.
19. The bluetooth device communication method according to any of claims 17 or 18, characterized in that the method further comprises:
s05, when the communication state of the first Bluetooth device meets the monitoring condition, switching the current link to the first Bluetooth link;
s06, the first bluetooth device sends, according to the preset access code, an additional packet for triggering link switching to the second bluetooth device at a preset position of the switched first slave-master timeslot, so as to trigger the second bluetooth device to switch from the second bluetooth link to the listening link;
s07, when the second bluetooth device does not receive the data packet sent by the first bluetooth device at the receiving position of any master-slave time slot of the second bluetooth link, receiving the additional packet at the preset position of the idle time of the same time slot according to the first blue-hopping sequence and the preset access code;
s08, the second bluetooth device switches from the second bluetooth link to the listening link after receiving the additional packet.
20. The bluetooth device communication method according to claim 19, wherein before step S05, the method further comprises:
s05', the first bluetooth device and the second bluetooth device agree on a sending method of the additional packet through the second bluetooth link, where the sending method is as follows: and the channel frequency point is transformed according to the first frequency hopping sequence, the access code is the preset access code, and the sending position is the preset position.
21. The bluetooth device communication method according to claim 19, wherein in step S05, the first bluetooth device performs link switching at an idle time of a slave-to-master slot of the second bluetooth link to enter the first bluetooth link before a start of a next slot.
22. A Bluetooth device communication device is applied to a first Bluetooth device, wherein the first Bluetooth device is used for forming a double wireless Bluetooth device pair with a second Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code;
the method is characterized in that:
the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link, the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of the listening link, the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number;
the bluetooth device communication apparatus includes:
the first transceiver module is used for receiving the audio data sent by the sound source equipment at each master-slave time slot in sequence when the first transceiver module is positioned in the first Bluetooth link;
and the forwarding triggering module is used for switching the current link to the second Bluetooth link when the communication state meets the forwarding condition, and sending a first data packet to the second Bluetooth device in the master-slave time slot of the second Bluetooth link so as to trigger the second Bluetooth device to switch from the monitoring link to the second Bluetooth link.
23. A Bluetooth device communication device is applied to a second Bluetooth device; the second Bluetooth device is used for forming a double-wireless Bluetooth device pair with the first Bluetooth device; the first Bluetooth device can be used as a network slave device to receive audio data sent by a sound source device through a first Bluetooth link, and can be used as a network master device to send first communication parameters of the first Bluetooth link to a second Bluetooth device through a second Bluetooth link and forward the audio data; when the first Bluetooth device is in a first Bluetooth link, the second Bluetooth device can monitor audio data sent on the first Bluetooth link through a monitoring link; the first communication parameter comprises a first frequency hopping sequence and a first channel access code;
it is characterized in that the preparation method is characterized in that,
the master-slave time slot of the second Bluetooth link corresponds to the slave-master time slot of the first Bluetooth link, and the slave-master time slot of the second Bluetooth link corresponds to the master-slave time slot of the first Bluetooth link; the N1 time slot of the listening link corresponds to the master-slave time slot of the first Bluetooth link, and the N2 time slot corresponds to the slave-master time slot of the first Bluetooth link; the second Bluetooth device can listen to the audio data sent by the sound source device according to the first frequency hopping sequence and the first channel access code of the first Bluetooth link in the N1 time slot of a listening link, and the second Bluetooth device can listen to the data sent by the first Bluetooth device according to the second frequency hopping sequence and the second channel access code of the second Bluetooth link in the N2 time slot of the listening link, wherein N1+ N2 is an odd number;
the bluetooth device communication apparatus includes:
a link monitoring module, configured to monitor, when the bluetooth device is in the monitored link, audio data sent by the audio source device according to the first frequency hopping sequence and the first channel access code at N1 time slot, and monitor, at N2 time slot, data sent by the second bluetooth device according to the second frequency hopping sequence and the second channel access code;
and the forwarding following module is used for switching from the monitoring link to the second Bluetooth link when receiving a first data packet which is sent by the first Bluetooth device and used for triggering link switching at any N2 time slot.
24. A bluetooth device, characterized in that the bluetooth device comprises:
a processor for implementing the method of any one of claims 1-16.
25. A pair of dual wireless bluetooth devices comprising a first bluetooth device and the second bluetooth device, wherein the first bluetooth device and the second bluetooth device communicate using the bluetooth device communication method according to any one of claims 17-21.
26. A bluetooth communication system, comprising an audio source device for providing audio data and two first and second bluetooth devices for playing audio data of the audio source device, characterized in that: the first bluetooth device and the second bluetooth device communicate using the communication method according to any one of claims 17 to 21.
27. A chip for a bluetooth device having an integrated circuit thereon, characterized in that the integrated circuit is designed for implementing the method according to any one of claims 1-13 or 14-16.
28. A storage medium having stored thereon a computer program for performing the method of any one of claims 1-13 or 14-16 when the computer program is executed by a processor.
CN202010331020.2A 2020-04-24 2020-04-24 Bluetooth device communication method and related device Active CN111885553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010331020.2A CN111885553B (en) 2020-04-24 2020-04-24 Bluetooth device communication method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010331020.2A CN111885553B (en) 2020-04-24 2020-04-24 Bluetooth device communication method and related device

Publications (2)

Publication Number Publication Date
CN111885553A true CN111885553A (en) 2020-11-03
CN111885553B CN111885553B (en) 2023-09-12

Family

ID=73154232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010331020.2A Active CN111885553B (en) 2020-04-24 2020-04-24 Bluetooth device communication method and related device

Country Status (1)

Country Link
CN (1) CN111885553B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055868A (en) * 2021-03-12 2021-06-29 上海物骐微电子有限公司 Bluetooth rapid networking method and system and Bluetooth headset
CN113271641A (en) * 2021-05-18 2021-08-17 南京大学 Method for reducing packet loss rate based on Bluetooth scattering network communication
CN113543090A (en) * 2021-05-14 2021-10-22 浙江大华技术股份有限公司 Method, device and storage medium for reducing power consumption of Bluetooth receiving device
CN113872729A (en) * 2021-09-24 2021-12-31 上海物骐微电子有限公司 Audio data communication method and wireless audio system
CN114827974A (en) * 2022-06-29 2022-07-29 成都市安比科技有限公司 Bandwidth optimization method of TWS system
CN115250137A (en) * 2021-04-28 2022-10-28 合肥炬芯智能科技有限公司 Bluetooth device, bluetooth system and audio transmission method thereof
US11546682B2 (en) * 2020-06-22 2023-01-03 Verisilicon Microelectronics (Shanghai) Co., Ltd. Method and system for synchronous audio playback of TWS earphones
WO2023000565A1 (en) * 2021-07-22 2023-01-26 珠海市杰理科技股份有限公司 Packet loss data error correction method and apparatus in dual-transmission mode, and device and system

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010010689A1 (en) * 2000-01-20 2001-08-02 Awater Geert Arnout Interoperability for bluetooth/IEEE 802.11
US20020177460A1 (en) * 2001-05-02 2002-11-28 James Beasley Wireless base station to base station synchronization in a communication system, such as a system employing a short range frequency hopping or time division duplex scheme
EP1501244A2 (en) * 2003-07-22 2005-01-26 Mansella Limited Method and apparatus for Bluetooth communication
US20060246911A1 (en) * 2000-05-31 2006-11-02 Jerry Petermann Wireless communications system with parallel computing artificial intelligence-based distributive call routing
US20100151791A1 (en) * 2008-12-15 2010-06-17 Samsung Electronics Co., Ltd. Audio data service provision method and system
WO2013100994A1 (en) * 2011-12-28 2013-07-04 Intel Corporation Wireless communication device and method for power-efficient data transfer
CN105101362A (en) * 2014-05-05 2015-11-25 刘洪明 Method of reducing signal transmitting radiation of Bluetooth low-power consumption equipment and system
CN107894881A (en) * 2017-10-18 2018-04-10 恒玄科技(上海)有限公司 The method that principal and subordinate link switching, conversation monitoring and the Mike of bluetooth earphone switch
US20180176717A1 (en) * 2016-12-20 2018-06-21 Smartech Worldwide Limited Method for bluetooth mode switching, bluetooth system and eletronic device
CN108337074A (en) * 2018-06-22 2018-07-27 恒玄科技(上海)有限公司 The bluetooth headset wireless communications method of high reliability
CN109495867A (en) * 2018-11-22 2019-03-19 重庆物奇科技有限公司 The method of bluetooth equipment, system and the transmission of equipment room information
CN109951833A (en) * 2019-03-26 2019-06-28 佛山市顺德区美的洗涤电器制造有限公司 Intelligent control equipment, household appliance and its networking control method and system
CN110913375A (en) * 2019-11-27 2020-03-24 南京中感微电子有限公司 Wireless communication system and equipment
CN110931026A (en) * 2019-11-27 2020-03-27 南京中感微电子有限公司 Audio data communication method, equipment and system
US10631363B1 (en) * 2018-10-23 2020-04-21 Google Llc Two stage role switch for fully wireless earbuds

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010010689A1 (en) * 2000-01-20 2001-08-02 Awater Geert Arnout Interoperability for bluetooth/IEEE 802.11
US20060246911A1 (en) * 2000-05-31 2006-11-02 Jerry Petermann Wireless communications system with parallel computing artificial intelligence-based distributive call routing
US20020177460A1 (en) * 2001-05-02 2002-11-28 James Beasley Wireless base station to base station synchronization in a communication system, such as a system employing a short range frequency hopping or time division duplex scheme
EP1501244A2 (en) * 2003-07-22 2005-01-26 Mansella Limited Method and apparatus for Bluetooth communication
US20050053039A1 (en) * 2003-07-22 2005-03-10 Mansella Limited Bluetooth communication
US20100151791A1 (en) * 2008-12-15 2010-06-17 Samsung Electronics Co., Ltd. Audio data service provision method and system
WO2013100994A1 (en) * 2011-12-28 2013-07-04 Intel Corporation Wireless communication device and method for power-efficient data transfer
CN105101362A (en) * 2014-05-05 2015-11-25 刘洪明 Method of reducing signal transmitting radiation of Bluetooth low-power consumption equipment and system
US20180176717A1 (en) * 2016-12-20 2018-06-21 Smartech Worldwide Limited Method for bluetooth mode switching, bluetooth system and eletronic device
CN107894881A (en) * 2017-10-18 2018-04-10 恒玄科技(上海)有限公司 The method that principal and subordinate link switching, conversation monitoring and the Mike of bluetooth earphone switch
CN108337074A (en) * 2018-06-22 2018-07-27 恒玄科技(上海)有限公司 The bluetooth headset wireless communications method of high reliability
US10631363B1 (en) * 2018-10-23 2020-04-21 Google Llc Two stage role switch for fully wireless earbuds
CN109495867A (en) * 2018-11-22 2019-03-19 重庆物奇科技有限公司 The method of bluetooth equipment, system and the transmission of equipment room information
CN109951833A (en) * 2019-03-26 2019-06-28 佛山市顺德区美的洗涤电器制造有限公司 Intelligent control equipment, household appliance and its networking control method and system
CN110913375A (en) * 2019-11-27 2020-03-24 南京中感微电子有限公司 Wireless communication system and equipment
CN110931026A (en) * 2019-11-27 2020-03-27 南京中感微电子有限公司 Audio data communication method, equipment and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TAREK ALMAHDI: "Intelligent automated parking system with hacking intimation feature", 2016 INTERNATIONAL CONFERENCE ON ADVANCES IN ELECTRICAL, ELECTRONIC AND SYSTEMS ENGINEERING (ICAEES) *
孙金超: "蓝牙新技术标准演进及其应用的研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11546682B2 (en) * 2020-06-22 2023-01-03 Verisilicon Microelectronics (Shanghai) Co., Ltd. Method and system for synchronous audio playback of TWS earphones
CN113055868A (en) * 2021-03-12 2021-06-29 上海物骐微电子有限公司 Bluetooth rapid networking method and system and Bluetooth headset
CN113055868B (en) * 2021-03-12 2022-09-23 上海物骐微电子有限公司 Bluetooth rapid networking method and system and Bluetooth headset
CN115250137A (en) * 2021-04-28 2022-10-28 合肥炬芯智能科技有限公司 Bluetooth device, bluetooth system and audio transmission method thereof
CN113543090A (en) * 2021-05-14 2021-10-22 浙江大华技术股份有限公司 Method, device and storage medium for reducing power consumption of Bluetooth receiving device
CN113271641A (en) * 2021-05-18 2021-08-17 南京大学 Method for reducing packet loss rate based on Bluetooth scattering network communication
WO2023000565A1 (en) * 2021-07-22 2023-01-26 珠海市杰理科技股份有限公司 Packet loss data error correction method and apparatus in dual-transmission mode, and device and system
CN113872729A (en) * 2021-09-24 2021-12-31 上海物骐微电子有限公司 Audio data communication method and wireless audio system
CN113872729B (en) * 2021-09-24 2022-03-25 上海物骐微电子有限公司 Audio data communication method and wireless audio system
CN114827974A (en) * 2022-06-29 2022-07-29 成都市安比科技有限公司 Bandwidth optimization method of TWS system
CN114827974B (en) * 2022-06-29 2022-11-29 成都市安比科技有限公司 Bandwidth optimization method of TWS system

Also Published As

Publication number Publication date
CN111885553B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN111885553B (en) Bluetooth device communication method and related device
CN111436044B (en) Method, device and system for processing packet loss data of dual-wireless Bluetooth communication network
CN110267305B (en) Wireless data retransmission method
CN111106853B (en) Master-slave switching method, device and equipment for double wireless Bluetooth equipment and audio system
CN111654845B (en) Bluetooth multi-terminal link switching method, bluetooth audio equipment and system
CN111885554B (en) Link switching method based on dual-wireless Bluetooth communication and related equipment
US8335244B2 (en) Data transmission method, network device, and communication system
US9001801B2 (en) Method and system for low power mode management for complex Bluetooth devices
CN111200769B (en) Communication method for Bluetooth headset device and Bluetooth headset device
JP4734336B2 (en) Wireless network interconnection using master / slave nodes
CN111436043B (en) Communication method, device, equipment and system of dual-wireless Bluetooth communication network
EP2728764B1 (en) Synchronous access method, and communication device and system in frequency hopping radio communication
CN111435844B (en) Method, device, equipment and system for correcting audio data in dual-wireless Bluetooth communication
US20230016757A1 (en) Audio Data Transmission Method, System and Device
CN111901730B (en) TWS earphone interaction method and system and TWS earphone
US20120033620A1 (en) Synchronization for data transfers between physical layers
CN112771941B (en) Data synchronization method, device, equipment, system and storage medium
Suriyachai et al. Implementation of a MAC protocol for QoS support in wireless sensor networks
CN107040874A (en) Method, device and the bluetooth equipment of blue-teeth data simultaneously operating
CN111107526A (en) Master-slave switching method, device and system for double wireless Bluetooth devices in standard time slot
CN109587666B (en) Bluetooth device, system and scheduling method
JP5179002B2 (en) Telephone system, telephone control device, and program
CN111954123B (en) Method, system, medium, and wireless audio device for information synchronization of wireless audio devices
WO2024087881A1 (en) Clock synchronization method and apparatus, system, device, and storage medium
EP3852449A1 (en) Data synchronization method and device, and 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
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