Bluetooth connection method, electronic equipment and system

By storing the BLE address of the second electronic device in the first electronic device and simultaneously initiating BLE broadcast and ACL connection, the problem of slow Bluetooth connection between the electronic devices is solved, and a faster connection speed and a better user experience is achieved.

CN119729903APending Publication Date: 2025-03-28HUAWEI DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290691.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, the Bluetooth connection speed between electronic devices is slow, resulting in poor user experience.

Method used

By storing the BLE address of the second electronic device in the first electronic device and simultaneously launching the BLE broadcast and the ACL connection when the connection is triggered, the time-consuming time of broadcasting in the BLE connection is reduced.

Benefits of technology

It improves the Bluetooth connection speed between electronic devices, shortens the connection delay, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729903A_ABST
    Figure CN119729903A_ABST
Patent Text Reader

Abstract

The invention discloses a Bluetooth connection method, electronic equipment and a chip system, relates to the technical field of terminals, and can improve the BLE connection speed between the electronic equipment. According to the scheme, when the BLE connection is triggered and established at the first electronic equipment side, the BLE broadcast state of the first electronic equipment and the ACL connection state of the BLE are initiated at the same time, so that after the second electronic equipment receives the BLE broadcast of the first electronic equipment and replies to the BLE broadcast in time, the first electronic equipment can receive the BLE broadcast of the second electronic equipment in the ACL connection process of the BLE, and the BLE connection of the first electronic equipment is realized. And the ACL connection of the BLE can be completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a Bluetooth connection method, electronic device, and system. Background Art

[0002] Bluetooth (BT) is a commonly used data transmission method between electronic devices. It can realize short-range wireless data transmission between electronic devices (such as mobile phones and personal computers (PCs)), and has the advantages of convenience, flexibility and security. It can be applied to many short-range communication scenarios, for example, in multi-screen collaborative scenarios such as extended screen scenarios and screen projection scenarios.

[0003] However, for installation When electronic devices such as PCs with operating systems establish Bluetooth connections with other electronic devices, they usually establish classic Bluetooth connections, that is, basic rate (BR) connections with relatively slow connection speeds, resulting in a large connection delay between electronic devices, affecting the user experience. Summary of the invention

[0004] The present application provides a Bluetooth connection method, electronic device and system, which can improve the Bluetooth connection speed between electronic devices.

