CN111447602B - Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium - Google Patents

Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium Download PDF

Info

Publication number
CN111447602B
CN111447602B CN202010551365.9A CN202010551365A CN111447602B CN 111447602 B CN111447602 B CN 111447602B CN 202010551365 A CN202010551365 A CN 202010551365A CN 111447602 B CN111447602 B CN 111447602B
Authority
CN
China
Prior art keywords
bluetooth
equipment
bluetooth module
connection
external device
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
CN202010551365.9A
Other languages
Chinese (zh)
Other versions
CN111447602A (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.)
Chengdu Jimi Technology Co Ltd
Original Assignee
Chengdu Jimi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Jimi Technology Co Ltd filed Critical Chengdu Jimi Technology Co Ltd
Priority to CN202010551365.9A priority Critical patent/CN111447602B/en
Publication of CN111447602A publication Critical patent/CN111447602A/en
Application granted granted Critical
Publication of CN111447602B publication Critical patent/CN111447602B/en
Priority to PCT/CN2021/098059 priority patent/WO2021254160A1/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/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/23Manipulation of direct-mode connections

Landscapes

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

Abstract

The application discloses a Bluetooth device, a Bluetooth preemption method and device thereof and a computer readable storage medium. The Bluetooth device comprises a Bluetooth module, and the method comprises the following steps: monitoring the Bluetooth equipment; when the information touched by the active NFC is monitored, if the Bluetooth module has the currently connected external audio equipment, the Bluetooth module is controlled to disconnect the currently connected external audio equipment and establish the connection of new external equipment, and if not, the monitoring is continued; when the information sent by the Bluetooth module is monitored, whether the equipment type of the new external equipment can be acquired from the monitored information is judged, if the equipment type of the new external equipment is acquired and the Bluetooth module currently has the connected external equipment, the Bluetooth module is controlled to disconnect the currently connected external equipment and establish the connection of the new external equipment, and if not, the monitoring is continued. This application has realized that the bluetooth is preempted, and whole process does not need the manual operation, uses more convenient comfortable, and this application preempts speed fast enough, experiences better.

