Bluetooth connection method and electronic device

By realizing dual-mode connection in electronic devices and transmitting small data amounts of data using BLE connections, the power consumption waste caused by BR/EDR connection in the prior art is solved, and more efficient energy use is achieved.

CN114866994BActive Publication Date: 2025-04-11HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210331800.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-06
Publication Date
2025-04-11
Estimated Expiration
2039-09-06

AI Technical Summary

Technical Problem

When existing Bluetooth technology transmits data with a small amount of data, the use of BR/EDR connection method will cause waste of power consumption of electronic devices.

Method used

Provides a system that supports dual-mode connections, including a base rate/enhanced data rate (BR/EDR) connection and a Bluetooth low power (BLE) connection. By detecting the ability of the accessory device, disconnect the BR/EDR connection and convert it to a BLE connection to transmit audio data, video data or call data.

Benefits of technology

By using BLE connections, the power consumption of electronic devices when transmitting small data is significantly saved and the energy efficiency performance of the device is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114866994B_ABST
    Figure CN114866994B_ABST
Patent Text Reader

Abstract

The present application provides a method and electronic device for Bluetooth connection, the method comprising: the electronic device and the accessory device establish a basic rate / enhanced data rate BR / EDR connection; the electronic device determines that it supports dual-mode connection and the accessory device also supports dual-mode connection, wherein the dual-mode connection includes a BR / EDR connection and a Bluetooth low energy BLE connection; the electronic device disconnects the BR / EDR connection with the accessory device and establishes a BLE connection with the accessory device. In an embodiment of the present application, when both the electronic device and the accessory device support dual-mode connection, a BLE connection can be established, which helps to save power consumption of the electronic device and the accessory device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and more specifically, to a Bluetooth connection method and electronic device. Background Art

[0002] Bluetooth (BT) technology is an open global specification for wireless data communication. It is based on low-cost short-range wireless connections and is the most widely supported, feature-rich and secure near-field wireless communication standard on the market today.