[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:

[0006] In a first aspect, a Bluetooth connection method is provided, which is applied to a first electronic device, wherein the first electronic device stores a BLE address of a second electronic device, and the low-power Bluetooth BLE address of the second electronic device is fixed. The method includes: receiving a first operation, wherein the first operation is used to indicate establishing a Bluetooth connection with the second electronic device; in response to the first operation, sending a first BLE broadcast to the second electronic device, and initiating a first asynchronous connection-oriented ACL connection to the second electronic device based on the BLE address of the second electronic device; and in response to receiving a second BLE broadcast in reply to the second electronic device, successfully establishing a first ACL connection with the second electronic device.

[0007] The solution provided by the first aspect above, when the first electronic device stores the BLE address of the second electronic device, if the Bluetooth connection with the second electronic device is triggered on the first electronic device side, the BLE broadcast of the first electronic device and the ACL connection of BLE can be initiated at the same time. In this way, when the second electronic device promptly replies to the BLE broadcast after receiving the BLE broadcast of the first electronic device, since the ACL connection of BLE has been initiated in advance, the ACL connection of BLE can be successfully established when the first electronic device receives the BLE broadcast of the second electronic device during the ACL connection process of BLE. The Bluetooth connection speed between electronic devices is improved. Compared with the scenario where one end sends a broadcast, the other end replies to the broadcast, and one end initiates the ACL connection of BLE after receiving the reply broadcast, the time-consuming back and forth broadcast in the ACL connection of BLE is omitted.

[0008] In one possible implementation, the second BLE broadcast is used to broadcast the BLE address of the second electronic device. After initiating the first ACL connection to the second electronic device according to the BLE address of the second electronic device in response to the first operation, the method further includes: scanning nearby BLE broadcasts; when the BLE address in the scanned BLE broadcast is consistent with the BLE address of the second electronic device, determining that the second BLE broadcast replied by the second electronic device is received. In this way, after the first electronic device initiates the first ACL connection to the second electronic device in advance, it can directly start matching the broadcast in the air port. Therefore, when the broadcast with the BLE address of the second electronic device is matched, the BLE ACL connection can be successfully established.

[0009] In a possible implementation, before receiving the first operation, the method further includes: when discovering the second electronic device, obtaining connection data of the second electronic device, the connection data including the BLE address of the second electronic device. In this way, before the first electronic device triggers a Bluetooth connection with the second electronic device, the first electronic device can obtain the BLE address of the second electronic device in advance for storage and record at the stage of discovering the second electronic device.

[0010] In a possible implementation, when the second electronic device is discovered, the connection data of the second electronic device is obtained, including: when scanning the QR code displayed by the second electronic device, the second electronic device is discovered, and the connection data in the QR code is extracted; or when approaching the second electronic device to scan the discovery broadcast of the second electronic device, the second electronic device is discovered, and the connection data in the discovery broadcast is obtained; or when touching the near field communication NFC tag of the second electronic device, the second electronic device is discovered, and the connection data in the NFC tag is obtained. In this way, the first electronic device can obtain the BLE address of the second electronic device by touching, scanning, or approaching the second electronic device for storage and record.

[0011] In a possible implementation, after obtaining the connection data of the second electronic device, the method further includes: initiating a second ACL connection to the second electronic device according to the BLE address of the second electronic device; in response to receiving the third BLE broadcast sent by the second electronic device, successfully establishing a second ACL connection with the second electronic device; wherein the third BLE broadcast is synchronously sent by the second electronic device when it is discovered, the second ACL connection has been disconnected before the first operation, and the first operation is used to indicate that a Bluetooth connection is established again with the second electronic device. In this way, since the first electronic device has synchronously started to send the third BLE broadcast when the BLE address of the second electronic device is obtained when the first electronic device discovers the second electronic device, the first electronic device can directly initiate a BLE ACL connection to the second electronic device based on the obtained BLE address of the second electronic device. Since the second electronic device has started to send the third BLE broadcast in advance in the discovery stage. Therefore, after initiating the BLE ACL connection, the first electronic device can quickly receive the BLE broadcast of the second electronic device, thereby quickly completing the establishment of the BLE ACL connection. The Bluetooth connection speed between electronic devices is improved.

[0012] In one possible implementation, the third BLE broadcast is used to broadcast the BLE address of the second electronic device. After initiating the second ACL connection to the second electronic device based on the BLE address of the second electronic device, the method further includes: scanning nearby BLE broadcasts; when the BLE address in the scanned BLE broadcast is consistent with the BLE address of the second electronic device, it is determined that the third BLE broadcast sent by the second electronic device is received. In this way, after the first electronic device initiates the first ACL connection to the second electronic device based on the acquired BLE address of the second electronic device, it can directly start matching the broadcast in the air port. Therefore, when the broadcast with the BLE address of the second electronic device is matched, the BLE ACL connection can be successfully established.

[0013] In a possible implementation, receiving the first operation includes: displaying an available device list, the available device list including a device option of the second electronic device; and receiving a trigger operation for the device option of the second electronic device. In this way, when the first electronic device stores the BLE address of the second electronic device, the device option of the second electronic device can be displayed in the available device list. This facilitates the user to quickly trigger a Bluetooth connection with the second electronic device in the available device list.

[0014] In one possible implementation, the first electronic device includes a screen projection application, and displays a list of available devices, including: displaying the list of available devices in the interface of the screen projection application; after the first ACL connection is successfully established, the method further includes: establishing a BLE connection with the second electronic device based on the successfully established first ACL connection; and establishing a screen projection connection with the second electronic device based on the BLE connection. In this way, when the user triggers the screen projection connection with the second electronic device on the first electronic device side, the Bluetooth connection method of this solution can quickly establish an ACL connection, thereby improving the speed of the Bluetooth connection, and then improving the speed of the screen projection connection.

[0015] In a second aspect, a Bluetooth connection method is provided, which is applied to a second electronic device, and the BLE address of the second electronic device is fixed. The method includes: receiving a first BLE broadcast sent by a first electronic device, and the first BLE broadcast is sent synchronously when the first electronic device initiates a first ACL connection according to the stored BLE address of the second electronic device; replying a second BLE broadcast to the first electronic device; and successfully establishing a first ACL connection with the first electronic device.

[0016] In the solution provided by the second aspect above, when the first electronic device triggers a Bluetooth connection with the second electronic device, the first electronic device can simultaneously initiate a BLE broadcast of the first electronic device and an ACL connection of BLE. In this way, the second electronic device can receive a BLE broadcast from the first electronic device. At this time, the second electronic device does not initiate an ACL connection by itself, but chooses to reply to the BLE broadcast to indicate that the ACL connection is initiated by the first electronic device, and it is already in a BLE broadcast state and has the BLE connection conditions. Since the first electronic device has initiated an ACL connection in advance, when the BLE broadcast replied by the second electronic device is received by the first electronic device, the ACL connection of BLE can be successfully established. The Bluetooth connection speed between electronic devices is improved. Compared with the scenario where one end sends a broadcast, the other end replies to the broadcast, and one end receives the reply broadcast and then initiates the ACL connection of BLE, the time-consuming back-and-forth broadcast in the ACL connection of BLE is omitted.

[0017] In a possible implementation, the first electronic device also stores the device information of the second electronic device, the first BLE broadcast carries the device information of the second electronic device, and receiving the first BLE broadcast sent by the first electronic device includes: scanning nearby BLE broadcasts; when the device information carried in the scanned BLE broadcast is consistent with the device information of the second electronic device, it is determined that the first BLE broadcast sent by the first electronic device is received. In this way, the BLE broadcast sent by the first electronic device can be a directional broadcast.

[0018] In one possible implementation, before receiving the first BLE broadcast sent by the first electronic device, the method further includes: receiving a second operation; in response to the second operation, entering a discoverable state, wherein the discoverable state is used to indicate that the device that discovers the second electronic device can obtain the connection data of the second electronic device, and the connection data includes the BLE address of the second electronic device. In this way, before the first electronic device triggers the Bluetooth connection with the second electronic device, the user can first trigger it on the second electronic device, and the second electronic device enters a discoverable state. In this way, when the first electronic device discovers the second electronic device, it can obtain the BLE address of the second electronic device.

[0019] In a possible implementation, in response to the second operation, entering the discoverable state includes: in response to the second operation, displaying a QR code, which carries connection data; or in response to the second operation, sending a discovery broadcast, which carries connection data; or in response to the second operation, enabling a near field communication NFC function, wherein the second electronic device is configured with an NFC tag, which includes connection data. In this way, the second electronic device can make other devices discover itself by means of touch, scan, proximity discovery, etc., and when discovering itself, it can obtain its own BLE address.

[0020] In one possible implementation, after entering the discoverable state in response to the second operation, the method further includes: sending a third BLE broadcast when discovering the first electronic device, wherein the connection data is used to instruct the first electronic device to initiate a second ACL connection according to the acquired BLE address of the second electronic device; and successfully establishing a second ACL connection with the first electronic device. In this way, when the second electronic device enters the discoverable state so that its BLE address is acquired by other devices, the second electronic device can also adjust itself to be in the BLE broadcast state at the same time, so that it has the BLE connection conditions in advance. In this way, when the first electronic device discovers the second electronic device, after acquiring the BLE address of the second electronic device, it can directly initiate a BLE ACL connection to the second electronic device. Since the second electronic device is already in the BLE broadcast state in advance, that is, the third BLE broadcast is sent in advance. Therefore, after initiating the BLE ACL connection, the first electronic device can quickly receive the third BLE broadcast of the second electronic device, thereby quickly completing the establishment of the BLE ACL connection. The Bluetooth connection speed between electronic devices is improved.

[0021] In one possible implementation, when the first electronic device is discovered, a third BLE broadcast is sent, including: when the first electronic device is detected to scan the QR code, the first electronic device is discovered and the third BLE broadcast is sent; or when the first electronic device is detected to be close, the first electronic device is discovered and the third BLE broadcast is sent; or when the first electronic device is detected to touch the NFC tag, the first electronic device is discovered and the third BLE broadcast is sent. In this way, since the discovery between devices is mutual, when the second electronic device discovers the first electronic device, it can be considered that the first electronic device has also discovered the second electronic device. Therefore, when the second electronic device detects that the QR code is scanned, or a device is close or touched, it can consider itself to be discovered. At this time, the second electronic device can adjust itself to be in the BLE broadcast state, so that it has the BLE connection conditions in advance.

[0022] In one possible implementation, the second electronic device includes a computer manager application, and a screen projection function is provided in the computer manager application; a second operation is received, including: displaying a first control in the interface of the computer manager application, and the first control is used to trigger the screen projection function; a second operation acting on the first control is received; after the second ACL connection is successfully established, the method also includes: establishing a BLE connection with the second electronic device based on the successfully established second ACL connection; and establishing a screen projection connection with the second electronic device based on the BLE connection.

[0023] In this way, when the user triggers the screen projection function on the second electronic device, the second electronic device can enter a discoverable state and at the same time adjust itself to a BLE broadcast state, so that it has the BLE connection conditions in advance. Therefore, the first electronic device can obtain the BLE address of the second electronic device by discovering the second electronic device. The first electronic device can directly initiate a BLE ACL connection to the second electronic device based on the BLE address of the second electronic device. Since the second electronic device has sent a BLE broadcast in advance, the first electronic device can quickly receive the BLE broadcast of the second electronic device, so that the ACL connection can be quickly established, thereby increasing the speed of the Bluetooth connection, and then increasing the speed of the screen projection connection.

[0024] In a possible implementation, since the BLE address of a device using the Windows operating system is fixed, the second electronic device may be a device using the Windows operating system.

[0025] In a third aspect, a Bluetooth connection method is provided, which is applied to a communication system. The communication system includes a first electronic device and a second electronic device. The first electronic device stores a BLE address of the second electronic device, and the BLE address of the second electronic device is fixed. The method includes: the first electronic device receives a first operation, and the first operation is used to instruct the first electronic device to establish a Bluetooth connection with the second electronic device; the first electronic device sends a first BLE broadcast to the second electronic device in response to the first operation, and initiates a first ACL connection to the second electronic device based on the BLE address of the second electronic device; when the second electronic device receives the first BLE broadcast, the second BLE broadcast is replied to the first electronic device; in response to the first electronic device receiving the second BLE broadcast, the first ACL connection is successfully established.

[0026] The solution provided by the third aspect above, when the first electronic device stores the BLE address of the second electronic device, if the Bluetooth connection with the second electronic device is triggered on the first electronic device side, the BLE broadcast of the first electronic device and the ACL connection of BLE can be initiated at the same time. In this way, when the second electronic device receives the BLE broadcast of the first electronic device, it can reply to the BLE broadcast in time. Since the ACL connection of BLE has been initiated in advance, when the first electronic device receives the BLE broadcast of the second electronic device during the ACL connection process of BLE, the ACL connection of BLE can be successfully established. The Bluetooth connection speed between electronic devices is improved. Compared with the scenario where one end sends a broadcast, the other end replies to the broadcast, and one end initiates the ACL connection of BLE after receiving the reply broadcast, the time-consuming back and forth broadcast in the ACL connection of BLE is omitted.

[0027] In one possible implementation, the second BLE broadcast is used to broadcast the BLE address of the second electronic device. After the first electronic device initiates the first ACL connection to the second electronic device according to the BLE address of the second electronic device in response to the first operation, the method also includes: the first electronic device scans the nearby BLE broadcasts; when the BLE address in the BLE broadcast scanned by the first electronic device is consistent with the BLE address of the second electronic device, the first electronic device determines that the second BLE broadcast replied by the second electronic device is received. In this way, after the first electronic device initiates the first ACL connection to the second electronic device in advance, it can directly start matching the broadcast in the air port. Therefore, when the broadcast with the BLE address of the second electronic device is matched, the BLE ACL connection can be successfully established.

[0028] In a possible implementation, the first electronic device also stores device information of the second electronic device, and the first BLE broadcast carries the device information of the second electronic device. The method further includes: the second electronic device scans the nearby BLE broadcast; when the device information carried in the BLE broadcast scanned by the second electronic device is consistent with the device information of the second electronic device, the second electronic device determines that the first BLE broadcast sent by the first electronic device is received. In this way, the BLE broadcast sent by the first electronic device can be a directional broadcast.

[0029] In a possible implementation, before the first electronic device receives the first operation, the method further includes: the second electronic device receives the second operation; the second electronic device enters a discoverable state in response to the second operation; when the first electronic device discovers the second electronic device, it obtains the connection data of the second electronic device, and the connection data includes the BLE address of the second electronic device. In this way, before the first electronic device triggers a Bluetooth connection with the second electronic device, the first electronic device can obtain the BLE address of the second electronic device in advance for storage and record at the stage of discovering the second electronic device.

[0030] In one possible implementation, the second electronic device enters a discoverable state in response to the second operation, including: the second electronic device displays a QR code in response to the second operation, and the QR code carries connection data; when the first electronic device discovers the second electronic device, it obtains the connection data of the second electronic device, including: when the first electronic device scans the QR code, it discovers the second electronic device and extracts the connection data in the QR code.

[0031] In one possible implementation, the second electronic device enters a discoverable state in response to the second operation, including: the second electronic device sends a discovery broadcast in response to the second operation, and the discovery broadcast carries connection data; when the first electronic device discovers the second electronic device, it obtains the connection data of the second electronic device, including: when the first electronic device approaches the second electronic device to scan the discovery broadcast, it discovers the second electronic device and obtains the connection data in the discovery broadcast.

[0032] In one possible implementation, the second electronic device is configured with an NFC tag, and the NFC tag includes connection data; the second electronic device enters a discoverable state in response to a second operation, including: the second electronic device turns on a near field communication NFC function in response to the second operation; when the first electronic device discovers the second electronic device, it obtains the connection data of the second electronic device, including: when the first electronic device touches the NFC tag of the second electronic device, it discovers the second electronic device and obtains the connection data in the NFC tag.

[0033] In one possible implementation, the method further includes: the second electronic device enters a discoverable state in response to the second operation, and the second electronic device sends a third BLE broadcast; after the first electronic device obtains the connection data of the second electronic device, the method further includes: the first electronic device initiates a second ACL connection to the second electronic device according to the BLE address of the second electronic device; the first electronic device successfully establishes the second ACL connection in response to receiving the third BLE broadcast; wherein the second ACL connection was disconnected before the first operation, and the first operation is used to instruct the first electronic device to establish a Bluetooth connection with the second electronic device again.

[0034] In one possible implementation, the third BLE broadcast is used to broadcast the BLE address of the second electronic device. After the first electronic device initiates a second ACL connection to the second electronic device based on the BLE address of the second electronic device, the method also includes: the first electronic device scans nearby BLE broadcasts; when the BLE address in the BLE broadcast scanned by the first electronic device is consistent with the BLE address of the second electronic device, the first electronic device determines that the third BLE broadcast sent by the second electronic device is received.

[0035] In one possible implementation, the second electronic device includes a computer manager application, and a screen projection function is provided in the computer manager application; the second electronic device receives a second operation, including: the second electronic device displays a first control in the interface of the computer manager application, and the first control is used to trigger the screen projection function; the second electronic device receives the second operation acting on the first control; after the second ACL connection is successfully established, the method also includes: the second electronic device establishes a BLE connection between the first electronic device and the second electronic device based on the successfully established second ACL connection; based on the BLE connection, establishes a screen projection connection between the first electronic device and the second electronic device.

[0036] In a possible implementation, the first electronic device receives a first operation, including: the first electronic device displays an available device list, where the available device list includes a device option of the second electronic device; and the first electronic device receives a trigger operation for the device option of the second electronic device.

[0037] In one possible implementation, the first electronic device includes a screen projection application, and the first electronic device displays a list of available devices, including: the first electronic device displays the list of available devices in the interface of the screen projection application; after the first ACL connection is successfully established, the method also includes: the first electronic device establishes a BLE connection between the first electronic device and the second electronic device based on the successfully established first ACL connection; based on the BLE connection, establishes a screen projection connection between the first electronic device and the second electronic device.

[0038] In a possible implementation, the second electronic device is a device with a Windows operating system.

[0039] In a fourth aspect, an electronic device is provided, the electronic device comprising: an operation receiving unit, a connection initiating unit, and a connection responding unit. The operation receiving unit is used to receive a first operation, the first operation is used to indicate to establish a Bluetooth connection with a second electronic device; the connection initiating unit is used to send a first BLE broadcast to the second electronic device in response to the first operation, and initiate a first asynchronous connection-oriented ACL connection to the second electronic device according to the BLE address of the second electronic device; the connection responding unit is used to successfully establish a first ACL connection with the second electronic device in response to receiving a second BLE broadcast in reply to the second electronic device.

[0040] In one possible implementation, the second BLE broadcast is used to broadcast the BLE address of the second electronic device. The connection response unit is used to scan the nearby BLE broadcasts; when the BLE address in the scanned BLE broadcast is consistent with the BLE address of the second electronic device, it is determined that the second BLE broadcast replied by the second electronic device is received.

[0041] In a possible implementation, the electronic device further includes a device discovery unit, which is configured to acquire connection data of the second electronic device when discovering the second electronic device, where the connection data includes a BLE address of the second electronic device.

[0042] In one possible implementation, the device discovery unit is used to discover the second electronic device and extract connection data in the QR code when scanning a QR code displayed by the second electronic device; or discover the second electronic device and obtain connection data in the discovery broadcast when approaching the second electronic device to scan the discovery broadcast of the second electronic device; or discover the second electronic device and obtain connection data in the near field communication NFC tag of the second electronic device when touching the NFC tag.

[0043] In a possible implementation, the electronic device also includes a discovery connection unit and a discovery response unit. The discovery connection unit is used to initiate a second ACL connection to the second electronic device according to the BLE address of the second electronic device after acquiring the connection data of the second electronic device during the discovery phase. The discovery response unit is used to successfully establish a second ACL connection with the second electronic device in response to receiving a third BLE broadcast sent by the second electronic device. The third BLE broadcast is sent synchronously by the second electronic device when it is discovered, the second ACL connection has been disconnected before the first operation, and the first operation is used to indicate that a Bluetooth connection is established again with the second electronic device.

[0044] In one possible implementation, the third BLE broadcast is used to broadcast the BLE address of the second electronic device, and the discovery response unit is used to scan nearby BLE broadcasts; when the BLE address in the scanned BLE broadcast is consistent with the BLE address of the second electronic device, it is determined that the third BLE broadcast sent by the second electronic device is received.

[0045] In a possible implementation, the electronic device further includes a display unit for displaying an available device list, where the available device list includes device options of the second electronic device; and the operation receiving unit is configured to receive a trigger operation for the device option of the second electronic device.

[0046] In one possible implementation, the first electronic device includes a screen projection application, and a display unit for displaying a list of available devices in the interface of the screen projection application. The electronic device also includes a screen projection connection unit for establishing a BLE connection with the second electronic device based on the successfully established first ACL connection after the first ACL connection is successfully established; and establishing a screen projection connection with the second electronic device based on the BLE connection.

[0047] In a fifth aspect, an electronic device is provided, which includes: a broadcast receiving unit, a broadcast reply unit, and a connection response unit. Among them, the broadcast receiving unit is used to receive a first BLE broadcast sent by a first electronic device, and the first BLE broadcast is sent synchronously when the first electronic device initiates a first ACL connection according to the stored BLE address of the second electronic device. The broadcast reply unit is used to reply to the second BLE broadcast to the first electronic device. The connection response unit is used to successfully establish a first ACL connection with the first electronic device.

[0048] In a possible implementation, the first electronic device also stores device information of the second electronic device, and the first BLE broadcast carries the device information of the second electronic device. The broadcast receiving unit is used to scan nearby BLE broadcasts; when the device information carried in the scanned BLE broadcast is consistent with the device information of the second electronic device, it is determined that the first BLE broadcast sent by the first electronic device is received.

[0049] In a possible implementation, the electronic device further includes an operation receiving unit and a state switching unit. The operation receiving unit is used to receive a second operation. The state switching unit is used to enter a discoverable state in response to the second operation, and the discoverable state is used to indicate that a device that discovers the second electronic device can obtain connection data of the second electronic device, and the connection data includes a BLE address of the second electronic device.

[0050] In one possible implementation, the state switching unit is used to display a QR code in response to the second operation, the QR code carrying connection data; or to send a discovery broadcast in response to the second operation, the discovery broadcast carrying connection data; or to enable a near field communication NFC function in response to the second operation, wherein the second electronic device is configured with an NFC tag, and the NFC tag includes the connection data.

[0051] In a possible implementation, the electronic device further includes a discovery broadcast unit and a discovery response unit. The discovery broadcast unit is used to send a third BLE broadcast when discovering the first electronic device, wherein the connection data is used to instruct the first electronic device to initiate a second ACL connection according to the acquired BLE address of the second electronic device. The discovery response unit is used to successfully establish a second ACL connection with the first electronic device.

[0052] In one possible implementation, the discovery broadcast unit is used to: discover the first electronic device and send a third BLE broadcast when it is detected that the first electronic device scans a QR code; or discover the first electronic device and send a third BLE broadcast when it is detected that the first electronic device is approaching; or discover the first electronic device and send a third BLE broadcast when it is detected that the first electronic device touches an NFC tag.

[0053] In one possible implementation, the second electronic device includes a computer manager application, and a screen projection function is provided in the computer manager application. The electronic device also includes a display unit, which is used to display a first control in the interface of the computer manager application, and the first control is used to trigger the screen projection function. An operation receiving unit is used to receive a second operation acting on the first control. The electronic device also includes a screen projection connection unit, which is used to establish a BLE connection with the second electronic device based on the successfully established second ACL connection after the second ACL connection is successfully established; and to establish a screen projection connection with the second electronic device based on the BLE connection.

[0054] In a possible implementation, the second electronic device is a device using a Windows operating system.

[0055] In a sixth aspect, an electronic device is provided, which may be the aforementioned first electronic device or the aforementioned second electronic device. The electronic device includes: a memory, a communication module, and one or more processors; the memory is coupled to the processor. The memory is used to store computer program codes, and the computer program codes include computer instructions; when the electronic device is running, the processor is used to execute one or more computer instructions stored in the memory, so that the electronic device executes the method executed in any of the above possible implementations.

[0056] In a seventh aspect, a Bluetooth connection device is provided, which is included in an electronic device, and has the function of implementing the behavior of the electronic device in any of the above possible implementation methods. 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.

[0057] In an eighth aspect, a communication system is provided, the communication system comprising the first electronic device and the second electronic device. The first electronic device executes the Bluetooth connection method executed by the first electronic device in any possible implementation described above, and the second electronic device executes the Bluetooth connection method executed by the second electronic device in any possible implementation described above.

[0058] In a ninth aspect, a chip system is provided, which is applied to an electronic device. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, where the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the Bluetooth connection method in any possible implementation described above.

[0059] In a tenth aspect, a computer-readable storage medium is provided, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the Bluetooth connection method in any possible implementation described above.

[0060] In an eleventh aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the Bluetooth connection method in any possible implementation described above.

[0061] It can be understood that the beneficial effects that can be achieved by the method of the third aspect, the electronic devices of the fourth, fifth and sixth aspects, the device of the seventh aspect, the communication system of the eighth aspect, the chip system of the ninth aspect, the computer storage medium of the tenth aspect, and the computer program product of the eleventh aspect provided above can be referred to the beneficial effects in the aforementioned possible implementations and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a multi-screen collaboration scenario provided in an embodiment of the present application;

[0063] Figure 2A A schematic diagram of a flow chart of a Bluetooth connection method in the related art;

[0064] Figure 2B A schematic diagram of a multi-screen collaboration scenario provided in an embodiment of the present application;

[0065] Figure 3A A schematic diagram of a flow chart of another Bluetooth connection method in the related art;

[0066] Figure 3B A schematic diagram of a multi-screen collaboration scenario provided in an embodiment of the present application;

[0067] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0068] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0069] Figure 6 A schematic diagram of a flow chart of a Bluetooth connection method provided in an embodiment of the present application;

[0070] Figure 7 A flowchart of a Bluetooth connection method between a mobile phone and a PC in the related art;

[0071] Figure 8 A schematic diagram of a flow chart of a Bluetooth connection method between a mobile phone and a PC provided in an embodiment of the present application;

[0072] Fig. 9 A schematic diagram of a flow chart of another Bluetooth connection method between a mobile phone and a PC provided in an embodiment of the present application;

[0073] Fig.10 A schematic diagram of a flow chart of a Bluetooth connection method applied to a multi-screen collaboration scenario provided in an embodiment of the present application;

[0074] Fig.11 A flowchart of another Bluetooth connection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] In the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship between 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.

[0076] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, a and b and c, where a, b, and c can be single or multiple.

[0077] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0078] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0079] The features, structures or characteristics in this application may be combined in one or more embodiments in any suitable manner. In various embodiments of this application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0080] Some optional features in the embodiments of the present application may be implemented independently in some scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They may also be combined with other features in some scenarios as needed.

[0081] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In each embodiment of this application, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.

[0082] In addition, the business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0083] Figure 1 Schematic diagram of system architecture involved in various exemplary embodiments of the present application is shown. Figure 1 As shown, the system architecture includes an electronic device 1 and an electronic device 2 .

[0084] Among them, both the electronic device 1 and the electronic device 2 can be electronic devices that support both classic Bluetooth BR and Bluetooth low energy (BLE). Classic Bluetooth BR can support data transmission with a large amount of data, but the connection speed is relatively slow. BLE can support data transmission with high real-time requirements and the connection speed is relatively fast.

[0085] A BR connection may be established between the electronic device 1 and the electronic device 2 to perform data transmission based on the established BR connection channel. The electronic device 1 and the electronic device 2 may also establish a BLE connection to perform data transmission based on the established BLE connection channel.

[0086] In the embodiment of the present application, electronic device 1 can obtain the BR address or BLE address of electronic device 2 to establish a BR connection or BLE connection between electronic device 1 and electronic device 2 based on the Bluetooth address. The BR address and BLE address of electronic device 2 are fixed.

