CN111432386B - Connection switching method, device, equipment and storage medium of Bluetooth headset - Google Patents
Connection switching method, device, equipment and storage medium of Bluetooth headset Download PDFInfo
- Publication number
- CN111432386B CN111432386B CN202010238496.1A CN202010238496A CN111432386B CN 111432386 B CN111432386 B CN 111432386B CN 202010238496 A CN202010238496 A CN 202010238496A CN 111432386 B CN111432386 B CN 111432386B
- Authority
- CN
- China
- Prior art keywords
- connection
- master
- slave
- bluetooth headset
- bluetooth
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
- H04W84/20—Master-slave selection or change arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1041—Mechanical or electronic switches, or control elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2420/00—Details of connection covered by H04R, not provided for in its groups
- H04R2420/07—Applications of wireless loudspeakers or wireless microphones
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention provides a connection switching method, a device, equipment and a storage medium of a Bluetooth headset, namely, communication connection is established between master equipment and all slave equipment, and Bluetooth connection is established between the master equipment and the Bluetooth headset; when a slave device detects a preset event, sending an earphone connection request instruction to the master device, and converting the earphone connection request instruction into a master mode; the master device disconnects the Bluetooth connection with the Bluetooth headset when receiving the headset connection request instruction; and when the slave equipment converted into the master mode receives the permission instruction fed back by the master equipment, establishing Bluetooth connection with the Bluetooth headset according to prestored Bluetooth headset pairing information, and completing connection switching of the Bluetooth headset between the master equipment and the slave equipment. The invention completes the automatic switching of the connection of the Bluetooth headset between the master device and the slave device, reduces the user operation, improves the connection switching efficiency of the Bluetooth headset and improves the user experience.
Description
Technical Field
The present invention relates to the field of bluetooth communication technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for connection switching of a bluetooth headset.
Background
With the development of science and technology, most users have a plurality of mobile devices, such as a plurality of mobile phones, computers or tablet computers PAD, but the bluetooth headset can be connected to only one mobile device at a time, that is, the bluetooth headset can only be connected to one of the mobile devices at a time, so as to provide functions of playing music, talking and the like for the connected mobile device. When another mobile device which is not connected with the Bluetooth headset is dialed into a phone, or a user needs to use another mobile device to play music, the user needs to manually disconnect the Bluetooth headset from the current Bluetooth of the connected mobile device, and then the Bluetooth headset is connected with the mobile device to be used in a Bluetooth mode, so that the user operation is increased, and the user experience is reduced.
Disclosure of Invention
The invention mainly aims to provide a connection switching method, a connection switching device, equipment and a computer readable storage medium for a Bluetooth headset, and aims to solve the technical problem of poor user experience caused by the fact that a user needs to manually perform disconnection operation between the Bluetooth headset and a plurality of mobile devices.
In order to achieve the above object, the present invention provides a connection switching method for a bluetooth headset, which is applied to a connection switching device for a bluetooth headset, and the connection switching method for the bluetooth headset includes the following steps:
the master device establishes communication connection with all slave devices and establishes Bluetooth connection with a Bluetooth headset;
when a slave device detects a preset event, sending an earphone connection request instruction to the master device, and converting the earphone connection request instruction into a master mode;
the master device disconnects the Bluetooth connection with the Bluetooth headset when receiving the headset connection request instruction;
and when the slave equipment converted into the master mode receives the permission instruction fed back by the master equipment, establishing Bluetooth connection with the Bluetooth headset according to prestored Bluetooth headset pairing information, and completing connection switching of the Bluetooth headset between the master equipment and the slave equipment.
Optionally, the earphone connection request instruction includes a temporary connection request instruction, and the step of sending the earphone connection request instruction to the master device and converting to the master mode when a slave device detects a preset event includes:
when a slave device detects a preset event, judging whether the preset event is a temporary connection event according to a preset event connection list;
if the preset event is the temporary connection event, the slave device which detects the preset event sends the temporary connection request instruction to the master device, and converts the temporary connection request instruction into the master mode.
Optionally, after the step of sending the temporary connection request instruction to the master device by the slave device that detects the preset event and converting the temporary connection request instruction into the master mode if the preset event is the temporary connection event, the method further includes:
the master device adds a preset identifier to the slave device converted into the master mode, and sends a connection permission returning request to the slave device added with the preset identifier when detecting that the preset event is finished;
when the slave equipment added with the preset identifier receives the connection authority returning request, the slave equipment feeds back a master-slave switching response instruction to the master equipment, converts the master-slave switching response instruction into a slave mode, disconnects the Bluetooth connection with the Bluetooth earphone and disconnects the communication connection with other slave equipment;
and when receiving the master-slave switching response instruction, the master device is converted into the master mode, establishes Bluetooth connection with the Bluetooth headset, and establishes communication connection with all slave devices so as to monitor master-slave device switching requests triggered by all the slave devices.
Optionally, the earphone connection request instruction includes a long-term connection request instruction, and after the step of determining whether the preset event is a temporary connection event according to a preset event connection list when a slave device detects the preset event, the method further includes:
if the preset event is not a temporary connection event, judging whether the preset event is a long-term connection event or not according to the preset event connection list;
if the preset event is the long-term connection event, the slave device which detects the preset event sends the long-term connection request instruction to the master device, and converts the long-term connection request instruction into the master mode.
Optionally, the connection switching apparatus further includes a master controller, and before the step of establishing communication connection between the master device and all slave devices and establishing bluetooth connection with a bluetooth headset, the connection switching apparatus further includes:
the master controller obtains connection time of all devices and the Bluetooth headset, the device with the longest connection time is set as the master device, and other devices are set as slave devices, wherein all the devices comprise the master device and all the slave devices.
Optionally, the communication connection includes a bluetooth connection, and before the step of establishing communication connection between the master device and all slave devices and establishing bluetooth connection between the master device and the bluetooth headset, the method further includes:
the master device sets all the slave devices and the Bluetooth headset as trusted devices;
the master device and the Bluetooth headset are set as trusted devices by all the slave devices;
the master controller sets the master device and all the slave devices as trusted devices of the Bluetooth headset.
Optionally, when the slave device converted into the master mode receives the permission instruction fed back by the master device, the slave device establishes a bluetooth connection with the bluetooth headset according to pre-stored bluetooth headset pairing information, and the step of completing the connection switching of the bluetooth headset between the master device and the slave device specifically includes:
when the slave device converted into the master mode receives the permission instruction, establishing Bluetooth connection with the Bluetooth headset according to the pre-stored Bluetooth headset pairing information and first trust device information;
and the slave equipment converted into the master mode establishes Bluetooth connection with the master equipment and other slave equipment according to the pre-stored equipment pairing information and second trust equipment information so as to monitor master-slave equipment switching requests of the master equipment and other slave equipment and complete connection switching of Bluetooth earphones between the master equipment and the slave equipment.
Optionally, the preset event includes an incoming call event, a voice call event, a video call event, and/or an audio play event.
In addition, to achieve the above object, the present invention further provides a connection switching device of a bluetooth headset, the connection switching device of the bluetooth headset includes a processor, a memory, and a connection switching program of the bluetooth headset stored on the memory and executable by the processor, wherein when the connection switching program of the bluetooth headset is executed by the processor, the steps of the connection switching method of the bluetooth headset as described above are implemented.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium having a connection switching program of a bluetooth headset stored thereon, wherein the connection switching program of the bluetooth headset is executed by a processor to implement the steps of the connection switching method of the bluetooth headset as described above.
The invention provides a connection switching method of a Bluetooth headset, which is applied to a connection switching device of the Bluetooth headset, establishes communication connection with all slave devices through a master device, and establishes Bluetooth connection with the Bluetooth headset; when a slave device detects a preset event, sending an earphone connection request instruction to the master device, and converting the earphone connection request instruction into a master mode; the master device disconnects the Bluetooth connection with the Bluetooth headset when receiving the headset connection request instruction; and when the slave equipment converted into the master mode receives the permission instruction fed back by the master equipment, establishing Bluetooth connection with the Bluetooth headset according to prestored Bluetooth headset pairing information, and completing connection switching of the Bluetooth headset between the master equipment and the slave equipment. Through the mode, when the slave device detects the preset event needing to be connected with the Bluetooth headset, the slave device sends the headset connection request instruction to the master device connected with the Bluetooth headset through the communication connection with the master device, so that the master device is disconnected from the Bluetooth headset, and a new Bluetooth connection is established between the slave device with the preset event and the Bluetooth headset, thereby completing the automatic switching of the connection of the Bluetooth headset between the master device and the slave device, reducing the user operation, improving the connection switching efficiency of the Bluetooth headset, improving the user experience, and solving the technical problem that the user experience is poor because the existing user needs to manually perform the disconnection operation between the Bluetooth headset and a plurality of mobile devices.
Drawings
Fig. 1 is a schematic hardware structure diagram of a connection switching device of a bluetooth headset according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a connection switching method of a bluetooth headset according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a connection switching method for a bluetooth headset according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating a connection switching method for a bluetooth headset according to a third embodiment of the present invention;
fig. 5 is a schematic functional block diagram of a connection switching apparatus of a bluetooth headset according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The connection switching method of the Bluetooth headset related by the embodiment of the invention is mainly applied to the connection switching equipment of the Bluetooth headset, and the connection switching equipment of the Bluetooth headset can be equipment with display and processing functions, such as a PC, a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a connection switching device of a bluetooth headset according to an embodiment of the present invention. In this embodiment of the present invention, the connection switching device of the bluetooth headset may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the connection switching device of the bluetooth headset, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to fig. 1, a memory 1005, which is one type of computer-readable storage medium in fig. 1, may include an operating system, a network communication module, and a connection switching program of the bluetooth headset.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; the processor 1001 may call the connection switching program of the bluetooth headset stored in the memory 1005 and execute the connection switching method of the bluetooth headset according to the embodiment of the present invention.
The embodiment of the invention provides a connection switching method of a Bluetooth headset.
Referring to fig. 2, fig. 2 is a flowchart illustrating a connection switching method of a bluetooth headset according to a first embodiment of the present invention.
In this embodiment, the connection switching method for the bluetooth headset is applied to a connection switching device for the bluetooth headset, and the connection switching method for the bluetooth headset includes the following steps:
step S10, the master device establishes communication connection with all slave devices and establishes Bluetooth connection with a Bluetooth headset;
with the development of technology and the improvement of living standard of people, users generally have a plurality of mobile devices, such as a plurality of mobile phones, computers and PADs. However, users generally wear only one pair of bluetooth headsets, which are connected to only one of the mobile devices at a time, thereby providing the user with functions such as music playing or talking. However, if another mobile device is dialed into the phone, or the user wants to play music with another mobile device, the user needs to manually disconnect the current bluetooth connection, then disconnect to use the new mobile device and reselect a new bluetooth connection, which is very poor in use experience. In order to solve the above problems, the present invention uses one mobile device as a master device to perform bluetooth connection with a bluetooth headset and other multiple mobile devices as slave devices. The mobile device serving as the main device is connected with the Bluetooth headset through Bluetooth to achieve audio functions such as music playing and communication. When other mobile devices are dialed into the phone or the music playing function is turned on, the device with the audio service requirement sends a Bluetooth headset connection request to the master device, the current master device is switched to the slave mode, and Bluetooth connection with the Bluetooth headset is disconnected. The slave equipment with the audio service requirement is converted into a master mode, and new connection is established with the Bluetooth headset, so that automatic switching of the master equipment of the Bluetooth headset is realized, and user experience is improved. Specifically, the system is composed of a bluetooth headset and a plurality of mobile devices with bluetooth communication functions, and in this embodiment, three mobile devices, i.e., a device a, a device B, and a device C, and a pair of bluetooth headsets are taken as an example for description. One mobile device is used as a master device, Bluetooth connection is carried out with a Bluetooth headset, and communication connection including but not limited to Bluetooth connection or wireless connection is carried out with other mobile devices which are used as slave devices, so as to receive audio service request information sent by the slave devices. When the mobile device A serving as the main device is connected with the Bluetooth headset in a Bluetooth mode, audio functions such as music playing and communication are achieved. The mobile device A as the master device simultaneously establishes actual communication connection with other mobile devices B as the slave devices, and the slave devices B can send the audio service request information of the slave devices B to the master device A in real time.
Wherein, the connection switching device further comprises a master controller, and before step S10, the connection switching device further comprises:
the master controller obtains connection time of all devices and the Bluetooth headset, the device with the longest connection time is set as the master device, and other devices are set as slave devices, wherein all the devices comprise the master device and all the slave devices.
In this embodiment, the connection time between all devices, that is, the master device and all slave devices, and the bluetooth headset is obtained. The longest connection time with the bluetooth headset requires a large demand for the bluetooth headset, and is preferentially set as the master device and sets other devices as the slave devices. In a specific embodiment, the master device and the slave device corresponding to each time point can be determined according to the connection time point of each device and the bluetooth headset.
Step S20, when a slave device detects a preset event, sending an earphone connection request instruction to the master device, and converting the earphone connection request instruction into a master mode;
in this embodiment, when a slave device detects a predetermined event, i.e., when the slave device B is dialed into the phone or turns on the music playing function, the slave device B sends a headset connection request instruction (i.e., audio service request information) to the master device a. The preset events comprise incoming call events, voice call events, video call events and/or audio playing events. And after the slave device B sends the audio service request information, switching to the master mode, and initiating a call to other devices to establish communication connection with the other devices so as to receive the audio service request information sent by the other devices.
Step S30, when the master device receives the earphone connection request instruction, the master device disconnects the Bluetooth connection with the Bluetooth earphone;
in this embodiment, after receiving the request information, i.e., the earphone connection request instruction, the master device a actively disconnects the connection with the bluetooth earphone and switches to the slave mode.
Step S40, when the slave device converted into the master mode receives the permission instruction fed back by the master device, establishing a bluetooth connection with the bluetooth headset according to pre-stored bluetooth headset pairing information, and completing the connection switching of the bluetooth headset between the master device and the slave device.
In this embodiment, pairing of each mobile device and the bluetooth headset is completed in advance to acquire information such as an address and a pairing password of the bluetooth headset, and the device B can directly call the bluetooth headset and perform bluetooth connection with the bluetooth headset. After receiving the request information, the master device A disconnects the Bluetooth connection with the Bluetooth headset, so that the Bluetooth headset is in a disconnected state, records the trust information of the device B, does not need to be paired again, and can directly establish the Bluetooth connection, thereby completing the connection switching of the Bluetooth headset between the master device and the slave device.
The embodiment provides a connection switching method of a bluetooth headset, which is applied to a connection switching device of the bluetooth headset, establishes communication connection with all slave devices through a master device, and establishes bluetooth connection with the bluetooth headset; when a slave device detects a preset event, sending an earphone connection request instruction to the master device, and converting the earphone connection request instruction into a master mode; the master device disconnects the Bluetooth connection with the Bluetooth headset when receiving the headset connection request instruction; and when the slave equipment converted into the master mode receives the permission instruction fed back by the master equipment, establishing Bluetooth connection with the Bluetooth headset according to prestored Bluetooth headset pairing information, and completing connection switching of the Bluetooth headset between the master equipment and the slave equipment. Through the mode, when the slave device detects the preset event needing to be connected with the Bluetooth headset, the slave device sends the headset connection request instruction to the master device connected with the Bluetooth headset through the communication connection with the master device, so that the master device is disconnected from the Bluetooth headset, and a new Bluetooth connection is established between the slave device with the preset event and the Bluetooth headset, thereby completing the automatic switching of the connection of the Bluetooth headset between the master device and the slave device, reducing the user operation, improving the connection switching efficiency of the Bluetooth headset, improving the user experience, and solving the technical problem that the user experience is poor because the existing user needs to manually perform the disconnection operation between the Bluetooth headset and a plurality of mobile devices.
Referring to fig. 3, fig. 3 is a flowchart illustrating a connection switching method for a bluetooth headset according to a second embodiment of the present invention.
Based on the embodiment shown in fig. 2, in this embodiment, the earphone connection request instruction includes a temporary connection request instruction, and the step S20 specifically includes:
step S21, when a slave device detects a preset event, judging whether the preset event is a temporary connection event according to a preset event connection list;
step S22, if the preset event is the temporary connection event, the slave device that detects the preset event sends the temporary connection request instruction to the master device, and converts the temporary connection request instruction into the master mode.
In this embodiment, the device a serves as a default master device, and after establishing a bluetooth connection with a bluetooth headset, can implement music playing (or audio functions such as conversation). The master device A establishes Bluetooth connection with the slave device B and the slave device C, and bidirectional data communication between the devices can be realized. The device B, the device C may send the audio service request information to the device a. When the slave device B is dialed into the telephone, the slave device B sends call service request information to the master device A, and after receiving the request information and replying a response for allowing the temporary master-slave switching to the slave device B, the master device A actively disconnects the connection with the slave device (comprising a Bluetooth headset, the device A and the device C) and shifts to a slave mode. Master a becomes slave a.
Further, after the step of sending the temporary connection request instruction to the master device by the slave device that detects the preset event and converting the temporary connection request instruction into the master mode if the preset event is the temporary connection event, the method further includes:
the master device adds a preset identifier to the slave device converted into the master mode, and sends a connection permission returning request to the slave device added with the preset identifier when detecting that the preset event is finished;
when the slave equipment added with the preset identifier receives the connection authority returning request, the slave equipment feeds back a master-slave switching response instruction to the master equipment, converts the master-slave switching response instruction into a slave mode, disconnects the Bluetooth connection with the Bluetooth earphone and disconnects the communication connection with other slave equipment;
and when receiving the master-slave switching response instruction, the master device is converted into the master mode, establishes Bluetooth connection with the Bluetooth headset, and establishes communication connection with all slave devices so as to monitor master-slave device switching requests triggered by all the slave devices.
In this embodiment, after receiving the response that allows the temporary master-slave switching sent by the master device a, the slave device B marks the device a as a device that needs to return the authority of the master device, and switches to the master mode, so that the slave device B becomes the master device B. The main device B initiates a call, and since the former device B has already finished pairing with the Bluetooth headset, the device A and the device C and has obtained information such as the address, the pairing password and the like of the devices, the main device B can directly call the slave device. The slave device records the trust information of the device B, and can directly establish connection without recoupling, so that the Bluetooth connection between the master device B and the Bluetooth headset, between the device A and the device C is realized, and the automatic switching of the master device of the Bluetooth headset is realized, namely, the Bluetooth headset playing the audio content of the device A is switched to the call operation of the device B. After the call is finished, the master device B sends master device permission returning request information to the slave device A marked as needing returning the master device permission, and the slave device A receives the request information and replies a response of master-slave switching to the master device B and then shifts to the master mode. Slave a becomes master a. Meanwhile, after receiving the response of master-slave switching sent by the slave device a, the master device B actively disconnects the slave device (including the bluetooth headset, the device a and the device C), and switches to the master mode, so that the slave device B becomes the master device B. The master device A initiates a call, and can directly call the slave device because the slave device B, the slave device C and information such as addresses, pairing passwords and the like of the Bluetooth headset are obtained. The slave device records the trust information of the device B, and can directly establish connection without recoupling, so that the Bluetooth connection between the master device A and the Bluetooth headset, between the device B and the device C is realized, the automatic switching of the master device of the Bluetooth headset is realized, and the Bluetooth headset recovers the audio content of the playing device A.
Further, the earphone connection request instruction includes a long-term connection request instruction, and after the step S21, the method further includes:
if the preset event is not a temporary connection event, judging whether the preset event is a long-term connection event or not according to the preset event connection list;
if the preset event is the long-term connection event, the slave device which detects the preset event sends the long-term connection request instruction to the master device, and converts the long-term connection request instruction into the master mode.
In this embodiment, when the user opens the audio playing function of the slave device C, the slave device C sends audio service request information to the master device a, and after receiving the request information and replying a response to the slave device C that allows long-term master-slave switching, the master device a actively disconnects the connection with the slave device (including the bluetooth headset, the device a, and the device C), and switches to the slave mode. Master a becomes slave a. And after receiving the response which allows the long-term master-slave switching and is sent by the master device A, the slave device C is directly switched into the master mode. Since the music playing function is long connection time, it is not necessary to mark the device a as a device that needs to return the authority of the master device (i.e. the device C obtains the authority of the default master device), and transition to the master mode, and the slave device C becomes the master device C. The master device C initiates a call, because the former device C has already finished pairing with the Bluetooth headset, the device A and the device C, and has obtained the address, the pairing password and other information of the devices, the master device C can directly call the slave device and directly establish connection, so that the Bluetooth connection between the master device C and the Bluetooth headset, the device A and the device B is realized, and the automatic switching of the master device of the Bluetooth headset is realized, namely, the Bluetooth headset playing the audio content of the device A is switched to the audio playing operation of the device C. Through the operation, the equipment for playing the audio can be set as default main equipment, and the played audio content is listened through the Bluetooth headset; the equipment that has the conversation to dial in can obtain the interim authority that master slave switched and realize bluetooth headset's interim conversation function, and after the conversation was ended, will resume acquiescence main equipment's audio playback, promote user experience.
Referring to fig. 4, fig. 4 is a flowchart illustrating a connection switching method for a bluetooth headset according to a third embodiment of the present invention.
Based on the foregoing embodiment shown in fig. 3, in this embodiment, the step S40 specifically includes:
step S41, when the slave device converted into the master mode receives the permission instruction, establishing Bluetooth connection with the Bluetooth headset according to the pre-stored Bluetooth headset pairing information and first trust device information;
step S42, the slave device converted into the master mode establishes a bluetooth connection with the master device and the other slave devices according to the pre-stored device pairing information and the second trusted device information to monitor the master-slave device switching requests of the master device and the other slave devices, and complete the connection switching of the bluetooth headset between the master device and the slave devices.
Before step S10, the method further includes:
the communication connection comprises a Bluetooth connection, the master device establishes communication connection with all slave devices, and before the step of establishing Bluetooth connection with the Bluetooth headset, the method further comprises the following steps:
the master device sets all the slave devices and the Bluetooth headset as trusted devices;
the master device and the Bluetooth headset are set as trusted devices by all the slave devices;
the master controller sets the master device and all the slave devices as trusted devices of the Bluetooth headset.
In this embodiment, the device a is used as a master device to initiate a call, find out a bluetooth device that can be found around, and when finding out the slave device B, the slave device C, and the bluetooth headset, the device a is paired with the slave device B, the slave device C, and the bluetooth headset. At this time, the trust information of the device B, the device C and the bluetooth headset is recorded, and the paired devices do not need to be paired again when calling next time. The device B is used as a main device, and the operation is repeated, so that other devices can record the trust information of the device B, and the device B does not need to be paired again when calling next time. The device C is used as a main device, and the operations are repeated, so that other devices can record the trust information of the device C, and the device C does not need to be paired again when calling next time. When the slave device B is dialed into the phone, the slave device B sends call service request information to the master device A, and after receiving the request information and replying a response for allowing master-slave switching to the slave device B, the master device A actively disconnects the connection with the slave device (comprising a Bluetooth headset, the device A and the device C) and switches to a slave mode. Master a becomes slave a. And after receiving the response which allows the master-slave switching and is sent by the master device A, the slave device B shifts to the master mode, and becomes the master device B. The main device B initiates a call, and since the former device B has already finished pairing with the Bluetooth headset, the device A and the device C and has obtained information such as the address, the pairing password and the like of the devices, the main device B can directly call the slave device. The slave device records the trust information of the device B, and can directly establish connection without recoupling, so that the Bluetooth connection between the master device B and the Bluetooth headset, between the device A and the device C is realized, and the automatic switching of the master device of the Bluetooth headset is realized, namely, the Bluetooth headset playing the audio content of the device A is switched to the call operation of the device B.
In addition, the embodiment of the invention also provides a connection switching device of the Bluetooth headset.
Referring to fig. 5, fig. 5 is a functional module diagram of a connection switching device of a bluetooth headset according to a first embodiment of the present invention.
In this embodiment, the connection switching apparatus of the bluetooth headset includes:
the device communication connection module is used for establishing communication connection between the master device and all slave devices and establishing Bluetooth connection with a Bluetooth headset;
the connection switching request module is used for sending an earphone connection request instruction to the master device when a slave device detects a preset event and converting the earphone connection request instruction into a master mode;
the connection switching response module is used for disconnecting the Bluetooth connection with the Bluetooth headset when the master device receives the headset connection request instruction;
and the earphone connection switching module is used for establishing Bluetooth connection with the Bluetooth earphone according to prestored Bluetooth earphone pairing information when the slave equipment which is converted into the master mode receives the permission instruction fed back by the master equipment, and completing the connection switching of the Bluetooth earphone between the master equipment and the slave equipment.
Further, the earphone connection request instruction includes a temporary connection request instruction, and the connection switching request module includes:
the device comprises a first request judging unit, a second request judging unit and a processing unit, wherein the first request judging unit is used for judging whether a preset event is a temporary connection event or not according to a preset event connection list when a slave device detects the preset event;
and the temporary connection request unit is used for sending the temporary connection request instruction to the master device by the slave device which detects the preset event if the preset event is the temporary connection event, and converting the temporary connection request instruction into the master mode.
Further, the temporary connection request unit is further configured to:
the master device adds a preset identifier to the slave device converted into the master mode, and sends a connection permission returning request to the slave device added with the preset identifier when detecting that the preset event is finished;
when the slave equipment added with the preset identifier receives the connection authority returning request, the slave equipment feeds back a master-slave switching response instruction to the master equipment, converts the master-slave switching response instruction into a slave mode, disconnects the Bluetooth connection with the Bluetooth earphone and disconnects the communication connection with other slave equipment;
and when receiving the master-slave switching response instruction, the master device is converted into the master mode, establishes Bluetooth connection with the Bluetooth headset, and establishes communication connection with all slave devices so as to monitor master-slave device switching requests triggered by all the slave devices.
Further, the connection switching request module further includes:
a second request judging unit, configured to judge whether the preset event is a long-term connection event according to the preset event connection list if the preset event is not a temporary connection event;
a long-term connection request unit, configured to send the long-term connection request instruction to the master device by the slave device that detects the preset event if the preset event is the long-term connection event, and convert the long-term connection request instruction into the master mode.
Further, the connection switching apparatus further includes a master controller and a master-slave device determining module, where the master-slave device determining module is further configured to:
the master controller obtains connection time of all devices and the Bluetooth headset, the device with the longest connection time is set as the master device, and other devices are set as slave devices, wherein all the devices comprise the master device and all the slave devices.
Further, the communication connection comprises a bluetooth connection, the connection switching device further comprises a trusted device setting module, and the trusted device setting module is configured to:
the master device sets all the slave devices and the Bluetooth headset as trusted devices;
the master device and the Bluetooth headset are set as trusted devices by all the slave devices;
the master controller sets the master device and all the slave devices as trusted devices of the Bluetooth headset.
Further, the earphone connection switching module specifically includes:
the earphone connection establishing unit is used for establishing Bluetooth connection with the Bluetooth earphone according to the pre-stored Bluetooth earphone pairing information and first trust equipment information when the slave equipment converted into the master mode receives the permission instruction;
and the device connection establishing unit is used for the slave device converted into the master mode to establish Bluetooth connection with the master device and other slave devices according to the pre-stored device pairing information and second trust device information so as to monitor master-slave device switching requests of the master device and other slave devices and complete connection switching of Bluetooth earphones between the master device and the slave devices.
Each module in the connection switching device of the bluetooth headset corresponds to each step in the connection switching method embodiment of the bluetooth headset, and the functions and implementation processes thereof are not described in detail herein.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a connection switching program of a bluetooth headset, wherein the connection switching program of the bluetooth headset is executed by a processor to implement the steps of the connection switching method of the bluetooth headset as described above.
The method for implementing the connection switching procedure of the bluetooth headset when executed may refer to each embodiment of the connection switching method of the bluetooth headset of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (9)
1. A connection switching method of a Bluetooth headset is applied to a connection switching device of the Bluetooth headset, and comprises the following steps:
the master device establishes communication connection with all slave devices and establishes Bluetooth connection with the Bluetooth headset;
when a slave device detects a preset event, sending an earphone connection request instruction to the master device, and converting the earphone connection request instruction into a master mode;
the master device disconnects the Bluetooth connection with the Bluetooth headset when receiving the headset connection request instruction;
when the slave device converted into the master mode receives an allowing instruction fed back by the master device, establishing Bluetooth connection with the Bluetooth headset according to prestored Bluetooth headset pairing information, and completing connection switching of the Bluetooth headset between the master device and the slave device;
the master device adds a preset identifier to the slave device converted into the master mode, and sends a connection permission returning request to the slave device added with the preset identifier when detecting that the preset event is finished;
when the slave equipment added with the preset identifier receives the connection authority returning request, the slave equipment feeds back a master-slave switching response instruction to the master equipment, converts the master-slave switching response instruction into a slave mode, disconnects the Bluetooth connection with the Bluetooth earphone and disconnects the communication connection with other slave equipment;
and when receiving the master-slave switching response instruction, the master device is converted into the master mode, establishes Bluetooth connection with the Bluetooth headset, and establishes communication connection with all slave devices so as to monitor master-slave device switching requests triggered by all the slave devices.
2. The method for switching connection of a bluetooth headset according to claim 1, wherein the headset connection request command includes a temporary connection request command, and the step of sending the headset connection request command to the master device and converting to the master mode when a slave device detects a preset event specifically includes:
when a slave device detects a preset event, judging whether the preset event is a temporary connection event according to a preset event connection list;
if the preset event is the temporary connection event, the slave device which detects the preset event sends the temporary connection request instruction to the master device, and converts the temporary connection request instruction into the master mode.
3. The method for switching connection of a bluetooth headset according to claim 1, wherein the headset connection request command includes a long-term connection request command, and the method further comprises, after the step of determining whether the preset event is a temporary connection event according to a preset event connection list when a preset event is detected by a slave device:
if the preset event is not a temporary connection event, judging whether the preset event is a long-term connection event or not according to the preset event connection list;
if the preset event is the long-term connection event, the slave device which detects the preset event sends the long-term connection request instruction to the master device, and converts the long-term connection request instruction into the master mode.
4. The method for switching connection of bluetooth headset according to claim 1, wherein the connection switching apparatus further includes a master controller, the master device establishes communication connection with all slave devices, and before the step of establishing bluetooth connection with the bluetooth headset, further includes:
the master controller obtains connection time of all devices and the Bluetooth headset, the device with the longest connection time is set as the master device, and other devices are set as slave devices, wherein all the devices comprise the master device and all the slave devices.
5. The method for switching connection of a bluetooth headset according to claim 4, wherein the communication connection includes a bluetooth connection, and before the step of establishing the bluetooth connection between the master device and all the slave devices, the method further comprises:
the master device sets all the slave devices and the Bluetooth headset as trusted devices;
the master device and the Bluetooth headset are set as trusted devices by all the slave devices;
the master controller sets the master device and all the slave devices as trusted devices of the Bluetooth headset.
6. The method according to claim 5, wherein the step of establishing the bluetooth connection with the bluetooth headset according to the pre-stored bluetooth headset pairing information when the slave device converted into the master mode receives the permission instruction fed back by the master device, and completing the connection switching of the bluetooth headset between the master device and the slave device specifically comprises:
when the slave device converted into the master mode receives the permission instruction, establishing Bluetooth connection with the Bluetooth headset according to the pre-stored Bluetooth headset pairing information and first trust device information;
and the slave equipment converted into the master mode establishes Bluetooth connection with the master equipment and other slave equipment according to prestored equipment pairing information and second trust equipment information so as to monitor master-slave equipment switching requests of the master equipment and other slave equipment and complete connection switching of Bluetooth earphones between the master equipment and the slave equipment.
7. The method for switching connection of bluetooth headset according to one of claims 1 to 6, wherein the preset event comprises an incoming call event, a voice call event, a video call event and/or an audio play event.
8. A connection switching apparatus of a bluetooth headset, comprising a processor, a memory, and a connection switching program of the bluetooth headset stored on the memory and executable by the processor, wherein the connection switching program of the bluetooth headset when executed by the processor implements the steps of the connection switching method of the bluetooth headset according to any one of claims 1 to 7.
9. A computer-readable storage medium, having a connection switching program of a bluetooth headset stored thereon, wherein the connection switching program of the bluetooth headset when executed by a processor implements the steps of the connection switching method of the bluetooth headset according to any one of claims 1 to 7.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010238496.1A CN111432386B (en) | 2020-03-30 | 2020-03-30 | Connection switching method, device, equipment and storage medium of Bluetooth headset |
PCT/CN2020/124830 WO2021196577A1 (en) | 2020-03-30 | 2020-10-29 | Bluetooth earphone connection switching method, apparatus and device, and storage medium |
US17/995,160 US20230156838A1 (en) | 2020-03-30 | 2020-10-29 | Bluetooth earphone connection switching method, apparatus and device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010238496.1A CN111432386B (en) | 2020-03-30 | 2020-03-30 | Connection switching method, device, equipment and storage medium of Bluetooth headset |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111432386A CN111432386A (en) | 2020-07-17 |
CN111432386B true CN111432386B (en) | 2021-08-27 |
Family
ID=71549289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010238496.1A Active CN111432386B (en) | 2020-03-30 | 2020-03-30 | Connection switching method, device, equipment and storage medium of Bluetooth headset |
Country Status (3)
Country | Link |
---|---|
US (1) | US20230156838A1 (en) |
CN (1) | CN111432386B (en) |
WO (1) | WO2021196577A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111432386B (en) * | 2020-03-30 | 2021-08-27 | 歌尔科技有限公司 | Connection switching method, device, equipment and storage medium of Bluetooth headset |
DE112020007208T5 (en) * | 2020-09-01 | 2023-03-09 | Shenzhen Bluetrum Technology Co., Ltd. | Method of communication for wireless device, wireless device and computer-readable storage medium |
CN113613226A (en) * | 2021-07-30 | 2021-11-05 | 上海闻泰信息技术有限公司 | Connection method and device of Bluetooth equipment, electronic equipment and storage medium |
CN114125735B (en) * | 2021-12-03 | 2023-04-21 | Oppo广东移动通信有限公司 | Earphone connection method and device, computer readable storage medium and electronic equipment |
CN116669225B (en) * | 2022-12-28 | 2024-04-19 | 广州源动智慧体育科技有限公司 | Device connection method, electronic device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102811274A (en) * | 2011-05-30 | 2012-12-05 | 康佳集团股份有限公司 | Mobile phone and control method thereof |
CN104683940A (en) * | 2015-03-05 | 2015-06-03 | 丰唐物联技术(深圳)有限公司 | Bluetooth connection switching method and system |
CN104683003A (en) * | 2015-03-05 | 2015-06-03 | 丰唐物联技术(深圳)有限公司 | Bluetooth connection switching method and system |
CN108710597A (en) * | 2018-05-17 | 2018-10-26 | 福建升腾资讯有限公司 | A kind of method and system using GPIO optimization MCU communications |
CN109890021A (en) * | 2019-03-06 | 2019-06-14 | 西安易朴通讯技术有限公司 | Bluetooth headset switching method, bluetooth headset and terminal |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110177780A1 (en) * | 2010-01-15 | 2011-07-21 | Kabushiki Kaisha Toshiba | Wireless communication apparatus |
CN105072564B (en) * | 2015-07-30 | 2019-04-02 | Oppo广东移动通信有限公司 | A kind of audio frequency playing method and device based on bluetooth connection |
CN105827264B (en) * | 2016-03-30 | 2018-04-10 | 乐视汽车(北京)有限公司 | A kind of vehicle-mounted more amusement equipment bluetooth switching method, amusement equipment and systems |
US9986370B2 (en) * | 2016-04-05 | 2018-05-29 | Plantronics, Inc. | Connection switching for bluetooth headsets |
US10028079B2 (en) * | 2016-07-07 | 2018-07-17 | Plantronics, Inc. | Enhanced security for near field communication enabled bluetooth devices |
CN109548184B (en) * | 2017-08-16 | 2024-03-08 | 中兴通讯股份有限公司 | Method and device for connecting mobile terminal and Bluetooth device and mobile terminal |
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 |
CN108924706B (en) * | 2018-06-26 | 2020-08-18 | 东莞市和乐电子有限公司 | Bluetooth headset switching control method, Bluetooth headset and computer readable storage medium |
CN109274827A (en) * | 2018-09-29 | 2019-01-25 | 泸州威恩德科技有限公司 | Method, apparatus, equipment and the medium of auto-pickup mobile phone communication |
CN108989940A (en) * | 2018-10-30 | 2018-12-11 | 努比亚技术有限公司 | Bluetooth headset function is compatible with implementation method, device, bluetooth headset and storage medium |
CN113225693B (en) * | 2019-04-18 | 2022-04-15 | 华为技术有限公司 | Bluetooth connection method, equipment and system |
CN110167194A (en) * | 2019-05-20 | 2019-08-23 | 安徽华米信息科技有限公司 | Equipment connection method, device, bluetooth headset and system |
CN111432386B (en) * | 2020-03-30 | 2021-08-27 | 歌尔科技有限公司 | Connection switching method, device, equipment and storage medium of Bluetooth headset |
-
2020
- 2020-03-30 CN CN202010238496.1A patent/CN111432386B/en active Active
- 2020-10-29 WO PCT/CN2020/124830 patent/WO2021196577A1/en active Application Filing
- 2020-10-29 US US17/995,160 patent/US20230156838A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102811274A (en) * | 2011-05-30 | 2012-12-05 | 康佳集团股份有限公司 | Mobile phone and control method thereof |
CN104683940A (en) * | 2015-03-05 | 2015-06-03 | 丰唐物联技术(深圳)有限公司 | Bluetooth connection switching method and system |
CN104683003A (en) * | 2015-03-05 | 2015-06-03 | 丰唐物联技术(深圳)有限公司 | Bluetooth connection switching method and system |
CN108710597A (en) * | 2018-05-17 | 2018-10-26 | 福建升腾资讯有限公司 | A kind of method and system using GPIO optimization MCU communications |
CN109890021A (en) * | 2019-03-06 | 2019-06-14 | 西安易朴通讯技术有限公司 | Bluetooth headset switching method, bluetooth headset and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN111432386A (en) | 2020-07-17 |
WO2021196577A1 (en) | 2021-10-07 |
US20230156838A1 (en) | 2023-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111432386B (en) | Connection switching method, device, equipment and storage medium of Bluetooth headset | |
US11812485B2 (en) | Bluetooth communication method and terminal | |
KR100584369B1 (en) | Method for providing status information of mobile communication terminal in mobile communication system and the mobile communication terminal | |
EP3537734A1 (en) | Method, apparatus, system, and device for connecting bluetooth device | |
CN111556439A (en) | Terminal connection control method, terminal and computer storage medium | |
JP2021521737A (en) | Access control method, message broadcasting method and related equipment | |
CN113784001A (en) | Audio data playing method and device, electronic equipment and storage medium | |
JP5005103B1 (en) | Call system | |
WO2023092785A1 (en) | Terminal control method, terminal control system, and storage medium | |
JP6093967B2 (en) | CALLING SYSTEM, CONTROL DEVICE, PROGRAM, AND CALLING METHOD | |
US20030068021A1 (en) | Communication apparatus | |
TW201427381A (en) | Communication device and method for transferring incoming call | |
JP4783615B2 (en) | Mobile communication system | |
JP2002218556A (en) | Communication terminal, communication method and recording medium | |
JP5664458B2 (en) | Wireless terminal | |
JP2009089380A (en) | Method and apparatus for muting sounder device | |
CN113068193B (en) | Information processing method, device and equipment and storage medium | |
KR100563711B1 (en) | method and system for certifying contract using telephone | |
JP6765702B1 (en) | Communication management device, communication management method, communication management program and communication management system | |
JP7280608B2 (en) | CTI system for telephone sales | |
JP6812047B1 (en) | Communication management device, communication management method, communication management program and communication management system | |
JP6849231B2 (en) | Wireless communication device, communication system and setting information providing program | |
JP3570997B2 (en) | Communication systems, telephone exchanges and communication devices | |
CN113395384A (en) | Communication method and device based on wearable device and readable storage medium | |
JP2022061276A (en) | Communication management device, communication management method, communication management program, and communication management system |
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 |