[0003] The current Bluetooth technology mainly includes basic rate (BR) Bluetooth technology and enhanced data rate (EDR) Bluetooth technology. In addition, current electronic devices are also single-mode Bluetooth communication devices, that is, they only support BR / EDR Bluetooth connection mode. Since BR / EDR is mainly used to transmit some data with large data volume, such as audio data, when some data with small data volume (for example, user's heart rate, blood pressure and other data) needs to be transmitted between electronic devices through Bluetooth connection, the use of BR / EDR connection mode will cause waste of power consumption of electronic devices. Summary of the invention

[0004] The present application provides a Bluetooth connection method, which helps to save power consumption when an electronic device transmits data via Bluetooth technology.

[0005] In a first aspect, a system is provided, which includes a first electronic device and an accessory device, wherein the first electronic device and the accessory device support dual-mode connection, the dual-mode connection including a basic rate / enhanced data rate BR / EDR connection and a Bluetooth low energy (BLE) connection, the first electronic device is used to establish a BR / EDR connection with the accessory device; the first electronic device is further used to disconnect the BR / EDR connection with the accessory device and establish a BLE connection with the accessory device when it is determined that the accessory device supports the dual-mode connection; the first electronic device is further used to transmit audio data, video data or call data with the accessory device through the BLE connection.

[0006] In the embodiment of the present application, when both the first electronic device and the accessory device support dual-mode connection, the first electronic device can first establish a BR / EDR connection with the accessory device, and when it is determined that the accessory device supports dual-mode connection, disconnect the BR / EDR connection with the accessory device and establish a BLE connection with the accessory device. In addition, the first electronic device can also transmit audio data, video data, or call data, etc. to the accessory device through the BLE connection, which helps to save power consumption of the electronic device.

[0007] In some possible implementations, the first electronic device may query the capability information of the accessory device after establishing a BR / EDR connection with the accessory device. After establishing the BR / EDR connection, the first electronic device may transmit call data on a synchronous connection-oriented / extended (SCO) link or an extended synchronous connection-oriented (ESCO) link; and transmit audio data or video data on an ACL link.

[0008] In some possible implementations, under the BLE connection, the first electronic device can use an isochronous channel (ISO) to transmit call data, audio data, or video data with the accessory device.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the first electronic device is specifically used to establish an asynchronous link ACL in a BR / EDR connection with the accessory device; the first electronic device is also used to send a query request message to the accessory device on the ACL, and the query request message is used to query whether the accessory device supports the dual-mode connection; the first electronic device is also used to receive a query response message sent by the accessory device, and the query response message is used to indicate that the accessory device supports the dual-mode connection.

[0010] In an embodiment of the present application, the first electronic device can inquire the accessory device for its capability information when the ACL under the BR / EDR connection is established with the accessory device, without having to inquire again after the BR / EDR connection is fully established. This helps to reduce the delay in establishing a BLE connection between the first electronic device and the accessory device.

[0011] In combination with the first aspect, in some implementations of the first aspect, the first electronic device is specifically configured to carry the query request information via an echo message.

[0012] In an embodiment of the present application, the first electronic device can carry the query request information in the echo message, and can confirm the versions supported by both parties to ensure version compatibility.

[0013] In some possible implementations, the query request information is carried in an echo request message.

[0014] In some possible implementations, the query response information is carried in an echo response message.

[0015] In combination with the first aspect, in certain implementations of the first aspect, the accessory device is a Bluetooth headset, which includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, the second address is a MAC address used when the main ear and the first electronic device establish a connection, and the first electronic device is specifically used to: when the first ear is the main ear, establish a BR / EDR connection with the first ear through the second address; when it is determined that the Bluetooth headset supports the dual-mode connection, disconnect the BR / EDR connection with the first ear; establish a BLE connection with the first ear through the first address, and establish a BLE connection with the second ear through the second address.

[0016] In an embodiment of the present application, the Bluetooth headset can statically configure the second MAC address as the MAC address used when establishing a connection with the first electronic device and the main ear. When the first electronic device establishes a BR / EDR connection with the Bluetooth headset, the Bluetooth headset can also dynamically change the main ear. When the left ear is the main ear, the left ear establishes a BR / EDR connection with the first electronic device through the second MAC address, and the right ear can monitor the link between the left ear and the first electronic device. When the first electronic device establishes a BLE connection with the Bluetooth headset, the left ear can establish a BLE connection with the first electronic device through the first MAC address, and the right ear can establish a BLE connection with the first electronic device through the second MAC address.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the first electronic device is also used to establish a BLE connection with the first ear through the first address, and to establish a BLE connection with the second ear through the second address when the main ear switches from the first ear to the second ear.

[0018] In an embodiment of the present application, when an electronic device establishes a BLE connection with a Bluetooth headset, no matter how the main ear changes, the left ear uses the real MAC address of the left ear (first address) when establishing a connection with the electronic device, and the right ear uses the real MAC address of the right ear (second address) when establishing a connection with the electronic device.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the system also includes a second electronic device, which only supports BR / EDR connection, and is characterized in that the Bluetooth headset is used to disconnect the BLE connection between the first ear and the first electronic device, and disconnect the BLE connection between the second ear and the first electronic device; the second electronic device is used to establish a BR / EDR connection with the first ear through the second address when the first ear is the main ear; the second electronic device is also used to establish a BR / EDR connection with the second ear through the second address when the main ear switches from the first ear to the second ear.

[0020] In an embodiment of the present application, if the second electronic device only supports BR / EDR connection, when the left ear is the main ear, the left ear establishes a BR / EDR connection with the second electronic device through the second MAC address, and the right ear can monitor the link between the left ear and the second electronic device. When the right ear is the main ear, the right ear establishes a BR / EDR connection with the second electronic device through the second MAC address, and the left ear can monitor the link between the right ear and the second electronic device. The difference from the BLE connection is that under the BR / EDR connection, whether the left ear is the main ear or the right ear is the main ear, the main ear uses the same MAC address to establish a BR / EDR connection with the electronic device. In BLE mode, whether the left ear is the main ear or the right ear is the main ear, the left ear establishes a BLE connection with the electronic device through its real MAC address, and the right ear establishes a BLE connection with the electronic device through its real MAC address.

[0021] In a second aspect, a Bluetooth connection method is provided, which is applied to an electronic device that supports dual-mode connection, wherein the dual-mode connection includes a BR / EDR connection and a BLE connection. The method includes: the electronic device and an accessory device establish a BR / EDR connection; when the electronic device determines that the accessory device supports the dual-mode connection, the electronic device disconnects the BR / EDR connection with the accessory device and establishes a BLE connection with the accessory device; the electronic device and the accessory device transmit audio data, video data or call data via the BLE connection.

[0022] In the embodiment of the present application, when both the electronic device and the accessory device support dual-mode connection, the electronic device can first establish a BR / EDR connection with the accessory device, and when it is determined that the accessory device supports dual-mode connection, the BR / EDR connection with the accessory device is disconnected and a BLE connection is established with the accessory device. The electronic device can also transmit audio data, video data, or call data, etc. to the accessory device through the BLE connection, which helps to save power consumption of the electronic device.

[0023] In some possible implementations, the electronic device may query the capability information of the accessory device after establishing a BR / EDR connection with the accessory device. After establishing the BR / EDR connection, the electronic device may transmit call data on the SCO or ESCO; and transmit audio data or video data on the ACL.

[0024] In some possible implementations, under a BLE connection, the electronic device can use ISO to transmit call data, audio data, or video data with the accessory device.

[0025] In combination with the second aspect, in certain implementations of the second aspect, before the electronic device disconnects the BR / EDR connection with the accessory device, the process includes: the electronic device sends a query request message to the accessory device through the ACL in the BR / EDR connection established with the accessory device, and the query request message is used to query whether the accessory device supports the dual-mode connection; and the electronic device receives the query response message sent by the accessory device, and the query response message is used to indicate that the accessory device supports the dual-mode connection.

[0026] In an embodiment of the present application, the electronic device can inquire the accessory device for its capability information when the ACL under the BR / EDR connection is established with the accessory device, without having to inquire again after the BR / EDR connection is fully established. This helps to reduce the delay in establishing a BLE connection between the electronic device and the accessory device.

[0027] In combination with the second aspect, in some implementations of the second aspect, the sending the query request information to the accessory device includes: the electronic device sending an echo message to the accessory device, wherein the echo message carries the query request information.

[0028] In an embodiment of the present application, the electronic device can carry the query request information in the echo message, and can confirm the versions supported by both parties to ensure version compatibility.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the accessory device is a Bluetooth headset, which includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, the second address is a MAC address used when the main ear and the electronic device establish a connection, and the electronic device and the accessory device establish a BR / EDR connection, including: when the first ear is the main ear, the electronic device establishes a BR / EDR connection with the first ear through the second address; when the main ear switches from the first ear to the second ear, the electronic device establishes a BR / EDR connection with the second ear through the second address.

[0030] In the embodiment of the present application, no matter the left ear or the right ear is the primary ear, the electronic device establishes a BR / EDR connection with the primary ear through the second address.

[0031] In combination with the second aspect, in certain implementations of the second aspect, the electronic device establishes a BLE connection with the first ear, and the electronic device establishes a BLE connection with the second ear, including: when the first ear is the main ear, the electronic device establishes a BLE connection with the first ear through the first address, and the electronic device establishes a BLE connection with the second ear through the second address; when the main ear switches from the first ear to the second ear, the electronic device establishes a BLE connection with the first ear through the first address, and the electronic device establishes a BLE connection with the second ear through the second address.

[0032] The difference when connecting with BLE is that in BR / EDR connection, no matter the left ear is the main ear or the right ear is the main ear, the main ear uses the same MAC address to establish BR / EDR connection with the electronic device. In BLE mode, no matter the left ear is the main ear or the right ear is the main ear, the left ear uses its real MAC address to establish BLE connection with the electronic device, and the right ear uses its real MAC address to establish BLE connection with the electronic device.

[0033] In an embodiment of the present application, when both the electronic device and the accessory device support dual-mode connection, the electronic device and the accessory device can first establish a BR / EDR connection. Under the BR / EDR connection, the electronic device can query whether the accessory device supports dual-mode connection. When both the electronic device and the accessory device support dual-mode connection, the electronic device can disconnect the BR / EDR connection with the accessory device and establish a BLE connection, and transmit audio data, video data or call data under the BLE connection, which helps to save power consumption of the electronic device.

[0034] In a third aspect, a Bluetooth connection method is provided, which is applied to an accessory device, the accessory device supports dual-mode connection, the dual-mode connection includes a basic rate / enhanced data rate BR / EDR connection and a Bluetooth low energy BLE connection, the method comprising: the accessory device and the electronic device establish a BR / EDR connection; the accessory device sends indication information to the electronic device, the indication information is used to indicate that the accessory device supports the dual-mode connection; the accessory device disconnects the BR / EDR connection with the electronic device, and establishes a BLE connection with the electronic device; the accessory device and the electronic device transmit audio data, video data or call data through the BLE connection.

[0035] In the embodiment of the present application, when both the electronic device and the accessory device support dual-mode connection, the accessory device can first establish a BR / EDR connection with the electronic device. When the accessory device informs the electronic device that it supports dual-mode connection, the electronic device can disconnect the BR / EDR connection with the accessory device and establish a BLE connection with the accessory device. The electronic device can also transmit audio data, video data, or call data to the accessory device through the BLE connection, which helps to save power consumption of the electronic device and the accessory device.

[0036] In some possible implementations, the electronic device may query the capability information of the accessory device after establishing a BR / EDR connection with the accessory device. After establishing the BR / EDR connection, the electronic device may transmit call data on the SCO or ESCO; and transmit audio data or video data on the ACL.

[0037] In some possible implementations, under a BLE connection, the electronic device can use ISO to transmit call data, audio data, or video data with the accessory device.

[0038] In combination with the third aspect, in certain implementations of the third aspect, the accessory device sends indication information to the electronic device, including: after the accessory device establishes an ACL under a BR / EDR connection with the electronic device, the accessory device sends the indication information to the electronic device on the ACL.

[0039] In combination with the third aspect, in certain implementations of the third aspect, the accessory device is a Bluetooth headset, the Bluetooth headset includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, the second address is a MAC address used when the main ear and the electronic device establish a connection, and the accessory device and the electronic device establish a BR / EDR connection, including: when the first ear is the main ear, the first ear establishes a BR / EDR connection with the electronic device through the second address; when the main ear switches from the first ear to the second ear, the second ear establishes a BR / EDR connection with the electronic device through the second address.

[0040] In combination with the third aspect, in certain implementations of the third aspect, the accessory device and the electronic device establish a BLE connection, including: when the first ear is the main ear, the first ear establishes a BLE connection with the electronic device through the first address, and the second ear establishes a BLE connection with the electronic device through the second address; when the main ear switches from the first ear to the second ear, the first ear establishes a BLE connection with the electronic device through the first address, and the second ear establishes a BLE connection with the electronic device through the second address.

[0041] In a fourth aspect, a device is provided, which is included in an electronic device, and has the function of implementing the electronic device behavior in the above aspects and possible implementations of the above aspects. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.

[0042] In a fifth aspect, a device is provided, which is included in an accessory device, and has the function of implementing the above aspects and the possible implementation methods of the above aspects. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.

[0043] In a sixth aspect, an electronic device is provided, comprising: a Bluetooth chip; one or more processors; a memory; and one or more computer programs. The Bluetooth chip supports BR / EDR connection and BLE connection. One or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the Bluetooth connection method in the possible implementation of the second aspect.

[0044] In a seventh aspect, an accessory device is provided, comprising: a Bluetooth chip; one or more processors; a memory; and one or more computer programs. The Bluetooth chip supports BR / EDR connection and BLE connection. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the accessory device, the accessory device executes the Bluetooth connection method in the possible implementation of the third aspect.

[0045] In an eighth aspect, a chip system is provided, which is arranged in an electronic device, and the chip system includes: a Bluetooth chip and a processor, and the Bluetooth chip supports BR / EDR connection and BLE connection. The Bluetooth chip is used to establish a BR / EDR connection with an accessory device; the processor is used to determine that the accessory device supports dual-mode connection; the Bluetooth chip is also used to disconnect the BR / EDR connection with the accessory device and establish a BLE connection with the accessory device.

[0046] In some possible implementations, the Bluetooth chip is specifically used to: establish an ACL under BR / EDR with the accessory device; the Bluetooth chip is also used to send query request information to the accessory device on the ACL, and the query request information is used to query whether the accessory device supports the dual-mode connection; the Bluetooth chip is also used to receive query response information sent by the accessory device, and the query response information is used to indicate that the accessory device supports the dual-mode connection.

[0047] In some possible implementations, the Bluetooth chip is specifically configured to send the query request information to the accessory device via a response echo message of a logical link control and adaptation protocol L2CAP.

[0048] In some possible implementations, the accessory device is a Bluetooth headset, which includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, and the second address is a MAC address used when the main ear and the first electronic device establish a connection. The Bluetooth chip is specifically used to: when the processor determines that the first ear is the main ear, establish a BR / EDR connection with the accessory device through the second address; when the processor determines that the main ear switches from the first ear to the second ear, establish a BR / EDR connection with the accessory device through the second address.

[0049] In some possible implementations, the Bluetooth chip is specifically used to: when the processor determines that the first ear is the master ear, establish a BLE connection with the first ear through the first address and establish a BLE connection with the second ear through the second address; when the processor determines that the master ear is switched from the first ear to the second ear, establish a BLE connection with the first ear through the first address and establish a BLE connection with the second ear through the second address.

[0050] In the ninth aspect, a chip system is provided, which is set in an accessory device, and the chip system includes: a Bluetooth chip and a processor, and the Bluetooth chip supports BR / EDR connection and BLE connection. Among them, the Bluetooth chip is used to establish a BR / EDR connection with an electronic device; the Bluetooth chip is also used to indicate to the electronic device that the accessory device supports dual-mode connection; the Bluetooth chip is also used to disconnect the BR / EDR connection with the electronic device and establish a BLE connection with the electronic device.

[0051] In some possible implementations, the accessory device is a Bluetooth headset, which includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, the second address is a MAC address used when the main ear and the electronic device establish a connection, and the accessory device and the electronic device establish a BR / EDR connection, wherein the Bluetooth chip is used to establish a BR / EDR connection with the electronic device through the second address when the processor determines that the first ear is the main ear; when the processor determines that the main ear is switched from the first ear to the second ear, the second ear establishes a BR / EDR connection with the electronic device through the second address.

[0052] In some possible implementations, the Bluetooth chip is specifically used to: when the processor determines that the first ear is the primary ear, establish a BLE connection with the electronic device through the first address, and establish a BLE connection with the electronic device through the second address; when the processor determines that the primary ear is switched from the first ear to the second ear, establish a BLE connection with the electronic device through the first address, and establish a BLE connection with the electronic device through the second address.

[0053] In a tenth aspect, the present technical solution provides a computer-readable storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the Bluetooth connection method in any possible implementation of any of the above aspects.

[0054] In an eleventh aspect, the present technical solution provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the Bluetooth connection method in any possible design of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0056] Figure 2 It is a schematic diagram of the Bluetooth protocol framework provided in an embodiment of the present application.

