CN115776661A - Bluetooth-based control method and device, electronic equipment and storage medium - Google Patents

Bluetooth-based control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115776661A
CN115776661A CN202111050876.3A CN202111050876A CN115776661A CN 115776661 A CN115776661 A CN 115776661A CN 202111050876 A CN202111050876 A CN 202111050876A CN 115776661 A CN115776661 A CN 115776661A
Authority
CN
China
Prior art keywords
electronic device
electronic
bluetooth
connection
electronic equipment
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.)
Pending
Application number
CN202111050876.3A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111050876.3A priority Critical patent/CN115776661A/en
Publication of CN115776661A publication Critical patent/CN115776661A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a control method and device based on Bluetooth, electronic equipment and a storage medium. The method is applied to the first electronic equipment, and the method can comprise the following steps: under the condition that the first electronic equipment establishes Bluetooth connection with at least one second electronic equipment, receiving a first pairing instruction sent by the second electronic equipment; and entering a pairing state according to the first pairing instruction so that other electronic equipment can scan the first electronic equipment, wherein the other electronic equipment comprises electronic equipment which does not store connection information corresponding to the first electronic equipment. The control method and device based on the Bluetooth, the electronic device and the storage medium disclosed by the embodiment of the application can simplify the mode of enabling the electronic device to enter the pairing state, and make the mode of enabling the electronic device to enter the pairing state richer.

Description