Description

Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
Technical Field
The present application relates to the field of bluetooth communications, and in particular, to a bluetooth device, a bluetooth preemption method and apparatus thereof, and a computer-readable storage medium.
Background
Equipment accessible such as cell-phone is from audio equipment broadcast audio data such as music, but, people are more and more high to the pursuit of sound effect, and in order to reach better audio playback effect, the user can connect external bluetooth sound equipment through the bluetooth, utilizes audio data such as external bluetooth sound equipment broadcast music.
The bluetooth communication technology is a commonly used short-distance wireless communication technology, and bluetooth communication connection can be established between bluetooth equipment equipped with a bluetooth module and other external equipment supporting bluetooth functions through the bluetooth module so as to communicate with the external equipment, and the functions of the external equipment are used or the external equipment is enabled to use the functions of the bluetooth equipment. And disconnecting the currently connected external equipment, and continuing to connect the new external equipment, wherein the process is called Bluetooth preemption. Under the condition that the existing Bluetooth equipment is connected with external equipment, the new external equipment can only be paired, and finally audio connection cannot be established and cannot be preempted. Since bluetooth communication resources are very limited, if a new external device wants to establish an audio connection, the currently connected external audio device must be manually disconnected from the bluetooth connection of the bluetooth device, and then the connection of the new external device is established.
Disclosure of Invention
In view of the above, the present application provides a bluetooth device, a bluetooth preemption method and apparatus thereof, and a computer-readable storage medium.
In a first aspect, the present application provides a bluetooth preemption method for a bluetooth device, where the bluetooth device includes a bluetooth module, and the bluetooth module is configured to establish a bluetooth connection with an external device, and the method includes:
monitoring the Bluetooth equipment;
when the information touched by the active NFC is monitored, if the Bluetooth module has the currently connected external audio equipment, the Bluetooth module is controlled to disconnect the currently connected external audio equipment and establish the connection of new external equipment, and if not, the monitoring is continued;
when the information sent by the Bluetooth module is monitored, whether the equipment type of the new external equipment can be acquired from the monitored information is judged, if the equipment type of the new external equipment is acquired and the Bluetooth module currently has the connected external equipment, the Bluetooth module is controlled to disconnect the currently connected external equipment and establish the connection of the new external equipment, and if not, the monitoring is continued.
In a possible design, if the device type of the new external device is obtained and the bluetooth module currently has an external device connected to the bluetooth module, controlling the bluetooth module to disconnect the currently connected external device and establish a connection of the new external device includes:
judging whether the equipment type of the new external equipment is a preset type or not;
when the device type of the new external device is a preset type and the Bluetooth module has the currently connected external device, controlling the Bluetooth module to disconnect the currently connected external device and establish the connection of the new external device;
and when the device type of the new external device is not the preset type, continuing to monitor.
Optionally, when the device type of the new external device is a preset type and the bluetooth module has a currently connected external device, controlling the bluetooth module to disconnect the currently connected external device and establish a connection of the new external device, including:
and judging the equipment type of the external equipment currently connected with the Bluetooth module, if the equipment type of the external equipment currently connected with the Bluetooth module only has non-audio equipment, continuing to monitor, and if not, controlling the Bluetooth module to disconnect the external audio equipment currently connected with the Bluetooth module and establishing the connection of new external equipment.
In another possible design, if the device type of the new external device is obtained and the bluetooth module currently has the connected external device, controlling the bluetooth module to disconnect the currently connected external device and establish the connection of the new external device includes:
and judging whether the equipment type of the new external equipment is the same as the equipment type of the external equipment currently connected with the Bluetooth module, if so, controlling the Bluetooth module to disconnect the currently connected external equipment and establish the connection of the new external equipment, and if not, continuing to monitor.
Illustratively, the controlling the bluetooth module to disconnect the currently connected external device and establish a connection with a new external device includes:
and generating a preemption instruction and sending the preemption instruction to the Bluetooth module so that the Bluetooth module disconnects the currently connected external equipment and establishes the connection of new external equipment.
Optionally, the controlling the bluetooth module to disconnect the currently connected external device and establish a connection with a new external device further includes:
and monitoring the connection of the external equipment which is disconnected from the current connection of the Bluetooth module and the new external equipment.
In a second aspect, the present application provides a bluetooth preemption device for a bluetooth device, where the bluetooth device includes a bluetooth module, the bluetooth module is used to establish a bluetooth connection with an external device, and the device includes:
the monitoring unit is used for monitoring the Bluetooth equipment;
the preemption unit is used for controlling the Bluetooth module to disconnect the currently connected external audio equipment and establish the connection of new external equipment if the Bluetooth module has the currently connected external audio equipment when monitoring the message touched by the active NFC; when the information sent by the Bluetooth module is monitored, whether the equipment type of the new external equipment can be acquired from the monitored information is judged, and if the equipment type of the new external equipment is acquired and the Bluetooth module currently has the connected external equipment, the Bluetooth module is controlled to disconnect the currently connected external equipment and establish the connection of the new external equipment.
In a possible design, if the device type of the new external device is obtained and the bluetooth module currently has an external device connected to the bluetooth module, controlling the bluetooth module to disconnect the currently connected external device and establish a connection of the new external device includes:
judging whether the equipment type of the new external equipment is a preset type or not;
when the device type of the new external device is a preset type and the Bluetooth module has the currently connected external device, controlling the Bluetooth module to disconnect the currently connected external device and establish the connection of the new external device;
and when the device type of the new external device is not the preset type, continuing to monitor.
In a third aspect, the present application provides a bluetooth device, including a bluetooth module, and further including a preemption module in communication connection with the bluetooth module, where the bluetooth module is configured to establish a bluetooth connection with an external device, and execute a corresponding operation according to control of the preemption module;
the preemption module is configured to perform the bluetooth preemption method as described in the first aspect or any of its possible implementations.
In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions which, when executed by a processor, may implement the bluetooth preemption method of the first aspect or any of its possible implementations.
It should be noted that, the bluetooth preemption device of the second aspect, the bluetooth device of the third aspect, and the computer-readable storage medium of the fourth aspect in the present application are used to execute the method provided by the first aspect, so that the same beneficial effects as those of the method of the first aspect can be achieved, and the embodiments of the present application are not described in detail herein.
This application has realized that the bluetooth is preempted, when new external equipment wants to connect bluetooth equipment, does not need the external equipment of artificial disconnection current connection, after this new external equipment disconnection, but an external equipment of automatic connection, whole process does not need manual operation, uses more convenient comfortable, and the speed of preempting of this application is fast enough, experiences better.
Drawings
The present application will now be described by way of example only and with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a bluetooth preemption method for a bluetooth device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the 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.
All other embodiments, which can be derived by a person skilled in the art from the exemplary embodiments shown in the present application without inventive effort, shall fall within the scope of protection of the present application. Moreover, while the disclosure herein has been presented in terms of exemplary one or more examples, it is to be understood that each aspect of the disclosure can be utilized independently and separately from other aspects of the disclosure to provide a complete disclosure.
In the embodiments of the present application, the words "exemplary," "for example," and the like are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the term using examples is intended to present concepts in a concrete fashion.
Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or device that comprises a list of elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or device.
The term "remote control" as used herein refers to a component of an electronic device (e.g., a bluetooth device as disclosed herein) that is typically wirelessly controllable over a relatively short range. Typically using infrared and/or Radio Frequency (RF) signals and/or bluetooth to connect with the electronic device, and may also include WiFi, wireless USB, bluetooth, motion sensor, etc. The term "new external device" is used only to distinguish "currently connected external device".
In the following embodiments, a bluetooth device refers to an electronic device including a bluetooth module, and through the bluetooth module, the bluetooth device may establish a bluetooth connection with other external devices supporting a bluetooth function. Since the external device is a device supporting the bluetooth function, the external device is also a bluetooth device. In some embodiments, the bluetooth device may further include a passive NFC tag or an active NFC tag, the bluetooth MAC address of the bluetooth device is stored in the NFC tag, after the external device with the NFC function and supporting the bluetooth function touches, the bluetooth device may be connected by taking the bluetooth MAC address, if the external device and the bluetooth device are not connected, the bluetooth device or the external device may initiate scanning pairing, the connection is established after pairing is successful, and after connection is successful, the function of the external device may be used or the external device may use the function of the bluetooth device.
After the traditional Bluetooth equipment is started, certain keys are required to be triggered again to enter a connectable mode, at the moment, the external equipment can search the Bluetooth equipment in a Bluetooth list and carry out pairing connection, and under the condition that pairing is not removed, both sides are started next time, and the external equipment can be connected back to continue to be used in a single mode. Generally, after the bluetooth device is connected, other external devices cannot be searched, because the bluetooth device is in an undiscoverable state.
The bluetooth device with the passive NFC tag needs to be connected to the external device, and the mode needs to be set to be discoverable first, and because the external device touches the passive NFC tag, the bluetooth device does not know, so the bluetooth device needs to be discoverable all the time. The Bluetooth device with the active NFC label only needs to be in a starting mode, and the external device can be connected by touching the NFC label.
After the Bluetooth device is started, the Bluetooth is set to be discoverable, and the Bluetooth name is set, so that the external device can be connected with the Bluetooth device, and the method comprises two methods:
1) opening the Bluetooth, entering a Bluetooth setting to search the Bluetooth of the Bluetooth equipment, and clicking connection;
2) and opening the external equipment NFC, and connecting the external equipment with the Bluetooth through touching the NFC label of the Bluetooth equipment.
In general, the connection procedure of bluetooth can be divided into:
ACL connection phase, namely Bluetooth link layer connection establishment phase. The Bluetooth device is connected by the external device for the first time, and at this stage, the Bluetooth device cannot acquire any other effective information except the MAC address of the external device.
2. And (5) a centering stage. At this stage the bluetooth device can access the device type of the external device (e.g. phone, headset, handle, etc.).
3. A paired stage. After the pairing is completed, the external device support profile type list can be acquired according to the uuids of the external device, and preparation is made for next profile connection.
Profile is in the connection phase. And establishing audio connection, wherein the profile represents that the external equipment has certain type of capability, and the connection is carried out according to the profile type.
Profile connected phase. After the connection is successful, the Bluetooth device can have corresponding functions, for example, after the A2dpSinkProfile is connected, the external device plays music and then sounds at the Bluetooth device.
The external device is connected for the first time through all stages 1-5, and the external device which is paired is connected again to be called back to be connected, and only three stages 1, 4 and 5 are needed. In order to achieve a better experience, the preemption speed must be fast enough, so the preemption timing needs to be as early as possible. The method and the device realize preemption in the stage 1 or the stage 2 by judging whether the device type of the external device can be acquired. And for the bluetooth equipment with active NFC label, the NFC module is with bluetooth equipment hardware connection, when external equipment touched the active NFC module of bluetooth equipment, bluetooth equipment can be informed the very first time, consequently can break off the external equipment of having connected at present in the very first time, in time release bluetooth bandwidth resource, other flows in addition do not have any difference, when bluetooth equipment detected external equipment NFC and touched promptly, if there is the external equipment of having connected, then direct disconnection, continue the connection of new external equipment.
Fig. 1 is a flowchart of a bluetooth preemption method for a bluetooth device according to an embodiment of the present application, and as shown in fig. 1, the bluetooth preemption method includes:
monitoring the Bluetooth device, illustratively, monitoring the Bluetooth connection establishing the external device, includes:
1) ACL connection stage, receive the already set up broadcast of the connection path (set up the connection path);
2) a pairing stage, wherein a pairing broadcast (pairing) is received;
3) a paired stage, receiving a paired broadcast (paired);
4) the profile is in the connection stage, and the audio connection is received and broadcast (the audio connection is being established);
5) profile connected phase, audio connection connected broadcast is received (audio connection established).
When the information touched by the active NFC is monitored, if the Bluetooth module has the currently connected external audio equipment, the Bluetooth module is controlled to disconnect the currently connected external audio equipment and establish the connection of new external equipment, and if not, the monitoring is continued; when the information sent by the Bluetooth module is monitored, whether the equipment type of the new external equipment can be acquired from the monitored information is judged, if the equipment type of the new external equipment is acquired and the Bluetooth module currently has the connected external equipment, the Bluetooth module is controlled to disconnect the currently connected external equipment and establish the connection of the new external equipment, and if not, the monitoring is continued.
In some embodiments, when the external devices are devices such as a remote controller and a keyboard, it is not desirable that the devices occupy limited bluetooth communication resources, and at this time, it is necessary to determine the device type of a new external device that wants to establish a new connection, and when the device type of the new external device is a preset type and the bluetooth module has a currently connected external device, the bluetooth module is controlled to disconnect the currently connected external device and establish a connection of the new external device; and when the device type of the new external device is not the preset type, continuing to monitor. For example, the bluetooth device may store a device type table locally, which is not limited in this application.
In some embodiments, if the bluetooth device is currently connected to only a non-audio device (such as a remote controller), and does not need to disconnect the non-audio device, the device type of the currently connected external device may be determined, and if the device type of the currently connected external device is only a non-audio device, the monitoring may be continued, otherwise, the bluetooth module is controlled to disconnect the currently connected external audio device, and a connection of a new external device is established.
In some embodiments, when the device type of the new external device is the same as the device type of the external device currently connected to the bluetooth module, the bluetooth module may be controlled to disconnect the currently connected external device and establish the connection of the new external device, otherwise, the monitoring is continued.
For example, a preemption instruction may be generated and sent to the bluetooth module to cause the bluetooth module to disconnect the currently connected external device, such as calling an A2dpSinkProfile disconnect interface. Meanwhile, the connection of the external equipment which is disconnected with the Bluetooth module at present and the new external equipment is established can be monitored. Illustratively, the process of disconnecting the currently connected external device includes:
1) calling an A2dpSinkProfile disconnect interface;
2) a2dp Sink Profile is in the disconnection stage, and the audio connection is disconnected and broadcast is received;
3) a2dp Sink Profile disconnected stage, receiving the audio connection disconnected broadcast;
4) ACL DISCONNECT phase, the broadcast is received that the connection path has been disconnected.
The embodiment of the present application further provides a bluetooth preemption device for a bluetooth device, where the device is used to implement the bluetooth preemption method according to any embodiment in fig. 1, and may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above-described functions, e.g., a listening unit, a preemption unit, etc.
The embodiment of the present application further provides a bluetooth device, which includes a bluetooth module and a preemption module communicatively connected to the bluetooth module, and the preemption module is configured to execute the method according to any embodiment in fig. 1.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer instructions, when executed by a processor, implement the method according to any one of the embodiments in fig. 1.
The application of the bluetooth preemption method is further described below in conjunction with a specific embodiment. In this embodiment, the bluetooth device is a projection terminal with bluetooth sound function, and the external device is a mobile phone and an external bluetooth sound.
Originally, the projection end needs to enter the sound mode, and the mobile phone can search the Bluetooth sound of the projection end and connect the Bluetooth sound. Obviously, the passive NFC cannot provide such a trigger condition for projection, so the projection terminal needs to be specially modified, and needs to be capable of being connected with external bluetooth devices by scanning and being connected with mobile phone devices by searching. From the situation of the bluetooth protocol stack or the bluetooth bandwidth, it is obviously infeasible to connect the mobile phone to the projection end, and at this time, the projection end is also connected to the external audio. If the projection end is connected with the external Bluetooth sound equipment or the mobile phone is connected with the projection end sound equipment, the other mobile phone cannot be connected, because the strategy of the whole protocol stack does not support.
At this time, if the bluetooth preemption method of the embodiment of the application is utilized, when a new mobile phone wants to connect to the projection end, the ACL connection stage judges whether the device type can be acquired, if the device type cannot be acquired, the ACL connection stage ignores the device type, and if the device type can be acquired and is a phone type, the currently connected bluetooth device or mobile phone is disconnected. And in the binding stage, if the acquired type is a phone type, the currently connected Bluetooth device or mobile phone is disconnected. If the projection end is an active NFC projection end, the projection end detects NFC touch of the mobile phone, and at the moment, if the mobile phone or the Bluetooth sound box is connected, the connection is directly disconnected, and the connection of a new mobile phone is continued.
Because the bluetooth bandwidth is limited, in order to realize bluetooth preemption, bluetooth bandwidth equalization is required. For example, the usage scenario of bluetooth bandwidth includes:
1) keeping the stable connection of the Bluetooth remote controller;
2) the stable audio transmission of the connected mobile phone is ensured;
3) responding to the Page connection request of the new mobile phone.
Since audio transmission priority of the connected handset is higher, audio jamming can occur when reducing bandwidth occupation, so equalization adjustment from other two directions is modified as follows, for example:
1) the connection parameters of the Bluetooth remote controller are increased by 3-5ms, so that the requirement of the remote controller can be met, and the frequency of keeping connection and communication with the remote controller is reduced;
2) the interval time of Page Scan is shortened by 500-600ms, so as to respond the Page connection request of the new mobile phone more quickly.
It should be understood that, in various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, some or all of the steps may be executed in parallel or executed sequentially, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, a network device or a terminal device, etc.) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: u disk, removable hard disk, ROM, RAM) magnetic or optical disk, or the like.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
The word "if" or "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by instructing the relevant hardware through a program, which may be stored in a storage medium readable by a device and includes all or part of the steps when executed, such as: FLASH, EEPROM, etc.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1.A Bluetooth preemption method for a Bluetooth device, wherein the Bluetooth device comprises a Bluetooth module, and the Bluetooth module is used for establishing Bluetooth connection with an external device, and the method comprises the following steps:
monitoring the Bluetooth equipment;
when the information touched by the active NFC is monitored, if the Bluetooth module has the currently connected external audio equipment, the Bluetooth module is controlled to disconnect the currently connected external audio equipment and establish the connection of new external equipment, and if not, the monitoring is continued;
when a message sent by the Bluetooth module is monitored, judging whether the equipment type of the new external equipment can be acquired from the monitored message or not in an ACL connection stage, if the equipment type of the new external equipment is acquired and the Bluetooth module currently has the connected external equipment, controlling the Bluetooth module to disconnect the currently connected external equipment and establish the connection of the new external equipment, otherwise, continuing monitoring; in the middle pairing stage, acquiring the device type of the new external device, and if the Bluetooth module currently has the connected external device, controlling the Bluetooth module to disconnect the currently connected external device and establish the connection of the new external device;
control bluetooth module disconnection external device of current connection to establish the connection of new external device, include:
judging whether the equipment type of the new external equipment is a preset type or not;
when the device type of the new external device is a preset type and the Bluetooth module has the currently connected external device, controlling the Bluetooth module to disconnect the currently connected external device and establish the connection of the new external device;
and when the device type of the new external device is not the preset type, continuing to monitor.
2. The method according to claim 1, wherein when the device type of the new external device is a preset type and the bluetooth module currently has an external device connected thereto, the controlling the bluetooth module to disconnect the currently connected external device and establish a connection with the new external device comprises:
and judging the equipment type of the external equipment currently connected with the Bluetooth module, if the equipment type of the external equipment currently connected with the Bluetooth module only has non-audio equipment, continuing to monitor, and if not, controlling the Bluetooth module to disconnect the external audio equipment currently connected with the Bluetooth module and establishing the connection of new external equipment.
3. The method of claim 1, wherein the controlling the bluetooth module to disconnect the currently connected external device and establish a connection with a new external device comprises:
and judging whether the equipment type of the new external equipment is the same as the equipment type of the external equipment currently connected with the Bluetooth module, if so, controlling the Bluetooth module to disconnect the currently connected external equipment and establish the connection of the new external equipment, and if not, continuing to monitor.
4. The method for preempting Bluetooth of a Bluetooth device according to any of claims 1-3, wherein controlling the Bluetooth module to disconnect the currently connected external device and establish a connection with a new external device comprises:
and generating a preemption instruction and sending the preemption instruction to the Bluetooth module so that the Bluetooth module disconnects the currently connected external equipment and establishes the connection of new external equipment.
5. The method of claim 4, wherein the controlling the bluetooth module to disconnect the currently connected external device and establish a connection with a new external device further comprises:
and monitoring the connection of the external equipment which is disconnected from the current connection of the Bluetooth module and the new external equipment.
6. A Bluetooth preemption device for a Bluetooth device, wherein the Bluetooth device comprises a Bluetooth module, and the Bluetooth module is used for establishing Bluetooth connection with an external device, and the device is characterized by comprising:
the monitoring unit is used for monitoring the Bluetooth equipment;
the preemption unit is used for controlling the Bluetooth module to disconnect the currently connected external audio equipment and establish the connection of new external equipment if the Bluetooth module has the currently connected external audio equipment when monitoring the message touched by the active NFC; when a message sent by the Bluetooth module is monitored, judging whether the equipment type of the new external equipment can be acquired from the monitored message or not in an ACL connection stage, and if the equipment type of the new external equipment is acquired and the Bluetooth module currently has the connected external equipment, controlling the Bluetooth module to disconnect the currently connected external equipment and establishing the connection of the new external equipment; in the middle pairing stage, acquiring the device type of the new external device, and if the Bluetooth module currently has the connected external device, controlling the Bluetooth module to disconnect the currently connected external device and establish the connection of the new external device;
control bluetooth module disconnection external device of current connection to establish the connection of new external device, include:
judging whether the equipment type of the new external equipment is a preset type or not;
when the device type of the new external device is a preset type and the Bluetooth module has the currently connected external device, controlling the Bluetooth module to disconnect the currently connected external device and establish the connection of the new external device;
and when the device type of the new external device is not the preset type, continuing to monitor.
7. The Bluetooth device comprises a Bluetooth module and is characterized by further comprising a preemption module in communication connection with the Bluetooth module, wherein the Bluetooth module is used for establishing Bluetooth connection with an external device and executing corresponding operation according to the control of the preemption module;
the preemption module is configured to perform a bluetooth preemption method for a bluetooth device of any of claims 1-5.
8. A computer readable storage medium comprising computer instructions which, when executed by a processor, implement a bluetooth preemption method for a bluetooth device as claimed in any one of claims 1-5.
CN202010551365.9A 2020-06-17 2020-06-17 Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium Active CN111447602B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010551365.9A CN111447602B (en) 2020-06-17 2020-06-17 Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
PCT/CN2021/098059 WO2021254160A1 (en) 2020-06-17 2021-06-03 Bluetooth device and bluetooth preemption method and apparatus therefor, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010551365.9A CN111447602B (en) 2020-06-17 2020-06-17 Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111447602A CN111447602A (en) 2020-07-24
CN111447602B true CN111447602B (en) 2020-09-29