[0057] Figure 3 It is a structural diagram of the accessory equipment provided in the embodiment of the present application.

[0058] Figure 4 It is a set of GUIs provided by the embodiments of the present application.

[0059] Figure 5 It is a schematic flowchart of a method for Bluetooth pairing and connection between a mobile phone and a Bluetooth headset provided in an embodiment of the present application.

[0060] Figure 6 It is another set of GUIs according to an embodiment of the present application.

[0061] Figure 7 It is a schematic flowchart of a method for Bluetooth pairing and connection between a mobile phone and a Bluetooth headset provided in an embodiment of the present application.

[0062] Figure 8 It is a schematic flowchart of a method for Bluetooth pairing and connection between a mobile phone and a Bluetooth headset provided in an embodiment of the present application.

[0063] Fig. 9 It is a schematic flowchart of a method for Bluetooth pairing and connection between a mobile phone and a Bluetooth headset provided in an embodiment of the present application.

[0064] Fig.10It is a schematic flowchart of a method for Bluetooth pairing and connection between a mobile phone and a Bluetooth headset provided in an embodiment of the present application.

[0065] Fig.11 It is a schematic diagram of a system architecture provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0067] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0068] The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player function, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to devices equipped with Or a portable electronic device with other operating systems. The portable electronic device may also be other portable electronic devices, such as a laptop computer, etc. It should also be understood that in some other embodiments, the electronic device may not be a portable electronic device, but a desktop computer.

[0069] For example, Figure 1 1 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195.

[0070] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0071] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 101 may also include one or more processors 110. Among them, the controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. In some other embodiments, a memory may also be set in the processor 110 for storing instructions and data. Exemplarily, the memory in the processor 110 may be a high-speed cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the electronic device 101 in processing data or executing instructions.

[0072] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface and / or a USB interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used to transmit data between the electronic device 101 and a peripheral device. The USB interface 130 can also be used to connect headphones to play audio through the headphones.

[0073] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0074] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0075] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193 and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0076] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.

[0077] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0078] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0079] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0080] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0081] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (miniLED), MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.

[0082] In some embodiments of the present application, when the display panel is made of materials such as OLED, AMOLED, FLED, etc., the above Figure 1 The display screen 194 in the embodiment can be bent. Here, the display screen 194 can be bent, which means that the display screen can be bent to any angle at any position and can be kept at the angle. For example, the display screen 194 can be folded in half from the middle to the left or right. It can also be folded in half from the middle to the top or bottom.

[0083] The display screen 194 of the electronic device 100 can be a flexible screen. At present, the flexible screen has attracted much attention for its unique characteristics and huge potential. Compared with traditional screens, flexible screens have the characteristics of strong flexibility and bendability, which can provide users with a new interaction method based on bendable characteristics, and can meet users' more needs for electronic devices. For electronic devices equipped with a foldable display screen, the foldable display screen on the electronic device can be switched between a small screen in a folded form and a large screen in an unfolded form at any time. Therefore, users use the split-screen function on electronic devices equipped with a foldable display screen more and more frequently.

[0084] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.

[0085] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0086] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include one or more cameras 193.

[0087] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0088] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0089] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0090] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0091] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can enable the electronic device 101 to perform the Bluetooth pairing connection method provided in some embodiments of the present application, as well as various applications and data processing, by running the above instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 101. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, a flash memory component, a universal flash storage (UFS), etc. In some embodiments, the processor 110 can enable the electronic device 101 to perform the Bluetooth pairing connection method provided in the embodiment of the present application, as well as other applications and data processing by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor 110. The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0092] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0093] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0094] The gyroscope sensor 180B can be used to determine the motion posture of the terminal 100. In some embodiments, the angular velocity of the terminal 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0095] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0096] The magnetic sensor 180D includes a Hall sensor. The terminal 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal 100 is a flip phone, the terminal 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0097] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in various directions (generally three axes). When the terminal 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the terminal posture and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0098] The distance sensor 180F is used to measure the distance. The terminal 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0099] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal 100 emits infrared light outward through the light emitting diode. The terminal 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 100. When insufficient reflected light is detected, the terminal 100 can determine that there is no object near the terminal 100. The terminal 100 can use the proximity light sensor 180G to detect that the user holds the terminal 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0100] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal 100 is in a pocket to prevent accidental touches.

[0101] The fingerprint sensor 180H is used to collect fingerprints. The terminal 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0102] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal 100 heats the battery 142 to avoid abnormal shutdown of the terminal 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0103] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be arranged on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be arranged on the surface of the terminal 100, which is different from the position of the display screen 194.

[0104] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0105] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal 100 may receive key input and generate key signal input related to user settings and function control of the terminal 100.

[0106] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0107] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0108] like Figure 2 As shown, an embodiment of the present application provides a Bluetooth protocol framework, including but not limited to a host protocol stack, a host controller interface (HCI), and a controller.

[0109] Among them, the Host protocol stack defines multiple applications (profiles) and core protocols (protocols) in the Bluetooth framework. Each profile defines its own corresponding message format and application rules. Profiles are Bluetooth services (applications). In order to achieve interoperability between different devices on different platforms, the Bluetooth protocol has formulated specifications for various possible and universal application scenarios, such as the Bluetooth audio transmission model agreement (advanced audio distribution profile, A2DP), Bluetooth hands-free profile (hands-free profile, HFP), etc.

[0110] The core protocol includes but is not limited to the basic Bluetooth service protocol (service discovery protocol, SDP), logical link control and adaptation protocol (logical link control and adaptation protocol, L2CAP), etc. The core protocol is indispensable in the Bluetooth protocol stack.

[0111] Among them, HCI provides a unified interface for the upper layer protocol to enter the link manager and a unified way to enter the baseband. There will be several transmission layers between the host core protocol stack and the controller. These transmission layers are transparent and complete the task of transmitting data. The Bluetooth Special Interest Group (SIG) specifies four physical bus methods for connecting to hardware, namely four HCI transmission layers: USB, RS232, UART and PC card.

[0112] Among them, the controller defines the underlying hardware part, including radio frequency (RF), baseband (BB) and link management (LM). The RF layer filters and transmits data bit streams through microwaves in the 2.4GHz unlicensed ISM band, and mainly defines the conditions that the Bluetooth transceiver needs to meet for normal operation in this band. The baseband is responsible for frequency hopping and the transmission of Bluetooth data and information frames. The link management is responsible for connecting, establishing and dismantling links and performing security control. The link management (link manager, LM) layer is the link management layer protocol of the Bluetooth protocol stack, responsible for translating upper-layer HCI commands into operations that the baseband can accept, establishing asynchronous links (asynchronous connection-oriented link, ACL), synchronous links (synchronous connection-oriented / extended, SCO) and extended synchronous links (extended synchronous connection-oriented, ESCO), and making Bluetooth devices enter energy-saving working modes. The link control (link control, LC) layer is responsible for responding to upper-layer LM commands (such as LM commands that execute functions such as establishing a transmission link for data packets and maintaining links) during the transmission of a batch of data packets.

[0113] Under BR / EDR connection, electronic devices and accessory devices use SCO and ESCO to transmit call data; and use ACL link to transmit audio data or video data.

[0114] Under a BLE connection, an electronic device can use an isochronous channel (ISO) with an accessory device to transmit call data, audio data, or video data.

[0115] The method described in the embodiment of the present application is as follows: Figure 1 Part of the content implemented by the wireless communication module 160 of the electronic device 100 shown may be executed by a Bluetooth module or a Bluetooth chip.

[0116] Figure 3 The structural diagram of the accessory device 200 provided in the embodiment of the present application is exemplarily shown.

[0117] The following is a detailed description of the embodiment using the accessory device 200 as an example. It should be understood that: Figure 3 The accessory device 200 shown is only an example, and the accessory device 200 may have more Figure 3More or fewer components shown in the figure may be combined with two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0118] like Figure 3 As shown, the accessory device 200 may include: a processor 201, a memory 202, a Bluetooth communication module 203, an antenna 204, a power switch 205, a USB communication processing module 206, and an audio module 207. Among them:

[0119] The processor 201 can be used to read and execute computer-readable instructions. In a specific implementation, the processor 201 may mainly include a controller, an arithmetic unit, and a register. Among them, the controller is mainly responsible for decoding instructions and sending control signals for operations corresponding to the instructions. The arithmetic unit is mainly responsible for saving register operands and intermediate operation results temporarily stored during the execution of instructions. In a specific implementation, the hardware architecture of the processor 201 may be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.

[0120] In some embodiments, the processor 201 may be used to parse signals received by the Bluetooth communication processing module 203, such as a pairing mode modification request sent by the electronic device 100, etc. The processor 201 may be used to perform corresponding processing operations according to the parsing results, such as generating a pairing mode modification response, etc.

[0121] The memory 202 is coupled to the processor 201 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 202 may store an operating system, such as uCOS, VxWorks, RTLinux, and other embedded operating systems. The memory 202 may also store a communication program, which may be used to communicate with the electronic device 100, one or more servers, or other devices.

[0122] The Bluetooth communication module 203 may include a classic Bluetooth (BT) module and a Bluetooth low energy (BLE) module.

[0123] In some embodiments, the Bluetooth communication module 203 can monitor signals transmitted by other devices (such as the electronic device 100), such as detection requests, scanning signals, etc., and can send response signals, scanning responses, etc., so that other devices (such as the electronic device 100) can discover the accessory device 200, and establish wireless communication connections with other devices (such as the electronic device 100), and communicate with other devices (such as the electronic device 100) via Bluetooth.

[0124] In other embodiments, the Bluetooth communication module 203 can also transmit signals, such as broadcasting BLE signals, so that other devices (such as the electronic device 100) can discover the accessory device 200, establish wireless communication connections with other devices (such as the electronic device 100), and communicate with other devices (such as the electronic device 100) via Bluetooth.

[0125] The wireless communication function of the accessory device 200 can be implemented through the antenna 204, the Bluetooth communication module 203, the modem processor, etc.

[0126] Antenna 204 may be used to transmit and receive electromagnetic wave signals. Each antenna in accessory device 200 may be used to cover a single or multiple communication frequency bands.

[0127] In some embodiments, the Bluetooth communication module 203 may have one or more antennas.

[0128] The power switch 205 may be used to control the power supply to the accessory device 200 .

[0129] The USB communication processing module 206 may be used to communicate with other devices via a USB interface (not shown).

[0130] The audio module 26 can be used to output audio signals through the audio output interface, so that the accessory device 200 can support audio playback. The audio module can also be used to receive audio data through the audio input interface. The accessory device 200 can be a media playback device such as a Bluetooth headset.

[0131] In some embodiments, the accessory device 200 may further include a display screen (not shown), wherein the display screen may be used to display images, prompt information, etc. The display screen may be an LCD display screen, an OLED display screen, an AMOLED display screen, a FLED display screen, a QLED display screen, and the like.

[0132] In some embodiments, the accessory device 200 may also include a serial interface such as an RS-232 interface. The serial interface may be connected to other devices, such as an audio external speaker device such as a speaker, so that the accessory device 200 and the audio external speaker device can cooperate to play audio and video.

[0133] It is understandable that Figure 3The illustrated structure does not constitute a specific limitation on the accessory device 200. In other embodiments of the present application, the accessory device 200 may include more or fewer components than those shown in the figure, or combine some components, or separate some components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0134] In the method described in the embodiments of the present application, the Bluetooth protocol framework used by the accessory device can refer to the above Figure 2 As shown, no further description is given here.

[0135] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 1 and Figure 2 A mobile phone having the structure shown, and Figure 3 Taking the Bluetooth headset shown as an example, the Bluetooth pairing connection method provided in the embodiment of the present application is specifically described in combination with the accompanying drawings.

[0136] Figure 4 A set of graphical user interfaces (GUIs) provided by an embodiment of the present application is shown. Figure 4 The figure shows the process of Bluetooth headset connecting to a mobile phone through proximity discovery.

[0137] See also Figure 4 As shown in (a), the mobile phone is in a bright screen state and displays the mobile phone desktop. The mobile phone desktop includes applications (applications, APPs) such as Alipay application, task card store, Weibo, photo album, WeChat, card bag, settings and themes. The Bluetooth headset is in the headset box at this time.

[0138] See also Figure 4 As shown in (b), when the Bluetooth headset detects that the user opens the headset box and approaches the mobile phone, the mobile phone will automatically pop up a reminder box 401, wherein the reminder box 401 can display the device name of the Bluetooth headset. When the mobile phone detects that the user clicks the control 402, the mobile phone can pair with the Bluetooth headset.

[0139] Figure 5 A schematic flow chart of a method 500 for pairing a mobile phone and a Bluetooth headset for Bluetooth connection according to an embodiment of the present application is shown. Figure 5 As shown, the method 500 includes:

[0140] S501, the Bluetooth headset detects that the user opens the headset box.

[0141] S502, in response to detecting the user opening the earphone box, a basic rate (BR) / enhanced data rate (EDR) link is first established between the main ear and the auxiliary ear (or a BR / EDR link is first established between the left ear and the right ear).

[0142] S503, the Bluetooth headset determines the master ear, and the master ear can send a BLE broadcast data packet to surrounding devices.

[0143] Exemplarily, the BLE broadcast data packet may carry the MAC address of the master ear and the device type of the Bluetooth headset.

[0144] It should be understood that in the embodiment of the present application, the master ear can be determined according to a predefined rule. The predefined rule can be a combination of static configuration and dynamic configuration.

[0145] For example, the MAC address of the left ear of a Bluetooth headset is MAC address 1, and the MAC address of the right ear is MAC address 2. Before unpacking the Bluetooth headset, the right ear can be statically configured as the primary ear, and the above BLE broadcast can carry MAC address 2 and the device type of the Bluetooth headset. When the mobile phone receives the BLE broadcast data packet, it can parse the MAC address as MAC address 2, and the mobile phone will always establish a BR / EDR connection with the Bluetooth headset using MAC address 2.

[0146] When the Bluetooth headset detects that the user has opened the box, the Bluetooth headset can dynamically configure the method for determining the master ear.

[0147] For example, a Bluetooth headset can determine which is the primary ear and which is the secondary ear based on the positions of the left and right ears. When the Bluetooth headset detects that the left ear is inserted into the user's ear and the right ear has not been inserted into the user's ear, the Bluetooth headset can determine that the left ear is the primary ear and the right ear is the secondary ear. At this time, a BR / EDR link has been established between the left and right ears, that is, the left ear knows the MAC address of the right ear, and the right ear also knows the MAC address of the left ear. Then the left ear can use MAC address 2 to establish a BR / EDR link with the mobile phone, and the right ear can monitor (or, intercept) the link between the mobile phone and the left ear.

[0148] When both the left ear and the right ear are inserted into the user's ears, the Bluetooth headset can also determine which is the left ear and which is the right ear based on the power of the left ear and the right ear. For example, when both the left ear and the right ear are inserted into the user's ears, the power of the right ear is higher than that of the left ear, then the Bluetooth headset can determine that the right ear is the primary ear and the left ear is the secondary ear, then the right ear can use MAC address 2 to establish a BR / EDR link with the mobile phone, and the left ear can monitor (or intercept) the link between the mobile phone and the right ear.

[0149] S504, after receiving the BLE broadcast data packet, the mobile phone displays the device type of the Bluetooth headset and reminds the user whether to establish a connection between the mobile phone and the Bluetooth headset.

[0150] For example, Figure 4 As shown in (b) in the figure, the device type of the Bluetooth headset and the control 402 can be displayed on the display screen of the mobile phone.

[0151] S505 , when the mobile phone detects that the user clicks on the control 402 , the mobile phone may initiate a paging (page) for MAC address 2 .

[0152] S506, when the Bluetooth headset is in paging scanning (page scan), a page sent by the mobile phone is received, and the mobile phone and the main ear establish a (BR / EDR) ACL link.

[0153] S507: The mobile phone and the master earphone perform a (BR / EDR) pairing / SDP / encryption process.

[0154] It should be understood that S505 and S506 can be understood as a standard Bluetooth pairing process between the mobile phone and the master ear.

[0155] S508, data is transmitted between the mobile phone and the master earphone.

[0156] For example, when a mobile phone receives a call through a Bluetooth headset, an HFP connection can be established between the mobile phone and the primary earphone.

[0157] For example, when a mobile phone listens to music or watches videos through a Bluetooth headset, an A2DP connection can be established between the mobile phone and the main headset.

[0158] It should be understood that the above description of establishing a connection between a mobile phone and a Bluetooth headset is based on an example in which the Bluetooth headset approaches and discovers the mobile phone. The mobile phone may also actively search for the Bluetooth headset to establish a connection with the Bluetooth headset.

[0159] It should also be understood that the above method 500 is a process of connecting to a mobile phone through proximity discovery during the first connection of a Bluetooth headset. When the user opens the headset box next time, the main headset can initiate a page for the MAC address of the mobile phone. When the mobile phone is in page scan, the mobile phone can perform a standard Bluetooth pairing process with the main headset to establish a BR / EDR connection.