Bluetooth-based control method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a control method and apparatus based on bluetooth, an electronic device, and a storage medium.
Background
Bluetooth is a radio technology supporting short-range communication of devices, and enables wireless information exchange between a plurality of electronic devices supporting bluetooth transmission, so that data transmission between the electronic devices is more rapid and efficient. In order to improve the security of bluetooth communication, if two electronic devices that establish bluetooth connection have not been connected before, pairing is required during the bluetooth connection. At present, the mode of enabling the electronic equipment to enter the pairing state is relatively complicated and single.
Disclosure of Invention
The embodiment of the application discloses a control method and device based on Bluetooth, electronic equipment and a storage medium, which can simplify the mode of enabling the electronic equipment to enter a pairing state and make the mode of enabling the electronic equipment to enter the pairing state richer.
The embodiment of the application discloses a control method based on Bluetooth, which is applied to first electronic equipment and comprises the following steps:
under the condition that the first electronic equipment establishes Bluetooth connection with at least one second electronic equipment, receiving a first pairing instruction sent by the second electronic equipment;
and entering a pairing state according to the first pairing instruction so that other electronic equipment can scan the first electronic equipment, wherein the other electronic equipment comprises electronic equipment which does not store connection information corresponding to the first electronic equipment.
The embodiment of the application discloses a control method based on Bluetooth, which is applied to second electronic equipment, and comprises the following steps:
under the condition that Bluetooth connection is established between the second electronic device and a first electronic device, sending a first pairing instruction to the first electronic device, wherein the first pairing instruction is used for indicating the first electronic device to enter a pairing state so that other electronic devices can scan the first electronic device; wherein the other electronic devices include an electronic device that does not store connection information corresponding to the first electronic device.
The embodiment of the application discloses controlling means based on bluetooth is applied to first electronic equipment, the device includes:
the instruction receiving module is used for receiving a first pairing instruction sent by at least one second electronic device under the condition that the first electronic device establishes Bluetooth connection with the second electronic device;
and the pairing module is used for entering a pairing state according to the first pairing instruction so as to enable other electronic equipment to scan the first electronic equipment, wherein the other electronic equipment comprises electronic equipment which does not store the connection information corresponding to the first electronic equipment.
The embodiment of the application discloses controlling means based on bluetooth is applied to second electronic equipment, the device includes:
the instruction sending module is used for sending a first pairing instruction to the first electronic equipment under the condition that Bluetooth connection is established between the second electronic equipment and the first electronic equipment, wherein the first pairing instruction is used for triggering the first electronic equipment to enter a pairing state so that other electronic equipment can scan the first electronic equipment; wherein the other electronic devices include an electronic device that does not store connection information corresponding to the first electronic device.
An embodiment of the present application discloses an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is enabled to implement the method applied to the first electronic device as described above.
An embodiment of the present application discloses an electronic device, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is enabled to implement the method applied to the second electronic device.
An embodiment of the application discloses a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method applied to a first electronic device as described above.
An embodiment of the application discloses a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method applied to a second electronic device as described above.
According to the control method, the control device, the electronic equipment and the storage medium based on the Bluetooth, under the condition that the first electronic equipment is connected with at least one second electronic equipment in the Bluetooth mode, the second electronic equipment sends a first pairing instruction to the first electronic equipment, the first electronic equipment enters a pairing state according to the first pairing instruction, so that other electronic equipment can scan the first electronic equipment, the other electronic equipment comprises electronic equipment which does not store connection information corresponding to the first electronic equipment, the first electronic equipment is enabled to enter the pairing state by sending the first pairing instruction to the first electronic equipment through the second electronic equipment connected with the first electronic equipment, normal Bluetooth communication between the second electronic equipment and the first electronic equipment cannot be influenced, the mode for enabling the electronic equipment to enter the pairing state can be simplified, and the mode for enabling the electronic equipment to enter the pairing state is richer.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a diagram of an exemplary embodiment of a Bluetooth-based control method;
FIG. 2 is a flow diagram of a Bluetooth-based control method in one embodiment;
FIG. 3 is a sequence diagram illustrating interaction of electronic devices entering a pairing state in one embodiment;
FIG. 4 is a flow chart of a Bluetooth-based control method in another embodiment;
FIG. 5 is a schematic diagram of an interface of a second electronic device in one embodiment;
FIG. 6A is a timing diagram illustrating interaction during a connection preemption scenario by an electronic device in an embodiment;
FIG. 6B is a timing diagram illustrating interaction performed during a connection robbing scenario of the headset device in an embodiment;
FIG. 7A is a timing diagram illustrating interaction between a headset device and two electronic devices in one embodiment;
FIG. 7B is a timing diagram illustrating interaction between the earphone device and two electronic devices in another embodiment;
FIG. 8 is a flow chart of a Bluetooth-based control method in yet another embodiment;
FIG. 9 is a block diagram of a Bluetooth-based control device in one embodiment;
FIG. 10 is a block diagram of a Bluetooth-based control device in another embodiment;
FIG. 11 is a block diagram of an electronic device in one embodiment.
Detailed Description
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 some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the examples and figures of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first earphone may be referred to as a second earphone, and similarly, a second earphone may be referred to as a first earphone, without departing from the scope of the present application. The first and second headsets belong to both headsets, but are not the same headset. In addition, the terms "plurality" or the like used in the embodiments of the present application mean two or more.
In the relevant technique, let the mode that electronic equipment got into to pair the state have comparatively loaded down with trivial details and single problem, use electronic equipment for supporting the wireless headset that the bluetooth passes through as an example, when the user need let wireless headset get into to pair the state, need put into the box that charges with wireless headset, let wireless headset get into to pair the state through pressing the pairing button on the box that charges, operation process is loaded down with trivial details, and can exert an influence to user's normal use wireless headset, bring inconvenience for the user.
The embodiment of the application provides a control method and device based on Bluetooth, an electronic device and a storage medium, which can simplify a mode of enabling the electronic device to enter a pairing state, and enable the mode of enabling the electronic device to enter the pairing state to be richer.
Fig. 1 is a diagram of an application scenario of the bluetooth-based control method in one embodiment. As shown in fig. 1, a first electronic device 10 may establish a bluetooth connection with at least one second electronic device 20, and may communicate based on the bluetooth connection.
The first electronic device 10 may include, but is not limited to, a headset device, a mobile phone, a wearable device (such as a bracelet, a smart watch, smart glasses, etc.), an in-vehicle terminal, a tablet computer, etc., wherein the headset device may include, but is not limited to, a headset supporting bluetooth communication, an in-ear headset, an ear-bud headset, an in-ear headset, and an in-ear headset, etc., for example, the headset device may be a True Wireless Stereo (TWS) bluetooth headset, etc. The second electronic device 20 may include, but is not limited to, a wearable device, a vehicle-mounted terminal, a cell phone, a tablet computer, a notebook computer, etc.
Various bluetooth connections may be used between the first electronic device 10 and the second electronic device 20. Taking the first electronic device 10 as a TWS headset as an example, the first electronic device may include a first headset and a second headset, and optionally, the first headset and the second headset may distinguish between a master headset and a slave headset. As a connection method, a master earphone of the first earphone and the second earphone can establish a bluetooth connection with the second electronic device 20, a slave earphone can establish a bluetooth connection with the master earphone, and the slave earphone can acquire connection information and the like of the master earphone and the second electronic device 20 through the bluetooth connection with the master earphone, so that communication between the master earphone and the second electronic device 20 can be monitored in a monitoring manner, and synchronization of the master earphone and the slave earphone is realized. As an implementation manner, the master earphone may also establish a bluetooth connection with the second electronic device 20, and the master earphone establishes a bluetooth connection with the slave earphone, and the master earphone forwards the data sent by the second electronic device 20 to the slave earphone after receiving the data, and realizes synchronization of the master earphone and the slave earphone. It is understood that other bluetooth connection manners may be adopted between the first electronic device 10 and the second electronic device 20, and the specific bluetooth connection manner is not limited in the embodiment of the present application.
In the embodiment of the present application, in the case that the first electronic device 10 establishes a bluetooth connection with at least one second electronic device 20, the second electronic device 20 may send a first pairing instruction to the first electronic device 10. The first electronic device 10 receives the first pairing instruction and enters a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device 10, and the other electronic devices may include electronic devices that do not store connection information corresponding to the first electronic device 10.
The second electronic device 20 connected with the first electronic device 10 sends the first pairing instruction to the first electronic device 10 to enable the first electronic device 10 to enter the pairing state, so that normal data transmission between the second electronic device 20 and the first electronic device 10 is not affected, and a mode for enabling the first electronic device 10 to enter the pairing state can be simplified. Taking the first electronic device 10 as a wireless headset as an example, the wireless headset can enter a pairing state without being placed in a charging box, so that the user operation is simplified and the user can continue to use the wireless headset; take first electronic equipment 10 as wearable equipment for example, the display screen of wearable equipment is less usually, and the user need not click on little display screen and get into the bluetooth and set up the page, clicks again in the bluetooth sets up the page and clicks to pair the open button and let wearable equipment get into to pair the state, improves the simplicity and convenience of operation. Meanwhile, the mode of enabling the electronic equipment to enter the pairing state is enriched, and the requirements of the user in different scenes are met.
As shown in fig. 2, in an embodiment, a bluetooth-based control method is provided, which can be applied to the first electronic device described above, and the method can include the following steps:
step 210, receiving a first pairing instruction sent by a second electronic device under the condition that the first electronic device establishes bluetooth connection with at least one second electronic device.
The first electronic device may be an electronic device supporting bluetooth "one drag one", or may be an electronic device capable of supporting bluetooth "one drag more", such as "one drag two", "one drag three", "one drag four", etc. supporting bluetooth. The bluetooth support "one-for-many" means that the maximum number N of bluetooth connections that the first electronic device supports to establish may be an integer greater than or equal to 2, that is, the first electronic device is capable of maintaining bluetooth connections with at least two devices at the same time. Taking the bluetooth "one drags two" as an example, the first electronic device can keep bluetooth connection with two devices at the same time.
Under the condition that the first electronic device establishes Bluetooth connection with at least one second electronic device, the second electronic device can send a first pairing instruction to the first electronic device, wherein the first pairing instruction is used for indicating the first electronic device to enter a pairing state. Optionally, any second electronic device may send the first pairing instruction to the first electronic device, or a designated electronic device in the second electronic devices may send the first pairing instruction to the first electronic device. For example, when a user needs to enable a first electronic device to enter a pairing state, any one of the second electronic devices may be operated, so that the operated second electronic device sends a first pairing instruction to the first electronic device, so that the first electronic device enters the pairing state. For another example, the user may select a designated electronic device from among the second electronic devices connected to the first electronic device, and set pairing setting information (for example, a fixed time point for setting the first electronic device to enter the pairing state, or a scene for setting the first electronic device to enter the pairing state) in the designated electronic device, and the designated electronic device may send the first pairing instruction to the first electronic device according to the pairing setting information.
It should be noted that, in the case that the first electronic device establishes bluetooth connection with multiple second electronic devices, the user may send the pairing instruction through a specific second electronic device, may also send the pairing instruction through any second electronic device, and may also send the pairing instruction through multiple second electronic devices, which is not limited herein.
Step 220, entering a pairing state according to the first pairing instruction, so that the other electronic devices can scan the first electronic device.
The first electronic device may enter a pairing state according to a first pairing instruction sent by the second electronic device, so that the other electronic devices can scan the first electronic device, where the other electronic devices may include electronic devices that do not store connection information corresponding to the first electronic device. The connection information may include device information, pairing information, and the like, the device information may include, but is not limited to, a Media Access Control (MAC) address, a device name, and the like of the first electronic device, and the pairing information may include, but is not limited to, a pairing key, a pairing code, and the like. It is understood that when other electronic devices have the connection information, even if the discoverable state (inquiry scan mode) of the first electronic device is not activated, the other electronic devices can directly send a bluetooth connection request to the first electronic device according to the connection information to establish a bluetooth connection, and the specific connection mode can refer to a relevant bluetooth protocol, such as a bluetooth standard protocol, and can be adjusted according to the change of the protocol. The bluetooth connection request may include a paging page.
The pairing state may refer to that the first electronic device opens an inquiry scan mode and opens a page scan mode, and in the inquiry scan mode, the first electronic device is allowed to be scanned and searched by other electronic devices (i.e., can be found); in the page scan mode, the first electronic device is allowed to be connected by other electronic devices, and the first electronic device can receive Bluetooth connection requests sent by other electronic devices. That is, in the pairing state, the first electronic device is in the discoverable state and the connectable state at the same time, and the other electronic devices can start the bluetooth scanning function to scan the surrounding bluetooth devices, and then can scan the first electronic device and send a bluetooth request to the first electronic device. The first electronic device can respond to the bluetooth request sent by the other electronic device and establish bluetooth connection with the other electronic device, and since the other electronic device does not store connection information corresponding to the first electronic device (e.g. has not been connected with the first electronic device before, or has been connected but the connection information is deleted, etc.), pairing (pairing) can be performed during the process of establishing bluetooth connection between the first electronic device and the other electronic device. Optionally, the pairing may include a process of exchanging pairing codes with each other, agreeing on a key between the two, and the like, so as to secure the transmission.
In some embodiments, the method may further include: when the first electronic equipment is in a pairing state, receiving a scanning request sent by third electronic equipment; sending a scanning response to the third electronic equipment according to the scanning request; and receiving a first connection request sent by the third electronic equipment, and establishing Bluetooth connection with the third electronic equipment according to the first connection request.
Taking the third electronic device as an example, the third electronic device may be a device that is not connected to the first electronic device. When the first electronic device is in the pairing state, the third electronic device may start the scanning mode, scan the surrounding bluetooth devices, and send a scanning request (inquiry request) to the first electronic device. The first electronic device receives the scan request sent by the third electronic device, and may send a scan response (inquiry response) to the third electronic device according to the scan request.
After the third electronic device receives the scanning response, the device information of the first electronic device can be acquired, and a first connection request is sent to the first electronic device according to the device information. The first connection request may be understood as a bluetooth connection request.
Optionally, after obtaining the device information of the first electronic device, the third electronic device may display the device information, and the user may perform a selection operation on the device information to trigger the third electronic device to perform bluetooth connection with the first electronic device. After the third electronic device receives the selection operation, a first connection request may be sent to the first electronic device according to the device information of the first electronic device to request to establish a bluetooth connection with the first electronic device. After receiving the first connection request, the first electronic device may respond to the first connection request and establish a bluetooth connection with the third electronic device. Since the third electronic device is not connected with the first electronic device and is not paired with the first electronic device, the third electronic device can be paired in the process of establishing the Bluetooth connection.
Illustratively, fig. 3 is an interaction timing diagram of an electronic device entering a pairing state in one embodiment. As shown in fig. 3, a bluetooth connection is established between the electronic device a and the electronic device B, the electronic device B may send a first pairing instruction to the electronic device a, and the electronic device a enters a pairing state (simultaneously in an inquiry scan mode and a page scan mode) according to the first pairing instruction. The electronic device a may be a bluetooth "one-for-two" enabled device, and the electronic device C may be a device that does not store connection information corresponding to the electronic device a. When the electronic device a is in the pairing state, the electronic device C may transmit a scan request to the electronic device a, and the electronic device a may transmit a scan response to the electronic device C after receiving the scan request. The electronic device C can send a Bluetooth connection request to the electronic device A, the electronic device A can process the Bluetooth connection request, is in Bluetooth connection with the electronic device C, and is paired with the electronic device C in the process of Bluetooth connection.
In some embodiments, the other electronic devices may also include an electronic device storing connection information corresponding to the first electronic device, that is, may be an electronic device successfully paired with the first electronic device. When the first electronic device is in the page scan mode (i.e., the connected state), or is in both the inquiry scan mode and the page scan mode (i.e., the paired state), a bluetooth connection request sent by another electronic device can be received. The paired other electronic devices can send a Bluetooth connection request to the first electronic device according to the connection information to request to establish Bluetooth connection with the first electronic device, and pairing is not needed because pairing information such as a pairing key is stored in the previous pairing.
As a specific embodiment, the bluetooth connection request may be a paging (page) packet, and the other electronic device may transmit the paging packet in a frequency hopping manner to page the first electronic device. In the page scan mode, the first electronic device may scan (scan) paging packets sent from the outside at regular intervals, and if the first electronic device scans paging packets sent from other electronic devices, it may be considered that a bluetooth connection request is received. The specific process of the bluetooth connection can refer to the specification of the bluetooth standard protocol.
In some embodiments, establishing a bluetooth connection referred to above may include establishing a bluetooth physical link, such as an ACL (Asynchronous connection) physical link, and the like.
In some embodiments, the second electronic device connected to the first electronic device may also control the first electronic device to close the pairing state, the second electronic device may send a close instruction to the first electronic device, and the first electronic device may close the pairing state (i.e., close the inquiry scan mode) according to the close instruction, at this time, the first electronic device may also be in a page scan mode (i.e., connectable state), and may receive a bluetooth connection request sent by another electronic device.
Optionally, the second electronic device that sends the close instruction to the first electronic device and the second electronic device that sends the first pairing instruction to the first electronic device may be the same device or different devices, which is not limited in this embodiment of the present application. The second electronic equipment can flexibly open/close the pairing state of the first electronic equipment, and convenience and flexibility are improved.
It is to be understood that the first electronic device may also turn off the pairing state by itself, for example, turn off the pairing state by itself after entering the pairing state for a certain period of time (e.g., 2 minutes, 3 minutes, etc.), or turn off the pairing state after establishing a bluetooth connection with another electronic device, etc.
In the embodiment of the application, under the condition that the first electronic device and at least one second electronic device establish bluetooth connection, the second electronic device sends a first pairing instruction to the first electronic device, the first electronic device enters a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device, the first electronic device enters the pairing state by sending the first pairing instruction to the first electronic device through the second electronic device connected with the first electronic device, normal bluetooth communication between the second electronic device and the first electronic device cannot be influenced, the mode for enabling the electronic devices to enter the pairing state can be simplified, and the mode for enabling the electronic devices to enter the pairing state is richer.
In some embodiments, under the condition that the first electronic device does not establish bluetooth connection with any second electronic device, if the first electronic device is electrically connected with an accessory device, a second pairing instruction sent by the accessory device is received, and a pairing state is entered according to the second pairing instruction, where the second pairing instruction is generated by the accessory device according to the detected pairing trigger operation.
Under the condition that the first electronic device does not establish Bluetooth connection with any second electronic device, the user can enable the first electronic device to enter a pairing state in other modes. The first electronic device may correspond to an accessory device, and the accessory device may be used (or sold) with the first electronic device, for example, the first electronic device is a wireless headset, and the accessory device may be a charging box of the wireless headset; the first electronic device is a smart watch, and the accessory device may be a watchband or a processing module disposed on the watchband, but is not limited thereto.
The first electronic device can perform signal transmission with the accessory device when the first electronic device is electrically connected with the accessory device. The user can perform a pairing trigger operation on the accessory device, which can be a pre-set operation. For example, the first electronic device is a wireless headset, the accessory device is a charging box of the wireless headset, and the pairing trigger operation may be that the user presses a pairing button on the charging box for more than 3 seconds; the first electronic device is a smart watch, the accessory device is a processing module arranged on the watchband, a touch sensor can be arranged on the processing module, and the pairing triggering operation can be that a user touches the surface of the processing module for more than 2 seconds. The pairing triggering operation can be set according to actual product requirements and user requirements, and the specific operation mode of the pairing triggering operation is not limited in the embodiment of the application.
If the accessory device detects the pairing triggering operation, a second pairing instruction can be sent to the first electronic device, and the first electronic device can enter a pairing state according to the second pairing instruction.
It should be noted that, in the case that the first electronic device does not establish bluetooth connection with any second electronic device, the first electronic device may also enter the pairing state in other manners. For example, one or more different sensors, such as a distance sensor, a touch sensor, a pressure sensor, a temperature sensor, etc., may be provided in the first electronic device, and a pairing trigger operation (e.g., a pressing operation, a touch operation, a distance sensing operation, etc.) performed by a user may be detected by the one or more sensors, and a pairing state may be entered when the pairing trigger operation is detected.
In the embodiment of the application, various different modes for enabling the electronic equipment to enter the pairing state can be provided, the modes for enabling the electronic equipment to enter the pairing state are richer, the requirements of users under different conditions can be met, and product viscosity of the users is improved.
In another embodiment, as shown in fig. 4, a bluetooth-based control method is provided, which can be applied to the first electronic device, and the method can include the following steps:
step 402, receiving a first pairing instruction sent by a second electronic device under the condition that the first electronic device establishes bluetooth connection with at least one second electronic device.
And step 404, entering a pairing state according to the first pairing instruction so that the other electronic equipment can scan the first electronic equipment.
The description of steps 402 to 404 may refer to the related description in the above embodiments, and will not be repeated herein.
In some embodiments, the second electronic device sends the pairing instruction to the first electronic device, which may include any one of the following ways:
in the first mode, the second electronic device starts operation according to the state of the first electronic device and sends a first pairing instruction to the first electronic device. Under the condition that the bluetooth connection is established between the second electronic device and the first electronic device, the user may execute a state opening operation on the second electronic device for the first electronic device, and cause the first electronic device to enter a pairing state, wherein an operation manner of the state opening operation may include, but is not limited to, a touch operation, a voice control operation, a gesture operation, a line-of-sight control operation, and the like.
As an implementation manner, the second electronic device may display a management interface of the bluetooth device, where the management interface may include device information and a pairing control of the first electronic device, and the user may perform a state opening operation by touching the pairing control to enable the first electronic device to enter a pairing state. If the second electronic device detects a touch operation for the pairing control, that is, detects a state opening operation for the first electronic device, a first pairing instruction may be sent to the first electronic device, and the first electronic device may enter a pairing state according to the first pairing instruction.
Illustratively, fig. 5 is an interface schematic diagram of a second electronic device in an embodiment. As shown in fig. 5, the second electronic device 20 may display a device name (bluetooth headset) of the first electronic device 10, and a pairing control 202, and a user may click the pairing control 202, and the second electronic device 20 may send a first pairing instruction to the first electronic device 10 to enable the first electronic device 10 to enter a pairing state.
And the second electronic equipment sends a first pairing instruction to the first electronic equipment according to the set time information. The time information may be set by a user according to actual requirements, or may be set uniformly before the first electronic device leaves a factory, and optionally, when the second electronic device establishes bluetooth connection with the first electronic device for the first time, the first electronic device may send the set time information to the second electronic device for storage.
In some embodiments, the time information may be a fixed time point, such as 12 pm of each day to bring the first electronic device into the paired state, 8 am of monday of each week to bring the first electronic device into the paired state, and so on. The time information may also be a time period, and after the second electronic device is connected to the first electronic device, the first pairing instruction may be sent to the first electronic device according to the time period, for example, the time information may be sent once every 1 hour, or once every 2 hours, and the like, but is not limited thereto.
And in the third mode, the second electronic equipment sends a first pairing instruction to the first electronic equipment when detecting that the first electronic equipment is in the set target scene. The target scene may be set by a user according to actual requirements, or may be a scene set in a unified manner before the first electronic device leaves a factory, optionally, when the second electronic device establishes a bluetooth connection with the first electronic device for the first time, the first electronic device may send scene information of the set target scene to the second electronic device for storage, where the scene information may be used to describe the target scene.
In some embodiments, the target scenario may include a connection scenario of the first electronic device, for example, the target scenario may be that the number of devices currently connected by the first electronic device does not reach the maximum number N; the duration in which the first electronic device does not receive the service data may also reach the target duration (that is, in the target duration, no second electronic device connected to the first electronic device sends the service data to the first electronic device), and the service data may include audio data, call voice data, files, and the like, but is not limited thereto.
When the second electronic device detects that the first electronic device is in the set target scene, it can be considered that the first electronic device is most likely to need to establish bluetooth connection with other electronic devices, and then the first pairing instruction can be sent to the first electronic device. Taking the example that the second electronic device supports bluetooth 'one-drive-many' and the target scene is that the number of devices currently connected to the first electronic device does not reach the maximum number N, the second electronic device may obtain the number of devices currently connected to the first electronic device in real time or according to a time interval (e.g., 2 minutes or 3 minutes), and determine whether the number of devices reaches the maximum number N for the first device to support bluetooth connection establishment, so as to determine whether the first electronic device is in the target scene.
It should be noted that other manners may also be used to trigger the second electronic device to send the first pairing instruction to the first electronic device, which is not limited to the foregoing manners, for example, the second electronic device may also send the first pairing instruction to the first electronic device when the remaining power is lower than the power threshold, and when the remaining power of the second electronic device is lower than the power threshold, the second electronic device may be in a power-down state at any time to disconnect bluetooth connection with the first electronic device, so that the second electronic device may enter the pairing state to establish bluetooth connection with another electronic device, and a situation that the second electronic device suddenly fails to be powered down and a user cannot use the first electronic device can be avoided.
Step 406, receiving a first connection request sent by a third electronic device under the condition that the first electronic device establishes bluetooth connection with N second electronic devices.
It can be understood that, the first electronic device establishes bluetooth connections with the N second electronic devices, which may mean that the first electronic device maintains bluetooth connections with the N second electronic devices. When the first electronic device is in a pairing state, if the first electronic device has already established bluetooth connections with N second electronic devices, the bluetooth connections that the first electronic device can support reach the maximum number, and if a first connection request sent by a third electronic device is received, the bluetooth connection with one of the second electronic devices needs to be disconnected, and the first electronic device can successfully establish bluetooth connection with the third electronic device, which is equivalent to that the third electronic device preempts the bluetooth connection between the one of the second electronic devices and the first electronic device. That is, under the condition that the first electronic device and the N second electronic devices respectively establish bluetooth connections, if the first electronic device receives a bluetooth connection request sent by the third electronic device, the first electronic device is in a connection robbing scenario.
And step 408, performing disconnection processing corresponding to the target electronic device in the N second electronic devices, and establishing bluetooth connection with the third electronic device according to the first connection request.
Under the condition that the first electronic device and the N second electronic devices are respectively connected in the bluetooth mode, if the first electronic device enters the pairing state, in the related technology, the first electronic device can be directly disconnected from at least part of the second electronic devices, and even if no third electronic device requests to be connected with the first electronic device, the first electronic device and the at least part of the second electronic devices are in the disconnection state, and the user needs to manually restore the bluetooth connection again.
In this embodiment of the application, when the first electronic device enters the pairing state according to the first pairing instruction, the bluetooth connection with the N second electronic devices may be maintained. When the first electronic device is in the connection preemption scene (i.e., receives the first connection request sent by the third electronic device), the first electronic device can perform disconnection processing corresponding to the target electronic device in the N second electronic devices, and establish bluetooth connection with the third electronic device according to the first connection request. Wherein the disconnection process is operable to disconnect the bluetooth connection between the first electronic device and the target electronic device. The first electronic equipment does not need to disconnect the Bluetooth connection between the first electronic equipment and at least part of the second electronic equipment after entering the pairing state, so that the condition that the Bluetooth connection needs to be manually recovered by a user due to the fact that no third electronic equipment requests to be connected with the first electronic equipment can be avoided, and the requirement of the user is better met.
In some embodiments, the first electronic device may determine the target electronic device of the N second electronic devices prior to performing the disconnection process corresponding to the target electronic device of the N second electronic devices. In some embodiments, if N is 1, that is, the first electronic device establishes a bluetooth connection with only one second electronic device, the second electronic device is the target electronic device. If N is an integer greater than or equal to 2, that is, the first electronic device establishes bluetooth connection with the plurality of second electronic devices, the first electronic device may select one of the plurality of second electronic devices as a target electronic device.
Optionally, the target electronic device may be any one of N second electronic devices, and the first electronic device may randomly select the target electronic device from the N second electronic devices. As another embodiment, the first electronic device may also select the target electronic device from the N second electronic devices according to a preset selection rule, for example, the second electronic device with the lowest priority may be selected as the target electronic device according to the priority of each second electronic device, or the second electronic device with the lowest activity (i.e., the least amount of data to be transmitted) may be selected as the target electronic device, or the second electronic device that establishes the bluetooth connection earliest may be selected as the target electronic device, but is not limited thereto.
In one embodiment, the first electronic device may select, as the target electronic device, a second electronic device having a priority satisfying the priority condition from among the N second electronic devices according to the priority of each second electronic device.
The first electronic device may obtain a priority corresponding to each second electronic device that establishes the bluetooth connection, and optionally, the priority of each second electronic device may be determined according to the device state parameter of each second electronic device. The device status parameters may include, but are not limited to, one or more of a traffic data output parameter, a sequence parameter for characterizing a sequence of establishing a bluetooth connection with the first electronic device, a device type parameter, a device remaining power parameter, and a historical connection frequency.
The service data output parameter can be used for representing whether the second electronic device outputs service data to the first electronic device through the Bluetooth connection currently. The priority of the second electronic device currently outputting the service data to the first electronic device may be higher than the priority of the second electronic device not currently outputting the service data to the first electronic device.
The sequence parameter may be used to characterize a sequence in which bluetooth connections are established with the first electronic device. As an implementation manner, the first electronic device may store a connection time at which each second electronic device has recently established bluetooth connection with the first electronic device, and determine a connection duration of the current connection of each second electronic device according to the connection time corresponding to each second electronic device, where the connection duration is a duration from the connection time to the current time. The sequence parameter of each second electronic device can be determined according to the connection duration of each second electronic device, and the longer the connection duration is, the earlier the sequence indicated by the sequence parameter is, that is, the earlier the second electronic device establishes the bluetooth connection with the first electronic device.
As another embodiment, the first electronic device may also establish a connection queue, and the device information of each second electronic device may be sequentially stored in the connection queue according to an order in which the second electronic device establishes bluetooth connection with the first electronic device, and a second electronic device that is farther forward in the connection queue indicates that the second electronic device establishes bluetooth connection with the first electronic device earlier. Alternatively, the priority of the second electronic device that establishes the bluetooth connection with the first electronic device earlier may be lower.
The device type parameter may be used to characterize a device type of the second electronic device, which may include, but is not limited to, a cell phone, a smart watch, a bracelet, a smart home, and the like. The priority corresponding to each device type may be preset, and the first electronic device may determine the device type to which each first electronic device belongs according to the device type parameter of each second electronic device, and obtain the priority corresponding to the device type to which the first electronic device belongs.
The device remaining capacity parameter may be used to represent a current remaining capacity of the second electronic device, and the priority of the second electronic device with a large device remaining capacity may be higher than the priority of the second electronic device with a small device remaining capacity.
The historical connection frequency may be used to characterize the historical connection of the second electronic device to the first electronic device, and may be the connection frequency over a past period of time (e.g., over the past 1 week, over the past 1 month), etc. The first electronic device may store connection condition data of each connected electronic device, and the connection condition data may include device information, connection time, connection duration, and the like of each connected electronic device. The first electronic device may count historical connection frequencies of N second electronic devices currently connected to the first electronic device over a past period of time according to the stored connection condition data. The priority of the second electronic device whose historical connection frequency is high may be higher than the priority of the second electronic device whose historical connection frequency is low.
The first electronic device may determine the priority corresponding to each second electronic device according to one or more device status parameters of each second electronic device. If the corresponding priority of each second electronic device is determined according to the multiple device state parameters, the weight can be respectively distributed aiming at each device state parameter. Taking an apparatus a in the second electronic apparatus as an example, the apparatus a may be any second electronic apparatus, and a reference priority corresponding to each apparatus state parameter may be determined according to each apparatus state parameter of the apparatus a, for example, if a service data output parameter of the apparatus a is 1, which indicates that service data is currently being output to the first electronic apparatus, the reference priority corresponding to the service data output parameter may be 4; the device remaining capacity parameter of the device a indicates that the current remaining capacity of the device a is greater than 50%, and the reference priority corresponding to the device remaining capacity may be 2. And then according to the reference priority corresponding to each equipment state parameter of the equipment A and the distribution weight of each equipment state parameter, carrying out weighted sum calculation or weighted average calculation to obtain the priority corresponding to the equipment A.
For example, the priority rule may be directly set, and the priority rule may be based on the priority rule and the device state parameters of each second electronic device, where the priority rule is the highest priority of the second electronic device currently outputting service data to the first electronic device, and the priority rule is the lowest priority of the second electronic device currently not outputting service data to the first electronic device, and the priority of each second electronic device may be determined based on the priority rule and the device state parameters of each second electronic device.
The first electronic device selects a second electronic device with a priority satisfying a priority condition as a target electronic device from the N second electronic devices, and optionally, the priority condition may include any one of a priority lower than a priority threshold, a priority lowest, and the like. Further, the first electronic device may directly select the second electronic device with the lowest priority as the target electronic device, or may first select the second electronic device with the priority lower than the priority threshold, and if there are a plurality of second electronic devices with the priorities lower than the priority threshold, one of the second electronic devices may be randomly selected as the target electronic device, or the second electronic device with the lowest priority may be selected as the target electronic device. The target electronic equipment is determined based on the priority of each second electronic equipment, so that the target electronic equipment disconnected from the Bluetooth can better meet the requirements of the user, and the adverse effect on the normal use of the user caused by the disconnection of the Bluetooth can be reduced.
It should be noted that the priority of each second electronic device may be changed according to specific situations, and is not necessarily fixed. It can be understood that, before the first electronic device does not receive the bluetooth connection request, if the priority of a certain second electronic device is changed, the target electronic device is selected according to the latest priority of each second electronic device when the bluetooth connection request is received.
For example, if the first electronic device enters the pairing state, and the first electronic device receives the first connection request sent by the third electronic device, if none of the second electronic devices transmits the service data to the first electronic device, the first connected second electronic device a may be preferentially disconnected according to the bluetooth connection order of the second electronic devices. If the first electronic device enters the pairing state, if the second electronic device a transmits service data (such as voice data, audio data and the like) to the first electronic device before the first electronic device receives a first connection request sent by a third electronic device, the priority of the second electronic device a changes, at this time, if the first electronic device receives the first connection request, the bluetooth connection with the second electronic device a is not disconnected, and at this time, which second electronic device is determined according to the set priority rule is specifically disconnected. It can be seen that the first electronic device is disconnected not when entering the pairing state, but after receiving the bluetooth connection request, the first electronic device is disconnected to a greater extent, which ensures the use of the first electronic device by the user.
After determining the target electronic device, the first electronic device may send a disconnection instruction to the target electronic device to disconnect the bluetooth connection with the target electronic device.
Illustratively, fig. 6A is a sequence diagram of interactions in a contention scenario of an electronic device in one embodiment. As shown in fig. 6A, the electronic device a may be a device supporting bluetooth "one-to-two", and the electronic device a may establish bluetooth connections with the electronic device B and the electronic device D, respectively. The electronic device B may send a first pairing instruction to the electronic device a, and the electronic device a enters a pairing state (simultaneously in an inquiry scan mode and a page scan mode) according to the first pairing instruction, and keeps bluetooth connection with the electronic device B and the electronic device D when entering the pairing state. The electronic device C may be a device that does not store connection information corresponding to the electronic device a, and when the electronic device a is in the pairing state, the electronic device C may transmit a scan request to the electronic device a, and after receiving the scan request, the electronic device a may transmit a scan response to the electronic device C. The electronic device C may send a bluetooth connection request to the electronic device a, and after receiving the bluetooth connection request, the electronic device a may perform disconnection processing corresponding to a target electronic device (e.g., the electronic device B in fig. 6A), disconnect the bluetooth connection with the target electronic device, perform bluetooth connection with the electronic device C, and pair with the electronic device C in the process of performing the bluetooth connection.
In the embodiment of the application, under the condition that the first electronic device is connected with the N second electronic devices through the bluetooth, when the first electronic device enters the pairing state, the bluetooth connection with at least part of the second electronic devices is not disconnected, and when a first connection request sent by a third electronic device is received, namely, in a connection grabbing scene, disconnection operation is performed, so that the condition that the bluetooth connection needs to be manually restored by a user due to the fact that no third electronic device request is connected with the first electronic device can be avoided, and the requirement of the user is met.
In some embodiments, the first electronic device may include a headset device, and the headset device may include a first headset and a second headset. Step 408 may include: and performing disconnection processing corresponding to the target electronic equipment in the N second electronic equipment through the first earphone, and establishing Bluetooth connection with third electronic equipment through the second earphone according to the first connection request.
In the embodiment of the application, disconnection processing can be performed through a first earphone of the earphone device, and a first connection request sent by a third electronic device is processed through a second earphone of the earphone device so as to establish bluetooth connection with the third electronic device. The first earphone and the second earphone can perform disconnection operation and connection operation in parallel, the earphone device does not need to wait for the first connection request sent by the third electronic device after disconnection processing is completed, connection robbing speed of the third electronic device for the earphone device can be improved, and connection robbing efficiency is improved.
Optionally, the first earpiece is a master earpiece of the earpiece device and the second earpiece may be a slave earpiece of the earpiece device. The first earphone can be connected with N second electronic devices in a Bluetooth mode respectively, and Bluetooth connection is established between the first earphone and the second earphone. As an implementation manner, if the first earphone receives data sent by any second electronic device, the first earphone sends the data to the second earphone through bluetooth connection with the second earphone, so as to implement master-slave synchronization. As another embodiment, the first headset may synchronize connection information of each second electronic device with the second headset through bluetooth connection with the second headset, so that the second headset monitors bluetooth connections between the first headset and the N second electronic devices according to the connection information, thereby implementing master-slave synchronization.
When the earphone device is in a connection robbing scene, the first earphone can be directly disconnected from the Bluetooth connection with the target electronic device and sends a disconnection instruction to the target electronic device. The second headset may establish a bluetooth connection with the third electronic device according to the first connection request sent by the third electronic device.
In some embodiments, after the second headset establishes a bluetooth connection with the third electronic device, connection information of the third electronic device, which may include, but is not limited to, frequency hopping information, channel information, clock information, etc., may be synchronized to the first headset via the second headset. After the second earphone synchronizes the connection information of the third electronic device to the first earphone, the Bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone, and the second earphone monitors the Bluetooth connection between the first earphone and the third electronic device; after the second earphone synchronizes the connection information of the third electronic device to the first earphone, or the bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone, and the first earphone synchronizes data transmitted between the first earphone and the third electronic device to the second earphone.
After the first earphone acquires the connection information, data transmission can be directly carried out between the first earphone and the third electronic device based on the connection information, the physical link transition between the second earphone and the third electronic device is switched to the physical link between the first earphone and the third electronic device, and the Bluetooth connection object of the third electronic device is switched to the first earphone from the second earphone. The second earphone can monitor a physical link between the first earphone and the third electronic device, or the first earphone forwards data transmitted between the first earphone and the third electronic device to the second earphone, so that master-slave synchronization is realized. Through information synchronization between the earphones, all electronic equipment which is connected with the earphone equipment in a Bluetooth mode is connected with the first earphone (namely a main earphone), and the second earphone (namely a slave earphone) monitors or receives data forwarded by the first earphone, so that the connected electronic equipment is more conveniently managed and data is transmitted.
In some embodiments, after the first headset completes the disconnection process, the first headset may synchronize disconnection information to the second headset, the disconnection information may include at least device information of the target electronic device disconnected from the bluetooth connection, and the second headset may no longer monitor the bluetooth connection between the target electronic device and the first headset.
Illustratively, fig. 6B is a sequence diagram of interaction in a connection robbing situation of the headset device in one embodiment. As shown in fig. 6B, the headset device may be a device supporting bluetooth "one-to-two", and the headset device may establish bluetooth connections with the electronic device B and the electronic device D, respectively. The electronic device C may be a device that does not store connection information corresponding to the headset device, and the headset device may enter a pairing state and first maintain bluetooth connection with the electronic device B and the electronic device D when entering the pairing state. The electronic device C may send a scan request to the headset device, and the headset device may send a scan response to the electronic device C through the first headset and/or the second headset after receiving the scan request. The earphone equipment is in an inquiry scan mode and a page scan mode simultaneously in a pairing state, and when the electronic equipment C determines that Bluetooth connection is required to be performed with the earphone equipment, a Bluetooth connection request can be sent to the earphone equipment. After receiving the bluetooth connection request sent by the electronic device C, the headset device may perform disconnection processing corresponding to a target electronic device (e.g., the electronic device D in fig. 6B), and the second headset may process the bluetooth connection request, perform bluetooth connection with the electronic device C, and pair with the electronic device C during the bluetooth connection. After the first earphone is disconnected from the target electronic device, the first earphone can synchronously disconnect information to the second earphone, and after the second earphone is successfully connected with the electronic device C in a Bluetooth mode, the second earphone can synchronously connect information to the first earphone, information synchronization is achieved, and the Bluetooth connection object of the electronic device C is switched to the first earphone from the second earphone.
In some embodiments, after the bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone, a bluetooth physical link is established between the first earphone and the third electronic device, and further, the first earphone may further establish service connections, such as A2DP (Advanced Audio Distribution Profile, bluetooth Audio transmission model agreement), HFP (Hands-free Profile), and the like, with the third electronic device on the basis of the bluetooth physical link, so that the third electronic device may transmit service data, such as Audio data, voice data, and the like, to the first earphone.
Alternatively, the first earphone may be a slave earphone of the earphone device, and the second earphone may be a master earphone of the earphone device. When the earphone device is in a connection robbing scene, the first earphone can monitor the Bluetooth connection between the second earphone and the target electronic device, and send a disconnection request to the target electronic device on a transmission channel between the second earphone and the target electronic device, wherein the disconnection request can be used for triggering the Bluetooth connection between the target electronic device and the second earphone to be disconnected. The second headset may process a bluetooth request sent by the third electronic device and establish a bluetooth connection with the third electronic device.
In the embodiment of the application, when the earphone device has a condition that the third electronic device seizes the bluetooth connection, the disconnection operation and the connection operation are performed in parallel through the first earphone and the second earphone respectively, so that the connection speed of the third electronic device to the earphone device can be increased, and the connection efficiency can be increased. And after the disconnection operation and the connection operation are completed, the first earphone and the second earphone carry out information synchronization, so that a Bluetooth connection object of the third electronic equipment is switched from the second earphone to the first earphone, all Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
In some embodiments, after the first electronic device enters the pairing state according to the first pairing instruction, the method described above may further include: if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, establishing Bluetooth connection with the third electronic device according to the first connection request, and establishing Bluetooth connection with the fourth electronic device according to the second connection request.
It will be appreciated that the first connection request and the second connection request may be bluetooth connection requests.
The first electronic device may be a bluetooth enabled "drag and drop" function device. After the first electronic device enters the pairing state, if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, it can be stated that the first electronic device needs to establish a bluetooth connection with the third electronic device and the fourth electronic device simultaneously or in a connected manner. Wherein the first time period can be set according to actual requirements, for example, the first time period can be 1 second, 2 seconds and the like,
under the condition that a first electronic device is in Bluetooth connection with M second electronic devices, if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, bluetooth connection can be established with the third electronic device and the fourth electronic device respectively. Where M may be an integer greater than or equal to 0 and less than or equal to N-2, the first electronic device establishes bluetooth connections with M second electronic devices, which may include a case where the first electronic device does not establish bluetooth connections with any second electronic device (i.e., M = 0), and may also include a case where the number of second electronic devices that establish bluetooth connections with the first electronic device is less than or equal to N-2, for example, N is 3, and the first electronic device establishes bluetooth connections with only 1 second electronic device.
Under the condition that the first electronic device establishes Bluetooth connection with the M second electronic devices, the first electronic device can also establish Bluetooth connection with the N-M electronic devices, wherein the N-M is greater than or equal to 2, so that the first electronic device can establish Bluetooth connection with the third electronic device and the fourth electronic device respectively.
In some embodiments, when the number of the second electronic devices establishing the bluetooth connection with the first electronic device reaches N-1, if a first connection request sent by the third electronic device and a second connection request sent by the fourth electronic device are received within a first time period, disconnection processing may be performed on a target electronic device in the second electronic device, and then the bluetooth connection is established with the third electronic device and the fourth electronic device, respectively. As another embodiment, the bluetooth connection may also be established with an electronic device (for example, a third electronic device) that first receives the bluetooth connection request, and then the target electronic device in the second electronic device is disconnected and bluetooth connected with another electronic device (for example, a fourth electronic device). For the specific disconnection processing method and the bluetooth connection process, reference may be made to the related descriptions and the bluetooth standard protocol in the foregoing embodiments, which are not described herein again.
In some embodiments, the first electronic device may comprise a headset device, which may comprise a first headset and a second headset. The steps of establishing Bluetooth connection with a third electronic device according to the first connection request and establishing Bluetooth connection with a fourth electronic device according to the second connection request include: and processing the first connection request through the first earphone, establishing Bluetooth connection with the third electronic equipment, processing the second connection request through the second earphone, and establishing Bluetooth connection with the fourth electronic equipment.
If the headset device receives the first connection request sent by the third electronic device and the second connection request sent by the fourth electronic device within the first time period, it is described that the headset device needs to establish bluetooth connection with the third electronic device and the fourth electronic device simultaneously or continuously, and it is highly likely that the headset device receives another bluetooth connection request when one bluetooth connection request is not processed and completed. Therefore, the first earphone and the second earphone can be connected in parallel to establish Bluetooth connection with the third electronic device and the fourth electronic device respectively. The serial connection establishing process is changed into the parallel connection establishing process to reduce the connection waiting time.
Optionally, the first time period may be set according to actual requirements, for example, the first time period may be 1 second, 2 seconds, and the like, and the first time period may also be set according to a speed of the headset device establishing a bluetooth connection and the like, where the faster the speed of the headset device establishing the bluetooth connection is, the shorter the first time period may be, and the slower the speed of the headset device establishing the bluetooth connection is, the longer the first time period may be. Further, the first period of time may be a period of time during which the headset device normally establishes a bluetooth connection with the other electronic device.
In some embodiments, when the headset device is in the pairing state, the inquiry scan mode and the page scan mode are turned on, and can be scanned by other electronic devices. Under the condition that neither the third electronic device nor the fourth electronic device stores the connection information corresponding to the earphone device, the third electronic device and the fourth electronic device may send scanning requests to the earphone device, and the earphone device may send scanning responses to the third electronic device and the fourth electronic device respectively according to the scanning requests. Optionally, the first earphone may send the scan response to the third electronic device and the fourth electronic device, or the second earphone may send the scan response to the third electronic device and the fourth electronic device, or the first earphone may send the scan response to the third electronic device, and the second earphone may send the scan response to the fourth electronic device.
After receiving the scan response, the third electronic device may send a first connection request to the headset device, and the first headset may perform bluetooth connection with the third electronic device according to the first connection request.
In some embodiments, a bluetooth connection may be established between the first headset and the second headset, and after the bluetooth connection is established between the first headset and the third electronic device, connection information of the third electronic device may be synchronized to the second headset through the first headset; after the second headset establishes a bluetooth connection with the fourth electronic device, connection information of the fourth electronic device may be synchronized to the first headset through the second headset. And information synchronization between the first earphone and the second earphone is realized.
In some embodiments, the first earpiece may be a master earpiece and the second earpiece may be a slave earpiece in the earpiece device. After the second earphone synchronizes the connection information of the fourth electronic device with the first earphone, the Bluetooth connection object of the fourth electronic device can be switched from the second earphone to the first earphone, and the second earphone monitors the Bluetooth connection between the first earphone and the fourth electronic device; or after the second headset synchronizes the connection information of the fourth electronic device with the first headset, the bluetooth connection object of the fourth electronic device may be switched from the second headset to the first headset, and the first headset synchronizes data transmitted between the first headset and the fourth electronic device with the second headset.
After the first earphone acquires the synchronous connection information of the second earphone, data transmission can be directly carried out with the fourth electronic device based on the connection information, the physical link transition between the second earphone and the fourth electronic device is switched to the physical link between the first earphone and the fourth electronic device, and the Bluetooth connection object of the fourth electronic device is switched to the first earphone from the second earphone. The second earphone can monitor a Bluetooth physical link between the first earphone and the fourth electronic device, or the first earphone forwards data transmitted between the first earphone and the fourth electronic device to the second earphone, so that master-slave synchronization is realized.
After the first earphone establishes the bluetooth connection with the third electronic device, the first earphone can also synchronize the connection information of the third electronic device to the second earphone, and the second earphone can monitor the bluetooth connection established between the first earphone and the third electronic device based on the connection information. Through the information synchronization between the earphones, all electronic equipment which establishes Bluetooth connection with the earphone equipment adopts a mode that a first earphone (namely a main earphone) is connected, and a second earphone (namely a slave earphone) monitors or receives data forwarded by the first earphone, so that the connected electronic equipment is more conveniently managed and data is transmitted.
Illustratively, fig. 7A is an interaction timing diagram of a headset device connecting two electronic devices in one embodiment. As shown in fig. 7A, the headset device may be a bluetooth "one-drag-two" enabled device, and the headset device enters a pairing state without being connected to any electronic device. Neither electronic device E nor electronic device F stores connection information corresponding to headset devices. The earphone device is in an inquiry scan mode and a page scan mode simultaneously in a pairing state, and the electronic device E and the electronic device F can scan the earphone device and send a Bluetooth connection request to the earphone device. The earphone device receives the Bluetooth connection request sent by the electronic device E and the electronic device F in the first time period, the first earphone can process the Bluetooth connection request sent by the electronic device E and is in Bluetooth connection with the electronic device E, and the first earphone is paired with the electronic device E in the process of Bluetooth connection. The second earphone can process a Bluetooth connection request sent by the electronic device F, is in Bluetooth connection with the electronic device F, and is paired with the electronic device F in the process of Bluetooth connection. After the first earphone successfully establishes Bluetooth connection with the electronic equipment E, the connection information of the electronic equipment E can be synchronized with the second earphone, and after the second earphone successfully establishes Bluetooth connection with the electronic equipment F, the connection information of the electronic equipment F can be synchronized with the second earphone, so that information synchronization is realized, and a Bluetooth connection object of the electronic equipment F is switched to the first earphone from the second earphone.
Illustratively, fig. 7B is an interaction timing diagram of the headset device connecting two electronic devices in another embodiment. As shown in fig. 7B, the headset device may be a bluetooth "one drag three" enabled device, and the headset device establishes a bluetooth connection with the electronic device B. The electronic device B may send a first pairing instruction to the headset device, and the headset device may enter a pairing state according to the first pairing instruction. The subsequent process of establishing the bluetooth connection between the earphone device and the electronic device E and the electronic device F may be the same as the description in fig. 7A, and will not be repeated herein.
In some embodiments, if the headset device first receives the first connection request sent by the third electronic device, the first connection request may be processed by the first headset (the first headset may be a master headset). The first earphone can send first information to the second earphone when responding to the first connection request, the first information can be used for informing the second earphone, and the first earphone is processing the Bluetooth connection request; after the first earphone completes processing the first connection request and successfully establishes bluetooth connection with the third electronic device, second information can be sent to the second earphone, the second information is used for informing the second earphone, and the first earphone completes processing the bluetooth connection request. If the second earphone receives the first information but does not receive the second information, it indicates that the first earphone is still in the process of processing the first connection request of the third electronic device, and if the second earphone receives the second connection request sent by the fourth electronic device in the process, the second earphone can process the second connection request sent by the fourth electronic device and establish bluetooth connection with the fourth electronic device. The connection speed of the earphone device and the two electronic devices can be improved.
In this embodiment of the application, the first earphone and the second earphone of the earphone device can be connected with the third electronic device and the fourth electronic device respectively through bluetooth, and the first earphone and the second earphone are connected in parallel, so that the earphone device does not need to wait for the earphone device to establish bluetooth connection with one of the electronic devices after completing the bluetooth connection with the other electronic device, the speed of establishing bluetooth connection between the earphone device and the two electronic devices can be increased, and the connection efficiency is improved. And the first earphone and the second earphone carry out information synchronization, so that a Bluetooth connection object of the fourth electronic equipment is switched from the second earphone to the first earphone, all Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
The third electronic device, the fourth electronic device, and the like may be electronic devices that are paired with the first electronic device (that is, store connection information), and if there is no conflict, the bluetooth connection may be established with the first electronic device in the manner of establishing the bluetooth connection described in the above embodiments.
Optionally, the Bluetooth connection in the embodiment of the present application may include any one of a classic Bluetooth connection and a Bluetooth Low Energy (BLE) connection. In a BLE connection scenario, a first electronic device may send a BLE broadcast, and other electronic devices may scan for the BLE broadcast and establish a BLE bluetooth connection with the first electronic device.
As shown in fig. 8, in one embodiment, another bluetooth-based control method is provided, which is applicable to the second electronic device described above, and the method may include:
step 810, in a case that the bluetooth connection is established between the second electronic device and the first electronic device, sending a first pairing instruction to the first electronic device, where the first pairing instruction is used to instruct the first electronic device to enter a pairing state, so that the other electronic devices can scan the first electronic device. Wherein the other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device.
In one embodiment, the step of sending a first pairing instruction to the first electronic device comprises:
responding to a state starting operation aiming at the first electronic equipment, and sending a first pairing instruction to the first electronic equipment; or the like, or, alternatively,
sending a first pairing instruction to the first electronic equipment according to the set time information; or the like, or, alternatively,
when the first electronic equipment is detected to be in a set target scene, a first pairing instruction is sent to the first electronic equipment.
It should be noted that, for the description of the bluetooth-based control method applied to the second electronic device provided in the embodiments of the present application, reference may be made to the relevant description of the bluetooth-based control method applied to the first electronic device described in the foregoing embodiments, and details are not repeated here.
In the embodiment of the application, the first electronic device enters the pairing state by sending the first pairing instruction to the first electronic device through the second electronic device connected with the first electronic device, so that normal Bluetooth communication between the second electronic device and the first electronic device is not influenced, the mode of enabling the electronic device to enter the pairing state can be simplified, and the mode of enabling the electronic device to enter the pairing state is richer.
As shown in fig. 9, in an embodiment, a bluetooth-based control device 900 is provided, which can be applied to the first electronic device, and the bluetooth-based control device 900 may include a command receiving module 910 and a pairing module 920.
The instruction receiving module 910 is configured to receive a first pairing instruction sent by a second electronic device when the first electronic device establishes a bluetooth connection with at least one second electronic device.
The pairing module 920 is configured to enter a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device, where the other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device.
In one embodiment, the bluetooth-based control device 900 includes a connection module in addition to the command receiving module 910 and the pairing module 920.
The connection module is used for receiving a scanning request sent by third electronic equipment when the first electronic equipment is in a pairing state; sending a scanning response to the third electronic equipment according to the scanning request; and the Bluetooth module is used for receiving a first connection request sent by the third electronic equipment and establishing Bluetooth connection with the third electronic equipment according to the first connection request.
In the embodiment of the application, the first electronic device enters the pairing state by sending the first pairing instruction to the first electronic device through the second electronic device connected with the first electronic device, so that normal Bluetooth communication between the second electronic device and the first electronic device is not influenced, the mode of enabling the electronic device to enter the pairing state can be simplified, and the mode of enabling the electronic device to enter the pairing state is richer.
In an embodiment, the pairing module 920 is further configured to, when the first electronic device is not bluetooth-connected to any second electronic device, receive a second pairing instruction sent by the accessory device if the first electronic device is electrically connected to the accessory device, and enter a pairing state according to the second pairing instruction, where the second pairing instruction is generated by the accessory device according to the detected pairing triggering operation.
In the embodiment of the application, various different modes for enabling the electronic equipment to enter the pairing state can be provided, the modes for enabling the electronic equipment to enter the pairing state are richer, the requirements of users under different conditions can be met, and product viscosity of the users is improved.
In one embodiment, the connection module includes a receiving unit, a disconnection unit, and a connection unit.
The receiving unit is used for receiving a first connection request sent by a third electronic device under the condition that the first electronic device establishes Bluetooth connection with N second electronic devices.
And the disconnection unit is used for performing disconnection processing corresponding to the target electronic equipment in the N second electronic equipment.
And the connection unit is used for establishing Bluetooth connection with the third electronic equipment according to the first connection request.
The disconnection processing is used for disconnecting the Bluetooth connection between the first electronic equipment and the target electronic equipment; n is the maximum number of Bluetooth connections supported to be established by the first electronic device, and N is an integer greater than or equal to 1.
In one embodiment, the disconnection unit is further configured to determine a target electronic device of the N second electronic devices, and perform disconnection processing corresponding to the target electronic device.
In one embodiment, N is an integer greater than or equal to 2; and the disconnection unit is also used for selecting the second electronic equipment with the priority meeting the priority condition from the N second electronic equipment as the target electronic equipment according to the priority of each second electronic equipment.
In one embodiment, the first electronic device comprises a headset device comprising a first headset and a second headset. The disconnection unit is used for performing disconnection processing corresponding to target electronic equipment in the N pieces of second electronic equipment through the first earphone; and the connecting unit is used for establishing Bluetooth connection with the third electronic equipment through the second earphone according to the first connection request.
In one embodiment, the bluetooth-based control device 900 further includes a synchronization module. The synchronization module is used for synchronizing the connection information of the third electronic device to the first earphone through the second earphone after the second earphone establishes the Bluetooth connection with the third electronic device according to the first connection request.
In one embodiment, the synchronization module is further configured to switch a bluetooth connection object of the third electronic device from the second headset to the first headset after the second headset synchronizes connection information of the third electronic device with the first headset, and monitor a bluetooth connection between the first headset and the third electronic device through the second headset; or after the second earphone synchronizes the connection information of the third electronic device with the first earphone, the bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone, and the first earphone synchronizes the data transmitted between the first earphone and the third electronic device to the second earphone.
In the embodiment of the application, when the earphone device has a condition that the third electronic device seizes the bluetooth connection, the disconnection operation and the connection operation are performed in parallel through the first earphone and the second earphone respectively, so that the connection speed of the third electronic device to the earphone device can be increased, and the connection efficiency can be increased. And after the disconnection operation and the connection operation are completed, the first earphone and the second earphone carry out information synchronization, so that a Bluetooth connection object of the third electronic equipment is switched from the second earphone to the first earphone, all Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
In an embodiment, the connection module is further configured to, if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, establish a bluetooth connection with the third electronic device according to the first connection request, and establish a bluetooth connection with the fourth electronic device according to the second connection request.
In one embodiment, the first electronic device comprises a headset device comprising a first headset and a second headset. And the connecting module is also used for processing the first connecting request through the first earphone, establishing Bluetooth connection with the third electronic equipment, processing the second connecting request through the second earphone and establishing Bluetooth connection with the fourth electronic equipment.
In one embodiment, the synchronization module is further configured to synchronize connection information corresponding to the third electronic device to the second headset through the first headset after the first headset establishes a bluetooth connection with the third electronic device; and after the second earphone is connected with the fourth electronic device in a Bluetooth mode, synchronizing connection information corresponding to the fourth electronic device to the first earphone through the second earphone.
In one embodiment, the bluetooth connection comprises any one of a classic bluetooth connection and a bluetooth low energy BLE connection.
In this embodiment of the application, the first earphone and the second earphone of the earphone device can be connected with the third electronic device and the fourth electronic device respectively through bluetooth, and the first earphone and the second earphone are connected in parallel, so that the earphone device does not need to wait for the earphone device to establish bluetooth connection with one of the electronic devices after completing the bluetooth connection with the other electronic device, the speed of establishing bluetooth connection between the earphone device and the two electronic devices can be increased, and the connection efficiency is improved. And the first earphone and the second earphone carry out information synchronization, so that a Bluetooth connection object of the fourth electronic equipment is switched from the second earphone to the first earphone, all Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
As shown in fig. 10, in an embodiment, a bluetooth-based control apparatus 1000 is provided, which is applicable to the second electronic device, and the bluetooth-based control apparatus 1000 includes an instruction sending module 1010.
The instruction sending module 1010 is configured to send a first pairing instruction to a first electronic device under the condition that a bluetooth connection is established between a second electronic device and the first electronic device, where the first pairing instruction is used to trigger the first electronic device to enter a pairing state, so that other electronic devices can scan the first electronic device; wherein the other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device.
The instruction sending module 1010 is further configured to send a first pairing instruction to the first electronic device in response to a state starting operation for the first electronic device; or, sending a first pairing instruction to the first electronic device according to the set time information; or when the first electronic equipment is detected to be in the set target scene, sending a first pairing instruction to the first electronic equipment.
In the embodiment of the application, the first electronic equipment enters the pairing state by sending the first pairing instruction to the first electronic equipment through the second electronic equipment connected with the first electronic equipment, so that normal Bluetooth communication between the second electronic equipment and the first electronic equipment is not influenced, the mode of enabling the electronic equipment to enter the pairing state can be simplified, and the mode of enabling the electronic equipment to enter the pairing state is richer.
FIG. 11 is a block diagram of an electronic device in one embodiment. As shown in fig. 11, electronic device 1100 may include one or more of the following components: a processor 1110, a memory 1120 coupled with the processor 1110, wherein the memory 1120 may store one or more computer programs, and the one or more computer programs may be configured to implement the bluetooth-based control method applied to the first electronic device as described in the above embodiments when executed by the one or more processors 1110.
Processor 1110 may include one or more processing cores. The processor 1110 interfaces with various components throughout the electronic device 1100 using various interfaces and circuitry to perform various functions of the electronic device 1100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1120 and invoking data stored in the memory 1120. Alternatively, the processor 1110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1110 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is to be appreciated that the modem can be implemented by a single communication chip without being integrated into the processor 1110.
The Memory 1120 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). The memory 1120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like. The stored data area may also store data created during use by the electronic device 1100, and the like.
The electronic device 1100 may further include a bluetooth module, which may be used to provide bluetooth communication functions, establish bluetooth connections with other electronic devices, and perform bluetooth data transmission. The bluetooth module may support one or more bluetooth protocols, such as classic bluetooth, BLE, etc.), but is not limited thereto and may vary with the development of the bluetooth protocol.
In some embodiments, the processor 1110 is configured to receive, by the bluetooth module, a first pairing instruction sent by one second electronic device when the electronic device 1100 establishes a bluetooth connection with at least one second electronic device, and control the bluetooth module to enter a pairing state according to the first pairing instruction, so that other electronic devices can scan the electronic device 1100.
It is understood that the electronic device 1100 may include more or less structural elements than those shown in the above structural block diagrams, for example, a power module, a physical button, a sensor, etc., and is not limited herein.
The embodiment of the application discloses a computer readable storage medium, which stores a computer program, wherein the computer program realizes the control method based on Bluetooth applied to the first electronic device as described in the above embodiments when being executed by a processor.
Embodiments of the present application disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program is executable by a processor to implement a bluetooth based control method applied to a first electronic device as described in the above embodiments.
In one embodiment, an electronic device is further provided, which includes a memory and a processor, the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to implement the bluetooth-based control method applied to the second electronic device as described in the above embodiments.
The embodiment of the application discloses a computer-readable storage medium which stores a computer program, wherein when the computer program is executed by a processor, the bluetooth-based control method applied to a second electronic device as described in the above embodiments is realized.
An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the bluetooth-based control method applied to the second electronic device as described in the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a ROM, etc.
Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM can take many forms, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), rambus Direct RAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily required for this application. In this application, "a plurality" includes "two or more".
In various embodiments of the present application, it should be understood that the size of the serial number of each process described above does not mean that the execution sequence is necessarily sequential, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
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 integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The bluetooth-based control method, apparatus, electronic device and storage medium disclosed in the embodiments of the present application are described in detail above, and specific examples are applied herein to explain the principles and implementations of the present application, and the description of the embodiments is only used to help understand the method and its core idea of the present application. Meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (19)