Family

ID=71653623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010551365.9A Active CN111447602B (en) 2020-06-17 2020-06-17 Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111447602B (en)
WO (1) WO2021254160A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447602B (en) * 2020-06-17 2020-09-29 成都极米科技股份有限公司 Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
CN114173309A (en) * 2020-09-10 2022-03-11 华为技术有限公司 Audio control system
CN112911563B (en) * 2021-01-27 2023-02-03 广州橙行智动汽车科技有限公司 Bluetooth connection method and system based on multiple terminals
CN115412848A (en) * 2021-05-27 2022-11-29 Oppo广东移动通信有限公司 Audio sharing method, device, terminal, audio equipment and storage medium
CN115442643A (en) * 2021-06-03 2022-12-06 Oppo广东移动通信有限公司 Screen projection method and device, wireless terminal, screen projection equipment and storage medium
CN114173315B (en) * 2022-02-14 2022-06-14 荣耀终端有限公司 Bluetooth reconnection method and terminal equipment
CN116828588B (en) * 2023-08-25 2023-11-21 荣耀终端有限公司 Communication method, readable medium, and electronic device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801863A (en) * 2012-08-13 2012-11-28 孙涛 Mobile intelligent terminal and starting method for vehicle management module thereof
CN202907146U (en) * 2012-11-09 2013-04-24 深圳市盛天龙视听科技有限公司 A Bluetooth loudspeaker box based on NFC technology
CN104093216A (en) * 2014-06-16 2014-10-08 小米科技有限责任公司 Method and device for wireless data transmission
CN104285454A (en) * 2014-06-17 2015-01-14 华为技术有限公司 Switching method of wireless connection, wireless terminal and system thereof
CN204117179U (en) * 2014-09-26 2015-01-21 深圳市金瑞铭科技有限公司 Band is stable triggers output function NFC label and electronic equipment
CN104683003A (en) * 2015-03-05 2015-06-03 丰唐物联技术(深圳)有限公司 Bluetooth connection switching method and system
CN104683940A (en) * 2015-03-05 2015-06-03 丰唐物联技术(深圳)有限公司 Bluetooth connection switching method and system
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN107567009A (en) * 2017-09-28 2018-01-09 北京地平线机器人技术研发有限公司 Bluetooth equipment shares request and control method and electronic equipment
CN110191442A (en) * 2019-04-18 2019-08-30 华为技术有限公司 A kind of Bluetooth connecting method, equipment and system
CN111107524A (en) * 2018-10-25 2020-05-05 上海博泰悦臻电子设备制造有限公司 Bluetooth connection method, system and vehicle-mounted terminal
CN111246441A (en) * 2020-02-26 2020-06-05 深圳市岍丞技术有限公司 Method, system and storage medium for connecting Bluetooth headset and terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2406015A (en) * 2003-09-15 2005-03-16 Small Planet Technology Ltd Telephone with bluetooth interface
CN106454697A (en) * 2016-08-19 2017-02-22 深圳市元征科技股份有限公司 Bluetooth switching method and device
CN106850091A (en) * 2017-02-03 2017-06-13 珠海市杰理科技股份有限公司 Bluetooth equipment method of testing and system
US10321406B2 (en) * 2017-02-21 2019-06-11 International Business Machines Corporation Contextually switching from a wireless communication to human body near-field communication for power savings
CN109246851A (en) * 2018-10-30 2019-01-18 歌尔科技有限公司 A kind of processing method of bluetooth connection, equipment and storage medium
CN111447602B (en) * 2020-06-17 2020-09-29 成都极米科技股份有限公司 Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801863A (en) * 2012-08-13 2012-11-28 孙涛 Mobile intelligent terminal and starting method for vehicle management module thereof
CN202907146U (en) * 2012-11-09 2013-04-24 深圳市盛天龙视听科技有限公司 A Bluetooth loudspeaker box based on NFC technology
CN104093216A (en) * 2014-06-16 2014-10-08 小米科技有限责任公司 Method and device for wireless data transmission
CN104285454A (en) * 2014-06-17 2015-01-14 华为技术有限公司 Switching method of wireless connection, wireless terminal and system thereof
CN204117179U (en) * 2014-09-26 2015-01-21 深圳市金瑞铭科技有限公司 Band is stable triggers output function NFC label and electronic equipment
CN104683003A (en) * 2015-03-05 2015-06-03 丰唐物联技术(深圳)有限公司 Bluetooth connection switching method and system
CN104683940A (en) * 2015-03-05 2015-06-03 丰唐物联技术(深圳)有限公司 Bluetooth connection switching method and system
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN107567009A (en) * 2017-09-28 2018-01-09 北京地平线机器人技术研发有限公司 Bluetooth equipment shares request and control method and electronic equipment
CN111107524A (en) * 2018-10-25 2020-05-05 上海博泰悦臻电子设备制造有限公司 Bluetooth connection method, system and vehicle-mounted terminal
CN110191442A (en) * 2019-04-18 2019-08-30 华为技术有限公司 A kind of Bluetooth connecting method, equipment and system
CN111246441A (en) * 2020-02-26 2020-06-05 深圳市岍丞技术有限公司 Method, system and storage medium for connecting Bluetooth headset and terminal