[0087] Optionally, due to The particularity of the operating system, use The BLE address of the electronic device of the operating system is fixed, so the electronic device 2 can be used for An electronic device that runs an operating system, such as a PC (including a desktop or laptop computer).

[0088] Optionally, if in addition to the above In addition to the BLE address of the electronic device under the operating system being fixed, there are other types of electronic devices whose BLE addresses are unchanged, and the electronic device 2 may also be the other type of electronic device. The embodiment of the present application does not specifically limit the device type of the electronic device 2.

[0089] In addition, the embodiment of the present application does not specifically limit the device type and operating system of the electronic device 1. The electronic device 1 may be a mobile phone, a smart screen, a smart TV, or other electronic device with a display screen. The operating system of the electronic device 1 may be The operating system can also be Operating system or The operating system may also be any other operating system that meets the use requirements, which may be determined according to the actual use requirements and is not limited in the embodiments of the present application. The operating system, that is, the BLE address of the electronic device 1 also has a fixed characteristic.

[0090] In some scenarios, electronic device 1 and electronic device 2 are electronic devices that support screen projection. If electronic device 1 and electronic device 2 are both powered on and in the same local area network (such as a wireless fidelity (Wi-Fi) network), after electronic device 1 turns on the screen projection function, electronic device 1 can search for all devices that support screen projection. After electronic device 1 discovers electronic device 2, electronic device 1 can negotiate with electronic device 2 based on the screen projection protocol, and establish a screen projection connection after the negotiation is completed. Based on the screen projection connection, electronic device 1 can project the screen display content of electronic device 1 onto the screen of electronic device 2 for display. The screen projection protocol may include ChromeCast, Miracast, and Digital Living Network Alliance (DLNA), (wireless communication technology developed by Apple Inc.) and other standard protocols or private protocols, which are not limited in the embodiments of the present application.

[0091] In the process of establishing a screen projection connection, a Bluetooth connection needs to be established between electronic device 1 and electronic device 2 first, and based on the connection channel of the Bluetooth connection, binding, authentication and negotiation of Wi-Fi P2P parameters are performed between electronic device 1 and electronic device 2. After completing the binding, authentication and negotiation of Wi-Fi P2P parameters, electronic device 1 and electronic device 2 can further establish a screen projection connection.

[0092] In an embodiment of the present application, electronic device 1 and electronic device 2 can establish a BLE connection to implement the establishment of a screen projection connection based on the BLE connection.

[0093] In some embodiments, the BLE connection established between electronic device 1 and electronic device 2 can realize not only the above-mentioned wireless screen projection scenario, but also other multi-screen collaboration scenarios such as extended screen scenario and audio and video file sharing scenario. The embodiments of the present application do not limit the application scenarios of the Bluetooth connection established between electronic device 1 and electronic device 2.

[0094] For the sake of ease of description, the following will take electronic device 1 as a mobile phone and electronic device 2 as a PC as an example to introduce the wireless screen projection scenario in the related technology.

[0095] like Figure 2A As shown, the process of wireless screen projection between a mobile phone and a PC in the related art may include S101 to S104:

[0096] S101. The mobile phone discovers the PC.

[0097] In some embodiments, the mobile phone and the PC generally support one or more of the following functions: a scan function (such as scanning a QR code or a barcode), a touch discovery function based on near field communication (NFC), a Bluetooth proximity automatic discovery function, and a proximity automatic discovery function based on the 802.11 protocol. The mobile phone can discover the PC through one or more of the following methods: "scan", "touch", and "approach automatic discovery".

[0098] Exemplarily, the mobile phone and PC can turn on the wireless local area network (WLAN) function and the Bluetooth function. And the PC can provide an entry or control for turning on the computer screen projection function, such as a multi-screen collaborative control. For example, the PC turns on an application (application, APP) for computer management, such as a computer manager. The APP can be provided with an entry or control for turning on the computer screen projection function, such as a multi-screen collaborative control.

[0099] As one way, when the user clicks on the multi-screen collaborative control on the PC, the PC can display a QR code in response to the user's click operation. The user scans the QR code on the PC by holding a mobile phone, so that the mobile phone can find the PC. As another way, when the user clicks on the multi-screen collaborative control on the PC, the PC can send out broadcast information (such as classic Bluetooth BR broadcast) in response to the user's click operation so that the mobile phone can find the PC. In this way, the user holds the mobile phone close to the PC so that the mobile phone can search for the broadcast information sent by the PC and find the PC. As another way, when the user clicks on the multi-screen collaborative control on the PC, the PC responds to the user's click operation and can also turn on the NFC function. The mobile phone can find the PC by approaching or touching the NFC sensing area on the PC.

[0100] The mobile phone discovering the PC can be understood as the mobile phone acquiring relevant device information of the PC, and the device information may include the Bluetooth address of the PC, and may also include other information such as the device name, device unique identifier, device type, etc. This is not limited here.

[0101] In some embodiments, after the mobile phone discovers the PC, the mobile phone may pop up a window to prompt the user whether to establish a screen projection connection with the PC, and / or the PC may pop up a window to prompt the user whether to establish a screen projection connection with the mobile phone. After detecting that the user clicks to confirm, a screen projection connection is established between the mobile phone and the PC through the following steps S102 and 103. Optionally, after the mobile phone discovers the PC, it can also directly establish a screen projection connection between the mobile phone and the PC through the following steps S102-S103. No pop-up reminder is required.

[0102] For example, take scanning to achieve wireless screen projection as an example. Figure 2B As described, when a user needs to use the computer screen projection function, the user can click on the icon of the Computer Manager APP in the PC. In response to the user's click operation on the icon of the Computer Manager APP, the PC opens the Computer Manager APP and displays the interface of the Computer Manager APP, which may display function items of smart interconnection, and the interface of the smart interconnection function items displays multi-screen collaboration controls or buttons. When the user needs to project the screen display content of the mobile phone to the PC for display, the user can click on the multi-screen collaboration control to trigger the screen projection connection between the mobile phone and the PC. That is, through the following steps S102-S103, a screen projection connection is established between the mobile phone and the PC. For example, when the Computer Manager APP in the PC receives a user click operation on the "Multi-Screen Collaboration" control, a QR code can be displayed, and the user can be prompted to hold the mobile phone to scan the QR code on the PC to achieve the screen projection connection between the mobile phone and the PC. When the mobile phone successfully scans the QR code on the PC, such as Figure 2B As shown in the figure, the mobile phone can pop up a window to prompt the user whether to allow the PC to perform multi-screen collaboration. When the user clicks the allow control, it can trigger the establishment of a screen projection connection between the mobile phone and the PC. After the screen projection connection is successfully established, the screen display content of the mobile phone can be successfully projected to the PC for display.

[0103] S102. Establish a classic Bluetooth connection between the mobile phone and the PC.

[0104] In the process of establishing a screen projection connection between a mobile phone and a PC, a Bluetooth connection must first be established. Then, based on the Bluetooth connection channel, the mobile phone and the PC can bind, authenticate, and negotiate Wi-Fi P2P parameters. After completing the binding, authentication, and negotiation of Wi-Fi P2P parameters, the mobile phone and the PC can further establish a screen projection connection. Among them, when a mobile phone and a PC establish a Bluetooth connection, a classic Bluetooth connection is usually established. Classic Bluetooth, also known as traditional Bluetooth or standard Bluetooth, can be BR Bluetooth or enhanced data rate (EDR) Bluetooth.

[0105] Currently, a BR Bluetooth connection is usually established between a mobile phone and a PC, and then a screen projection connection is achieved based on the BR Bluetooth connection channel.

[0106] In some scenarios, in the above step S101, the mobile phone and PC can obtain the BR address (also called classic Bluetooth address) of the other party's Bluetooth module after "scanning", "touching" or "approaching automatic discovery". Among them, the BR address is the unique media access control (MAC) address of the Bluetooth module itself. The address is configured when the device leaves the factory and remains unchanged. Therefore, the mobile phone can determine the other party device, i.e., the PC, to establish a BR Bluetooth connection based on the other party's classic Bluetooth address.

[0107] As an example, when the user clicks on the multi-screen collaboration control on the PC, the QR code displayed by the PC may carry some information of the electronic device itself, such as the BR address. Therefore, when the mobile phone successfully scans the QR code on the PC, it can obtain information such as the BR address of the Bluetooth module of the PC. Then, based on the BR address of the PC, the mobile phone can trigger the Bluetooth module of the mobile phone and the Bluetooth module of the PC to establish a BR Bluetooth connection.

[0108] As another example, an electronic device with NFC function can store part of its own information in the NFC module to realize the interaction of NFC module information through the "touch and pay" function. For example, a mobile phone can obtain the NFC tag in the NFC module of the PC by touching it with the PC. The NFC tag contains parameter information such as the BR address preset by the PC, and then the mobile phone can trigger the Bluetooth module of the mobile phone and the Bluetooth module of the PC to establish a BR Bluetooth connection based on the BR address of the PC.

[0109] Among them, the mobile phone can send a BR Bluetooth connection request to the PC based on the BR address of the PC. After receiving the BR Bluetooth connection request from the mobile phone, the PC can send a reply message, which is used to indicate that the PC agrees (accepts) the BR Bluetooth connection request. In this way, after receiving the reply message from the PC, the mobile phone can establish a BR Bluetooth connection with the PC.

[0110] As a method, after obtaining the BR address of the PC, the mobile phone first sends a BR Bluetooth connection request to the air interface through the Bluetooth module. The BR Bluetooth connection request may be a paging message containing the BR address of the PC to request to establish a BR Bluetooth connection with the PC. In this way, after receiving the paging message, the PC that meets the BR address can return a reply message. The reply message may be a paging response, which may include information such as a frequency hopping sequence, a channel access code, and a clock. Through the paging response, the frequency hopping sequence, channel access code, and clock can be negotiated between the mobile phone and the PC to be consistent. Therefore, after receiving the paging response and determining that the paging response is from the device with the corresponding BR address (ie, the PC), the mobile phone can trigger the Bluetooth module of the mobile phone to establish a BR Bluetooth connection with the Bluetooth module of the device (ie, the PC).

[0111] In the process of establishing a BR Bluetooth connection, a physical connection of the Bluetooth connection needs to be established first. One type of physical connection of the Bluetooth connection is an asynchronous connection-oriented link (ACL), which is generally used to transmit connection-type negotiation signaling to maintain the Bluetooth connection.

[0112] That is to say, after receiving the paging response from the PC, the mobile phone and the PC can first establish an ACL connection for the BR Bluetooth connection based on the negotiated frequency hopping sequence, channel access code, clock and other information. After the ACL connection is established, the mobile phone and the PC can successfully establish a BR Bluetooth connection based on protocols such as the logical link control and adaptation protocol (L2CAP) and the Bluetooth serial port emulation protocol (RFCOMM).

[0113] In some embodiments, after the mobile phone and PC create the ACL connection of the BR Bluetooth connection, they cannot directly exchange data. They need to perform pairing and authentication processes, such as pairing permission and key configuration, to make the other party a trusted device. Only then can they transmit data to each other. Among them, key configuration is an optional step. If password verification is not required, key configuration is not necessary.

[0114] S103: The mobile phone and the PC establish a screen projection connection based on the session channel of the classic Bluetooth connection.

[0115] In some embodiments, after the mobile phone and the PC negotiate to establish a BR Bluetooth connection through step S102, a session channel of the BR Bluetooth connection for layer 2 network communication can be provided for establishing a Wi-Fi P2P connection (or screen projection connection).

[0116] Among them, Wi-Fi P2P (peer-to-peer, end-to-end or point-to-point) was proposed by the Wi-Fi Alliance, defining how two Wi-Fi electronic devices connect and communicate without routing. Specifically, electronic devices that support Wi-Fi P2P form a point-to-point workgroup (P2P group), including a point-to-point workgroup owner (P2P group owner) and a point-to-point client (P2P client). Among them, the electronic device that serves as the P2P group owner needs to have the functions of traditional routing, such as being able to control the communication of other electronic devices (P2P clients) in the Wi-Fi P2P workgroup as a soft AP (soft AP) device. The electronic device that serves as a P2P workgroup client (group client, GC) needs to be connected to the electronic device that serves as the P2P groupowner, thereby forming a workgroup that can communicate.

[0117] Optionally, the mobile phone and PC can negotiate Wi-Fi P2P parameters (or screen projection parameters) based on the session channel of the classic Bluetooth connection to establish a screen projection connection based on the negotiated Wi-Fi P2P parameters.

[0118] In some embodiments, after the mobile phone and PC establish a BR Bluetooth connection, they can negotiate or obtain the hotspot parameter information of the other party's Wi-Fi based on the session channel of the BR Bluetooth connection to establish a Wi-Fi connection. In some embodiments, after the mobile phone and PC establish a Wi-Fi connection, they also need to perform an authentication process to set the other party's device as a trusted device to confirm the security of the current Wi-Fi session.

[0119] After the mobile phone and PC establish a secure Wi-Fi session based on the Bluetooth connection session channel, they start the Wi-Fi P2P parameter negotiation to negotiate who will be the group owner and who will be the group client. Specifically, the mobile phone sends the list of RF bands and channels that it supports and is currently available to the PC. The PC selects the appropriate RF band and channel, creates a P2P soft AP, and sets its own role as the group owner. Correspondingly, the mobile phone acts as a groupclient and forms a Wi-Fi P2P working group with the PC.

[0120] After the mobile phone and PC form a Wi-Fi P2P working group, the mobile phone can establish a Wi-Fi P2P connection with the PC. Thus, the mobile phone and PC can interact with each other based on the service channel of the Wi-Fi P2P connection. For example, the service data flow and control information flow in the process of wireless screen projection or audio and video file sharing can be processed.

[0121] Optionally, after the mobile phone establishes a screen projection connection with the PC, the mobile phone can send the image data on the display screen to the PC for display.

[0122] At this point, after the above process, the process of projecting the displayed content from the mobile phone to the PC is completed.

[0123] It can be seen that when the user triggers the wireless screen projection function of the mobile phone on the PC, the mobile phone can first obtain the BR address of the PC through "scan", "touch", "approach automatic discovery", etc., and then the mobile phone establishes an ACL connection for the BR Bluetooth connection between the mobile phone and the PC based on the BR address. After the ACL connection is established, the BR Bluetooth connection between the mobile phone and the PC is established. Then, based on the BR Bluetooth connection, the projection parameters are negotiated to realize wireless screen projection between the mobile phone and the PC. After that, the mobile phone can record the BR address of the PC. The next time the user needs to trigger the wireless screen projection between the mobile phone and the PC, the user can also directly trigger the wireless screen projection function with the PC on the mobile phone.

[0124] The following describes a solution for users to trigger wireless screen projection with a PC from their mobile phone, targeting the scenario where the mobile phone already has the BR address of the PC.

[0125] Optionally, a collaborative application for realizing wireless screen projection between multiple devices may be installed in the mobile phone. The collaborative application may also be a program code pre-installed in the mobile phone, and there may be no corresponding desktop application icon. Optionally, the collaborative application may also be a service provided by an application in the mobile phone. The application may be a super terminal application, a mobile phone manager application, a computer assistant application or other application, which is not limited in the embodiments of the present application.