[0160] Figure 6 Another set of GUIs according to an embodiment of the present application is shown.

[0161] Figure 6 The GUI shown is described by taking the example that the mobile phone detects that the user turns on the Bluetooth function and then actively searches for the Bluetooth headset.

[0162] See also Figure 6 As shown in (a) of FIG. 1 , the GUI is a mobile phone desktop. The mobile phone desktop includes icons of multiple applications, including a setting icon 601. When the mobile phone detects that the user clicks the icon 601 on the desktop, the setting mobile phone related functions can be started, and the display is as follows: Figure 6 GUI shown in (b) in .

[0163] See also Figure 6 The GUI shown in (b) is the setting interface of the mobile phone. The GUI includes multiple function options, including wireless and network, device connection, desktop and wallpaper and sound, etc. Among them, the user can set up functions such as Bluetooth, NFC and mobile phone screen projection through the device connection function. When the mobile phone detects that the user clicks the device connection function 602, the mobile phone opens the Bluetooth connection setting interface and displays the following Figure 6 GUI shown in (c) in FIG.

[0164] See also Figure 6 The GUI shown in (c) of FIG. 1 is a device connection setting interface of the mobile phone. The GUI includes multiple function options under the device connection, and the multiple function options include device connection options such as Bluetooth, NFC, Huawei beacon, Huawei share, and mobile phone screen projection. When the mobile phone detects that the user clicks on the Bluetooth function 603, the mobile phone can open the Bluetooth function setting interface and display the following Figure 6 GUI shown in (d).

[0165] join Figure 6 The GUI shown in (d) is a Bluetooth setting interface. The Bluetooth device interface includes a Bluetooth switch control 604, a device name "Huawei P30" and other functions. When the mobile phone detects that the user clicks the control 604, the mobile phone can turn on the Bluetooth function and display Figure 6 As shown in (e) in .

[0166] See also Figure 6 The GUI shown in (e) is a Bluetooth setting interface. The setting interface can display paired devices and available devices, where the paired devices can be Bluetooth devices that the mobile phone has previously connected to, and the available devices can be Bluetooth devices searched by the mobile phone.

[0167] See also Figure 6The GUI shown in (f) in the figure is a Bluetooth setting interface. The available devices in the setting interface can display the Bluetooth devices searched by the mobile phone, including "Bluetooth headset" 605. When the mobile phone detects that the user clicks "Bluetooth headset" 605, the mobile phone can initiate a paging to the Bluetooth headset according to the media access control (MAC) address of the Bluetooth headset and display the following information: Figure 6 GUI shown in (g).

[0168] See also Figure 6 The GUI shown in (g) is a Bluetooth setting interface. In the Bluetooth setting interface, it can be displayed in the paired devices that the Bluetooth device named "Bluetooth headset" and the mobile phone are connected.

[0169] Figure 7 A schematic flow chart of a method 700 for pairing a mobile phone and a Bluetooth headset according to an embodiment of the present application is shown. Figure 7 As shown, the method 700 includes:

[0170] S701, the Bluetooth headset detects that a user opens the headset box.

[0171] S702: In response to the user opening the earphone box, the left ear and the right ear establish a BR / EDR link.

[0172] S703, the Bluetooth headset detects that the user presses the function key on the headset box, and the master ear enters the inquiry scan.

[0173] It should be understood that after the mobile phone detects that the user presses the function key to enter the pairing mode, the host sends a command to the controller, causing the controller to enter the pairing mode.

[0174] S704: The mobile phone detects that the user turns on the Bluetooth function.

[0175] For example, Figure 6 As shown in (c) in FIG. 8 , when the mobile phone detects that the user clicks on the Bluetooth function 603 , the mobile phone turns on the Bluetooth.

[0176] S705, the mobile phone sends an inquiry message to surrounding devices.

[0177] S706, the master ear sends an FHS packet to the mobile phone in response to the inquiry sent by the mobile phone, wherein the FHS packet includes the MAC address of the master ear.

[0178] It should be understood that the process of determining the dominant ear may refer to the description in the above method 500, and for the sake of brevity, it will not be repeated here.

[0179] S707, the mobile phone sends a request message to the master ear according to the MAC address in the FHS packet, where the request message is used to request the device name of the Bluetooth headset.

[0180] S708, in response to the request information, the master ear sends the device name of the Bluetooth headset to the mobile phone.

[0181] S709: The mobile phone displays the device name of the Bluetooth headset in the available devices in the Bluetooth device search interface.

[0182] For example, Figure 6 As shown in (f) in FIG. 1 , the device name of the Bluetooth headset may be “Bluetooth headset”.

[0183] S710: The mobile phone detects that the user clicks on “Bluetooth headset”.

[0184] S711, in response to the user clicking on the "Bluetooth headset", the mobile phone initiates paging for the MAC address of the Bluetooth headset.

[0185] S712, the master ear is in a page scan state. After receiving a page sent by the mobile phone, the mobile phone and the master earphone establish an ACL link.

[0186] S713: (BR / EDR) pairing / SDP / encryption process is performed between the mobile phone and the master earphone.

[0187] It should be understood that S712 and S713 can be understood as a standard Bluetooth pairing process between the mobile phone and the master ear.

[0188] S714, data transmission between the mobile phone and the main earphone.

[0189] For example, when a mobile phone receives a call through a Bluetooth headset, an HFP connection can be established between the mobile phone and the primary earphone.

[0190] For example, when a mobile phone listens to music or watches videos through a Bluetooth headset, an A2DP connection can be established between the mobile phone and the main headset.

[0191] It should be understood that the above method 700 introduces the process of the mobile phone actively querying the Bluetooth headset and establishing a connection.

[0192] The above describes the process of establishing a connection between a mobile phone and a Bluetooth headset in combination with method 500 and method 700. Currently, the connection established between a mobile phone and a Bluetooth headset can be a BR / EDR connection, that is, the mobile phone only establishes a BR / EDR connection with the primary ear, and the secondary ear can monitor (or intercept) the link between the mobile phone and the primary ear.

[0193] For mobile phones and Bluetooth headsets that only support BR / EDR mode, the mobile phone and Bluetooth headset can establish a BR / EDR connection and then perform normal data transmission. In the embodiment of the present application, another BLE mode connection method is provided. For mobile phones and Bluetooth headsets that support BR / EDR and BLE, a BR / EDR connection can be established. After identifying the type and capability of the peer device, it is selected whether the subsequent connection is based on the BR / EDR mode or the BLE mode.

[0194] Figure 8 A schematic flow chart of a method 800 for pairing a mobile phone and a Bluetooth headset for Bluetooth connection provided in an embodiment of the present application is shown. Figure 8 As shown, the method 800 includes:

[0195] S801, a mobile phone and a Bluetooth headset establish a connection through a first mode.

[0196] Exemplarily, the first mode may be a BR / EDR mode.

[0197] It should be understood that the process of establishing a BR / EDR connection between the mobile phone and the Bluetooth headset can refer to the description in the above-mentioned method 500 and method 700. For the sake of brevity, it will not be repeated here.

[0198] It should also be understood that in the first mode, the mobile phone actually establishes a connection with the main earpiece of the Bluetooth headset.

[0199] S802: When the mobile phone determines that the Bluetooth headset supports dual-mode and the mobile phone itself also supports dual-mode, the mobile phone and the Bluetooth headset establish a connection through the second mode.

[0200] In one embodiment, after the mobile phone and the Bluetooth headset establish a connection through the second mode, the mobile phone and the Bluetooth headset disconnect the connection in the first mode.

[0201] In the embodiment of the present application, the second mode takes precedence over the first mode. After establishing the ACL link through BR / EDR, the mobile phone can ask whether the Bluetooth headset supports dual-mode. If both the mobile phone and the Bluetooth headset support dual-mode, the mobile phone and the Bluetooth headset can establish a BLE connection.

[0202] For example, if both the mobile phone and the accessory device (e.g., a watch, a bracelet, etc.) support dual-mode, the mobile phone can transmit heart rate, blood pressure, and other data to the accessory device through BLE connection, which can save power consumption of the mobile phone and the accessory device. Alternatively, the BLE extended transmission protocol can be used to transmit audio data, video data, or call data.

[0203] If the mobile phone supports dual-mode but the accessory device does not; or if the mobile phone does not support dual-mode but the accessory device does, the mobile phone can continue to perform (BR / EDR) pairing / SDP / encryption and other operations after establishing an ACL link through BR / EDR, so that the mobile phone and the accessory device can establish a BR / EDR connection before transmitting data.

[0204] It should be understood that if the mobile phone does not support dual-mode, or the mobile phone supports dual-mode but the Bluetooth headset does not support dual-mode, or the mobile phone does not support dual-mode but the Bluetooth headset supports dual-mode, the mobile phone can continue to maintain a connection with the Bluetooth headset through the first mode.

[0205] It should also be understood that in the second mode, the mobile phone actually establishes a BLE connection with the main ear and the secondary ear of the Bluetooth headset respectively, or in other words, the mobile phone establishes a BLE connection with the left ear and the right ear of the Bluetooth headset respectively.