Also Published As

Publication number Publication date
WO2021254160A1 (en) 2021-12-23
CN111447602A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN111447602B (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
US11350200B2 (en) Wireless audio source switching
CN107852762B (en) Method for managing Bluetooth connection, Bluetooth master device and device
WO2019090726A1 (en) Method for selecting bluetooth device, terminal, and system
US8116686B2 (en) Instant message audio connection management system and method
CN108886804A (en) BWP switching method, device and storage medium
US9301087B1 (en) Method and apparatus for connecting a bluetooth device
US9924297B2 (en) Timed and variable duration for multiple device synching
WO2019137337A1 (en) Cell selection method, terminal, and network device
KR20170105545A (en) In-vehicle wireless communication
EP2536247B1 (en) Wireless communication apparatus that operates as master station or remote station in wireless network and computer readable medium
CN109548184B (en) Method and device for connecting mobile terminal and Bluetooth device and mobile terminal
KR20110125530A (en) Method for auto provision of electronic device system based on wifi and system supporting the same
EP3068150B1 (en) Method and device for controlling device
US9258672B2 (en) Short-range wireless communication device
CN115190197B (en) Bluetooth headset-based communication method and device and storage medium
EP3131276B1 (en) Incoming call forwarding method and user equipment
CN111741456A (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
CN115776662A (en) Bluetooth connection method, device, earphone device and computer readable storage medium
WO2017223165A1 (en) Wireless audio source switching
WO2023151423A1 (en) Device connection method and apparatus, device, and storage medium
CN113810887B (en) Bluetooth protocol connection method and device, storage medium and related equipment
KR101632627B1 (en) Communication terminal for automatic setting of local area network
CN111491278B (en) Method and terminal for playing audio through Bluetooth device
CN113905085B (en) Control method and device and electronic equipment

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