[0126] Among them, "super terminal" refers to the integration of the capabilities of multiple terminals through distributed technology, storing them in a virtual hardware resource pool, and uniformly managing, scheduling and integrating the capabilities of each terminal according to business needs to provide external services, so that different terminals can achieve fast connection, mutual assistance in capabilities, and resource sharing. For example, a mobile phone and a PC form a super terminal (or super terminal system), which can realize the screen projection function of the mobile phone interface to the PC; a mobile phone and a smart speaker form a super terminal, which can realize the function of remote control of the smart speaker by the mobile phone, etc.

[0127] Optionally, the mobile phone can be used as a central device / core device to establish a communication connection with one or more other collaborative devices to form a "super terminal". The mobile phone can provide a unified entrance for interaction between the mobile phone and one or more other collaborative devices, such as a super terminal application, a super terminal interface, etc.

[0128] Collaborative devices, also known as associated devices, can be electronic devices located in the same communication network as the mobile phone (i.e., core device), for example, electronic devices located in the same Wi-Fi network. Collaborative devices can also be electronic devices whose login account is the same account as the mobile phone login account (such as a Huawei account), or whose login account belongs to the same group as the mobile phone login account (such as a family account). Collaborative devices can also be electronic devices that establish a trusted relationship (or pairing) with a mobile phone in other ways, such as an electronic device that has been paired with Bluetooth, an electronic device that has been connected to a hotspot shared by a mobile phone, or a mobile phone that has been connected to the hotspot of the electronic device, or a mobile phone that has established a Wi-Fi P2P connection with the electronic device, etc. The embodiments of the present application do not limit the specific association method between the above-mentioned collaborative device and the mobile phone.

[0129] It can be understood that the "super terminal" is only an exemplary term and can also be replaced by other terms, such as "smart collaboration", "multi-device collaboration", "multi-screen collaboration", etc., and the embodiments of the present application are not limited to this.

[0130] In some scenarios, after turning on the WLAN and Bluetooth functions, the phone can start an application for wireless screen projection with the PC, such as the HyperTerminal application. Figure 3AAs shown, the mobile phone can display a list of available devices at this time, which may include the identifier of at least one device that has established a screen projection connection with the mobile phone, such as the identifier of a PC. Optionally, the mobile phone can record the BR address of at least one device that has established a screen projection connection with the mobile phone.

[0131] When the user clicks on the logo of the PC, the mobile phone can respond to the user's operation on the logo of the PC, triggering the establishment of a BR Bluetooth connection between the mobile phone and the PC. Optionally, the mobile phone first determines the BR address corresponding to the logo of the PC by recording the BR address of at least one device that has established a screen projection connection with the mobile phone. Then, based on the BR address corresponding to the logo of the PC, a BR Bluetooth connection request is sent to the PC. After the PC receives the BR Bluetooth connection request from the mobile phone, it can send a reply message, which is used to indicate that the PC agrees (accepts) the BR Bluetooth connection request. In this way, after receiving the reply message from the PC, the mobile phone can establish a BR Bluetooth connection with the PC. Therefore, the mobile phone and the PC can negotiate the screen projection parameters based on the session channel of the BR Bluetooth connection to establish a screen projection connection between the mobile phone and the PC. Wireless screen projection between the mobile phone and the PC is thereby achieved based on the screen projection connection.

[0132] For example, take the scenario of wireless screen projection between a mobile phone and a PC through a hyperterminal as an example. Figure 3B As shown, the user interface 300 is a schematic diagram of a main interface (or called a main screen interface, etc.) displayed by a mobile phone, and the user interface 300 may include a top status bar 301, a desktop 302, a bottom tray bar 303, etc. Among them, the top status bar 301 includes a mobile signal indicator, a wireless network signal indicator, a Bluetooth indicator, a battery indicator, a time indicator, etc. The desktop 302 may display icons of one or more applications, application function components, etc. The bottom tray bar 303 may display icons of commonly used applications, so that users can quickly open these applications.

[0133] like Figure 3B As shown, the user can call out the control center interface through user operation 304. Figure 3B The user operation 304 shown may be a touch operation of the user sliding downward from the top of the user interface 300. In other embodiments, the user operation 304 may also be a touch operation of the user sliding upward from the bottom of the display interface.

[0134] After detecting the user operation 304, the mobile phone displays the control center interface, as shown in the user interface 310. The user interface 310 may display multiple function controls, or may also be called cards or modules, etc. For example, the setting control 311, the quick setting card 312, the hyperterminal function card 313, etc. shown in the user interface 310.

[0135] The setting control 311 can be used for the user to quickly enter the setting interface. After the user clicks the setting control 311 to quickly enter the setting interface, the user can select the Bluetooth function option in the "settings" application interface to turn on the Bluetooth function, or select the WLAN function option in the "settings" application interface to turn on the WLAN function.

[0136] The quick setting card 312 includes multiple controls, which can be used by the user to quickly turn on / off or adjust corresponding functions, such as WLAN, Bluetooth, mobile network, sound, etc. The user can turn on the Bluetooth function by clicking the Bluetooth control in the quick setting card 312, and can also turn on the WLAN function by clicking the WLAN control in the quick setting card 312.

[0137] When the WLAN and Bluetooth functions are turned on on the mobile phone and PC, the mobile phone can realize the wireless screen projection scenario between the mobile phone and the PC through the hyperterminal.

[0138] like Figure 3B As shown, when the mobile phone turns on the WLAN function and the Bluetooth function, the super terminal function card 313 may display icons of one or more devices. These devices may include devices that have been connected to the mobile phone to form a super terminal, and may also include devices detected by the mobile phone that have not yet established a connection. The devices that have not yet established a connection may be devices that have been paired before, or devices that have not yet been paired. This application does not impose any restrictions on this.

[0139] The user can select the device to be projected from the icons of one or more devices displayed in the hyperterminal function card 313, so that the mobile phone can initiate a projection connection to the device. Figure 3B As shown, after the user clicks on the icon 314 to select the PC from the hyperterminal function card 313, the mobile phone can initiate a screen projection connection to the PC device. Optionally, after the user clicks on the icon 314 to select the PC from the hyperterminal function card 313, the mobile phone may pop up a window to prompt the user whether to establish a screen projection connection with the PC. And / or, the PC may pop up a window to prompt the user whether to establish a screen projection connection with the mobile phone. After detecting that the user clicks to confirm, the mobile phone can be triggered to establish a screen projection connection with the PC. That is, by recording the BR address of the PC, the mobile phone and the PC are triggered to establish a BR Bluetooth connection. Thereby, based on the Bluetooth connection channel, a screen projection connection between the mobile phone and the PC is established.

[0140] After the screen projection connection is successfully established, the mobile phone can display a user interface 320, and the hyperterminal function card 321 shown in the user interface 320 can display a schematic diagram of successful collaboration with the PC device. At this time, the mobile phone can realize the screen projection function of projecting the mobile phone interface to the PC based on the screen projection connection.

[0141] In some scenarios, the user can also enter the hyperterminal interface by selecting the hyperterminal option in the settings page. The hyperterminal interface can display the icons of one or more of the above devices for the user to select the device that needs to be coordinated to establish a collaborative connection. That is, the user operation 304 can include a series of operations, such as the operation of the user clicking the "settings" application icon in the main interface, and the operation of selecting the corresponding function option in the "settings" application interface. Alternatively, the user can also enter the hyperterminal interface from the negative first screen of the mobile phone, the pull-up toolbar, the pull-down notification bar, the left / right pull-down shortcut icon bar, the desktop card or an application (such as a smart home application), etc. This embodiment does not limit the way to enter the hyperterminal interface.

[0142] It can be seen that at present, a BR Bluetooth connection needs to be established between the mobile phone and the PC first, and then the Wi-Fi P2P parameters can be negotiated based on the BR Bluetooth connection to establish a Wi-Fi P2P working group, thereby realizing wireless screen projection between the mobile phone and the PC. Although the connection method of the BR Bluetooth connection is simple, as long as the BR address of the peer device is obtained, the BR connection can be directly initiated without the need for the peer device to be in a continuous Bluetooth broadcast state, but the ACL connection establishment speed of the BR Bluetooth connection is relatively slow, resulting in the Bluetooth connection time alone taking 2.5 to 3 seconds, plus the subsequent Wi-Fi P2P establishment time, the negotiation time of the screen projection related parameters (Wi-Fi P2P parameters), etc., resulting in a relatively long time for the entire wireless screen projection to be realized. It makes the user need to wait for a long time to see the successful screen projection interface, which easily gives the user an experience that the wireless screen projection connection process is relatively slow.

[0143] In order to solve the above problems, an embodiment of the present application provides a Bluetooth connection method, in which electronic device 1 (such as a mobile phone) can record the Bluetooth low energy (BLE) address of the Bluetooth module of electronic device 2 (such as a PC), and then electronic device 1 can trigger the establishment of a BLE connection between electronic device 1 and electronic device 2 through the BLE address of the Bluetooth module of electronic device 2. Thus, a screen projection connection between electronic device 1 and electronic device 2 can be established based on the BLE connection. Since the connection speed of the BLE connection is faster than that of the BR Bluetooth connection, the Bluetooth connection speed between electronic device 1 and electronic device 2 can be improved, thereby reducing the screen projection connection delay from electronic device 1 to electronic device 2. The user can wait for a short time to see the successful screen projection interface, thereby improving the user experience.

[0144] In the embodiment of the present application, the operating system of the electronic device 2 is Operating system. The operating system of the electronic device 1 may be The operating system can also be Operating system or The operating system may also be any other operating system that meets the usage requirements, which can be determined based on actual usage requirements and is not limited in the embodiments of the present application.

[0145] It should be noted that for installation For the electronic device 2 of the operating system, the BLE address of its Bluetooth module is the same as the BR address and remains fixed. Therefore, in an embodiment of the present application, the electronic device 1 can record and store the BLE address of the Bluetooth module of the electronic device 2. When a Bluetooth connection needs to be established between the electronic device 1 and the electronic device 2, the electronic device 1 can directly execute the Bluetooth connection method provided in the present application according to the recorded BLE address of the Bluetooth module of the electronic device 2 to complete the establishment of the BLE Bluetooth connection between the electronic device 1 and the electronic device 2. In some other embodiments, the BLE address may also be different from the BR address, and it is fixed.

[0146] It is understandable that, in addition to the above In addition to the scenario where the BLE address under the operating system is fixed, when there are other scenarios where the BLE address is fixed, the Bluetooth connection method of the embodiment of the present application can also be applied to other scenarios. The embodiment of the present application does not limit the scenario where the BLE address is fixed.

[0147] As an example, see Figure 4 , Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown. The electronic device may be the electronic device 1 or the electronic device 2 described above.

[0148] like Figure 4 As shown, the electronic device 400 may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a sensor module 480, a button 490, a motor 491, an indicator 492, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc.

[0149] 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. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. For example, if the electronic device is electronic device 2, and electronic device 2 is a PC, the structure of electronic device 2 may not include mobile communication module 450, motor 491, SIM card interface 495, etc.

[0150] The processor 410 may include one or more processing units, for example, the processor 410 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0151] The controller may be the nerve center and command center of the electronic device 400. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0152] The processor 410 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may store instructions or data that the processor 410 has just used or cyclically used. If the processor 410 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.

[0153] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 400. The external memory card communicates with the processor 410 via the external memory interface 420 to implement a data storage function.

[0154] Internal memory 421 may be used to store program code. For example, the program code may include an operating system program and an application program. The operating system may include but is not limited to etc. operating systems. Among them, the program code includes instructions. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the internal memory 421. For example, in an embodiment of the present application, the processor 410 can display the corresponding display content on the display screen 494 in response to the user clicking the preset button / control by executing the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function, etc. The data storage area may store data created during the use of the electronic device 400 (such as input events, screen projection data, etc.), etc. In addition, the internal memory 421 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0155] In an embodiment of the present application, the internal memory 421 may store a MAC address (also referred to as a classic Bluetooth address, BR address) for uniquely identifying a Bluetooth module of an electronic device. In addition, the internal memory 421 may also store connection data of other electronic devices that have established a Bluetooth connection with the electronic device. For example, the connection data may be the Bluetooth address of another electronic device. The Bluetooth address may be a BR address or a BLE address.

[0156] The wireless communication module 460 can provide wireless communication solutions including WLAN such as Wi-Fi network, Bluetooth BT, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. applied to the electronic device 400. The wireless communication module 460 can be one or more devices integrating at least one communication processing module. The wireless communication module 460 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 410. The wireless communication module 460 can also receive the signal to be sent from the processor 410, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0157] In some embodiments, the wireless communication module 460 may include a Bluetooth module. The Bluetooth module may be used to provide Bluetooth communication functions, establish Bluetooth connections with other electronic devices, and perform Bluetooth data transmission. The Bluetooth module may support one or more Bluetooth protocols, such as classic Bluetooth BR / EDR, BLE, BLE Audio, etc., but is not limited thereto and may change with the development of Bluetooth protocols.

[0158] Optionally, the Bluetooth module may be a Bluetooth chip. The electronic device 400 may be paired with a Bluetooth chip of another electronic device through the Bluetooth chip and establish a wireless connection, so as to achieve multi-screen collaboration between the electronic device 400 and the other electronic devices through the wireless connection.

[0159] Optionally, the Bluetooth module may store the Bluetooth address of the electronic device, which may include the MAC address (also called classic Bluetooth address, BR address) of the Bluetooth module used to uniquely identify itself. When operating the electronic device 2 of the operating system, the Bluetooth address stored in the Bluetooth module may also include a BLE address. The BLE address is fixed and may be the same as the MAC address of the Bluetooth module, i.e., the BR address, or may be different from the BR address.

[0160] In some embodiments, the wireless communication module 460 may also include an NFC module. Electronic devices implement point-to-point data transmission through NFC. If the NFC function of electronic device 1 is turned on and it is close to the NFC sensing area of ​​electronic device 2, the file can be quickly shared with electronic device 2.

[0161] In some embodiments, the electronic device may store some of its own information in the NFC module, which may include the MAC address (also called classic Bluetooth address, BR address) of the Bluetooth module used to uniquely identify itself, and may also include the name or unique identifier of the electronic device.

[0162] When the electronic equipment is installed as above When operating the electronic device 2 of the operating system, the NFC module may also store the BLE address of its own Bluetooth module. The BLE address is fixed and may be the same as the MAC address of the Bluetooth module, i.e., the BR address. When other electronic devices with the NFC function turned on are close to the NFC sensing area of ​​the other electronic devices, the other electronic devices may obtain the BR address and BLE address preset in their own NFC modules.

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

[0164] The display screen 494 is used to display images, videos, etc. The display screen 494 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), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0165] In some embodiments, if the display screen of the electronic device is relatively small, the wireless communication module 460 can be used to connect to other large-screen electronic devices, and the display content can be sent to the large-screen electronic device for display based on the wireless screen projection technology.

[0166] The electronic device 400 can implement the shooting function through the ISP, the camera 493, the video codec, the GPU, the display screen 494 and the application processor. In some embodiments, the electronic device can implement the scanning function through the camera 493. For example, the electronic device 1 turns on the camera and points it at the QR code displayed on the electronic device 2, and the BR address and BLE address of the Bluetooth module of the electronic device 2 can be obtained.