1. A Bluetooth-based control method is applied to a first electronic device, and comprises the following steps:
under the condition that the first electronic equipment establishes Bluetooth connection with at least one second electronic equipment, receiving a first pairing instruction sent by the second electronic equipment;
and entering a pairing state according to the first pairing instruction so that other electronic equipment can scan the first electronic equipment, wherein the other electronic equipment comprises electronic equipment which does not store connection information corresponding to the first electronic equipment.
2. The method of claim 1, further comprising:
when the first electronic equipment is in the pairing state, receiving a scanning request sent by third electronic equipment;
sending a scanning response to the third electronic equipment according to the scanning request;
and receiving a first connection request sent by the third electronic equipment, and establishing Bluetooth connection with the third electronic equipment according to the first connection request.
3. The method according to claim 2, wherein the receiving a first connection request sent by the third electronic device, and establishing a bluetooth connection with the third electronic device according to the first connection request comprises:
under the condition that the first electronic equipment establishes Bluetooth connection with N pieces of second electronic equipment, receiving a first connection request sent by third electronic equipment;
performing disconnection processing corresponding to a target electronic device in the N second electronic devices, and establishing Bluetooth connection with the third electronic device according to the first connection request;
wherein the disconnection process is used to disconnect the bluetooth connection between the first electronic device and the target electronic device; the N is the maximum number of the Bluetooth connections supported to be established by the first electronic device, and is an integer greater than or equal to 1.
4. The method according to claim 3, wherein the performing disconnection processing corresponding to a target electronic device of the N second electronic devices comprises:
and determining a target electronic device in the N second electronic devices, and performing disconnection processing corresponding to the target electronic device.
5. The method of claim 4, wherein N is an integer greater than or equal to 2; the determining a target electronic device of the N second electronic devices includes:
and selecting the second electronic equipment with the priority meeting the priority condition from the N second electronic equipment as target electronic equipment according to the priority of each second electronic equipment.
6. The method of any of claims 3-5, wherein the first electronic device comprises a headset device, the headset device comprising a first headset and a second headset; the performing disconnection processing corresponding to a target electronic device of the N second electronic devices, and establishing bluetooth connection with the third electronic device according to the first connection request includes:
and performing disconnection processing corresponding to a target electronic device in the N second electronic devices through the first earphone, and establishing Bluetooth connection with the third electronic device through the second earphone according to the first connection request.
7. The method of claim 6, wherein after the establishing a Bluetooth connection with the third electronic device via the second headset according to the first connection request, the method further comprises:
synchronizing connection information of the third electronic device to the first headset via the second headset.
8. The method of claim 7, wherein after the second headset synchronizes connection information of the third electronic device to the first headset, a Bluetooth connection object of the third electronic device is switched from the second headset to the first headset, and the second headset listens for a Bluetooth connection between the first headset and the third electronic device; or the like, or, alternatively,
and the Bluetooth connection object of the third electronic equipment is switched from the second earphone to the first earphone, and the first earphone synchronizes data transmitted between the first earphone and the third electronic equipment to the second earphone.
9. The method of claim 2, wherein the maximum number N of bluetooth connections that the first electronic device supports to establish is an integer greater than or equal to 2; the receiving a first connection request sent by the third electronic device, and establishing a bluetooth connection with the third electronic device according to the first connection request includes:
if a first connection request sent by the third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, establishing Bluetooth connection with the third electronic device according to the first connection request, and establishing Bluetooth connection with the fourth electronic device according to the second connection request.
10. The method of claim 9, wherein the first electronic device comprises a headset device comprising a first headset and a second headset; the establishing of the bluetooth connection with the third electronic device according to the first connection request and the establishing of the bluetooth connection with the fourth electronic device according to the second connection request includes:
and processing the first connection request through the first earphone, establishing Bluetooth connection with the third electronic equipment, processing the second connection request through the second earphone, and establishing Bluetooth connection with the fourth electronic equipment.
11. The method of claim 10, wherein after the first headset processes the first connection request and establishes a bluetooth connection with the third electronic device, the method further comprises: synchronizing connection information corresponding to the third electronic device to the second headset through the first headset;
after the second connection request is processed by the second headset and a bluetooth connection is established with the fourth electronic device, the method further includes: and synchronizing the connection information corresponding to the fourth electronic device to the first earphone through the second earphone.
12. The method according to any one of claims 2-5 and 9-11, wherein the bluetooth connection comprises any one of a classic bluetooth connection and a Bluetooth Low Energy (BLE) connection.
13. The method of any one of claims 1 to 5 and 9 to 11, further comprising:
under the condition that the first electronic device is not in Bluetooth connection with any second electronic device, if the first electronic device is electrically connected with accessory equipment, receiving a second pairing instruction sent by the accessory equipment, and entering a pairing state according to the second pairing instruction, wherein the second pairing instruction is generated by the accessory equipment according to detected pairing triggering operation.
14. A Bluetooth-based control method is applied to a second electronic device, and comprises the following steps:
under the condition that Bluetooth connection is established between the second electronic device and a first electronic device, sending a first pairing instruction to the first electronic device, wherein the first pairing instruction is used for indicating the first electronic device to enter a pairing state so that other electronic devices can scan the first electronic device; wherein the other electronic devices include an electronic device that does not store connection information corresponding to the first electronic device.
15. The method of claim 14, wherein sending a first pairing instruction to the first electronic device comprises:
responding to a state starting operation aiming at the first electronic equipment, and sending a first pairing instruction to the first electronic equipment; or the like, or, alternatively,
sending a first pairing instruction to the first electronic equipment according to the set time information; or the like, or a combination thereof,
when the first electronic equipment is detected to be in a set target scene, a first pairing instruction is sent to the first electronic equipment.
16. A Bluetooth-based control device, applied to a first electronic device, the device comprising:
the instruction receiving module is used for receiving a first pairing instruction sent by at least one second electronic device under the condition that the first electronic device establishes Bluetooth connection with the second electronic device;
and the pairing module is used for entering a pairing state according to the first pairing instruction so as to enable other electronic equipment to scan the first electronic equipment, wherein the other electronic equipment comprises electronic equipment which does not store connection information corresponding to the first electronic equipment.
17. A Bluetooth-based control device, applied to a second electronic device, the device comprising:
the instruction sending module is used for sending a first pairing instruction to the first electronic equipment under the condition that Bluetooth connection is established between the second electronic equipment and the first electronic equipment, wherein the first pairing instruction is used for triggering the first electronic equipment to enter a pairing state so that other electronic equipment can scan the first electronic equipment; wherein the other electronic devices include an electronic device that does not store connection information corresponding to the first electronic device.
18. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that, when executed by the processor, causes the processor to carry out the method of any one of claims 1 to 13 or 14 to 15.
19. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 13 or 14 to 15.
CN202111050876.3A 2021-09-08 2021-09-08 Bluetooth-based control method and device, electronic equipment and storage medium Pending CN115776661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111050876.3A CN115776661A (en) 2021-09-08 2021-09-08 Bluetooth-based control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111050876.3A CN115776661A (en) 2021-09-08 2021-09-08 Bluetooth-based control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115776661A true CN115776661A (en) 2023-03-10

