CN111510902B - Bluetooth device and Bluetooth state switching method and device thereof - Google Patents

Bluetooth device and Bluetooth state switching method and device thereof Download PDF

Info

Publication number
CN111510902B
CN111510902B CN202010333187.2A CN202010333187A CN111510902B CN 111510902 B CN111510902 B CN 111510902B CN 202010333187 A CN202010333187 A CN 202010333187A CN 111510902 B CN111510902 B CN 111510902B
Authority
CN
China
Prior art keywords
bluetooth
state
slave
actual
switching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010333187.2A
Other languages
Chinese (zh)
Other versions
CN111510902A (en
Inventor
胡明辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202010333187.2A priority Critical patent/CN111510902B/en
Publication of CN111510902A publication Critical patent/CN111510902A/en
Application granted granted Critical
Publication of CN111510902B publication Critical patent/CN111510902B/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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a Bluetooth device and a Bluetooth state switching method and device thereof, wherein the Bluetooth device comprises a master device and a slave device which are connected based on a Bluetooth link, and the method comprises the following steps: the method comprises the steps that after the main device detects that the Bluetooth connection with a control terminal is disconnected, a first switching command is generated so that the Bluetooth state of the main device can be switched to a connectable state; the master device sends a first switching command to the slave device so that the slave device can carry out Bluetooth state switching; the slave equipment acquires the actual Bluetooth state of the master equipment and judges whether the actual Bluetooth state is a connectable state or not; if not, the slave device sends a first switching command to the master device, and updates and acquires the actual Bluetooth state of the master device until the actual Bluetooth state acquired by updating is a connectable state. This application utilizes the slave unit to supervise and check the bluetooth state switching of master device, can effectively improve the back of bluetooth equipment and control terminal after disconnected efficiency, has ensured bluetooth connection stability of bluetooth equipment.

Description

Bluetooth device and Bluetooth state switching method and device thereof
Technical Field
The present disclosure relates to the field of bluetooth communication technologies, and in particular, to a bluetooth device and a bluetooth state switching method and apparatus thereof.
Background
With the development of modern technologies and the introduction of smart life concepts, smart bluetooth devices are gradually and widely inserted into people's work and life, such as TWS (True Wireless Stereo) sound boxes, and their applications in home theaters or party stations are gradually increasing. The TWS sound box mainly adopts a Bluetooth 5.0 chip, so that the connection with a control terminal such as a user mobile phone and the communication between the master sound box and the slave sound box are realized.
In actual use, the situation that the bluetooth devices such as the TWS speaker are disconnected from the control terminal such as the mobile phone may occasionally occur, including active disconnection, and sudden disconnection caused by the fact that the placement position of the bluetooth device exceeds the effective communication distance or a bug occurs in an internal program. In the prior art, for disconnected bluetooth devices, the recovery of the connection with the control terminal bluetooth, i.e., the reconnection, usually takes a certain time, the efficiency is low, and the user experience is poor.
In view of the above, it is an important need for those skilled in the art to provide a solution to the above technical problems.
Disclosure of Invention
The application aims to provide a Bluetooth device and a Bluetooth state switching method and device thereof, so that the connection speed of the Bluetooth device and a control terminal after disconnection is effectively increased, and the performance stability of the Bluetooth device is improved.
In order to solve the above technical problem, in a first aspect, the present application discloses a bluetooth state switching method for a bluetooth device, where the bluetooth device includes a master device and a slave device connected based on a bluetooth link, and the method includes:
the method comprises the steps that after the main device detects that the Bluetooth connection with a control terminal is disconnected, a first switching command is generated so that the Bluetooth state of the main device can be switched to a connectable state;
the master device sends the first switching command to the slave device so that the slave device can carry out Bluetooth state switching;
the slave equipment acquires the actual Bluetooth state of the master equipment and judges whether the actual Bluetooth state is a connectable state or not;
if not, the slave device sends the first switching command to the master device, and updates and acquires the actual Bluetooth state of the master device until the actual Bluetooth state acquired by updating is a connectable state.
Optionally, before the generating the first switch command to switch the bluetooth state of the master device to the connectable state, the method further includes:
the master device inquires a Bluetooth pairing record of the control terminal in a preset FLASH;
and if the record of successful Bluetooth pairing exists, executing the first switching command generation so as to switch the Bluetooth state of the main equipment into a connectable state and the subsequent steps.
Optionally, after the master device queries a bluetooth pairing record with the control terminal in a preset FLASH, the method further includes:
and if the record of successful Bluetooth pairing does not exist, generating a second switching command so as to switch the Bluetooth state of the master device into a non-connectable state, and sending the second switching command to the slave device.
Optionally, the updating and acquiring the actual bluetooth state of the master device until the updated and acquired actual bluetooth state is a connectable state includes:
and updating and acquiring the actual Bluetooth state of the main equipment every preset time length until the updated and acquired actual Bluetooth state is a connectable state.
In a second aspect, the present application further discloses a bluetooth state switching apparatus for a bluetooth device, where the bluetooth device includes a master device and a slave device connected based on a bluetooth link, the apparatus includes:
the first switching module is applied to the main equipment and used for generating a first switching command after detecting that the Bluetooth connection between the main equipment and the control terminal is disconnected so as to switch the Bluetooth state of the main equipment into a connectable state;
the command sending module is applied to the master device and used for sending the first switching command to the slave device;
the second switching module is applied to the slave equipment and used for switching the Bluetooth state according to the first switching command;
the state supervision module is applied to the slave equipment and used for acquiring the actual Bluetooth state of the master equipment and judging whether the actual Bluetooth state is a connectable state; and if not, sending the first switching command to the main equipment, and updating and acquiring the actual Bluetooth state of the main equipment until the updated and acquired actual Bluetooth state is a connectable state.
Optionally, the first switching module is specifically configured to:
inquiring a Bluetooth pairing record of the control terminal in a preset FLASH; and if the record of successful Bluetooth pairing exists, generating the first switching command so as to switch the Bluetooth state of the main equipment into a connectable state.
Optionally, the first switching module is further configured to:
after the Bluetooth pairing record of the control terminal is inquired in a preset FLASH, if the record of successful Bluetooth pairing does not exist, a second switching command is generated so as to switch the Bluetooth state of the main equipment to a non-connectable state;
the command sending module is further configured to:
and sending the second switching command to the slave equipment so as to switch the Bluetooth state of the slave equipment into the non-connectable state.
In a third aspect, the present application further discloses a bluetooth device, including a master device and a slave device connected based on a bluetooth link, where the master device is configured to:
after detecting that the Bluetooth connection between the main equipment and the control terminal is disconnected, generating a first switching command so as to switch the Bluetooth state of the main equipment into a connectable state; sending the first switching command to the slave equipment so that the slave equipment can carry out Bluetooth state switching;
the slave device is to:
acquiring the actual Bluetooth state of the main equipment, and judging whether the actual Bluetooth state is a connectable state; if not, the first switching command is continuously sent to the main equipment, and the actual Bluetooth state of the main equipment is updated and obtained until the updated and obtained actual Bluetooth state is a connectable state.
Optionally, the master device and the slave device implement true wireless connectivity based on an ACL link.
Optionally, the bluetooth device is a bluetooth speaker, the master device is a master speaker, and the slave device is a slave speaker.
The method for switching the Bluetooth state of the Bluetooth equipment comprises the following steps: after detecting that the Bluetooth connection with the control terminal is disconnected, the main device of the Bluetooth device generates a first switching command so as to switch the Bluetooth state of the main device into a connectable state; the master device sends the first switching command to a slave device of the Bluetooth device so that the slave device can switch the Bluetooth state; the slave equipment acquires the actual Bluetooth state of the master equipment and judges whether the actual Bluetooth state is a connectable state or not; if not, the slave device sends the first switching command to the master device, and updates and acquires the actual Bluetooth state of the master device until the actual Bluetooth state acquired by updating is a connectable state.
Therefore, the Bluetooth state switching method of the Bluetooth device disclosed by the application monitors and verifies the Bluetooth state switching of the master device by using the slave device, effectively ensures that the master device is switched to a connectable state in time after being disconnected from the control terminal, further effectively improves the reconnection efficiency of the Bluetooth device and the control terminal after being disconnected, and ensures the Bluetooth connection stability of the Bluetooth device. The Bluetooth equipment and the Bluetooth state switching device thereof have the beneficial effects.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
Fig. 1 is a flowchart of a bluetooth state switching method of a bluetooth device according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a bluetooth state switching method of another bluetooth device according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a bluetooth state switching apparatus of a bluetooth device according to an embodiment of the present disclosure;
fig. 4 is a schematic view of a bluetooth speaker disclosed in an embodiment of the present application;
fig. 5 is an internal circuit schematic diagram of a bluetooth speaker disclosed in an embodiment of the present application.
Detailed Description
The core of the application lies in providing the Bluetooth equipment and the Bluetooth state switching method and device thereof, so as to effectively improve the connection speed of the Bluetooth equipment with the control terminal after disconnection, and ensure the performance stability of the Bluetooth equipment.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Currently, in actual use, the situation that a bluetooth device such as a TWS speaker is disconnected from a control terminal such as a mobile phone may occasionally occur, including active disconnection, and sudden disconnection caused when the placement position of the bluetooth device exceeds an effective communication distance or a bug occurs in an internal program. In the prior art, for disconnected bluetooth devices, the recovery, i.e., the reconnection, of the connection between the disconnected bluetooth devices and the control terminal often takes a certain time, so that the efficiency is low, and the user experience is poor. In view of this, the present application provides a bluetooth state switching scheme for a bluetooth device, which can effectively solve the above problems.
Referring to fig. 1, an embodiment of the present application discloses a bluetooth state switching method for a bluetooth device, where the bluetooth device includes a master device and a slave device connected based on a bluetooth link, and the method includes:
s101: the main device generates a first switching command after detecting that the Bluetooth connection with the control terminal is disconnected, so that the Bluetooth state of the main device is switched into a connectable state.
It should be noted that the master device is a device that performs various logic judgments and function control, and the bluetooth connection and communication with the control terminal (such as a mobile phone, a bracelet, etc.) are also handled by the master device. A slave device is a device that follows the master device for the same operation. For example, when the master device performs a shutdown operation after being determined by the logic processing, the slave device will also perform the shutdown operation following the master device.
After the bluetooth device is connected with a certain control terminal, in order to guarantee the working performance of the bluetooth device and reduce power consumption, the bluetooth device usually sets the bluetooth state to a non-connectable state. In the non-connection state, the Bluetooth chip does not send out connection broadcast, and does not respond or reply when other control terminals attempt to perform Bluetooth connection.
Therefore, in the application, after the bluetooth connection between the master device and the control terminal is disconnected, the master device generates a first switching command to switch the bluetooth state of the master device to a connectable state. In the connectable state, the Bluetooth chip continuously sends out connection broadcast, and when the control terminal tries to connect, the Bluetooth chip responds and replies, thereby realizing quick connection back with the control terminal.
It should be added that the switching of the bluetooth state of the bluetooth device may be managed by means of a state machine. In addition, the bluetooth status only specifically relates to whether the bluetooth device is connectable, and in practical applications, those skilled in the art may further enrich the setting based on the above content according to actual needs, for example, the bluetooth device may be specifically set to be in a non-discoverable and non-connectable state during the successful bluetooth connection between the bluetooth device and the control terminal, and after the bluetooth device is disconnected from the control terminal, the bluetooth device is switched to be in the non-discoverable and connectable state based on the first switching command.
S102: the master device sends a first switching command to the slave device so that the slave device performs Bluetooth state switching.
As described above, the slave device should perform a corresponding operation following the master device, so the master device sends a first switch command to the slave device so that the slave device is also switched to the connectable state.
S103: the slave equipment acquires the actual Bluetooth state of the master equipment and judges whether the actual Bluetooth state is a connectable state or not; if not, the process proceeds to S104.
S104: the slave device sends a first switching command to the master device, and updates and acquires the actual Bluetooth state of the master device until the actual Bluetooth state acquired by updating is a connectable state.
It should be noted that, since the master device is different from the slave device and needs to be responsible for many logical processes and function control, the internal program process is complicated. Therefore, in some special cases, the master device may not actually execute the first switch command, i.e., does not actually switch the bluetooth status to the connectable status, which still affects the connection back efficiency between the bluetooth device and the control terminal.
In view of the foregoing situation, in the bluetooth state switching method provided in the embodiment of the present application, a monitoring mechanism for the slave device to switch the bluetooth state of the master device is specifically set: the slave device requests the master device to acquire the actual Bluetooth state of the master device, and checks the actual Bluetooth state of the master device to judge whether the master device is in a connectable state.
If the actual bluetooth state of the master device is indeed the connectable state, it indicates that the bluetooth state is switched normally, and at this time, the fast connection back with the control terminal can be realized. If the actual bluetooth state of the master device is not the connectable state, the slave device will send a first switching command to the master device, so that the master device performs the bluetooth state switching operation corresponding to the first switching command again. When the actual bluetooth state of the master device is indeed switched to the connectable state, the slave device stops updating and verifying the actual bluetooth state of the master device and the related operation of sending the first switching command.
It should be noted that, the first switch command in this application means a command that can cause the command receiving side to switch the bluetooth state to the connectable state, and the sender and the receiver of the command are not particularly limited.
The method for switching the Bluetooth state of the Bluetooth equipment provided by the embodiment of the application comprises the following steps: the method comprises the steps that after the main device detects that the Bluetooth connection with a control terminal is disconnected, a first switching command is generated so that the Bluetooth state of the main device can be switched to a connectable state; the master device sends a first switching command to the slave device so that the slave device can carry out Bluetooth state switching; the slave equipment acquires the actual Bluetooth state of the master equipment and judges whether the actual Bluetooth state is a connectable state or not; if not, the slave device sends a first switching command to the master device, and updates and acquires the actual Bluetooth state of the master device until the actual Bluetooth state acquired by updating is a connectable state.
Therefore, the Bluetooth state switching method of the Bluetooth device provided by the application monitors and verifies the Bluetooth state switching of the master device by using the slave device, effectively ensures that the master device is timely switched to a connectable state after being disconnected with the control terminal, further effectively improves the back connection efficiency of the Bluetooth device after being disconnected with the control terminal, and ensures the Bluetooth connection stability of the Bluetooth device.
Referring to fig. 2, an embodiment of the present application discloses another bluetooth state switching method for a bluetooth device, where the bluetooth device includes a master device and a slave device connected based on a bluetooth link, and the method includes:
s201: after detecting that the Bluetooth connection with the control terminal is disconnected, the main device inquires a Bluetooth pairing record of the main device and the control terminal in a preset FLASH.
S202: the master device judges whether a record of successful Bluetooth pairing exists; if yes, entering S203; if not, the process proceeds to S209.
S203: the master device generates a first switching command so as to switch the Bluetooth state of the master device to a connectable state; the process proceeds to S204.
Specifically, in this embodiment, after the master device is disconnected from the control terminal, the switching command is generated according to whether a record that the bluetooth pairing with the control terminal is successful is stored in the preset FLASH. If the record of successful Bluetooth pairing is reserved in the preset FLASH, the connection state is switched to be in a connectable state through a first switching command.
S204: the master device sends a first switching command to the slave device so that the slave device can switch the Bluetooth state; the process proceeds to S205.
S205: the slave equipment judges whether a preset time length passes or not; if yes, entering S206; if not, the process returns to S205.
Specifically, in this embodiment, the slave device may update and acquire the actual bluetooth state of the master device every preset time period to check until the updated and acquired actual bluetooth state is the connectable state.
S206: the slave device acquires the actual Bluetooth state of the master device; the process proceeds to S207.
S207: the slave equipment judges whether the actual Bluetooth state is a connectable state or not; if not, the process proceeds to S208.
S208: the slave device sends a first switching command to the master device; the process proceeds to S205.
S209: the master device generates a second switching command so as to switch the Bluetooth state of the master device into a non-connectable state; the process proceeds to S210.
Specifically, in this embodiment, if there is no record of successful bluetooth pairing in the preset FLASH (some bluetooth devices may be provided with a mechanism for automatically clearing the record after disconnection), it is not necessary to switch to the connectable state, and therefore, the master device may switch to the non-connectable state by using the second switch command.
Similarly, the second switch command in the present application means a command that can cause the command receiver to switch the bluetooth state to the non-connectable state, and it also does not specifically limit the sender and receiver of the command.
S210: and sending a second switching command to the slave device so as to switch the Bluetooth state of the slave device to the non-connectable state.
Referring to fig. 3, an embodiment of the present application discloses a bluetooth state switching apparatus for a bluetooth device, where the bluetooth device includes a master device and a slave device connected based on a bluetooth link, and the apparatus includes:
the first switching module 301 is applied to the master device, and is configured to generate a first switching command after detecting that the bluetooth connection between the master device and the control terminal is disconnected, so as to switch the bluetooth state of the master device to a connectable state;
a command sending module 302 applied to the master device for sending the first switching command to the slave device;
the second switching module 303 is applied to the slave device and is used for switching the bluetooth state according to the first switching command;
a state monitoring module 304 applied to the slave device, configured to obtain an actual bluetooth state of the master device, and determine whether the actual bluetooth state is a connectable state; and if not, sending a first switching command to the main equipment, and updating and acquiring the actual Bluetooth state of the main equipment until the updated and acquired actual Bluetooth state is a connectable state.
Therefore, the bluetooth state switching device of the bluetooth device disclosed in the embodiment of the present application monitors and checks the bluetooth state switching of the master device by using the slave device, effectively ensures that the master device is switched to a connectable state in time after being disconnected from the control terminal, further effectively improves the back connection efficiency of the bluetooth device and the control terminal after being disconnected, and ensures the bluetooth connection stability of the bluetooth device.
As a specific embodiment, in the bluetooth state switching apparatus of a bluetooth device disclosed in this embodiment of the present application, on the basis of the foregoing content, the first switching module 301 is specifically configured to:
inquiring Bluetooth pairing records of the control terminal in a preset FLASH; and if the record of successful Bluetooth pairing exists, generating a first switching command so as to switch the Bluetooth state of the master equipment into a connectable state.
As a specific embodiment, in the bluetooth state switching apparatus of a bluetooth device disclosed in this embodiment of the present application, on the basis of the foregoing content, the first switching module 301 is further configured to: after the Bluetooth pairing record of the control terminal is inquired in the preset FLASH, if the record of successful Bluetooth pairing does not exist, a second switching command is generated so as to switch the Bluetooth state of the main equipment to be a non-connectable state;
the command sending module 302 is further configured to: and sending a second switching command to the slave device so as to switch the Bluetooth state of the slave device to the non-connectable state.
As a specific embodiment, on the basis of the foregoing content, the state monitoring module 304 of the bluetooth state switching apparatus of the bluetooth device disclosed in the embodiment of the present application is specifically configured to: and updating and acquiring the actual Bluetooth state of the master equipment every preset time length until the updated and acquired actual Bluetooth state is a connectable state.
For the specific content of the bluetooth state switching apparatus of the bluetooth device, reference may be made to the foregoing detailed description of the bluetooth state switching method of the bluetooth device, and details thereof are not repeated here.
The embodiment of the application also discloses Bluetooth equipment, which comprises a master device and a slave device which are connected based on the Bluetooth link; wherein, the first and the second end of the pipe are connected with each other,
the master device is to: after detecting that the Bluetooth connection between the main equipment and the control terminal is disconnected, generating a first switching command so as to switch the Bluetooth state of the main equipment into a connectable state; sending a first switching command to the slave equipment so as to facilitate the slave equipment to carry out Bluetooth state switching;
the slave device is to: acquiring the actual Bluetooth state of the master equipment, and judging whether the actual Bluetooth state is a connectable state; if not, continuously sending the first switching command to the main equipment, and updating and acquiring the actual Bluetooth state of the main equipment until the actual Bluetooth state acquired by updating is a connectable state.
For the details of the bluetooth device, reference may be made to the foregoing detailed description of the bluetooth state switching method for the bluetooth device, and details thereof are not repeated here.
As a specific embodiment, based on the above content, the bluetooth device disclosed in the embodiment of the present application implements true wireless connection between the master device and the slave device based on an ACL (Asynchronous connection) link.
The ACL link is a Bluetooth specific link, has the function of directionally sending data packets, and supports both symmetric connection and asymmetric connection (one-to-one or one-to-many). Based on the ACL link, bluetooth information interaction between the master sound box and the control terminal and between the master sound box and the slave sound boxes can be realized.
As a specific embodiment, on the basis of the above contents, the bluetooth device disclosed in the embodiment of the present application is a bluetooth speaker, the master device is a master speaker, and the slave device is a slave speaker. Specifically, referring to fig. 4, fig. 4 is a schematic view of a bluetooth speaker provided in the present application.
Of course, it should be noted that the bluetooth device in the present application may also be other devices such as a bluetooth headset, and this is not limited in this field.
Referring to fig. 5, fig. 5 is a schematic diagram of an internal circuit of a bluetooth speaker according to an embodiment of the present application.
The internal hardware circuit structure of the bluetooth sound box shown in fig. 5 mainly includes a bluetooth chip, and a digital audio processor (DSP), two microphones (MIC 1 and MIC 2), a three-axis motion sensor (G-sensor), a key, an indicator Light (LED), a power amplifier circuit, and a Speaker (SPK) connected to the bluetooth chip.
Wherein, the bluetooth chip specifically adopts bluetooth 5.0 standard. The DSP is connected with the Bluetooth chip through an I2C bus and used for finishing the work of audio data processing. MIC1 and MIC2 are connected with bluetooth chip's GPIO mouth for carry out pronunciation and gather, so that the user is based on speech control bluetooth speaker's work. G-sensor passes through I2C bus connection with the bluetooth chip for detect the present motion data of audio amplifier, can realize falling functions such as detection. The button is connected with the GPIO mouth of bluetooth chip for realize bluetooth speaker's manual switch machine. LED is connected with the GPIO mouth of bluetooth chip for instruct bluetooth speaker's operating condition, for example the blue light represents the bluetooth and pairs the state, and the red light represents the charged state.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the equipment disclosed by the embodiment, the description is relatively simple because the equipment corresponds to the method disclosed by the embodiment, and the relevant parts can be referred to the method part for description.
It is further noted that, throughout this document, relational terms such as "first" and "second" are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are described herein using specific examples, which are only used to help understand the method and its core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, the present application can also make several improvements and modifications, and those improvements and modifications also fall into the protection scope of the present application.

Claims (10)

1. A Bluetooth state switching method of a Bluetooth device, the Bluetooth device comprising a master device and a slave device connected based on a Bluetooth link, the method comprising:
the method comprises the steps that after the main device detects that the Bluetooth connection with a control terminal is disconnected, a first switching command is generated so that the Bluetooth state of the main device can be switched to a connectable state;
the master device sends the first switching command to the slave device so that the slave device can carry out Bluetooth state switching;
the slave equipment acquires the actual Bluetooth state of the master equipment and judges whether the actual Bluetooth state is a connectable state or not;
if not, the slave device sends the first switching command to the master device, and updates and acquires the actual Bluetooth state of the master device until the actual Bluetooth state acquired by updating is a connectable state.
2. The method of claim 1, further comprising, prior to the generating a first switch command to switch a Bluetooth state of the master device to a connectable state:
the master device inquires a Bluetooth pairing record of the control terminal in a preset FLASH;
and if the record of successful Bluetooth pairing exists, executing the first switching command generation so as to switch the Bluetooth state of the main equipment into a connectable state and the subsequent steps.
3. The method according to claim 2, wherein after the master device queries the bluetooth pairing record with the control terminal in a preset FLASH, the method further comprises:
and if the record of successful Bluetooth pairing does not exist, generating a second switching command so as to switch the Bluetooth state of the master device into a non-connectable state, and sending the second switching command to the slave device.
4. The method according to any one of claims 1 to 3, wherein the updating to obtain the actual Bluetooth state of the master device until the actual Bluetooth state obtained by updating is a connectable state comprises:
and updating and acquiring the actual Bluetooth state of the main equipment every other preset time length until the updated and acquired actual Bluetooth state is a connectable state.
5. An apparatus for switching a bluetooth state of a bluetooth device, the bluetooth device including a master device and a slave device connected based on a bluetooth link, the apparatus comprising:
the first switching module is applied to the main equipment and used for generating a first switching command after detecting that the Bluetooth connection between the main equipment and the control terminal is disconnected so as to switch the Bluetooth state of the main equipment into a connectable state;
the command sending module is applied to the master equipment and used for sending the first switching command to the slave equipment;
the second switching module is applied to the slave equipment and used for switching the Bluetooth state according to the first switching command;
the state supervision module is applied to the slave equipment and used for acquiring the actual Bluetooth state of the master equipment and judging whether the actual Bluetooth state is a connectable state; and if not, sending the first switching command to the main equipment, and updating and acquiring the actual Bluetooth state of the main equipment until the updated and acquired actual Bluetooth state is a connectable state.
6. The apparatus of claim 5, wherein the first switching module is specifically configured to:
inquiring Bluetooth pairing records of the control terminal in a preset FLASH; and if the record of successful Bluetooth pairing exists, generating the first switching command so as to switch the Bluetooth state of the main equipment into a connectable state.
7. The apparatus of claim 5, wherein the first switching module is further configured to:
after the Bluetooth pairing record of the control terminal is inquired in a preset FLASH, if no record of successful Bluetooth pairing exists, a second switching command is generated so as to switch the Bluetooth state of the main equipment to a non-connectable state;
the command sending module is further configured to:
sending the second switching command to the slave device so as to switch the Bluetooth state of the slave device to the non-connectable state.
8. A bluetooth device comprising a master device and a slave device connected based on a bluetooth link, wherein the master device is configured to:
after detecting that the Bluetooth connection between the main equipment and the control terminal is disconnected, generating a first switching command so as to switch the Bluetooth state of the main equipment into a connectable state; sending the first switching command to the slave equipment so that the slave equipment can carry out Bluetooth state switching;
the slave device is to:
acquiring the actual Bluetooth state of the main equipment, and judging whether the actual Bluetooth state is a connectable state; if not, the first switching command is continuously sent to the main equipment, and the actual Bluetooth state of the main equipment is updated and obtained until the updated and obtained actual Bluetooth state is a connectable state.
9. The bluetooth device of claim 8, wherein the master device and the slave device implement a true wireless connection based on an ACL link.
10. The bluetooth device of claim 8, wherein the bluetooth device is a bluetooth speaker, the master device is a master speaker, and the slave device is a slave speaker.
CN202010333187.2A 2020-04-24 2020-04-24 Bluetooth device and Bluetooth state switching method and device thereof Active CN111510902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010333187.2A CN111510902B (en) 2020-04-24 2020-04-24 Bluetooth device and Bluetooth state switching method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010333187.2A CN111510902B (en) 2020-04-24 2020-04-24 Bluetooth device and Bluetooth state switching method and device thereof

Publications (2)

Publication Number Publication Date
CN111510902A CN111510902A (en) 2020-08-07
CN111510902B true CN111510902B (en) 2022-10-28

Family

ID=71877979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010333187.2A Active CN111510902B (en) 2020-04-24 2020-04-24 Bluetooth device and Bluetooth state switching method and device thereof

Country Status (1)

Country Link
CN (1) CN111510902B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965895B (en) * 2021-12-16 2022-09-02 深圳市晨北科技有限公司 Bluetooth connection switching method, equipment and storage medium
CN114710771B (en) * 2022-06-07 2022-08-23 成都市安比科技有限公司 Link switching method and device based on TWS (two way communication system) and Bluetooth communication system
CN117255332B (en) * 2023-11-17 2024-03-19 Tcl通讯科技(成都)有限公司 Bluetooth connection control method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105392115A (en) * 2015-12-03 2016-03-09 上海卓易科技股份有限公司 Automatic Bluetooth reconnection method
CN106851530A (en) * 2016-12-14 2017-06-13 青岛海信电器股份有限公司 The method and bluetooth equipment of a kind of automatic Hui Lian of bluetooth equipment
WO2019041278A1 (en) * 2017-08-31 2019-03-07 华为技术有限公司 Pairing method, unpairing method, terminal device and externally-connected device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105392115A (en) * 2015-12-03 2016-03-09 上海卓易科技股份有限公司 Automatic Bluetooth reconnection method
CN106851530A (en) * 2016-12-14 2017-06-13 青岛海信电器股份有限公司 The method and bluetooth equipment of a kind of automatic Hui Lian of bluetooth equipment
WO2019041278A1 (en) * 2017-08-31 2019-03-07 华为技术有限公司 Pairing method, unpairing method, terminal device and externally-connected device

Also Published As

Publication number Publication date
CN111510902A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN111510902B (en) Bluetooth device and Bluetooth state switching method and device thereof
CN108718467B (en) Voice data transmission method, wireless headset and TWS headset
CN108769856B (en) Method and device for establishing single-wire connection, wireless earphone and charging box
CN111225346B (en) Connection switching method of wireless earphone, wireless earphone and storage medium
CN111436041B (en) Method and device for switching master and slave Bluetooth earphones, bluetooth earphones and system
CN111200769B (en) Communication method for Bluetooth headset device and Bluetooth headset device
CN105120101A (en) Volume control method and device of smart sound box, smart sound box and mobile terminal
CN109348334B (en) Wireless earphone and environment monitoring method and device thereof
WO2020019820A1 (en) Microphone hole blockage detection method and related product
CN112055349B (en) Wireless communication method and Bluetooth device
KR20200110086A (en) Method for establishing wireless communication link and electronic device supporting the same
CN111436042B (en) Bluetooth headset and dynamic master-slave switching method, device and system thereof
CN111031443A (en) Earphone control method, earphone box, earphone and storage medium
US11425520B2 (en) Method for detecting blocking of microphone and related products
CN113906773A (en) Channel selection method and device of low-power-consumption Bluetooth device
CN114245362B (en) Device reconnection method and Bluetooth peripheral
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
US9445205B2 (en) Dynamic hearing aid system and a method for configuring the hearing aid system
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
CN112806023B (en) Control method of wireless earphone and related product
CN109120298B (en) Earphone far-field interaction method, earphone far-field interaction accessory and wireless earphone
WO2020082387A1 (en) Method for changing audio channel, and related device
CN114501239B (en) Master-slave switching method and device of earphone, bluetooth earphone and storage medium
CN115967927A (en) Bluetooth connection method and device, earphone and storage medium
CN109151699B (en) Microphone hole blockage detection method and related product

Legal Events

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