[0206] In the embodiment of the present application, the BLE mode is more helpful in saving power consumption of electronic devices than the BR / EDR mode.

[0207] The BLE mode of the embodiment of the present application is described below.

[0208] Fig. 9 is a schematic flow chart showing a method 900 for pairing a mobile phone and a Bluetooth headset for Bluetooth connection provided in an embodiment of the present application, such as Fig. 9 As shown, the method 900 includes:

[0209] S901, the mobile phone and the Bluetooth headset establish a connection through the first mode.

[0210] Exemplarily, the first mode may be a BR / EDR mode. The mobile phone actually establishes a BR / EDR connection with the primary earphone.

[0211] It should be understood that the process of establishing a BR / EDR connection between the mobile phone and the Bluetooth headset can refer to the description in the above-mentioned method 500 and method 700. For the sake of brevity, it will not be repeated here.

[0212] S902, the mobile phone sends a capability query request message to the Bluetooth headset, where the capability query request message is used to query whether the Bluetooth headset supports dual-mode.

[0213] Exemplarily, the mobile phone sends a capability query request message to the master ear.

[0214] Exemplarily, the mobile phone sends query request information to the Bluetooth headset via echo. For example, the mobile phone can send an echo request message to the Bluetooth headset, and the echo request message carries the capability query request information; the Bluetooth headset can send an echo response message to the mobile phone, and the echo response message carries the capability query response information.

[0215] It should be understood that S902 can be a capability query performed when the BR / EDR connection has been established between the mobile phone and the Bluetooth headset in S901. It can also be that during the process of establishing BR / EDR between the mobile phone and the Bluetooth headset in S901, when the ACL link is established between the mobile phone and the main ear, the mobile phone can send the capability query request information to the Bluetooth headset, so that the mobile phone can determine whether the Bluetooth headset supports dual-mode before establishing the BR / EDR protocol and profile with the main ear. If the mobile phone determines that the Bluetooth headset supports dual-mode, then this can avoid the subsequent BR / EDR connection establishment process and quickly switch to BLE connection, which helps to save the delay of establishing BLE connection between the mobile phone and the Bluetooth headset.

[0216] S903, the master earphone sends capability query response information to the mobile phone, where the capability query response information is used to indicate that the Bluetooth headset supports dual-mode.

[0217] Exemplarily, the master ear sends the capability query response information to the mobile phone.

[0218] S904, the mobile phone queries the main ear for the real MAC addresses of the main ear and the secondary ear.

[0219] For example, the MAC address of the left ear of the Bluetooth headset is MAC address 1, and the MAC address of the right ear is MAC address 2. In BR / EDR mode, the Bluetooth headset can be statically configured as the right ear before unpacking, so the Bluetooth headset will use MAC address 2 to establish a BR / EDR connection with the mobile phone after unpacking.

[0220] After the Bluetooth headset detects that the user has opened the box, the Bluetooth headset can also dynamically adjust the primary ear based on the position and power level. For example, if the Bluetooth headset determines that the left ear is in the user's ear and the right ear is not in the user's ear, then the left ear can be determined to be the primary ear. Since a connection is established between the left and right ears after the box is opened, the left ear actually knows the MAC address of the right ear, so the left ear can use MAC address 2 to establish a BR / EDR connection with the mobile phone.

[0221] Exemplarily, the Bluetooth headset may have a wearing detection function, for example, the Bluetooth headset may detect the position of the headset through a proximity light sensor. The position of the left ear or the right ear is detected through the proximity light sensor during the dynamic address change process. The proximity light sensor may determine whether the left ear or the right ear is located in the user's ear, or the proximity light sensor may determine whether the left ear or the right ear has fallen off from the user's ear.

[0222] For another example, if both the left ear and the right ear are in the user's ears, the Bluetooth headset can determine the primary ear based on the power of the left ear and the right ear. If the power of the right ear is higher than that of the left ear, the Bluetooth headset can determine that the right ear is the primary ear. At this time, the right ear can use MAC address 2 to establish a BR / EDR connection with the mobile phone.

[0223] In BLE mode, the mobile phone stores the address information of MAC address 2, so the mobile phone can query the MAC addresses of the main ear and the secondary ear from the main ear based on MAC address 2.

[0224] S905: The primary ear sends the real MAC addresses of the primary ear and the secondary ear to the mobile phone.

[0225] For example, if the right ear is in the user's ear and the left ear is no longer in the user's ear, the right ear is the main ear. In fact, the main ear (right ear) can establish an ACL link with the mobile phone through MAC address 2, and the mobile phone asks the main ear (right ear) whether it supports dual-mode. If the capability query response information returned by the main ear (right ear) indicates that dual-mode is supported, the mobile phone will then query the main ear (right ear) for MAC address information. The main ear (right ear) will return its real MAC address to the mobile phone as MAC address 2, and the MAC address of the other ear (left ear) as MAC address 1.

[0226] It should be understood that when the mobile phone and the primary ear (right ear) establish a (BR / EDR) ACL link, the MAC address 2 can be used to establish the ACL link with the mobile phone. When the primary ear (right ear) reports the real MAC addresses of the primary ear and the secondary ear to the mobile phone, it can report (MAC address 2, MAC address 1), indicating that the real MAC address of the primary ear (right ear) is MAC address 2, and the real MAC address of the secondary ear (left ear) is MAC address 1.

[0227] Exemplarily, Table 1 shows the working status of the main ear in the BR / EDR mode and the BLE mode when the right ear is the main ear.

[0228] Table 1 Working status of the master ear in BR / EDR mode and BLE mode

[0229]

[0230] For example, if the left ear is in the user's ear and the right ear is no longer in the user's ear, the left ear is the main ear. In fact, the main ear (left ear) can establish an ACL link with the mobile phone through MAC address 2, and the mobile phone asks the main ear (left ear) whether it supports dual-mode. If the capability query response information returned by the main ear (left ear) indicates that dual-mode is supported, the mobile phone will then query the main ear (left ear) for MAC address information. The main ear (left ear) will return its real MAC address to the mobile phone as MAC address 1, and the MAC address of the opposite ear (right ear) is MAC address 2.

[0231] It should be understood that when the mobile phone and the primary ear (left ear) establish a (BR / EDR) ACL link, the MAC address 2 can be used to establish the ACL link with the mobile phone. When the primary ear (left ear) reports the real MAC addresses of the primary ear and the secondary ear to the mobile phone, it can report (MAC address 1, MAC address 2), indicating that the real MAC address of the primary ear (left ear) is MAC address 1, and the real MAC address of the secondary ear (right ear) is MAC address 2.

[0232] Exemplarily, Table 2 shows another working state of the dominant ear in the BR / EDR mode and the BLE mode when the left ear is the dominant ear.

[0233] Table 2 Another working state of the master ear in BR / EDR mode and BLE mode

[0234]

[0235] S906: The mobile phone and the master earphone are connected via the second mode.

[0236] Exemplarily, the second mode is the BLE mode.

[0237] In one embodiment, the process of establishing a BLE connection between the real MAC address of the mobile phone and the main ear includes: establishing a (BLE) ACL link between the real MAC address of the mobile phone and the main ear; performing (BLE) SDP / encryption between the real MAC address of the mobile phone and the main ear; and performing (BLE) HFP / A2DP connection between the real MAC address of the mobile phone and the main ear.

[0238] S907: The mobile phone and the auxiliary headset are connected via the second mode.

[0239] In one embodiment, the process of establishing a BLE connection between the real MAC address of the mobile phone and the secondary ear includes: the real MAC address of the mobile phone and the secondary ear establishes a (BLE) ACL link; the real MAC address of the mobile phone and the secondary ear performs (BLE) SDP / encryption; the real MAC address of the mobile phone and the secondary ear performs (BLE) HFP / A2DP connection.

[0240] For example, when the right ear is the primary ear, the primary ear (right ear) will return its real MAC address as MAC address 2 to the mobile phone, and the MAC address of the secondary ear (left ear) is MAC address 1. Then the mobile phone actually establishes a BLE connection with the real MAC address (MAC address 2) of the primary ear (right ear). The mobile phone establishes a BLE connection with the real MAC address (MAC address 1) of the secondary ear (left ear).

[0241] For example, when the left ear is the primary ear, the primary ear (left ear) will return its real MAC address as MAC address 1 to the mobile phone, and the MAC address of the secondary ear (right ear) is MAC address 2. Then the mobile phone actually establishes a BLE connection with the real MAC address (MAC address 1) of the primary ear (left ear). The mobile phone establishes a BLE connection with the real MAC address (MAC address 2) of the secondary ear (right ear).

[0242] Fig.10 A schematic flow chart of a method 1000 for pairing a mobile phone and a Bluetooth headset for Bluetooth connection provided in an embodiment of the present application is shown, as shown in FIG. Fig.10 As shown, the method 1000 includes:

[0243] S1001, the Bluetooth headset detects that the user opens the headset box.

[0244] S1002: In response to the user opening the earphone box, the left ear and the right ear of the Bluetooth earphone establish a BR / EDR connection.