Family

ID=85388138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111050876.3A Pending CN115776661A (en) 2021-09-08 2021-09-08 Bluetooth-based control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115776661A (en)

Similar Documents

Publication Publication Date Title
CN110168942B (en) Method, terminal, system and storage medium for selecting Bluetooth device
WO2023036178A1 (en) Bluetooth connection method and apparatus, earphone device, and computer-readable storage medium
CN111447602B (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
CN109417758A (en) A kind of method and terminal of bluetooth connection
EP3125513A1 (en) Multi-mode power saving multimedia transmission method and system
UA117250C2 (en) Multi-mode, wearable, wireless microphone
CN110933738B (en) Mode switching method and system of wireless earphone and TWS earphone system
EP3179705B1 (en) Message processing method, system and related device
CN113691678B (en) Call control method, electronic device, computer readable storage medium and chip system
US10624027B2 (en) Call processing method and apparatus thereof
CN115002934A (en) Audio service processing system, electronic equipment and Bluetooth headset
WO2023103732A1 (en) State control method and apparatus for earphone device, earphone device and storage medium
JP7453385B2 (en) Resource scheduling method, communication equipment, network equipment and storage medium
CN111954123B (en) Method, system, medium, and wireless audio device for information synchronization of wireless audio devices
CN116528202A (en) Connection control method, device, electronic equipment and storage medium
CN115776661A (en) Bluetooth-based control method and device, electronic equipment and storage medium
WO2023035782A1 (en) Bluetooth connection method and apparatus, earphone device and computer-readable storage medium
CN115278624A (en) Information updating method and device, audio sharing method and system and electronic equipment
CN114173321B (en) Equipment communication connection establishment method and equipment communication system
CN113810887B (en) Bluetooth protocol connection method and device, storage medium and related equipment
CN115885573A (en) Audio output apparatus wirelessly receiving data from electronic device and method of operating the same
CN115967927A (en) Bluetooth connection method and device, earphone and storage medium
CN116074986B (en) Bluetooth connection method, device and system
CN114666741B (en) Wireless communication method and system
CN114615729B (en) Data interaction method, earphone device and computer readable storage medium

Legal Events

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