[0167] Exemplarily, the software system of the electronic device 1 and the electronic device 2 provided in the embodiment of the present application may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. For example, the software system may include but is not limited to This application does not limit the operating system to Harmony.

[0168] The following will take the electronic device 1 being a mobile phone and the electronic device 2 being a PC as an example to introduce a software architecture of the electronic device 1 and the electronic device 2 provided by the present application.

[0169] As an example, Figure 5 This is a software structure diagram of a mobile phone and a PC provided in an embodiment of the present application. The software structure diagram shows that the mobile phone has an Android system with a layered architecture and the PC has a software structure of a Windows system, and the software structure diagram can support multi-screen collaborative operation between the mobile phone and the PC.

[0170] Among them, for the software structure of the mobile phone, the hierarchical structure divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes an application (application, APP) layer, an application framework (framework) layer, and a kernel layer (also called a driver layer) from top to bottom.

[0171] The application layer may include a series of application packages (APK). For example, an application package may include collaborative applications, memos, music, videos, gallery, Bluetooth, short messages, and desktop programs (Launcher) and other applications. For the convenience of description, the application is referred to as an application below. The application on the mobile phone can be a native application or a third-party application, which is not limited in the embodiments of the present application.

[0172] Figure 5 The collaborative application is used as an example. The collaborative application can be used to realize multi-screen collaboration between multiple electronic devices. In one scenario, when a mobile phone and a PC perform multi-screen collaboration, the collaborative application can be used to realize information interaction between the mobile phone and the PC, window layout display, and monitoring of user operations sent by the PC in a collaborative window.

[0173] The application framework layer can provide application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 6 As shown, the application framework layer may include a multi-screen framework, which may be used to manage multi-screen collaboration related affairs to control and implement multi-screen collaboration functions between devices. In some embodiments, the application framework layer may also include an input event management server (input manager service, IMS), a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. ( Figure 5 not shown).

[0174] The kernel layer is a layer between hardware and software, which can provide WLAN, Bluetooth capabilities and basic communication protocols. In the embodiment of the present application, the kernel layer may include a Bluetooth driver for driving the underlying hardware Bluetooth chip to realize Bluetooth connection with other devices.

[0175] In some embodiments, the kernel layer may include an underlying capability module for multi-screen transmission, which is used to provide reverse control transmission capabilities and video stream transmission capabilities in the multi-screen collaboration process. In an embodiment of the present application, after the collaborative application encodes the display data of the content to be projected on the mobile phone into a video stream, it can call the underlying capability module to transmit the video stream to the PC through the screen projection protocol. Among them, the screen projection protocol may include but is not limited to: Airplay technology, DLNA protocol, MiraCast protocol, ChromeCast protocol, Cast+ protocol.

[0176] In some embodiments, the kernel layer may also include display drivers, camera drivers, NFC drivers, input / output device drivers (such as touch screens, speakers, microphones, etc.), audio drivers, etc. ( Figure 5 not shown).

[0177] Need to explain, Figure 5 The software architecture of the mobile phone shown is only one implementation method of the embodiment of the present application. In actual applications, the mobile phone may also include more or fewer software modules, which is not limited here. For example, the software architecture of the mobile phone may also include a system library. The system library may include multiple functional modules. For example: layer integrator (SurfaceFlinger), surface manager (Surface Manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), two-dimensional graphics engine (for example: SGL), etc.

[0178] For the software structure of the PC, it can include a multi-layer architecture, such as a PC software layer, a kernel layer, an operating system (OS) layer, and the like. Among them, the PC software layer can run executable files (exe). For example, in the present application, the PC can pre-install an exe program for realizing multi-screen collaboration, and the multi-screen collaborative exe program can be embodied in the form of an App on the PC, such as the EMUI desktop, PC housekeeper, etc. Or by running the multi-screen collaborative exe program, the PC has the function of displaying windows on the mobile phone. This application refers to the exe program provided by the PC for displaying the window function on the mobile phone as a "collaborative application."

[0179] In the embodiment of the present application, the kernel layer of the PC may include a Bluetooth driver for driving the underlying hardware Bluetooth chip to realize Bluetooth connection with other devices. In some embodiments, the kernel layer of the PC may also include a display driver, a camera driver, an NFC driver, an input / output device driver (such as a touch screen, a speaker, a microphone, etc.), an audio driver, etc. ( Figure 5 not shown).

[0180] In some embodiments, the kernel layer of the PC may also include a bottom-level capability module for multi-screen transmission, which is used to provide reverse control transmission capability and video stream transmission capability in the multi-screen collaboration process. After the PC receives the video stream of the content to be projected sent by the mobile phone through the bottom-level capability module, it can be sent to the PC software layer, which decodes and displays the video stream.

[0181] Need to explain, Figure 5 The software architecture of the PC shown is only one implementation of the embodiment of the present application. In actual applications, the PC may also include more or fewer software modules, which is not limited here.

[0182] A Bluetooth connection method between a first electronic device and a second electronic device provided by an embodiment of the present application will be described below with reference to the accompanying drawings.

[0183] For ease of introduction, in the embodiments of the present application, the electronic device 1, such as a mobile phone, may be referred to as a first electronic device, and the electronic device 2, such as a PC, may be referred to as a second electronic device. Figure 6 The present invention provides a flowchart of a method for connecting a first electronic device to a second electronic device via Bluetooth, wherein the first electronic device stores the BLE address of the second electronic device, and the BLE address of the second electronic device is fixed.

[0184] like Figure 6 As shown, the process of the Bluetooth connection method between the first electronic device and the second electronic device may include:

[0185] S600: The first electronic device and the second electronic device enable Bluetooth functions.

[0186] The embodiment of the present application does not specifically limit the entry for the first electronic device and the second electronic device to enable the Bluetooth function.

[0187] Optionally, the user can slide down the notification bar (or status bar), and then click the Bluetooth control in the notification bar to turn on the Bluetooth function. Alternatively, the user can long press the Bluetooth control to display a Bluetooth setting interface, which may include a Bluetooth switch, and the user clicks the Bluetooth switch to turn on the Bluetooth function. Alternatively, the user can enter the Bluetooth function switch option in the settings application or Bluetooth application of the electronic device and choose to turn on the Bluetooth function.

[0188] In one scenario, when the user needs the first electronic device and the second electronic device to perform multi-screen collaboration, the user can turn on the Bluetooth function of the first electronic device and the second electronic device. Optionally, the user can also turn on the WLAN function of the first electronic device and the second electronic device so that the first electronic device and the second electronic device are in the same local area network to provide support for the subsequent multi-screen collaboration. Among them, multi-screen collaboration can mean that after any two devices with screens are connected, resource sharing and collaborative operation can be achieved, such as a wireless screen projection scenario in which the screen display content of one device is projected to another device for display.

[0189] The user can also slide down the notification bar and click the WLAN control in the notification bar to turn on the WLAN function. Alternatively, the user can long press the WLAN control to display the WLAN setting interface, which may include a WLAN switch, and the user clicks the WLAN switch to turn on the WLAN function. Alternatively, the user can enter the WLAN function switch option in the setting application or WLAN application of the electronic device and choose to turn on the WLAN function.

[0190] Optionally, the first electronic device may be installed with a collaboration application for implementing multi-screen collaboration among multiple devices.

[0191] In one scenario, when the user launches the collaborative application on the first electronic device, if the Bluetooth function and / or WLAN function is not turned on on the first electronic device, the first electronic device can automatically turn on the Bluetooth function and / or WLAN function, and the first electronic device can also prompt the user to turn on the Bluetooth function and / or WLAN function, so that the user can turn on the Bluetooth function and / or WLAN function in the above manner.

[0192] Optionally, the second electronic device may also be installed with a collaborative application for implementing multi-screen collaboration among multiple devices. The collaborative applications installed on the first electronic device and the second electronic device may be the same or different.

[0193] Similarly, when the user launches the collaborative application on the second electronic device, if the Bluetooth function and / or WLAN function is not turned on on the second electronic device, the second electronic device can automatically turn on the Bluetooth function and / or WLAN function, and the second electronic device can also prompt the user to turn on the Bluetooth function and / or WLAN function, so that the user can turn on the Bluetooth function and / or WLAN function in the above manner.

[0194] S610: The first electronic device displays an available device list, where the available device list includes an option of the second electronic device.

[0195] In an embodiment of the present application, the list of available devices displayed by the first electronic device may include options for one or more electronic devices. The options for each electronic device may include a device name and a device type. For example, the list of available devices displayed by the first electronic device may include a "HUAWEI MatePad 11" device option. Among them, the "HUAWEI MatePad 11" device option may include the device name text "HUAWEI MatePad11" and the device type icon as a tablet computer.

[0196] In one scenario, the first electronic device may display devices that support Bluetooth connection in a list of available devices for the user to select devices to be connected via Bluetooth. The devices that support Bluetooth connection may include one or more electronic devices with which the first electronic device has previously established a Bluetooth connection. The one or more electronic devices may include electronic devices with which the first electronic device has previously established a BR connection, electronic devices with which a BLE connection has previously been established, and electronic devices with which the first electronic device has previously established other Bluetooth connections. The embodiments of the present application are not limited thereto.

[0197] Optionally, the device supporting Bluetooth connection may also include one or more electronic devices that have been paired with the first electronic device before, and may also include one or more electronic devices that are searched nearby and have not been paired yet.

[0198] The embodiment of the present application does not specifically limit the manner in which the first electronic device displays the list of available devices. For example, after the user clicks the Bluetooth control in the notification bar to turn on the Bluetooth function, the notification bar may display a list of available devices, which includes options for one or more electronic devices that have established a Bluetooth connection with the first electronic device. Alternatively, after the user clicks the Bluetooth switch in the Bluetooth settings interface to turn on the Bluetooth function, the Bluetooth settings interface may display the list of available devices. Alternatively, after the user turns on the Bluetooth function in the settings application or the Bluetooth application, the user may enter the detailed interface of the Bluetooth function, which may display the list of available devices.

[0199] In another scenario, the first electronic device may display devices that support multi-screen collaboration in the list of available devices. The devices that support multi-screen collaboration may include one or more electronic devices with which the first electronic device has previously established a multi-screen collaborative connection (such as a projection connection). The one or more electronic devices include electronic devices with which the first electronic device has previously established a multi-screen collaborative connection by “scanning”, electronic devices with which the first electronic device has previously established a multi-screen collaborative connection by “touching”, and electronic devices with which the first electronic device has previously established a multi-screen collaborative connection by “automatically discovering by approaching”.

[0200] It is understandable that the multi-screen collaborative connection between multiple devices first requires the establishment of a Bluetooth connection between the devices. Therefore, the one or more electronic devices may include an electronic device that has established a Bluetooth connection with the first electronic device through one or more of "scan", "touch", and "approach automatic discovery", and an electronic device that has established a multi-screen collaborative connection based on the Bluetooth connection.

[0201] Optionally, the device supporting multi-screen collaboration may also include one or more electronic devices that are searched nearby but for which a multi-screen collaboration connection has not yet been established.

[0202] In one scenario, when a user needs a first electronic device and a second electronic device to perform multi-screen collaboration, when the first electronic device opens a multi-screen collaboration application, the application interface of the multi-screen collaboration application can be entered, and the application interface can display a list of available devices, which includes options for one or more electronic devices that have established a multi-screen collaboration connection with the first electronic device. The user can select the option of the device to be multi-screen collaborated. Thus, the first electronic device can first establish a Bluetooth connection with the device corresponding to the option, and then realize multi-screen collaboration based on the established Bluetooth connection.

[0203] For example, taking the collaborative application as a hyperterminal application, Figure 3B As shown, after the user performs a touch operation (user operation 304) of sliding downward from the top of the main interface 300 displayed by the first electronic device (such as a mobile phone), the mobile phone can display a control center interface 310, which may include a Bluetooth control for the user to quickly turn on / off the Bluetooth function, and a WLAN control for the user to quickly turn on / off the WLAN function. After the user quickly turns on the WLAN function and the Bluetooth function of the mobile phone by clicking on the Bluetooth control and the WLAN control (the mobile phone can display the effect of the Bluetooth control and the WLAN control being lit), the mobile phone can automatically start the hyperterminal service or hyperterminal application. At this time, the control center interface 310 can display a hyperterminal function card 313. The hyperterminal function card 313 can display a list of available devices, which includes options for one or more electronic devices. Among them, the options of the one or more electronic devices may include options for a second electronic device that has been paired before (such as a PC icon 314).

[0204] In an embodiment of the present application, the first electronic device may store connection data of one or more electronic devices that have previously established a Bluetooth connection, established a multi-screen collaborative connection, or paired. The connection data may include a Bluetooth address, a device name, a device unique identifier, a device type, etc. Among them, the Bluetooth address may include a BR address and / or a BLE address.

[0205] It should be noted that the BLE address of a general electronic device is a random address, which is usually randomly generated when the electronic device needs to send broadcast information and is updated every certain period of time (such as 15 minutes). Therefore, for such electronic devices with non-fixed BLE addresses, the first electronic device does not need to store its BLE address after pairing or connecting with it. However, for the BR address, since it is the unique MAC address of the Bluetooth module of the electronic device itself, the address is configured when the device leaves the factory and remains fixed. Therefore, for such electronic devices with non-fixed BLE addresses, the first electronic device can store its BR address after pairing or connecting with it, so that the first electronic device can directly initiate a BR connection through the BR address later.

[0206] For installation For electronic devices with operating systems, their BLE address type is a public address, and the BLE address is fixed. Therefore, for such electronic devices with fixed BLE addresses, in the embodiment of the present application, the first electronic device can store its BLE address after pairing or connecting with it before. Since the BR address is also fixed, therefore, for such electronic devices with fixed BLE addresses, in the embodiment of the present application, the first electronic device can store not only the BLE address but also the BR address after pairing or connecting with it before.

[0207] Optionally, for installation For electronic devices with operating systems, the BLE address is usually the same as the BR address and is fixed. For an electronic device operating the system, the first electronic device may also store only the BR address, and when the BLE address is needed, the BR address may be directly used instead. In some other embodiments, when the BLE address is different from the BR address, the first electronic device may also store the BR address and the BLE address.

[0208] In an embodiment of the present application, the list of available devices may include an option of a second electronic device, which is an electronic device with a fixed BLE address as described above. The first electronic device may store the BLE address of the second electronic device so that the first electronic device can directly initiate a BLE connection to the second electronic device through the BLE address.

[0209] Optionally, the second electronic device is used Operating system of the device.

[0210] Optionally, if in addition to the above In addition to the BLE address of the electronic device under the operating system being fixed, there are other types of electronic devices whose BLE addresses are unchanged, and the second electronic device may also be the other type of electronic device. The embodiment of the present application does not specifically limit the device type of the second electronic device with a fixed BLE address characteristic.

[0211] Optionally, the second electronic device is a device that has been paired or connected with the first electronic device before. It is understood that before the first electronic device is paired or connected with the second electronic device, the first electronic device needs to discover the second electronic device first. As a way, the first electronic device can obtain the BLE address of the second electronic device when discovering the second electronic device for storage and record.