[0245] S1003, the master ear determines whether the paired device list (PDL) PDL is empty.

[0246] It should be understood that the process of the Bluetooth headset determining the primary ear and the secondary ear can refer to the description in the above method 500, and for the sake of brevity, it will not be repeated here.

[0247] For example, if the PDL is not empty, the master ear can initiate a page by targeting the MAC address of the last connected electronic device.

[0248] For another example, if the PDL is empty, it means that the Bluetooth headset is unpacked for the first time or was not connected to other electronic devices when it was unpacked last time.

[0249] S1004: The Bluetooth headset detects that a user presses a function key.

[0250] S1005: In response to the user pressing a function key, the Bluetooth headset enters an inquiry scan.

[0251] S1006, the Bluetooth settings interface of the mobile phone detects the user's operation of turning on Bluetooth.

[0252] S1007, in response to the user turning on Bluetooth, settings sends an instruction to the Bluetooth controller (Bluetoothcontroller), instructing the Bluetooth controller to start searching for Bluetooth devices.

[0253] S1008: The Bluetooth controller initiates an inquiry to surrounding devices.

[0254] S1009, after receiving the inquiry, the master ear sends an FHS packet to the Bluetooth controller of the mobile phone, and the FHS packet includes the MAC address of the master ear.

[0255] Exemplarily, the MAC address of the left ear is MAC address 1, and the MAC address of the right ear is MAC address 2. Before the Bluetooth headset is unpacked, the right ear can be statically configured as the primary ear. When the Bluetooth headset determines that the right ear is in the ear and the left ear is not in the user's ear, the right ear can be determined to be the primary ear. At this time, the right ear reports an FHS packet, which includes MAC address 2.

[0256] S1010, after receiving the FHS packet, the mobile phone sends device name query information to the master ear.

[0257] S1011: The master ear returns its device name to the mobile phone.

[0258] Exemplarily, the device name of the Bluetooth device is “Bluetooth headset”.

[0259] For example, Figure 6 In (f), a Bluetooth device named "Bluetooth Headset" can be displayed in the available devices on the Bluetooth settings interface of the mobile phone.

[0260] S1012, the mobile phone displays the device name “Bluetooth headset” of the Bluetooth device in the available devices in the Bluetooth setting interface.

[0261] S1013, the mobile phone detects that the user clicks the device name of the Bluetooth device.

[0262] S1014, in response to the user clicking on the device name of the Bluetooth device, the mobile phone initiates a page for MAC address 2.

[0263] S1015, after the master ear in page scanning receives the page sent by the mobile phone, the Bluetooth controller (Bluetooth controller) of the mobile phone and the master ear establish a (BR / EDR) ACL link.

[0264] It should be understood that S1001-S1015 is explained by taking the mobile phone actively searching for a Bluetooth headset as an example, and the process can refer to the description of the process S701-S712 in the above method 700.

[0265] It should also be understood that S1001-S1015 can also be replaced by the process of S501-S506 in the above method 500, that is, the mobile phone can establish a (BR / EDR) ACL link with the main ear through active search, or the Bluetooth headset can establish a (BR / EDR) ACL link with the mobile phone through proximity discovery.

[0266] S1016, the Bluetooth stack of the mobile phone sends a capability query request message to the master ear to query whether the Bluetooth headset supports dual-mode.

[0267] In an embodiment of the present application, after the mobile phone establishes an ACL link with the Bluetooth headset, it can send capability query request information to the Bluetooth headset, so that capability interaction can be performed without the mobile phone and the Bluetooth headset establishing a Bluetooth connection. When both the mobile phone and the Bluetooth headset support dual mode, it helps to save the delay in establishing a connection between the mobile phone and the Bluetooth headset through the second mode.

[0268] S1017, the master earphone sends a capability query response message to the mobile phone, where the capability query response message is used to indicate that the Bluetooth headset supports dual-mode.

[0269] For example, the mobile phone sends the capability query request information to the main ear via echo, which can confirm the versions supported by both parties and ensure version compatibility.

[0270] S1018, the Bluetooth protocol stack of the mobile phone determines whether it supports dual-mode.

[0271] It should be understood that if both the mobile phone and the Bluetooth headset support dual mode and have the same main version, the mobile phone and the Bluetooth headset can enter the second mode connection.

[0272] It should be understood that there is no actual order between S1018 and S1016-S1017. The mobile phone may first determine whether it supports dual-mode, and after determining that it supports dual-mode, the mobile phone executes S1016; the mobile phone may first execute S1016-S1017, and after determining that the Bluetooth headset supports dual-mode, the mobile phone determines whether it supports dual-mode.

[0273] If the Bluetooth protocol stack of the mobile phone determines that it does not support dual-mode, execute steps S1019-S1021.

[0274] If the Bluetooth protocol stack of the mobile phone determines that it also supports dual-mode, the steps after S1022 are executed.

[0275] S1019, the process of (BR / EDR) pairing / SDP / encryption between the Bluetooth protocol stack of the mobile phone and the master earphone.

[0276] S1020, the Bluetooth protocol stack of the mobile phone reports the connection event to the settings of the mobile phone.

[0277] S1021, the Bluetooth settings interface of the mobile phone shows that the mobile phone and the Bluetooth headset are connected.

[0278] For example, Figure 6 As shown in (g), in the Bluetooth setting interface, the paired devices can show that the Bluetooth device named "Bluetooth Headset" and the mobile phone are connected.

[0279] S1022, the Bluetooth protocol stack of the mobile phone sends MAC address query information to the primary ear, where the MAC address query information is used to query the real MAC addresses of the primary ear and the secondary ear.

[0280] In one embodiment, the Bluetooth protocol stack of the mobile phone can carry its own version information through (BR / EDR) L2CAP Echo to confirm the second mode protocol version that both parties can support. The mobile phone initiates a Bluetooth address query request to the headset, and carries the BR MAC address of the mobile phone and the random BLE address in the echo request message. After receiving the version information of the mobile phone, the Bluetooth headset can determine that the mobile phone wants to query the real MAC addresses of the primary ear and the secondary ear.

[0281] Exemplarily, the version information carried by the mobile phone may include 1 byte to indicate the main version number and 1 byte to indicate the sub-version number.

[0282] S1023, the master ear sends a MAC address query response message to the Bluetooth protocol stack of the mobile phone. The MAC address query response message carries the real MAC addresses of the master ear and the slave ear.

[0283] It should be understood that the process of S1023 can refer to the description in the above method 900, and for the sake of brevity, it will not be repeated here.

[0284] S1024, the primary ear sends (BR / EDR) synchronization pairing information to the secondary ear, and synchronizes the link key generated under BR / EDR to the secondary ear.

[0285] S1025, the master ear notifies the slave ear to send a standard BLE unconnectable broadcast.

[0286] S1026: The master ear stops sending the unconnectable broadcast.

[0287] S1027, the master ear uses its real MAC address to send a connectable broadcast, so that the mobile phone can initiate a BLE connection to the master ear.

[0288] S1028, the secondary ear uses its real MAC address to send a connectable broadcast, so that the mobile phone can initiate a BLE connection to the secondary ear.

[0289] The Bluetooth headset can first stop sending non-continuous broadcasts and then switch to sending continuous broadcasts.

[0290] S1029, the Bluetooth protocol stack of the mobile phone adds the real MAC addresses of the primary ear and the secondary ear to the whitelist.

[0291] S1030: The Bluetooth protocol stack of the mobile phone notifies the Bluetooth controller to disconnect the ACL link with the master ear.

[0292] S1031: The ACL link between the Bluetooth controller of the mobile phone and the master earphone is disconnected.

[0293] Exemplarily, the Bluetooth protocol stack of the mobile phone may send a (BR / EDR) ACL link disconnection event to the master ear, and the master ear may return a (BR / EDR) ACL link disconnection completion event to the Bluetooth protocol stack.

[0294] S1032: Establish a (BLE) ACL link between the Bluetooth protocol stack of the mobile phone and the master ear.

[0295] S1033: The master ear stops sending connectable broadcasts.

[0296] S1034, the Bluetooth protocol stack of the mobile phone performs a (BLE) encryption / SDP process with the master ear.

[0297] S1035, a (BLE) HFP / A2DP connection is established between the Bluetooth protocol stack of the mobile phone and the master earphone.

[0298] For example, when a mobile phone receives a call through a Bluetooth headset, an HFP connection can be established between the mobile phone and the primary earphone.

[0299] For example, when a mobile phone listens to music or watches videos through a Bluetooth headset, an A2DP connection can be established between the mobile phone and the main headset.

[0300] S1036: The Bluetooth controller of the mobile phone establishes a (BLE) ACL link with the secondary earphone.

[0301] S1037, the secondary ear stops sending and can broadcast continuously.

[0302] S1038, a (BLE) encryption / SDP process is performed between the Bluetooth protocol stack of the mobile phone and the auxiliary earphone.

[0303] S1039, establish a (BLE) HFP / A2DP connection between the Bluetooth protocol stack of the mobile phone and the auxiliary earphone.

[0304] S1040, the Bluetooth protocol stack of the mobile phone reports the connection event to settings.

[0305] S1041, the Bluetooth setting interface of the mobile phone shows that the mobile phone and the Bluetooth headset are connected.

[0306] For example, Figure 6 As shown in (g), in the Bluetooth setting interface, the paired devices can show that the Bluetooth device named "Bluetooth Headset" and the mobile phone are connected.

[0307] In an embodiment of the present application, when both the mobile phone and the Bluetooth headset support dual mode, or when both the mobile phone and the Bluetooth headset support BR / EDR mode and BLE mode, the mobile phone and the Bluetooth headset can switch from BR / EDR mode connection to BLE mode connection, which helps save power consumption of the mobile phone and the Bluetooth headset.

[0308] Fig.11 FIG. 1 is a schematic diagram of a system architecture 1100 provided in an embodiment of the present application. Fig.11 As shown, the system 1100 may include: an electronic device 1101 and an accessory device 1102 .

[0309] The electronic device 1101 may be the electronic device in the above embodiment, and the accessory device 1102 may be the accessory device in the above embodiment.

[0310] For example, the electronic device 1101 may be a smart phone, a tablet computer, a personal computer, etc. The accessory device 1102 may be a device supporting a Bluetooth function, such as a Bluetooth headset, a Bluetooth speaker, a smart watch, etc.

[0311] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0312] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0313] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0314] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0315] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0316] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0317] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for Bluetooth connection, the method being applied to an electronic device, the electronic device supporting dual-mode connection, the dual-mode connection including a basic rate / enhanced data rate BR / EDR connection and a Bluetooth low energy consumption BLE connection, characterized in that: The method comprises: The electronic device and the accessory device establish an asynchronous connection-oriented link ACL under a BR / EDR connection; The electronic device sends a query request message to the accessory device through the ACL in the BR / EDR connection established with the accessory device, wherein the query request message is used to query whether the accessory device supports the dual-mode connection; The electronic device receives the query response information sent by the accessory device, where the query response information is used to indicate that the accessory device supports the dual-mode connection; When the accessory device supports the dual-mode connection, the electronic device and the accessory device establish a BLE connection; The electronic device and the accessory device transmit business data via a BLE connection.

2. The method according to claim 1, characterized in that: Before the electronic device and the accessory device establish a BLE connection, the method further includes: The electronic device disconnects the BR / EDR connection with the accessory device.

3. The method according to claim 1, characterized in that The sending the query request information to the accessory device includes: The electronic device sends an echo message to the accessory device, where the echo message carries the query request information.

4. The method according to any one of claims 1 to 3, characterized in that The accessory device is a Bluetooth headset, the Bluetooth headset includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, and the second address is a MAC address used when the main ear and the electronic device establish a connection, and the method further includes: When the first ear is the primary ear, the electronic device establishes a BR / EDR connection with the first ear through the second address; When the primary ear is switched from the first ear to the second ear, the electronic device establishes a BR / EDR connection with the second ear through the second address.

5. The method according to claim 4, characterized in that The electronic device and the accessory device establish a BLE connection, including: When the first ear is the primary ear, the electronic device establishes a BLE connection with the first ear through the second address, and the electronic device establishes a BLE connection with the second ear through the first address; When the main ear is switched from the first ear to the second ear, the electronic device establishes a BLE connection with the first ear through the first address, and the electronic device establishes a BLE connection with the second ear through the second address.

6. The method according to claim 1 or 3, characterized in that: The service data includes audio data, video data or call service data.

7. A Bluetooth connection method, the method is applied to an accessory device, the accessory device supports dual-mode connection, the dual-mode connection includes a basic rate / enhanced data rate BR / EDR connection and a Bluetooth low energy BLE connection, characterized in that: The method comprises: The accessory device and the electronic device establish an asynchronous connection-oriented link ACL under a BR / EDR connection; The accessory device sends indication information to the electronic device through the ACL in the BR / EDR connection established with the electronic device, where the indication information is used to indicate that the accessory device supports the dual-mode connection; When the accessory device supports the dual-mode connection, the accessory device and the electronic device establish a BLE connection; The accessory device and the electronic device transmit business data via a BLE connection.

8. The method according to claim 7, characterized in that Before the accessory device and the electronic device establish a BLE connection, the method further includes: The accessory device disconnects the BR / EDR connection with the electronic device.

9. The method according to claim 7 or 8, characterized in that: The accessory device is a Bluetooth headset, the Bluetooth headset includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, and the second address is a MAC address used when the main ear and the electronic device establish a connection, and the method further includes: When the first ear is the primary ear, the first ear establishes a BR / EDR connection with the electronic device through the second address; When the primary ear is switched from the first ear to the second ear, the second ear establishes a BR / EDR connection with the electronic device through the second address.

10. The method according to claim 9, characterized in that The accessory device and the electronic device establish a BLE connection, including: When the first ear is the master ear, the first ear establishes a BLE connection with the electronic device through the second address, and the second ear establishes a BLE connection with the electronic device through the first address; When the main ear is switched from the first ear to the second ear, the first ear establishes a BLE connection with the electronic device through the first address, and the second ear establishes a BLE connection with the electronic device through the second address.

11. The method according to claim 7, characterized in that The service data includes audio data, video data or call service data.

12. A system, comprising a first electronic device and an accessory device, wherein: The first electronic device and the accessory device support dual-mode connection, wherein the dual-mode connection includes a basic rate / enhanced data rate BR / EDR connection and a Bluetooth low energy consumption BLE connection, wherein: The first electronic device is used to establish an asynchronous connection-oriented link ACL in a BR / EDR connection with the accessory device; The first electronic device is further used to send a query request message to the accessory device on the ACL, where the query request message is used to query whether the accessory device supports the dual-mode connection; The first electronic device is further used to receive query response information sent by the accessory device, where the query response information is used to indicate that the accessory device supports the dual-mode connection; The first electronic device is further configured to establish a BLE connection with the accessory device when the accessory device supports the dual-mode connection; The first electronic device is also used to transmit business data with the accessory device via a BLE connection.

13. The system according to claim 12, characterized in that Before the first electronic device and the accessory device establish a BLE connection, the first electronic device is further configured to disconnect the BR / EDR connection with the accessory device.

14. The system according to claim 12, characterized in that The first electronic device is specifically configured to carry the query request information via an echo message.

15. The system according to any one of claims 12 to 14, characterized in that The accessory device is a Bluetooth headset, the Bluetooth headset includes a first ear and a second ear, the media access control MAC address of the first ear is a first address, the MAC address of the second ear is a second address, the second address is a MAC address used when the main ear and the first electronic device establish a connection, and the first electronic device is further used to: When the first ear is the primary ear, establishing a BR / EDR connection with the first ear through the second address; When the Bluetooth headset supports the dual-mode connection, disconnecting the BR / EDR connection with the first ear; A BLE connection is established with the first ear through the first address, and a BLE connection is established with the second ear through the second address.

16. The system according to claim 15, characterized in that The first electronic device is further configured to establish a BLE connection with the first ear through the first address, and to establish a BLE connection with the second ear through the second address, when the primary ear is switched from the first ear to the second ear.

17. The system according to claim 15, further comprising a second electronic device, wherein the second electronic device only supports BR / EDR connection, wherein: The Bluetooth headset is used to disconnect the BLE connection between the first ear and the first electronic device, and disconnect the BLE connection between the second ear and the first electronic device; the second electronic device, configured to establish a BR / EDR connection with the first ear through the second address when the first ear is the primary ear; The second electronic device is further configured to establish a BR / EDR connection with the second ear through the second address when the primary ear is switched from the first ear to the second ear.

18. The system according to claim 12 or 14, characterized in that The service data includes audio data, video data or call service data.

19. An electronic device, the electronic device supports dual-mode connection, the dual-mode connection includes a basic rate / enhanced data rate (BR / EDR) connection and a Bluetooth low energy (BLE) connection, characterized in that: include: Bluetooth chip; one or more processors; one or more memories; The one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the electronic device executes the method according to any one of claims 1 to 6.

20. An accessory device, the accessory device supporting dual-mode connection, the dual-mode connection including basic rate / enhanced data rate (BR / EDR) connection and Bluetooth low energy (BLE) connection, characterized in that: include: Bluetooth chip; one or more processors; one or more memories; The one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the accessory device performs the method according to any one of claims 7 to 11.

21. A chip system, characterized in that: The chip system includes at least one processor, and when program instructions are executed in the at least one processor, the function of the method described in any one of claims 1 to 6 is implemented on the electronic device.

22. A chip system, characterized in that: The chip system includes at least one processor, and when the program instructions are executed in the at least one processor, the function of the method described in any one of claims 7 to 11 on the accessory device is implemented.

23. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the Bluetooth connection method as claimed in any one of claims 1 to 6.

24. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, enable the accessory device to execute the Bluetooth connection method as claimed in any one of claims 7 to 11.

Citation Information

Patent Citations

  • Method and apparatus for transmitting and receiving data in wireless communication system

    US20170171697A1

  • Method and device for connecting substitute communication means by using bluetooth low energy (LE) technique

    US20180220335A1

  • Mixed mode bluetooth communications

    WO2019050556A1