[0212] In some scenarios, when a device such as device A is discovered by another device such as device B (such as through "approach automatic discovery", "scan" or "touch"), device A can send its own BR address, device name, device unique identifier, device type and other related device information to device B. Thus, device B can pair or establish a connection with device A based on the device information of device A.

[0213] As a method, if device A is an electronic device with a fixed BLE address as mentioned above, such as a second electronic device, when device A is discovered by device B (such as a first electronic device), device A can also send its own BLE address together with the above-mentioned related device information to device B.

[0214] After device B obtains the BLE address of device A, device B can directly store and record the BLE address of device A, or after judging that device A is a device with fixed BLE address characteristics through at least one device information such as device type, device name, and device unique identifier of device A, device B can store and record the BLE address of device A. For example, judging whether device A is a device using at least one device information such as device type, device name, and device unique identifier of device A An electronic device operating the system, if so, it can be determined that device A is a device with a fixed BLE address characteristic.

[0215] Optionally, if device B does not obtain the BLE address of device A, but device B determines that device A is using at least one device information such as device type, device name, and device unique identifier of device A. When operating the electronic device of the system, device B may also store and record the BR address of device A as the BLE address.

[0216] S620: The first electronic device sends a first BLE broadcast to the second electronic device in response to the operation of the option applied to the second electronic device.

[0217] S630: The first electronic device responds to the operation of the option acting on the second electronic device and initiates a BLE ACL connection to the second electronic device according to the BLE address of the second electronic device.

[0218] In some embodiments, when a user needs to establish a Bluetooth connection between a first electronic device and a second electronic device, the first electronic device may display a Bluetooth setting interface, which may display a list of available devices. The user may perform a selection operation in the list of available devices in the Bluetooth setting interface to select an option of the second electronic device. When the first electronic device detects an operation by the user on an option of the second electronic device, it may respond to the operation and trigger a Bluetooth connection establishment process between the first electronic device and the second electronic device.

[0219] In one scenario, when a user needs to establish multi-screen collaboration between a first electronic device and a second electronic device, the first electronic device can display an application interface for multi-screen collaboration, which can display a list of available devices. The user can select the option of the second electronic device from the list of available devices in the application interface for multi-screen collaboration. When the first electronic device detects the user's operation on the option of the second electronic device, it can respond to the operation and trigger the multi-screen collaboration establishment process between the first electronic device and the second electronic device. Since multi-screen collaboration first requires the establishment of a Bluetooth connection between devices, the Bluetooth connection establishment process between the first electronic device and the second electronic device can be triggered first.

[0220] Currently, when the first electronic device triggers the Bluetooth connection process with the second electronic device, it usually directly initiates the BR connection based on the previously stored BR address of the second electronic device. However, the BR ACL connection establishment speed is relatively slow, and the user experience is poor.

[0221] In order to improve the Bluetooth connection speed, a BLE connection can be established between the first electronic device and the second electronic device. That is, the first electronic device can trigger the BLE connection establishment process between the first electronic device and the second electronic device in response to the operation of the option acting on the second electronic device.

[0222] It is understandable that in the process of establishing a BLE connection, it is also necessary to first establish a physical connection of the BLE, namely an ACL connection. After the ACL connection is established, the first electronic device and the second electronic device can establish a BLE connection based on protocols such as L2CAP and RFCOMM.

[0223] However, in current BLE connections, one end sends a BLE broadcast, and after the other end receives the BLE broadcast, it initiates a BLE ACL connection with the peer device based on the BLE address carried in the BLE broadcast.

[0224] For example, Figure 7 As shown, Figure 7 The BLE connection establishment method between a mobile phone and a PC in the related art includes:

[0225] S1. After the mobile phone turns on the Bluetooth function, it can send out the first BLE broadcast of the first duration, such as 5 seconds, to continuously broadcast the mobile phone's own BLE address A to the surrounding area and continue broadcasting for a period of time. The BLE address A is a random address generated by the mobile phone during this broadcast, which can be maintained for a certain period of time.

[0226] S2. After the PC turns on the Bluetooth function, it can scan the surrounding BLE broadcasts to scan and receive the first BLE broadcast sent by the mobile phone.

[0227] S3A. After scanning and receiving the first BLE broadcast sent by the mobile phone, the PC can choose to initiate a BLE ACL connection by itself, that is, according to the BLE address A of the mobile phone carried in the first BLE broadcast, initiate a BLE ACL connection to the mobile phone to establish a BLE ACL connection between the PC and the mobile phone.

[0228] S4. After initiating the BLE ACL connection, the PC can scan the surrounding BLE broadcasts again.

[0229] It can be understood that, since the mobile phone in S1 continues to send the first BLE broadcast for a period of time, the PC can scan and receive the first BLE broadcast of the mobile phone again. In response to the received second BLE broadcast, the BLE ACL connection between the PC and the mobile phone is successfully established. Then the PC and the mobile phone can establish a BLE connection based on the established ACL connection.

[0230] However, for installation For PCs with the operating system, since they usually establish BLE connections at the default connection frequency (base frequency) and do not support the adjustment of the connection frequency, it takes a long time (more than 3s) for the PC to successfully establish a BLE connection from initiating the BLE ACL connection, which is similar to the BR connection speed, and is relatively slow. For mobile phones with operating systems, the BLE ACL connection initiated by them can support the adjustment of the connection frequency. For example, it can support multiple connection frequencies that gradually increase from low frequency to high frequency. If the BLE ACL connection is initiated by the mobile phone side, when the mobile phone establishes the BLE ACL connection at the highest connection frequency, the BLE connection speed is relatively fast (0.6s~0.8s).

[0231] In view of the above problem, the present application also proposes a solution. After scanning and receiving the first BLE broadcast sent by the mobile phone, the PC can reply to the BLE broadcast to the mobile phone, so that the mobile phone can initiate the BLE ACL connection. For example, Figure 8 As shown, the BLE connection establishment method in the solution includes:

[0232] S1. After the mobile phone turns on the Bluetooth function, it can send out the first BLE broadcast to continuously broadcast the mobile phone's own BLE address A to the surroundings.

[0233] S2. After the PC turns on the Bluetooth function, it can scan the surrounding BLE broadcasts to scan and receive the first BLE broadcast sent by the mobile phone.

[0234] S3B, after scanning and receiving the first BLE broadcast sent by the mobile phone, the PC can choose to reply to the second BLE broadcast of a certain duration (such as 3s), so as to reply to the mobile phone with its own BLE address B in the form of broadcast.

[0235] S4. The mobile phone can scan the surrounding BLE broadcasts to scan and receive the second BLE broadcast replied by the PC.

[0236] S5. After the mobile phone scans and receives the second BLE broadcast replied by the PC, the mobile phone can choose to initiate a BLE ACL connection by itself, that is, according to the BLE address B of the PC carried in the second BLE broadcast, initiate a BLE ACL connection to the PC to establish a BLE ACL connection between the mobile phone and the PC.

[0237] S6. After initiating the BLE ACL connection, the mobile phone can scan the surrounding BLE broadcasts again.

[0238] It can be understood that since the PC in S3B continues to send the second BLE broadcast for a period of time, the mobile phone can scan again and receive the second BLE broadcast replied by the PC. At this time, in response to the received second BLE broadcast, the BLE ACL connection between the mobile phone and the PC is successfully established. Then the PC and the mobile phone can establish a BLE connection based on the established ACL connection.

[0239] Although this solution can improve the Bluetooth connection speed to a certain extent by taking advantage of the relatively fast connection speed when initiating the BLE ACL connection on the mobile phone side, the mobile phone still needs to wait for a back-and-forth BLE broadcast between the mobile phone and the PC before initiating the BLE connection to obtain the BLE address of the other end. Therefore, in an embodiment of the present application, by utilizing the fixed characteristic of the PC's BLE address, when the mobile phone has discovered the PC before, by recording the PC's BLE address, the subsequent mobile phone can directly use the recorded PC's BLE address to initiate a BLE ACL connection to the PC. In this way, the mobile phone does not need to wait for the back-and-forth BLE broadcast duration before initiating the BLE ACL connection. The back-and-forth duration of the BLE broadcast is omitted. The Bluetooth connection speed between the mobile phone and the PC is further improved.

[0240] Based on the above research process, the present application provides a Bluetooth connection method between a first electronic device and a second electronic device. When the first electronic device stores the BLE address of the second electronic device and the BLE address of the second electronic device is fixed, if the first electronic device needs to establish a Bluetooth connection with the second electronic device, the first electronic device can turn on the BLE broadcast state. In the BLE broadcast state, the first electronic device can send a first BLE broadcast to the outside based on its own BLE address.

[0241] In the embodiment of the present application, when the first electronic device turns on the BLE broadcast state, it can also initiate a BLE ACL connection to the second electronic device according to the previously stored BLE address of the second electronic device to request to establish a BLE ACL connection with the second electronic device. The BLE connection sent by the first electronic device can indicate the BLE address of the second electronic device to establish a BLE ACL connection with the second electronic device in a targeted manner.

[0242] The first BLE broadcast sent by the first electronic device may include the connection data of the first electronic device, so as to broadcast the current connection data of the first electronic device to the surroundings. The connection data may include information such as the BLE address, channel, and device name of the first electronic device.

[0243] Optionally, the first BLE broadcast may be a BLE broadcast directed to a second electronic device, which may also carry relevant information of the second electronic device to interact with the second electronic device in a directed manner. The relevant information of the second electronic device may include one or more of the device name, the device's Bluetooth address (BR address and / or BLE address), the device's unique identifier, and the device type. Thus, after receiving the first BLE broadcast directed to the first electronic device, the second electronic device can reply to the broadcast.

[0244] Optionally, the first electronic device may send a first BLE broadcast of a first preset duration, that is, continuously send the first BLE broadcast for a period of time, such as 5 seconds. The first preset duration may be pre-set and may be pre-stored in the first electronic device.

[0245] In an embodiment of the present application, when the first electronic device sends a BLE ACL connection request to the second electronic device, it can start monitoring the Bluetooth broadcast. At this time, the first electronic device can continuously scan the BLE broadcast information in the air interface. When the BLE broadcast information from the second electronic device is scanned, the BLE ACL connection between the first electronic device and the second electronic device can be successfully established.

[0246] S640: After receiving the first BLE broadcast sent by the first electronic device, the second electronic device replies with a second BLE broadcast to the first electronic device.

[0247] In the embodiment of the present application, after the second electronic device turns on the Bluetooth function, it can monitor the nearby Bluetooth broadcast. After the second electronic device monitors the first BLE broadcast sent by the first electronic device, the second electronic device can turn on the BLE broadcast state. In the BLE broadcast state, the second electronic device can send a second BLE broadcast based on its own BLE address.

[0248] The second BLE broadcast sent by the second electronic device may include the connection data of the second electronic device, so as to broadcast the current connection data of the second electronic device to the surroundings, so as to inform the outside that the second electronic device is currently connectable. The connection data may include the BLE address, channel, device name and other information of the second electronic device.

[0249] Optionally, the second BLE broadcast may be a BLE broadcast directed to the first electronic device, which may carry relevant information of the first electronic device to interact with the first electronic device in a directed manner. The relevant information of the first electronic device may be determined based on the first BLE broadcast received from the first electronic device, which may include the device name of the first electronic device, the BLE address of the first electronic device, etc. Thus, the first electronic device can scan and receive the second BLE broadcast replied by the second electronic device.

[0250] Optionally, the second electronic device may send a second BLE broadcast of a second preset duration, that is, continuously send the second BLE broadcast for a period of time, such as 3 seconds. The first electronic device may complete the ACL connection with the BLE of the second electronic device within the preset duration. The second preset duration may be pre-set and may be pre-stored in the second electronic device.

[0251] S650: When the first electronic device receives the second BLE broadcast replied by the second electronic device, in response to the reception of the second BLE broadcast, the BLE ACL connection between the first electronic device and the second electronic device is successfully established.

[0252] In the embodiment of the present application, since the first electronic device has initiated a BLE ACL connection to the second electronic device while turning on the BLE broadcast state, the first electronic device can then continue to scan the BLE broadcast information in the air interface to determine whether the BLE address of the scanned BLE broadcast information is the BLE address of the second electronic device. If a BLE broadcast carrying the BLE address of the second electronic device is scanned, the first electronic device can successfully establish a BLE ACL connection with the second electronic device based on the connection data such as the channel of the second electronic device carried in the BLE broadcast.

[0253] It can be understood that if the second electronic device promptly responds to the second BLE broadcast after receiving the first BLE broadcast of the first electronic device, the first electronic device can scan and receive the second BLE broadcast in the air interface, so that the first electronic device can complete the establishment of the BLE ACL connection with the second electronic device in response to the reception of the second BLE broadcast.

[0254] For example, the first electronic device is a mobile phone and the second electronic device is a PC. Fig. 9 As shown, the BLE connection method between a mobile phone and a PC provided in an embodiment of the present application includes:

[0255] S11. The mobile phone sends a first BLE broadcast to the PC.

[0256] When the mobile phone needs to establish a Bluetooth connection with the PC, the mobile phone can turn on the BLE broadcast state. In the BLE broadcast state, the mobile phone can send the first BLE broadcast based on its own BLE address A. Among them, the BLE address A of the mobile phone is a random address, which can be randomly generated when the mobile phone sends the first BLE broadcast and updated every certain time (such as 15 minutes).

[0257] The first BLE broadcast may carry relevant information of the PC, such as the Bluetooth address (BLE address or BR address), device name, device unique identifier, device type, etc. of the PC, so that the PC can confirm that the first BLE broadcast is directed to itself.

[0258] S12. The mobile phone initiates a BLE ACL connection to the PC according to the pre-stored BLE address B of the PC.

[0259] Among them, the mobile phone has discovered the PC before and stored the BLE address B of the PC.

[0260] In an embodiment of the present application, when the mobile phone turns on the BLE broadcast state to send the first BLE broadcast to the PC, it also needs to initiate a BLE ACL connection to the PC based on the previously stored BLE address of the PC to request to establish a BLE ACL connection with the PC.

[0261] S13. After the Bluetooth function is turned on, the PC can scan the surrounding BLE broadcasts to scan and receive the first directional BLE broadcast sent by the mobile phone.

[0262] S14. After scanning and receiving the first directional BLE broadcast sent by the mobile phone, the PC can put itself in a state of sending BLE broadcasts and continue the broadcast state for a certain period of time to inform the surrounding that it can be connected. Specifically, the PC can continue to send a second BLE broadcast for a period of time. The BLE broadcast can carry its own BLE address B. Thus, the device that receives the second BLE broadcast can establish a BLE ACL connection based on the BLE address B.

[0263] S15. After initiating a BLE ACL connection to the PC, the mobile phone may scan surrounding BLE broadcasts to scan and receive a second BLE broadcast replied by the PC.

[0264] It can be understood that since the mobile phone has initiated a BLE ACL connection to the PC in advance, during the BLE ACL connection process, if the mobile phone receives the second BLE broadcast from the PC, it can be determined that the PC is nearby and is in a connectable state. At this time, in response to the received second BLE broadcast, the BLE ACL connection between the mobile phone and the PC is successfully established. Then the mobile phone and the PC can establish a BLE connection based on the established ACL connection.

[0265] In one scenario, Fig.10 As shown, when the user needs the first electronic device and the second electronic device to perform multi-screen collaboration, both the first electronic device and the second electronic device can open the collaborative application. At this time, the first electronic device and the second electronic device need to establish a Bluetooth connection. If the first electronic device stores the BLE address of the second electronic device, the Bluetooth connection type established by the first electronic device and the second electronic device can be a BLE connection. The BLE connection process is as follows:

[0266] A1. The coordinated application of the first electronic device and the second electronic device detects that the Bluetooth function is turned on.

[0267] Among them, after detecting that the Bluetooth function is turned on, the collaborative application of the second electronic device can instruct the underlying Bluetooth module to scan the surrounding broadcasts.

[0268] A2. The cooperative application of the first electronic device displays a list of available devices.

[0269] Optionally, after detecting that the Bluetooth function is turned on, the collaborative application of the second electronic device may also instruct the underlying Bluetooth module to scan surrounding broadcasts so that the currently scanned devices that have not been paired are also displayed in the list of available devices.

[0270] A3. The cooperative application of the first electronic device detects that the user has selected the option of the second electronic device in the list of available devices.

[0271] A4. The cooperative application of the first electronic device instructs the underlying Bluetooth module to initiate a BLE broadcast to the second electronic device.

[0272] A5. The cooperative application of the first electronic device simultaneously instructs the underlying Bluetooth module to initiate a BLE RFCOMM connection to the second electronic device based on the pre-stored BLE address of the second electronic device.

[0273] The BLE connection established between the first electronic device and the second electronic device can be understood as establishing an RFCOMM connection for BLE. The purpose of establishing an RFCOMM connection is to ensure a complete communication path between collaborative applications on two different devices. This allows the first electronic device and the second electronic device to subsequently interact with data based on the established RFCOMM session channel. For example, negotiate Wi-Fi P2P parameters to establish a screen projection connection.

[0274] A61. After receiving an instruction to initiate a BLE broadcast to a second electronic device, the Bluetooth module of the first electronic device sends a first BLE broadcast to the Bluetooth module of the second electronic device.

[0275] After receiving the instruction sent by the upper-layer collaborative application, the Bluetooth module of the first electronic device can perform corresponding operations according to the instruction.

[0276] Among them, in response to the instruction issued by the upper-layer collaborative application to initiate a BLE broadcast to the second electronic device, the Bluetooth module of the first electronic device can turn on the BLE broadcast state to send a first BLE broadcast to the Bluetooth module of the second electronic device in a directional manner.

[0277] A62. After receiving an instruction to initiate a BLE RFCOMM connection to the second electronic device, the Bluetooth module of the first electronic device matches the BLE broadcast in the air interface.

[0278] In response to the instruction issued by the upper-layer collaborative application to initiate a BLE RFCOMM connection to the second electronic device, the Bluetooth module of the first electronic device may first initiate a BLE ACL connection to the second electronic device based on the pre-stored BLE address of the second electronic device, and then establish a BLE RFCOMM connection between the first electronic device and the second electronic device after the ACL connection is established.

[0279] After initiating the BLE ACL connection, the Bluetooth module of the first electronic device can scan the surrounding BLE broadcasts and match the scanned BLE broadcast address with the pre-stored BLE address of the second electronic device to determine whether the BLE broadcast from the second electronic device is scanned.

[0280] A7. After the Bluetooth module of the second electronic device scans and receives the first BLE broadcast, the first BLE broadcast can be reported to the cooperative application of the second electronic device. At this time, the cooperative application of the second electronic device can pop up a window to indicate whether to agree to establish a Bluetooth connection with the first electronic device.

[0281] A8. If the user clicks the consent control, the collaborative application of the second electronic device can confirm to establish a Bluetooth connection with the first electronic device.

[0282] A9. The cooperative application of the second electronic device instructs the underlying Bluetooth module to reply to the BLE broadcast to the first electronic device.

[0283] A10. After receiving the instruction to reply the BLE broadcast to the first electronic device, the Bluetooth module of the second electronic device replies with a second BLE broadcast to the Bluetooth module of the first electronic device.

[0284] A11. When the Bluetooth module of the first electronic device matches the BLE broadcast in the air interface, if it detects that the BLE address of the scanned BLE broadcast matches the BLE address of the second electronic device, the Bluetooth module of the first electronic device can confirm that the second BLE broadcast replied by the second electronic device has been scanned and received. At this time, in response to the reception of the second BLE broadcast, the BLE ACL connection between the Bluetooth module of the first electronic device and the Bluetooth module of the second electronic device is successfully established.

[0285] It should be noted that in the related art, steps A5 and A62 are not executed in advance. The collaborative application of the first electronic device only instructs the underlying Bluetooth module to initiate a BLE broadcast. Thereafter, after receiving the second BLE broadcast replied by the second electronic device, the Bluetooth module of the first electronic device needs to report the received second BLE broadcast to the collaborative application of the first electronic device. Then the collaborative application of the first electronic device, based on the BLE address of the second electronic device carried in the second BLE broadcast, instructs the underlying Bluetooth module to initiate a BLE RFCOMM connection to the second electronic device. According to the instruction, the Bluetooth module of the first electronic device establishes a BLE ACL connection by matching the BLE broadcast in the air interface.

[0286] In the embodiment of the present application, the RFCOMM connection of the BLE of the first electronic device and the second electronic device has been initiated in advance at the same time as the BLE broadcast. Therefore, when the Bluetooth module of the first electronic device sends the first BLE broadcast, it can start to establish the ACL connection of BLE by matching the BLE broadcast in the air port. In this way, when the first electronic device receives the second BLE broadcast replied by the second electronic device, it can complete the establishment of the ACL connection of BLE.

[0287] A12. The Bluetooth modules of the first electronic device and the second electronic device establish a BLE RFCOMM connection based on the established BLE ACL connection.

[0288] Among them, after the ACL connection of BLE is successfully established, the process of establishing the RFCOMM connection of BLE based on the ACL connection can refer to the relevant technology, which will not be repeated here. For example, after the ACL connection of BLE is successfully established, the Bluetooth modules of the first electronic device and the second electronic device need to execute the negotiation process of relevant parameters, including encryption and authentication processes. Thus, the RFCOMM connection of BLE between the first electronic device and the second electronic device can be established based on the negotiated relevant parameters.

[0289] After the RFCOMM connection of BLE is successfully established, the Bluetooth modules of the first electronic device and the second electronic device can notify the upper-layer collaborative application that the RFCOMM Bluetooth of BLE is successfully established.

[0290] It can be understood that when the RFCOMM connection of the BLE between the first electronic device and the second electronic device is successfully established, subsequent collaboration-related information interaction can be initiated.

[0291] The Bluetooth connection method between the first electronic device and the second electronic device provided in the embodiment of the present application can simultaneously initiate the BLE broadcast of the first electronic device and the ACL connection of BLE during the process of the first electronic device initiating the BLE connection, and when the second electronic device receives the BLE broadcast of the first electronic device, it promptly replies to the BLE broadcast, so that when the first electronic device receives the BLE broadcast of the second electronic device during the ACL connection of BLE, the ACL connection of BLE can be established. Compared with the scenario where one end sends a broadcast, the other end replies to the broadcast, and one end initiates the ACL connection of BLE after receiving the reply broadcast, the time-consuming back-and-forth broadcast in the ACL connection of BLE is omitted.

[0292] In some scenarios, the method by which the first electronic device stores the BLE address of the second electronic device can be any method. For example, the BLE address of the second electronic device is preset in the first electronic device. For another example, when the first electronic device establishes other wireless communication connections with the second electronic device, the second electronic device actively sends its BLE address to the first electronic device for storage. The embodiment of the present application does not limit the method by which the first electronic device stores the BLE address of the second electronic device.

[0293] See also Fig.11 , Fig.11 A schematic diagram of a flow chart of another Bluetooth connection method between a first electronic device and a second electronic device provided in an embodiment of the present application. At this time, the first electronic device does not store the BLE address of the second electronic device.

[0294] like Fig.11 As shown, the process of the Bluetooth connection method between the first electronic device and the second electronic device may include:

[0295] S1110: When the first electronic device discovers the second electronic device, the second electronic device sends the BLE address of the second electronic device to the first electronic device, and sends a third BLE broadcast of a third preset duration.

[0296] Optionally, the first electronic device may discover the second electronic device by one or more of “touch and click”, “scan and scan”, and “automatic discovery by proximity”.

[0297] In one scenario, the first electronic device and the second electronic device may turn on the WLAN function and the Bluetooth function. The second electronic device may be installed with a collaborative application. The collaborative application may be provided with an entry or a control for turning on the multi-screen collaborative function, such as a multi-screen collaborative control.

[0298] As a method, when the user clicks on the multi-screen collaborative control on the second electronic device, the second electronic device can send the BLE address to the first electronic device by displaying a QR code.

[0299] Optionally, the QR code may carry some information of the second electronic device itself, such as BR address, BLE address, device name, device unique identifier, etc. The first electronic device scans the QR code displayed by the second electronic device, so that the first electronic device can obtain the BLE address of the second electronic device from the QR code while discovering the second electronic device.

[0300] As another way, when the user clicks on the multi-screen collaborative control on the second electronic device, the second electronic device can send a BLE address to the first electronic device via Bluetooth broadcast (such as classic Bluetooth BR broadcast, BLE broadcast, etc.).

[0301] Optionally, the Bluetooth broadcast sent by the second electronic device may carry some information of the second electronic device itself, such as BR address, BLE address, device name, device unique identifier, etc. The first electronic device approaches the second electronic device so that the first electronic device can search for the Bluetooth broadcast sent by the second electronic device, thereby discovering the second electronic device and obtaining the BLE address of the second electronic device from the information carried in the Bluetooth broadcast.

[0302] As another way, a second electronic device with NFC function can store part of its own information (BR address, BLE address, device name, device unique identifier, etc.) in the NFC module, so that the first electronic device can read the BLE address and other information in the NFC module of the second electronic device through the "touch and pay" function.

[0303] Optionally, when the user clicks the multi-screen collaboration control on the second electronic device, the second electronic device can also turn on the NFC function. The first electronic device approaches or touches the NFC sensing area on the second electronic device, so that the first electronic device can obtain the BLE address of the second electronic device preset in the NFC module of the second electronic device while discovering the second electronic device.

[0304] Optionally, the second electronic device can also read the device unique identifier, device name and other related information in the NFC module of the first electronic device through the "touch and pay" function. Thus, the second electronic device can send a BLE broadcast to the first electronic device in a directional manner according to the related information of the first electronic device.

[0305] In the embodiment of the present application, after the second electronic device is discovered by the first electronic device, not only the BLE address of the second electronic device is acquired by the first electronic device, but the second electronic device can also turn on the BLE broadcast state. In the BLE broadcast state, the second electronic device can send a third BLE broadcast based on its own BLE address.

[0306] The third BLE broadcast sent by the second electronic device may include the connection data of the second electronic device, so as to broadcast the current connection data of the second electronic device to the surroundings, so as to inform the outside world that the second electronic device is currently connected. The connection data may include the BLE address, channel, device name and other information of the second electronic device.

[0307] Optionally, the second electronic device may send a third BLE broadcast of a third preset duration, that is, continuously send the third BLE broadcast for a period of time, such as 3 seconds. The first electronic device may complete the ACL connection with the BLE of the second electronic device within the third preset duration. The third preset duration may be pre-set and may be pre-stored in the second electronic device.

[0308] Optionally, if the second electronic device obtains the device unique identifier, device name and other related information of the first electronic device through NFC "touch and pay", the second electronic device can also send a third BLE broadcast to the first electronic device. Thus, the first electronic device can scan and receive the third BLE broadcast directed by the second electronic device. Among them, the third BLE broadcast can carry relevant information of the first electronic device to interact with the first electronic device in a targeted manner.

[0309] S1120: The first electronic device obtains the BLE address of the second electronic device.

[0310] In some embodiments, after the first electronic device discovers the second electronic device through one or more of "touch", "scan", and "approach automatic discovery", and obtains the BLE address of the second electronic device, the first electronic device may pop up a window to prompt the user whether to establish a connection with the second electronic device, and / or the second electronic device may pop up a window to prompt the user whether to establish a connection with the first electronic device. After detecting the user's click to confirm, the first electronic device may trigger the establishment of a BLE connection with the second electronic device, that is, execute the following S1130.

[0311] Optionally, after the first electronic device discovers the second electronic device, it may also directly trigger the establishment of a BLE connection with the second electronic device, that is, execute the following S1130 without the need for a pop-up window reminder.

[0312] S1130: The first electronic device initiates a BLE ACL connection to the second electronic device according to the BLE address of the second electronic device.

[0313] In the embodiment of the present application, after the first electronic device discovers the second electronic device, since the BLE address of the second electronic device has been obtained, the first electronic device can directly initiate a BLE ACL connection to the second electronic device according to the BLE address of the second electronic device.

[0314] In the embodiment of the present application, when the first electronic device initiates a BLE ACL connection to the second electronic device, it can start monitoring Bluetooth broadcasts. At this time, the first electronic device can continuously scan the BLE broadcast information in the air interface to scan the BLE broadcast information from the second electronic device.

[0315] S1140: When the first electronic device receives the third BLE broadcast of the second electronic device, in response to the reception of the third BLE broadcast, the BLE ACL connection between the first electronic device and the second electronic device is successfully established.

[0316] In the embodiment of the present application, when the first electronic device discovers the second electronic device, the second electronic device has already turned on the BLE broadcast state, indicating that it is currently connectable. Therefore, after discovering the second electronic device, the first electronic device can directly initiate a BLE ACL connection to the second electronic device based on the BLE address of the second electronic device.

[0317] It can be understood that in the process of initiating a BLE ACL connection to the second electronic device by the first electronic device, the first electronic device can keep scanning the BLE broadcast information in the air interface to determine whether the BLE address of the scanned BLE broadcast information is the BLE address of the second electronic device. If a BLE broadcast carrying the BLE address of the second electronic device is scanned, the first electronic device can confirm that a third BLE broadcast from the second electronic device has been received. At this time, in response to the reception of the third BLE broadcast, the first electronic device can successfully establish an ACL connection with the BLE of the second electronic device based on the connection data such as the channel of the second electronic device carried in the third BLE broadcast. After the ACL connection is established, a BLE connection can be established between the first electronic device and the second electronic device.

[0318] In one scenario, when a user needs a first electronic device and a second electronic device to perform multi-screen collaboration, the first electronic device and the second electronic device must first establish a Bluetooth connection. If the BLE address of the second electronic device is fixed, the Bluetooth connection type established by the first electronic device and the second electronic device can be a BLE connection. It can be understood that when the BLE connection between the first electronic device and the second electronic device is successfully established, subsequent collaboration-related information interaction can be initiated.

[0319] It can be understood that, currently, when the first electronic device discovers the second electronic device, the second electronic device sends the BR address information to the first electronic device, so that when the first electronic device obtains the BR address, it can directly initiate the BR ACL connection based on the BR address. Although the second electronic device does not need to be in the Bluetooth broadcast state during this process, the BR ACL connection speed is relatively slow, which is easy to affect the user experience. In the embodiment of the present application, utilizing the fixed characteristic of the BLE address of the second electronic device, when the first electronic device discovers the second electronic device, not only the BLE address information of the second electronic device can be obtained by the first electronic device, but the second electronic device also puts itself in a state of sending a BLE broadcast, so that the second electronic device has the BLE ACL connection conditions. In this way, when the first electronic device obtains the BLE address of the second electronic device, it can directly initiate the BLE ACL connection. Since the ACL connection speed of BLE is faster than the ACL connection of BE, the Bluetooth connection speed is effectively improved, and in the multi-screen collaboration scenario, the multi-screen collaboration speed can also be improved.

[0320] In some embodiments, if the first electronic device finds the second electronic device and obtains the BLE address of the second electronic device, the first electronic device may store the BLE address of the second electronic device so that the user can subsequently directly trigger the BLE connection with the second electronic device on the first electronic device, that is, execute the Bluetooth connection method in the aforementioned embodiment.

[0321] As an implementation method, when the first electronic device and the second electronic device turn on the Bluetooth function, the second electronic device can send a Bluetooth broadcast, which can include the BLE address of the second electronic device. The first electronic device can monitor and search for broadcast information around it. If the first electronic device monitors and searches for the second electronic device (discovers the second electronic device), the first electronic device can obtain and store the BLE address of the second electronic device. In addition, the list of available devices displayed by the first electronic device can include the option of the second electronic device.

[0322] If the user selects the option of the second electronic device, the first electronic device responds to the operation of the option on the second electronic device, sends a first BLE broadcast to the second electronic device, and initiates a BLE ACL connection to the second electronic device based on the BLE address of the second electronic device. After the second electronic device receives the first BLE broadcast sent by the first electronic device, it can reply to the first electronic device with a second BLE broadcast. Since the first electronic device has already initiated a BLE ACL connection with the second electronic device in advance, when the first electronic device receives the second BLE broadcast replied by the second electronic device, the BLE ACL connection between the first electronic device and the second electronic device can be successfully established.

[0323] In this way, the first electronic device can obtain the BLE address of the second electronic device in real time during the process of discovering the second electronic device, and when the user confirms the need to establish a BLE connection with the second electronic device, the first electronic device simultaneously initiates a BLE broadcast and a BLE ACL connection, so that the BLE ACL connection can be quickly completed when a reply broadcast from the second electronic device is received.

[0324] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0325] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0326] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements each function or step executed by the electronic device in each of the above-mentioned method embodiments.

[0327] The present application also provides a Bluetooth connection device, which can be applied to the above electronic device and is used to execute the functions or steps executed by the electronic device in the above method embodiment.

[0328] The embodiment of the present application also provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected through a line. The interface circuit can read the instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the various functions or steps performed by the vehicle in the above method embodiment. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.

[0329] An embodiment of the present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the electronic device in the above-mentioned method embodiment.

[0330] The embodiment of the present application also provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes each function or step executed by the electronic device in the above method embodiment.

[0331] Among them, the electronic device, Bluetooth connection device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0332] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0333] In the several embodiments provided in the present application, it should be understood that the disclosed 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 modules or 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 device, 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.

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

[0335] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0336] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0337] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A Bluetooth connection method, characterized in that: Applied to a first electronic device, the first electronic device stores a BLE address of a second electronic device, and the low-power Bluetooth BLE address of the second electronic device is fixed and unchanged, the method includes: receiving a first operation, where the first operation is used to instruct to establish a Bluetooth connection with the second electronic device; In response to the first operation, sending a first BLE broadcast to the second electronic device, and initiating a first asynchronous connection-oriented ACL connection to the second electronic device according to the BLE address of the second electronic device; In response to receiving the second BLE broadcast replied by the second electronic device, the first ACL connection is successfully established with the second electronic device.

2. The method according to claim 1, characterized in that The second BLE broadcast is used to broadcast the BLE address of the second electronic device. After initiating a first ACL connection to the second electronic device according to the BLE address of the second electronic device in response to the first operation, the method further includes: Scan nearby BLE broadcasts; When the BLE address in the scanned BLE broadcast is consistent with the BLE address of the second electronic device, it is determined that the second BLE broadcast replied by the second electronic device is received.

3. The method according to claim 1 or 2, characterized in that: Before receiving the first operation, the method further includes: When the second electronic device is discovered, connection data of the second electronic device is acquired, where the connection data includes a BLE address of the second electronic device.

4. The method according to claim 3, characterized in that The acquiring connection data of the second electronic device when the second electronic device is discovered includes: When scanning the QR code displayed by the second electronic device, discovering the second electronic device and extracting the connection data in the QR code; or When approaching the second electronic device to scan for a discovery broadcast of the second electronic device, discovering the second electronic device and acquiring the connection data in the discovery broadcast; or When the near field communication NFC tag of the second electronic device is touched, the second electronic device is discovered, and the connection data in the NFC tag is acquired.

5. The method according to claim 3 or 4, characterized in that: After acquiring the connection data of the second electronic device, the method further includes: Initiating a second ACL connection to the second electronic device according to the BLE address of the second electronic device; In response to receiving a third BLE broadcast sent by the second electronic device, successfully establishing the second ACL connection with the second electronic device; The third BLE broadcast is sent synchronously by the second electronic device when it is discovered, the second ACL connection is disconnected before the first operation, and the first operation is used to instruct to establish a Bluetooth connection with the second electronic device again.

6. The method according to claim 5, characterized in that The third BLE broadcast is used to broadcast the BLE address of the second electronic device. After initiating the second ACL connection to the second electronic device according to the BLE address of the second electronic device, the method further includes: Scan nearby BLE broadcasts; When the BLE address in the scanned BLE broadcast is consistent with the BLE address of the second electronic device, it is determined that the third BLE broadcast sent by the second electronic device is received.

7. The method according to any one of claims 1 to 7, characterized in that: The receiving of the first operation comprises: displaying an available device list, wherein the available device list includes device options of the second electronic device; A triggering operation for a device option of the second electronic device is received.

8. The method according to claim 7, characterized in that The first electronic device includes a screen projection application, and the display of the available device list includes: Displaying the list of available devices in the interface of the screen projection application; After the first ACL connection is successfully established, the method further includes: Establishing a BLE connection with a second electronic device based on the first ACL connection successfully established; Based on the BLE connection, a screen projection connection is established with the second electronic device.

9. A Bluetooth connection method, characterized in that: Applied to a second electronic device, the BLE address of the second electronic device is fixed, and the method includes: receiving a first BLE broadcast sent by a first electronic device, where the first BLE broadcast is sent synchronously when the first electronic device initiates a first ACL connection according to the stored BLE address of the second electronic device; Replying to the first electronic device with a second BLE broadcast; The first ACL connection is successfully established with the first electronic device.

10. The method according to claim 9, characterized in that The first electronic device further stores device information of the second electronic device, the first BLE broadcast carries the device information of the second electronic device, and the receiving the first BLE broadcast sent by the first electronic device includes: Scan nearby BLE broadcasts; When the device information carried in the scanned BLE broadcast is consistent with the device information of the second electronic device, it is determined that the first BLE broadcast sent by the first electronic device is received.

11. The method according to claim 9 or 10, characterized in that: Before receiving the first BLE broadcast sent by the first electronic device, the method further includes: Receiving a second operation; In response to the second operation, a discoverable state is entered, where the discoverable state is used to indicate that a device that discovers the second electronic device can obtain connection data of the second electronic device, where the connection data includes the BLE address of the second electronic device.

12. The method according to claim 11, characterized in that The step of entering a discoverable state in response to the second operation includes: In response to the second operation, displaying a QR code, wherein the QR code carries the connection data; or In response to the second operation, sending a discovery broadcast, wherein the discovery broadcast carries the connection data; or In response to the second operation, a near field communication (NFC) function is enabled, wherein the second electronic device is configured with an NFC tag, and the NFC tag includes the connection data.

13. The method according to claim 12, characterized in that After entering the discoverable state in response to the second operation, the method further includes: When the first electronic device is discovered, sending a third BLE broadcast, wherein the connection data is used to instruct the first electronic device to initiate a second ACL connection according to the acquired BLE address of the second electronic device; The second ACL connection is successfully established with the first electronic device.

14. The method according to claim 13, characterized in that The sending a third BLE broadcast when the first electronic device is discovered includes: When detecting that the first electronic device has scanned the QR code, discovering the first electronic device and sending a third BLE broadcast; or When detecting that the first electronic device is approaching, discovering the first electronic device and sending a third BLE broadcast; or When it is detected that the first electronic device touches the NFC tag, the first electronic device is discovered and a third BLE broadcast is sent.

15. The method according to claim 13 or 14, characterized in that The second electronic device includes a computer manager application, and the computer manager application is provided with a screen projection function; The receiving of the second operation comprises: Displaying a first control in the interface of the computer manager application, wherein the first control is used to trigger the screen projection function; receiving a second operation acting on the first control; After the second ACL connection is successfully established, the method further includes: Establishing a BLE connection with a second electronic device based on the successfully established second ACL connection; Based on the BLE connection, a screen projection connection is established with the second electronic device.

16. The method according to any one of claims 9 to 15, characterized in that: The second electronic device is a device having a Windows operating system.

17. A Bluetooth connection method, characterized in that: Applied to a communication system, the communication system includes a first electronic device and a second electronic device, the first electronic device stores a BLE address of the second electronic device, and the BLE address of the second electronic device is fixed, the method includes: The first electronic device receives a first operation, where the first operation is used to instruct the first electronic device to establish a Bluetooth connection with the second electronic device; The first electronic device sends a first BLE broadcast to the second electronic device in response to the first operation, and initiates a first ACL connection to the second electronic device according to the BLE address of the second electronic device; When the second electronic device receives the first BLE broadcast, the second electronic device replies to the first electronic device with a second BLE broadcast; In response to the first electronic device receiving the second BLE broadcast, the first ACL connection is established successfully.

18. The method according to claim 17, characterized in that The second BLE broadcast is used to broadcast the BLE address of the second electronic device. After the first electronic device initiates a first ACL connection to the second electronic device according to the BLE address of the second electronic device in response to the first operation, the method further includes: The first electronic device scans for nearby BLE broadcasts; When the BLE address in the BLE broadcast scanned by the first electronic device is consistent with the BLE address of the second electronic device, the first electronic device determines that the second BLE broadcast replied by the second electronic device is received.

19. The method according to claim 17 or 18, characterized in that The first electronic device further stores device information of the second electronic device, and the first BLE broadcast carries the device information of the second electronic device. The method further includes: The second electronic device scans for nearby BLE broadcasts; When the device information carried in the BLE broadcast scanned by the second electronic device is consistent with the device information of the second electronic device, the second electronic device determines that the first BLE broadcast sent by the first electronic device is received.

20. The method according to any one of claims 17 to 19, characterized in that: Before the first electronic device receives the first operation, the method further includes: The second electronic device receives a second operation; The second electronic device enters a discoverable state in response to the second operation; When discovering the second electronic device, the first electronic device acquires connection data of the second electronic device, where the connection data includes the BLE address of the second electronic device.

21. The method according to claim 20, characterized in that The second electronic device enters a discoverable state in response to the second operation, including: The second electronic device displays a QR code in response to the second operation, wherein the QR code carries the connection data; When the first electronic device discovers the second electronic device, acquiring connection data of the second electronic device includes: When the first electronic device scans the two-dimensional code, it finds the second electronic device and extracts the connection data in the two-dimensional code.

22. The method according to claim 20, characterized in that The second electronic device enters a discoverable state in response to the second operation, including: In response to the second operation, the second electronic device sends a discovery broadcast, where the discovery broadcast carries the connection data; When the first electronic device discovers the second electronic device, acquiring connection data of the second electronic device includes: When the first electronic device approaches the second electronic device to scan the discovery broadcast, the first electronic device discovers the second electronic device and obtains the connection data in the discovery broadcast.

23. The method according to claim 20, characterized in that The second electronic device is configured with an NFC tag, and the NFC tag includes the connection data; The second electronic device enters a discoverable state in response to the second operation, including: The second electronic device activates a near field communication (NFC) function in response to the second operation; When the first electronic device discovers the second electronic device, acquiring connection data of the second electronic device includes: When the first electronic device touches the NFC tag of the second electronic device, the second electronic device is discovered and the connection data in the NFC tag is acquired.

24. The method according to any one of claims 20 to 23, characterized in that: The method further comprises: The second electronic device enters a discoverable state in response to the second operation, and the second electronic device sends a third BLE broadcast; After the first electronic device obtains the connection data of the second electronic device, the method further includes: The first electronic device initiates a second ACL connection to the second electronic device according to the BLE address of the second electronic device; In response to receiving the third BLE broadcast, the first electronic device successfully establishes the second ACL connection; The second ACL connection has been disconnected before the first operation, and the first operation is used to instruct the first electronic device to establish a Bluetooth connection with the second electronic device again.

25. The method according to claim 24, characterized in that The third BLE broadcast is used to broadcast the BLE address of the second electronic device. After the first electronic device initiates a second ACL connection to the second electronic device according to the BLE address of the second electronic device, the method further includes: The first electronic device scans for nearby BLE broadcasts; When the BLE address in the BLE broadcast scanned by the first electronic device is consistent with the BLE address of the second electronic device, the first electronic device determines that the third BLE broadcast sent by the second electronic device is received.

26. The method according to claim 24 or 25, characterized in that The second electronic device includes a computer manager application, and the computer manager application is provided with a screen projection function; The second electronic device receives a second operation, including: The second electronic device displays a first control in the interface of the computer manager application, where the first control is used to trigger the screen projection function; The second electronic device receives a second operation acting on the first control; After the second ACL connection is successfully established, the method further includes: The second electronic device establishes a BLE connection between the first electronic device and the second electronic device based on the successfully established second ACL connection; Based on the BLE connection, a screen projection connection is established between the first electronic device and the second electronic device.

27. The method according to any one of claims 17 to 26, characterized in that: The first electronic device receives a first operation, including: The first electronic device displays an available device list, wherein the available device list includes device options of the second electronic device; The first electronic device receives a triggering operation for a device option of the second electronic device.

28. The method according to claim 27, characterized in that The first electronic device includes a screen projection application, and the first electronic device displays a list of available devices, including: The first electronic device displays the available device list in the interface of the screen projection application; After the first ACL connection is successfully established, the method further includes: The first electronic device establishes a BLE connection between the first electronic device and a second electronic device based on the first ACL connection that is successfully established; Based on the BLE connection, a screen projection connection is established between the first electronic device and the second electronic device.

29. The method according to any one of claims 17 to 28, characterized in that: The second electronic device is a device having a Windows operating system.

30. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory is used to store a program, and when the processor executes the program, the electronic device executes the method as described in any one of claims 1-8, or executes the method as described in any one of claims 9-16.

31. A chip system, characterized in that: The chip system is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, the signal including instructions stored in the memory; when the processor executes the instructions, the electronic device executes the method as described in any one of claims 1-8, or executes the method as described in any one of claims 9-16.

32. A communication system, characterized in that: The method comprises a first electronic device and a second electronic device, wherein the first electronic device executes the method according to any one of claims 1 to 8, and the second electronic device executes the method according to any one of claims 9 to 16.

33. A readable storage medium, characterized in that: The invention comprises a program, and when the program is executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 8, or executes the method as claimed in any one of claims 9 to 16.