Bluetooth connection method and apparatus, electronic device, and storage medium
By combining BLE Audio with classic Bluetooth, the terminal device can determine the address and output a single connection information within the same group of Bluetooth devices, solving the audio transmission problem of BLE Audio devices in different scenarios and realizing fast and convenient Bluetooth dual-mode switching and data synchronization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2021-10-20
- Publication Date
- 2026-04-17
AI Technical Summary
How to better utilize BLE Audio technology to meet users' audio transmission needs in different scenarios, especially in scenarios with large data transmission volumes and high real-time requirements, is a problem that existing technologies have not yet effectively solved.
By combining BLE Audio with Classic Bluetooth, the terminal device can determine the BLE address and Classic Bluetooth address of the same group of Bluetooth devices and output only one connection information. The user can establish a connection between BLE Audio and Classic Bluetooth with a single operation, realizing Bluetooth dual-mode switching.
It enables quick and convenient connection with devices that support BLE Audio and classic Bluetooth in different scenarios, meeting users' audio transmission needs in different scenarios and improving operational efficiency and data transmission synchronization.
Smart Images

Figure CN115996371B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a Bluetooth connection method, device, electronic device, and storage medium. Background Technology
[0002] With the development of Bluetooth technology and users' increasing demands for Bluetooth audio transmission, the Bluetooth Special Interest Group (SIG) released the Bluetooth audio technology standard: BLE Audio (Bluetooth Low Energy Audio). BLE Audio technology can bring wireless audio services with lower power consumption, lower cost, higher quality, and lower latency. However, BLE Audio technology is still in its early stages of development. How to better enable devices to use BLE Audio technology to meet users' audio transmission needs in different scenarios has become an urgent technical problem to be solved. Summary of the Invention
[0003] This application discloses a Bluetooth connection method, device, electronic device, and storage medium, which can combine BLEAudio with classic Bluetooth to meet users' audio transmission needs in different scenarios.
[0004] This application discloses a Bluetooth connection method applied to a terminal device. The method includes: determining a first Bluetooth Low Energy (BLE) address corresponding to a first device, and determining a first classic Bluetooth address corresponding to the first device; determining a second BLE address corresponding to a second device, wherein the first device and the second device belong to the same group of Bluetooth devices; outputting only one connection request information corresponding to the same group of Bluetooth devices; if a Bluetooth connection operation is detected for the connection request information, establishing a first LE Audio Bluetooth connection with the first device based on the first BLE address, establishing a classic Bluetooth connection with the first device based on the first classic Bluetooth address, and establishing a second LE Audio Bluetooth connection with the second device based on the second BLE address.
[0005] This application discloses a Bluetooth address control method applied to a target Bluetooth device, wherein the target Bluetooth device and at least one other Bluetooth device belong to the same group of Bluetooth devices. The method includes: after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, determining the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices, and setting the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship; wherein the classic Bluetooth address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a classic Bluetooth address with the master device; the BLE address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a LE Audio Bluetooth connection with the master device; and the BLE address of the slave device in the same group of Bluetooth devices is used to enable the terminal device to establish a LE Audio Bluetooth connection with the slave device.
[0006] This application discloses a Bluetooth connection method applied to an earphone device, the earphone device including a first earphone and a second earphone. The method includes: the first earphone sending a first LE Audio broadcast signal based on a first BLE address, so that a terminal device receiving the first LE Audio broadcast signal obtains the first BLE address, the first BLE address being the same as a first classic Bluetooth address corresponding to the first earphone; the second earphone sending a second LE Audio broadcast signal based on a second BLE address, so that a terminal device receiving the second LE Audio broadcast signal obtains the second BLE address; the first earphone receiving a first LEAudio connection request sent by the terminal device based on the first BLE address, establishing a first LE Audio Bluetooth connection with the terminal device based on the first LE Audio connection request, and receiving a first classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, establishing a classic Bluetooth connection with the terminal device based on the first classic Bluetooth connection request; the second earphone receiving a second LE Audio connection request sent by the terminal device based on the second BLE address, establishing a second LE Audio Bluetooth connection with the terminal device based on the second LEAudio connection request.
[0007] This application discloses a Bluetooth connection device applied to a terminal device. The device includes: a first address determination module, used to determine a first low-power Bluetooth (BLE) address corresponding to a first device and a first classic Bluetooth address corresponding to the first device; a second address determination module, used to determine a second BLE address corresponding to a second device, wherein the first device and the second device belong to the same group of Bluetooth devices; an output module, used to output only one connection request information corresponding to the same group of Bluetooth devices; and a connection module, used to establish a first LE Audio Bluetooth connection with the first device based on the first BLE address, establish a classic Bluetooth connection with the first device based on the first classic Bluetooth address, and establish a second LE Audio Bluetooth connection with the second device based on the second BLE address if a Bluetooth connection operation for the connection request information is detected.
[0008] This application discloses a Bluetooth connection device applied to a target Bluetooth device, wherein the target Bluetooth device and at least one other Bluetooth device belong to the same group of Bluetooth devices. The device method includes: an address setting module, used to determine the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, and set the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship; wherein, the classic Bluetooth address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a classic Bluetooth address with the master device; the BLE address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish an LE Audio Bluetooth connection with the master device; the BLE address of the slave device in the same group of Bluetooth devices is used to enable the terminal device to establish an LE Audio Bluetooth connection with the slave device, and the BLE address of the slave device is different from the BLE address of the master device.
[0009] This application discloses a Bluetooth connection device applied to an earphone device. The earphone device includes a first earphone and a second earphone. The device includes: a first broadcast module, used by the first earphone to send a first LE Audio broadcast signal based on a first BLE address, so that a terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address, wherein the first BLE address is the same as a first classic Bluetooth address corresponding to the first earphone; a second broadcast module, used by the second earphone to send a second LE Audio broadcast signal based on a second BLE address, so that a terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address; a first connection module, used by the first earphone to receive a first LE Audio connection request sent by the terminal device based on the first BLE address, and to establish a first LE Audio Bluetooth connection with the terminal device based on the first LE Audio connection request, and to receive a first classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, and to establish a classic Bluetooth connection with the terminal device based on the first classic Bluetooth connection request; and a second connection module, used by the second earphone to receive a second LE Audio connection request sent by the terminal device based on the second BLE address, and to establish a second LE Audio Bluetooth connection with the terminal device based on the second LE Audio connection request.
[0010] This application discloses an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to implement any of the methods described above.
[0011] This application discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the methods described above.
[0012] The Bluetooth connection method, apparatus, electronic device, and storage medium provided in this application embodiment allow a terminal device to determine the first low-power Bluetooth (BLE) address and the first classic Bluetooth address corresponding to the first device. Since the first device and the second device belong to the same group of Bluetooth devices, only one connection request information corresponding to the same group of Bluetooth devices is output. The terminal device can also determine the second BLE address corresponding to the second device. If the terminal device detects a Bluetooth connection operation for the connection request information, it can establish a first LE Audio Bluetooth connection with the first device based on the first BLE address, a classic Bluetooth connection with the first device based on the first classic Bluetooth address, and a second LE Audio Bluetooth connection with the second device based on the second BLE address. In this application embodiment, for the same group of Bluetooth devices, the terminal device only displays one corresponding connection request information. Therefore, the user only needs to perform one Bluetooth connection operation on the terminal device to trigger the terminal device to establish LE Audio Bluetooth connections with the first and second devices belonging to the same group of Bluetooth devices, and to establish a classic Bluetooth connection with the first device. This allows for quick LE Audio Bluetooth and classic Bluetooth connections with devices that simultaneously support classic Bluetooth and BLE Audio, combining BLE Audio and classic Bluetooth to meet the user's audio transmission needs in different scenarios. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is an application scenario diagram of the Bluetooth connection method in one embodiment;
[0015] Figure 2 This is a timing diagram of a Bluetooth connection method in one embodiment;
[0016] Figure 3 This is a flowchart of a Bluetooth connection method applied to a terminal device in one embodiment;
[0017] Figure 4 This is a schematic diagram of the connection information output by the terminal device in one embodiment;
[0018] Figure 5 This is a flowchart of a Bluetooth connection method applied to a terminal device in another embodiment;
[0019] Figure 6 This is a timing diagram of a Bluetooth connection method in another embodiment;
[0020] Figure 7A This is a timing diagram illustrating the establishment of a Bluetooth connection between a terminal device and an earphone device in one embodiment.
[0021] Figure 7B This is a timing diagram illustrating the master-slave switching of the headphone device in one embodiment.
[0022] Figure 7C This is a timing diagram illustrating the master-slave switching of the headphone device in another embodiment;
[0023] Figure 7D This is a timing diagram of the master-slave switching of the headphone device in another embodiment;
[0024] Figure 8 This is a flowchart of a Bluetooth connection method applied to a headphone device in one embodiment;
[0025] Figure 9 A flowchart of a Bluetooth connection method applied to a first device in one embodiment;
[0026] Figure 10 This is a flowchart of a Bluetooth connection method applied to a second device in one embodiment;
[0027] Figure 11 This is a block diagram of a Bluetooth connection device applied to a terminal device in one embodiment;
[0028] Figure 12 This is a block diagram of a Bluetooth connection device applied to an earphone device in one embodiment;
[0029] Figure 13 This is a block diagram of a Bluetooth connection device applied to a first device in one embodiment;
[0030] Figure 14 This is a block diagram of a Bluetooth connection device applied to a second device in one embodiment;
[0031] Figure 15 This is a structural block diagram of a terminal device in one embodiment. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0034] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first earphone may be referred to as a second earphone, and similarly, a second earphone may be referred to as a first earphone. Both the first earphone and the second earphone are earphones, but they are not the same earphone. It should be noted that the terms "multiple," etc., used in this application refer to two or more.
[0035] Figure 1 This is a diagram illustrating an application scenario of a Bluetooth connection method in one embodiment. For example... Figure 1 As shown, terminal device 10, first device 20, and second device 30 can all be electronic devices that support Bluetooth dual-mode. Electronic devices supporting Bluetooth dual-mode refer to those that simultaneously support both the classic Bluetooth protocol and the BLE (Bluetooth Low Energy) protocol. The classic Bluetooth protocol supports data transmission with larger data volumes, while the BLE protocol supports data transmission with higher real-time requirements.
[0036] Furthermore, terminal device 10, first device 20, and second device 30 can all be electronic devices that simultaneously support the classic Bluetooth protocol and the BLE Audio protocol. BLE Audio technology solves the problem that BLE connection can only transmit small amounts of data and cannot transmit audio data. The BLE Audio protocol supports audio data encoded with LC3 (Low Complexity Communications Codec), which enables the transmission of audio data to better balance issues such as power consumption, real-time performance, and sound quality.
[0037] Terminal device 10 may include, but is not limited to, mobile phones, smart wearable devices, in-vehicle terminals, tablets, PCs (Personal Computers), PDAs (Personal Digital Assistants), etc. First device 20 and second device 30 may include, but are not limited to, headphones, mobile phones, wearable devices, speaker devices, smart home devices, etc. As one implementation, first device 20 and second device 30 may be complementary devices. For example, first device 20 and second device 30 may belong to the same headphone device, with first device 20 being the left earphone and second device 30 being the right earphone, or first device 20 being the right earphone and second device 30 being the left earphone, etc. Further, the headphone device may be a TWS (True Wireless Stereo) headphone.
[0038] To meet users' audio transmission needs in different scenarios, for example, when listening to high-definition music, the sound quality of LDAC encoding transmitted based on the classic Bluetooth protocol may be better than that of LC3 encoding supported by the BLE Audio protocol. Therefore, audio data transmission can be performed based on the classic Bluetooth protocol. When users play games on terminal device 10, audio data transmission based on the BLE Audio protocol can reduce latency. Terminal device 10 can simultaneously establish a classic Bluetooth connection and a first LE Audio Bluetooth connection with the first device 20, and terminal device 10 can establish a second LE Audio Bluetooth connection with the second device 30. In some embodiments, a Bluetooth connection (either a classic Bluetooth connection or a BLE connection) can also be established between the first device 20 and the second device 30, to ensure data synchronization between the first device 20 and the second device 30, which belong to the same group of Bluetooth devices.
[0039] In some embodiments, after the terminal device 10 establishes a classic Bluetooth connection with the first device 20, the second device 30 may monitor the classic Bluetooth connection between the terminal device 10 and the first device 20, or the first device 20 may synchronize the data transmitted between itself and the terminal device 10 through the classic Bluetooth connection to the second device 30, so as to ensure that when the terminal device 10 transmits data with the first device 20 through the classic Bluetooth connection, the second device 30 can also synchronously obtain the transmitted data.
[0040] After the terminal device 10 establishes a first LE Audio Bluetooth connection with the first device 20 and a second LE Audio Bluetooth connection with the second device 30, it can synchronously send audio data to the first device 20 and the second device 30 through the first LE Audio Bluetooth connection and the second LE Audio Bluetooth connection, respectively, so as to ensure that the audio data received between the first device 20 and the second device 30 is synchronized.
[0041] Maintaining both LE Audio Bluetooth and Classic Bluetooth connections simultaneously between the same group of Bluetooth devices and terminal device 10 allows for leveraging the advantages of both Bluetooth protocols and facilitates quick switching.
[0042] Figure 2 This is a timing diagram of a Bluetooth connection method in one embodiment. Figure 2 As shown, the first device 20 can send a first LE Audio broadcast signal, and the second device 30 can send a second LE Audio broadcast signal. After the terminal device 10 receives the first LE Audio broadcast signal, it can determine the first BLE address corresponding to the first device 20 based on the first LE Audio broadcast signal. After the terminal device 10 receives the second LE Audio broadcast signal, it can determine the second BLE address corresponding to the second device 30 based on the second LE Audio broadcast signal. The terminal device 10 can also determine the first classic Bluetooth address corresponding to the first device 20, and can establish a first LE Audio Bluetooth connection with the first device 20 based on the first BLE address, establish a classic Bluetooth connection with the first device 20 based on the first classic Bluetooth address, and establish a second LE Audio Bluetooth connection with the second device 30 based on the second BLE address, thus realizing a scheme to simultaneously establish a classic Bluetooth connection and a LE Audio Bluetooth connection with the first device 20.
[0043] like Figure 3 As shown, in one embodiment, a Bluetooth connection method is provided, which can be applied to the aforementioned terminal device. The method may include the following steps:
[0044] Step 310: Determine the first BLE address corresponding to the first device, and determine the first classic Bluetooth address corresponding to the first device.
[0045] Step 320: Determine the second BLE address corresponding to the second device. The first device and the second device belong to the same group of Bluetooth devices.
[0046] In some embodiments, the first device may enable a broadcast state. In this broadcast state, the first device may send a first LE Audio broadcast signal based on a first BLE address. A terminal device receiving the first LE Audio broadcast signal can initiate a LE Audio Bluetooth connection to the first device. The first BLE address can be used to identify the first device's identity in LE Audio Bluetooth technology. Optionally, the first BLE address may be the same as the first classic Bluetooth address corresponding to the first device, and the first classic Bluetooth address can be used to identify the first device's identity in classic Bluetooth technology. For example, when the first device sends the first LE Audio broadcast signal, if the first classic Bluetooth address is address A, then the first BLE address is also address A.
[0047] The terminal device can receive a first LE Audio broadcast signal sent by the first device and determine the first BLE address corresponding to the first device based on the first LE Audio broadcast signal.
[0048] In some embodiments, the second device may also enable a broadcast state. In this broadcast state, the second device can send a second LE Audio broadcast signal based on a second BLE address. A terminal device receiving the first LE Audio broadcast signal can initiate a LE Audio Bluetooth connection to the second device. The second BLE address can be used to identify the second device's identity in LE Audio Bluetooth technology. When both the first and second devices are capable of LE Audio Bluetooth connection (i.e., both devices simultaneously send LE Audio broadcast signals), the second BLE address is distinct from the first BLE address, enabling the terminal device to simultaneously scan for both devices. For example, the first BLE address might be address A, and the second BLE address might be address B.
[0049] The terminal device can receive a second LE Audio broadcast signal sent by the second device and determine the first BLE address corresponding to the first device based on the second LE Audio broadcast signal.
[0050] In this embodiment, the terminal device may further determine the first classic Bluetooth address corresponding to the first device. As one implementation, determining the first classic Bluetooth address corresponding to the first device may include: querying for Bluetooth devices existing within a first distance range, and determining the first classic Bluetooth address corresponding to the first device based on the query response returned by the first device.
[0051] The terminal device can be a device that has never previously established a classic Bluetooth connection with the first device, or a device that, although it has established a classic Bluetooth connection with the first device, has been restored to factory settings, and therefore does not store any connection records of establishing a classic Bluetooth connection with the first device. The terminal device can enable inquiry mode, in which it can send an inquiry command every first time interval to query for Bluetooth devices within a first distance range. The first device can be in a discoverable state, in which it can enable inquiry scan mode to scan for inquiry commands sent by other devices. When the first device in discoverable state receives an inquiry command from the terminal device, it can return a query response to the terminal device, which can then determine the first classic Bluetooth address corresponding to the first device based on this response.
[0052] In some embodiments, a first device and a second device belonging to the same group of Bluetooth devices may share the same classic Bluetooth address, such as sharing the first classic Bluetooth address of the first device. Optionally, the second device may be in an undiscoverable state, i.e., the inquiry scan mode is turned off, and it cannot receive query commands sent by the terminal device. Optionally, the second device may also be in a discoverable state, with the inquiry scan mode enabled. Regardless of whether the second device has the inquiry scan mode enabled, since the first device and the second device share the same classic Bluetooth address, there will be no situation where multiple different classic Bluetooth addresses corresponding to the same group of Bluetooth devices are simultaneously scanned.
[0053] As another implementation, if the terminal device stores a connection record for establishing a classic Bluetooth connection with the first device, the connection record may include the device information of the first device and the first classic Bluetooth address. Therefore, the first classic Bluetooth address corresponding to the first device can also be obtained directly from the connection record.
[0054] It should be noted that the embodiments of this application do not limit the order in which the first device sends the first LE Audio broadcast signal and the second device sends the second LE Audio broadcast signal. The first device may send the first LE Audio broadcast signal first, followed by the second device, or the second device may send the second LE Audio broadcast signal first, followed by the first device, or both may be sent simultaneously. Similarly, the embodiments of this application do not limit the order in which the terminal device determines the first BLE address, the first classic Bluetooth address, and the second BLE address.
[0055] Step 330: Output only one connection information corresponding to the same group of Bluetooth devices.
[0056] For the same group of Bluetooth devices, the terminal device can output only one corresponding connection request information. This connection request information can be used to indicate that a Bluetooth connection can be established with the same group of Bluetooth devices. In related technologies, for each Bluetooth address acquired by the terminal device, connection request information corresponding to each Bluetooth address is displayed separately. For example, the first BLE address, the second BLE address, and the first classic Bluetooth address all display corresponding connection request information to indicate that the terminal device has scanned all three Bluetooth addresses and that a Bluetooth connection can be established. Therefore, this may cause unnecessary confusion for the user.
[0057] In this embodiment, for a first device and a second device belonging to the same group of Bluetooth devices, only one connection-pending information indicating that a Bluetooth connection can be established may be output. As one implementation, the first BLE address and the first classic Bluetooth address corresponding to the first device are the same as the second classic Bluetooth address of the second device. The second classic Bluetooth address of the second device may refer to the second classic Bluetooth address of the second device when the terminal device determines the first classic Bluetooth address, or it may refer to the second classic Bluetooth address of the second device when sending the second LE Audio broadcast signal. The second LE Audio broadcast signal includes a non-displayable flag, which indicates that the connection-pending information corresponding to the BLE address in the LE Audio broadcast signal is not displayed on the terminal device.
[0058] Optionally, only one connection request message corresponding to the same group of Bluetooth devices can be output, which may include any of the following:
[0059] 1. Only output the connection information corresponding to both the first classic Bluetooth address and the first BLE address, and do not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal.
[0060] Optionally, the second device may be in an undiscoverable state, i.e., the second device has its inquiry scan mode disabled. Therefore, the terminal device cannot scan and obtain the second device's current second classic Bluetooth address, but can only obtain the first device's first classic Bluetooth address and first BLE address, as well as the second device's second BLE address. The first LE Audio broadcast signal may include a displayable flag, which can be used to indicate that the connection information corresponding to the BLE address in the LE Audio broadcast signal is displayed on the terminal device. Since the first device's first classic Bluetooth address and first BLE address are the same, only one connection information corresponding to both the first classic Bluetooth address and the first BLE address can be output, while the second LE Audio broadcast signal contains a non-displayable flag and does not output the connection information corresponding to the second BLE address.
[0061] Second, output only one connection information corresponding to the first classic Bluetooth address, the first BLE address, and the current second classic Bluetooth address, and do not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal.
[0062] Optionally, the second device can be in a discoverable state, i.e., the second device is in inquiry scan mode. Therefore, the terminal device can scan and obtain the second device's current second classic Bluetooth address, as well as the first device's first classic Bluetooth address and first BLE address, and the second device's second BLE address. The first LE Audio broadcast signal may contain a displayable identifier. Since the first device's first classic Bluetooth address, first BLE address, and the second device's current second classic Bluetooth address are all the same, only one connection information corresponding to the first classic Bluetooth address, first BLE address, and current second classic Bluetooth address can be output. The second LE Audio broadcast signal contains a non-displayable identifier and does not output the connection information corresponding to the second BLE address.
[0063] Third, output only one connection information corresponding to both the first classic Bluetooth address and the current second classic Bluetooth address, and do not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal.
[0064] Optionally, the second device can be in a discoverable state, i.e., the second device is in inquiry scan mode. Therefore, the terminal device can scan and obtain the second device's current second classic Bluetooth address, as well as the first device's first classic Bluetooth address and first BLE address, and the second device's second BLE address. The first LE Audio broadcast signal may contain a non-displayable identifier. Since the first device's first classic Bluetooth address is the same as the second device's current second classic Bluetooth address, only a connection request information corresponding to both the first classic Bluetooth address and the current second classic Bluetooth address can be output. However, since the second LE Audio broadcast signal contains a non-displayable identifier, no connection request information corresponding to the second BLE address is output.
[0065] Fourth, only output the connection information corresponding to the first classic Bluetooth address, and do not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal.
[0066] Optionally, the second device can be in an undiscoverable state, i.e., the second device disables the inquiry scan mode. Therefore, the terminal device cannot scan and obtain the second device's current second classic Bluetooth address, but can only obtain the first device's first classic Bluetooth address and first BLE address, as well as the second device's second BLE address. The first LE Audio broadcast signal may contain a non-displayable identifier, and the second LE Audio broadcast signal also contains a non-displayable identifier. Therefore, only a connection request message corresponding to the first classic Bluetooth address can be output, without outputting a connection request message corresponding to the second BLE address.
[0067] In some embodiments, the connection information corresponding to the same group of Bluetooth devices may include, but is not limited to, one or more of the following: the device name of the first device, the names of the Bluetooth devices in the same group to which the first device and the second device belong, and the first classic Bluetooth address of the first device.
[0068] It should be noted that the methods for outputting the connection information include, but are not limited to, displaying the connection information or playing the connection information by voice.
[0069] Understandably, for the first and second devices in the same group of Bluetooth devices, only one connection information will be displayed. This reduces the confusion for users and improves the foolproof effect. However, in order for users to trigger the establishment of classic Bluetooth connection and LE Audio Bluetooth connection with the same group of Bluetooth devices by operating on a single connection information, the following solution is still needed.
[0070] Step 340: If a Bluetooth connection operation for the connection information is detected, a first LE Audio Bluetooth connection is established with the first device based on the first BLE address, a classic Bluetooth connection is established with the first device based on the first classic Bluetooth address, and a second LE Audio Bluetooth connection is established with the second device based on the second BLE address.
[0071] After the terminal device outputs the connection request information for the first device, the user can perform a Bluetooth connection operation based on the actual needs to trigger the terminal device to connect with the first and second devices belonging to the same group of Bluetooth devices. The specific operation method of this Bluetooth connection operation is not limited in this embodiment of the application, and can be any of the following: touch operation, voice interaction operation, gaze interaction operation, gesture operation, etc.
[0072] When a terminal device detects a Bluetooth connection operation for the connection information to be connected, it can respond to the Bluetooth connection operation, establish a first LE Audio Bluetooth connection with the first device based on the first BLE address, establish a classic Bluetooth connection with the first device based on the first classic Bluetooth address, and establish a second LE Audio Bluetooth connection with the second device based on the second BLE address.
[0073] For example, Figure 4 This is a schematic diagram of the connection request information output by the terminal device in one embodiment. For example... Figure 4 As shown, the first device is the first earphone 410, and the second device is the second earphone 420. The first earphone 410 and the second earphone 420 belong to the same set of earphone devices (i.e., the same group of Bluetooth devices). After the terminal device 10 determines the first classic Bluetooth address and the first BLE address corresponding to the first earphone 410, based on the previous scheme, only the name of the earphone device "TWS Earphone" and the corresponding connection control 402 can be displayed on the interface. Since the first classic Bluetooth address and the first BLE address are the same, the user can choose to trigger the connection control 402 to allow the terminal device 10 to establish a first LE Audio Bluetooth connection and a classic Bluetooth connection with the first earphone 410. Since the first device and the second device are the same group of Bluetooth devices, a second LE Audio Bluetooth connection will also be established with the second earphone 420. For the first earphone 410 and the second earphone 420, the terminal device 10 only displays a connection information, which will not cause unnecessary interference to the user. Moreover, the user only needs to perform a Bluetooth connection operation once to trigger the terminal device 10 to simultaneously connect to the first earphone 410 via LE Audio Bluetooth and Classic Bluetooth, as well as to the second earphone 420 via LE Audio Bluetooth. The operation method is more convenient and the operation efficiency is higher.
[0074] In some embodiments, establishing a first LE Audio Bluetooth connection with a first device based on a first BLE address may include: sending a first LE Audio connection request to the first device based on the first BLE address, so as to establish a first LE Audio Bluetooth connection with the first device through the first LE Audio connection request.
[0075] For example, when a terminal device detects a Bluetooth connection operation for connection information, it can send a connection request command to a first device based on the first BLE address in the received first LE Audio broadcast signal. This connection request command notifies the first device that an LE Audio Bluetooth connection is about to be established. Upon receiving the connection request command, the first device can prepare for reception based on it. For example, the connection request command may include fields such as transmission window offset and transmission window size. The transmission window offset and transmission window size can be used to determine the time interval between the first device receiving the connection request command and receiving the LE Audio connection data packet. Upon reaching the connection anchor point, the terminal device can send an LE Audio connection data packet to the first device. After receiving the LE Audio connection data packet, the first device can return a response signal to the terminal device, thereby successfully establishing a first LE Audio Bluetooth connection with the terminal device.
[0076] The terminal device can send a second LE Audio connection request to the first device based on the second BLE address, so as to establish a second LE Audio Bluetooth connection with the second device through the second LE Audio connection request. The process of establishing the second LE Audio Bluetooth connection is similar to that described above, and will not be repeated here.
[0077] It should be noted that the specific connection establishment process for establishing LE Audio Bluetooth connection and establishing classic Bluetooth connection involved in the embodiments of this application can also refer to the relevant provisions in the relevant Bluetooth standards agreement.
[0078] In some embodiments, the first device and the second device belong to the same group of Bluetooth devices, and the first device and the second device can share the same classic Bluetooth address. Further, the classic Bluetooth address shared by the first device and the second device is the first classic Bluetooth address. When the terminal device is in query mode, it can only scan this shared classic Bluetooth address (e.g., only scanning the first classic Bluetooth address of the first device, or scanning the same first classic Bluetooth address of the first device and the second classic Bluetooth address of the second device). After the terminal device and the first device establish a classic Bluetooth connection, the second device can monitor the classic Bluetooth connection between the terminal device and the first device, or the first device can synchronize the data transmitted between itself and the terminal device via the classic Bluetooth connection to the second device 30, to ensure that when the terminal device transmits data with the first device via the classic Bluetooth connection, the second device can also synchronously obtain the transmitted data.
[0079] After establishing a first LE Audio Bluetooth connection and a classic Bluetooth connection with the first device, and a second LE Audio Bluetooth connection with the second device, the terminal device can choose either the classic Bluetooth connection or the LE Audio Bluetooth connection for audio data transmission according to the audio transmission needs in various scenarios, thus achieving a Bluetooth dual-mode switching solution. Because both classic Bluetooth and LE Audio Bluetooth connections are maintained simultaneously, the switching speed when selecting different links for transmission is improved.
[0080] In one implementation, the terminal device can first establish a first LE Audio Bluetooth connection with the first device, and then establish a classic Bluetooth connection with the first device. Optionally, after establishing the first LE Audio Bluetooth connection with the first device, the terminal device can convert the first key (such as LTK "Long Term Key") corresponding to the first LE Audio Bluetooth connection into a second key (such as a link key) required for the classic Bluetooth connection, and then establish a classic Bluetooth connection with the first device based on the second key. This may save classic Bluetooth connection time because it may not be necessary to generate a key through pairing operations when establishing a classic Bluetooth connection with the first device. Furthermore, the terminal device may not need to pop up a classic Bluetooth pairing confirmation window for user confirmation, which is more convenient for user operation.
[0081] As another implementation, the terminal device may first establish a classic Bluetooth connection with the first device, and then establish a first LE Audio Bluetooth connection with the first device. Optionally, after establishing a classic Bluetooth connection with the first device, the terminal device may convert the second key corresponding to the classic Bluetooth connection into the first key corresponding to the first LE Audio Bluetooth connection, and then establish a first LE Audio Bluetooth connection with the first device based on the first key.
[0082] In this embodiment, for the same group of Bluetooth devices, the terminal device displays only one corresponding connection information. The user only needs to perform a Bluetooth connection operation once on the terminal device to trigger the terminal device to establish LE Audio Bluetooth connections with the first and second devices belonging to the same group of Bluetooth devices, and to establish a Classic Bluetooth connection with the first device. This allows for quick LE Audio Bluetooth and Classic Bluetooth connections with devices that support both Classic Bluetooth and BLE Audio, combining BLE Audio and Classic Bluetooth to meet the user's audio transmission needs in different scenarios.
[0083] like Figure 5 As shown, in another embodiment, a Bluetooth connection method is provided, which can be applied to the aforementioned terminal device. This method may include the following steps:
[0084] Step 502: Receive the first LE Audio broadcast signal sent by the first device, and determine the first BLE address corresponding to the first device based on the first LE Audio broadcast signal.
[0085] Step 504: Query the Bluetooth devices that exist within the first distance range, and determine the first classic Bluetooth address corresponding to the first device based on the query response returned by the first device.
[0086] Step 506: Receive the second LE Audio broadcast signal sent by the second device, determine the second BLE address corresponding to the second device based on the second LE Audio broadcast signal, and the first device and the second device belong to the same group of Bluetooth devices.
[0087] Step 508 outputs only one connection information corresponding to the same group of Bluetooth devices.
[0088] Step 510: If a Bluetooth connection operation for the connection information is detected, a first LE Audio Bluetooth connection is established with the first device based on the first BLE address, and a classic Bluetooth connection is established with the first device based on the first classic Bluetooth address.
[0089] The descriptions of steps 502 to 512 can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0090] Step 512: If it is determined that the first device and the second device belong to the same group of Bluetooth devices, establish a second LE Audio Bluetooth connection with the second earphone based on the second BLE address.
[0091] In some embodiments, before establishing a second LE Audio Bluetooth connection with the second headset based on the second BLE address, the terminal device may first determine whether the first device and the second device belong to the same group of Bluetooth devices. The same group of Bluetooth devices can achieve LE Audio data synchronization. For example, the first device and the second device belong to the same CIG (Connected Isochronous Groups). The LE Audio Bluetooth connections of devices in the same CIG have the same timestamp to ensure data synchronization within the same CIG.
[0092] In some embodiments, after the terminal device receives the first LE Audio broadcast signal and the second LE Audio broadcast signal, it can determine that the first device and the second device belong to the same group of Bluetooth devices based on the first LE Audio broadcast signal and the second LE Audio broadcast signal. Optionally, the first LE Audio broadcast signal may include a first identity identifier, and the second LE Audio broadcast signal may include a second identity identifier. The identity identifier can be used to indicate the group identity. The terminal device can parse the first LE Audio broadcast signal and the second LE Audio broadcast signal respectively to obtain the first identity identifier and the second identity identifier, and determine whether the first identity identifier and the second identity identifier are the same. If the first identity identifier and the second identity identifier are the same, it is determined that the first device and the second device belong to the same group of Bluetooth devices.
[0093] In one specific implementation, the first device and the second device are part of the same set of equipment. For example, the first device is a first earphone, and the second device is a second earphone; the first earphone and the second earphone belong to the same set of earphone equipment. Before the earphone equipment leaves the factory, the same first identification identifier and second identification identifier can be pre-stored in the first earphone and the second earphone to indicate that the first earphone and the second earphone are part of the same set of earphone equipment. For different earphone devices, different identification identifiers are stored, thereby distinguishing different earphone devices and avoiding connection errors.
[0094] Only when the first device and the second device belong to the same group of Bluetooth devices will the terminal device respond to the Bluetooth connection operation and establish a second LE Audio Bluetooth connection with the second device. This can avoid connection errors. Furthermore, by accurately identifying the same group of Bluetooth devices, data synchronization of the same group of Bluetooth devices can be guaranteed, improving the accuracy of data transmission.
[0095] For example, Figure 6 This is a timing diagram of a Bluetooth connection method in another embodiment. Figure 6As shown, the first device 20 sends a first LE Audio broadcast signal to the terminal device 10, and the terminal device 10 can obtain the first BLE address corresponding to the first device 20 based on the first LE Audio broadcast signal. The second device 30 sends a second LE Audio broadcast signal to the terminal device 10, and the terminal device 10 can obtain the second BLE address corresponding to the second device 30 based on the second LE Audio broadcast signal. When the terminal device 10 is in inquiry mode, it sends an inquiry command. The first device 20, which is in a discoverable state (i.e., in inquiry scan mode), can receive the inquiry command and return an inquiry response to the terminal device 10. The terminal device 10 can obtain the first classic Bluetooth address corresponding to the first device 20 based on the inquiry response.
[0096] Optionally, the terminal device 10 outputs connection information corresponding to the first classic Bluetooth address (or a combination of the first classic Bluetooth address and the first BLE address) of the first device 20. If a Bluetooth connection operation targeting this connection information is detected, a first LE Audio Bluetooth connection can be established with the first device 20 based on the first BLE address, and a classic Bluetooth connection can be established with the first device 20 based on the first classic Bluetooth address. The terminal device 10 can determine whether the first device 20 and the second device 30 belong to the same group of Bluetooth devices. If they belong to the same group, a second LE Audio Bluetooth connection can be established with the second device 30 based on the second BLE address. It should be noted that the terminal device 10 can determine whether the first device 20 and the second device 30 belong to the same group of Bluetooth devices before outputting the connection information. This embodiment does not specifically limit the timing of this step.
[0097] In some embodiments, before establishing a first LE Audio Bluetooth connection with the first device, the terminal device needs to determine whether the first device supports the LE Audio Bluetooth protocol (i.e., the BLE Audio protocol). If it is determined that the first device supports the LEAudio protocol, then the terminal device establishes the first LE Audio Bluetooth connection with the first device. Optionally, the terminal device may determine whether the first device supports the LE Audio protocol in the following ways, including but not limited to:
[0098] Method 1: Determine whether the first device supports the LE Audio Bluetooth protocol based on the first LE Audio broadcast sent by the first device.
[0099] The terminal device can parse the first LE Audio broadcast signal to determine whether it carries a first support marker based on the parsing result. If the first device supports the LE Audio Bluetooth protocol, it can carry the first support marker in the transmitted first LE Audio broadcast signal. This first support marker can be used to indicate support for the LE Audio Bluetooth protocol. If the terminal device receives a first LE Audio broadcast signal carrying the first support marker, it determines that the first device supports the LE Audio Bluetooth protocol, and can then establish a first LE Audio Bluetooth connection with the first device based on the first BLE address.
[0100] Method 2: Determine whether the first device supports the LE Audio Bluetooth protocol based on the query response returned by the first device.
[0101] When a terminal device is in query mode and sends a query command, if the first device supports the LE Audio Bluetooth protocol, the first device scans and obtains the query command and can return a query response containing a second support flag to the terminal device. This second support flag can be used to indicate support for the LE Audio Bluetooth protocol. After receiving the query response returned by the first device, the terminal device can determine whether the first device supports the LE Audio Bluetooth protocol based on the query response. It can detect whether the query response contains the second support flag. If it does, it can be determined that the first device supports the LE Audio Bluetooth protocol, and a first LE Audio Bluetooth connection can be established with the first device based on the first BLE address.
[0102] Optionally, the first supporting tag and the second supporting tag mentioned above can be the same tag character (or tag field) or different tag characters (or tag fields), etc. The specific tags can be set according to actual needs, and there are no restrictions here.
[0103] Method 3: The terminal device actively queries the first device to see if it supports the LE Audio Bluetooth protocol.
[0104] If the terminal device detects a Bluetooth connection request for the connection information, it establishes a classic Bluetooth connection with the first device based on the first classic Bluetooth address. After establishing the classic Bluetooth connection with the first device, the terminal device can send a query command to the first device through this connection. This query command can be used to inquire whether the first device supports the LE Audio Bluetooth protocol. For example, the terminal device can send a query command to the first device based on the classic Bluetooth SDP (Service Discovery Protocol), but it is not limited to this.
[0105] If the first device receives the query command via the classic Bluetooth connection and supports the LE Audio Bluetooth protocol, it can return a confirmation command to the terminal device indicating support for the LE Audio Bluetooth protocol. If the terminal device receives the confirmation command from the first device indicating support for the LE Audio Bluetooth protocol, it can determine that the first device supports the LE Audio Bluetooth protocol and can then establish a first LE Audio Bluetooth connection with the first device based on the first BLE address.
[0106] In this embodiment, the terminal device will only establish a second LE Audio Bluetooth connection with the second device if it is determined that the first device and the second device belong to the same group of Bluetooth devices. This can avoid connection errors and ensure data synchronization of the same group of Bluetooth devices, thereby improving the accuracy of data transmission. In addition, it will first determine whether the first device supports the LE Audio Bluetooth protocol, thereby ensuring the successful establishment of the LE Audio Bluetooth connection and improving connection stability.
[0107] In some embodiments, the first device and the second device described above belong to the same group of Bluetooth devices. Taking the target Bluetooth device in the same group of Bluetooth devices as an example, the target Bluetooth device can be the first device (such as the first headset) in this application, or it can be the second device (such as the second headset) in this application. The method may further include: after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, determining the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices, and setting the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship. It should be noted that setting the classic Bluetooth address and BLE address of the target Bluetooth device may include the target Bluetooth device changing the classic Bluetooth address and / or BLE address, or the target Bluetooth device not changing the classic Bluetooth address and / or BLE address. "Setting" does not mean that the target Bluetooth device will necessarily operate on the classic Bluetooth address and BLE address.
[0108] In this group of Bluetooth devices, the classic Bluetooth address of the master device is used to enable the terminal device to establish a classic Bluetooth connection with the master device; the BLE address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a LEAudio Bluetooth connection with the master device; and the BLE address of the slave device in the same group of Bluetooth devices is used to enable the terminal device to establish a LEAudio Bluetooth connection with the slave device.
[0109] A group of Bluetooth devices may include one master device and one or more slave devices. The master device can be a Bluetooth device in the same group that establishes a classic Bluetooth connection with the terminal device. A slave device can be a Bluetooth device in the same group that listens for the classic Bluetooth connection between the master device and the terminal device, or a slave device can be a Bluetooth device in the same group that receives data transmitted via the classic Bluetooth connection and forwarded by the master device. When the master device and a slave device in the same group establish a Bluetooth connection, the slave device's classic Bluetooth address is the same as the master device's classic Bluetooth address. When both the master device and the slave device establish separate LE Audio Bluetooth connections with the terminal device, the slave device's BLE address is different from the master device's BLE address.
[0110] Optionally, the first device can be set as the master device by default, and the second device can be set as the slave device by default. Master-slave switching is supported between the first and second devices. For example, the default address of the first device's first classic Bluetooth address can be A, and the default address of the first BLE address can be A. The default address of the second device's second classic Bluetooth address can be B, and the default address of the second BLE address can be B. When the first device and the second device establish a Bluetooth connection, the first device can share the default address A of the first classic Bluetooth address with the second device. The second device can then change the second classic Bluetooth address from the default address B to A. The first BLE address and the second BLE address remain unchanged, thus ensuring that when the first device and the second device are connected via Bluetooth, the first classic Bluetooth address, the second classic Bluetooth address, and the first BLE address are the same, for example, all A, while the second BLE address is different from the first BLE address, for example, B.
[0111] In some embodiments, when a master-slave switch occurs between the first device and the second device, with the first device becoming the slave and the second device becoming the master, and the classic Bluetooth connection of the terminal device switching from the first device to the second device, if a Bluetooth connection is maintained between the first device and the second device, and a first LEAudio Bluetooth connection is maintained between the first device and the terminal device, and a classic Bluetooth connection and a second LEAudio Bluetooth connection are maintained between the second device and the terminal device, then the first classic Bluetooth address and the first BLE address of the first device, and the second classic Bluetooth address and the second BLE address of the second device can remain unchanged. For example, before the master-slave switch, the first classic Bluetooth address of the first device is A, the first BLE address is A, and the second classic Bluetooth address of the second device is A, and the second BLE address is B. After the master-slave switch, the first classic Bluetooth address of the first device is A, the first BLE address is A, and the second classic Bluetooth address of the second device is A, and the second BLE address is B. For example, if the Bluetooth device is a TWS Bluetooth earphone, the first device is the first earphone (default is the master earphone), and the second device is the second earphone (default is the slave earphone). In a scenario where the first earphone is removed but not put into the earphone case, while the second earphone is still being worn, a master-slave switch between the first and second earphones can be triggered.
[0112] In some embodiments, when a master-slave switch occurs between the first device and the second device, i.e., the first device becomes the slave device and the second device becomes the master device, if the first device disconnects the first LE Audio Bluetooth connection with the terminal device (for example, the first device is a first earphone, after the first earphone is removed, the first earphone and the second earphone switch master and slave, then the first earphone is put into the earphone case and the earphone case is closed, and the first earphone disconnects the first LE Audio Bluetooth connection, etc.), the second device maintains the second LE Audio Bluetooth connection with the terminal device and the classic Bluetooth connection with the terminal device, and the first device has switched to the slave earphone, then the first classic Bluetooth address and the first BLE address of the first device, and the second classic Bluetooth address and the second BLE address of the second device can remain unchanged.
[0113] In some embodiments, after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, if it is determined that the target Bluetooth device is the master device in the same group of Bluetooth devices, and the classic Bluetooth address and the BLE address of the target Bluetooth device are different, then the BLE address of the target Bluetooth device is changed to be the same as the classic Bluetooth address of the target Bluetooth device.
[0114] For example, if the first LE Audio Bluetooth connection between the first device and the terminal device, the second LE Audio Bluetooth connection between the second device and the terminal device, and the classic Bluetooth connection are all disconnected, the second device can determine that the current master-slave relationship is that the second device is the master device, and determine whether the second classic Bluetooth address and the second BLE address of the second device are the same; if the second classic Bluetooth address of the second device is A and the second BLE address is B, then the second device can change the second BLE address to A.
[0115] In some embodiments, after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, if it is determined that the target Bluetooth device is the master device in the same group of Bluetooth devices, and the classic Bluetooth address and the BLE address of the target Bluetooth device are the same, then the BLE address and the classic Bluetooth address of the target Bluetooth device are kept unchanged.
[0116] In some embodiments, after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, if it is determined that the target Bluetooth device is a slave device in the same group of Bluetooth devices, and the classic Bluetooth address and the BLE address of the target Bluetooth device are the same, then the BLE address of the target Bluetooth device is changed to be different from the classic Bluetooth address of the target Bluetooth device.
[0117] For example, if the first LE Audio Bluetooth connection between the first device and the terminal device, the second LE Audio Bluetooth connection between the second device and the terminal device, and the classic Bluetooth connection are all disconnected, the first device determines that the current master-slave relationship is that of a slave device. The master device can send an address confirmation command to the slave device. After receiving the address confirmation command, the first device can determine whether the classic Bluetooth address and the BLE address are the same. If the classic Bluetooth address and the BLE address of the first device are the same, the first device will change the BLE address of the first device to be different from the classic Bluetooth address of the first device. For example, if the master-slave relationship of the first device is that of a slave device, and the master-slave relationship of the second device is that of a master device, and if the first classic Bluetooth address and the first BLE address of the first device are both A, then the first device can change the first BLE address to B.
[0118] It should be noted that the above-mentioned situation before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device may include: when all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and the target Bluetooth device (such as the second device mentioned above) is disconnected from other Bluetooth devices in the same group (such as the first device mentioned above), and then the target Bluetooth device re-establishes a Bluetooth connection with other Bluetooth devices in the same group; or, when all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and the target Bluetooth device is disconnected from other Bluetooth devices in the same group, and the target Bluetooth device determines that it cannot re-establish a Bluetooth connection with other Bluetooth devices in the same group (e.g., the distance between the first and second devices is too far, or the remaining battery power of the first device is insufficient, or the first device is placed in the headphone case and the headphone case is closed); or, other situations where the target Bluetooth device is preparing to re-establish a Bluetooth connection with the terminal device, which are not limited here.
[0119] The following explanation will take the first device as the first earphone and the second device as the second earphone as an example.
[0120] In some embodiments, the first device described above may be a first earphone, and the second device may be a second earphone, with the first and second earphones belonging to the same earphone device. Optionally, the first earphone may be the master earphone in the earphone device, and the second earphone may be the slave earphone in the earphone device. The master earphone may refer to the earphone in the earphone device that directly establishes a classic Bluetooth connection with other devices (such as the terminal device described above), while the slave earphone may refer to the earphone in the earphone device that does not directly establish a classic Bluetooth connection with other devices. The first and second earphones may share the same classic Bluetooth address, for example, the classic Bluetooth address of the master earphone, so that the earphone device can only be scanned by other devices using the classic Bluetooth address shared by the first and second earphones.
[0121] In some embodiments, before the first and second earpieces share the same classic Bluetooth address, the first and second earpieces can first establish a Bluetooth connection, and share the first classic Bluetooth address with the second earpiece through this Bluetooth connection, so that the second earpiece changes its second classic Bluetooth address to be the same as the first classic Bluetooth address. Furthermore, through the Bluetooth connection between the first and second earpieces, the first and second earpieces can also share their respective LE Audio Bluetooth connection information with the terminal device, such as the key, IRK, and other information used in LE Audio Bluetooth communication.
[0122] Optionally, the Bluetooth connection can be a classic Bluetooth connection. Before establishing the Bluetooth connection, the first classic Bluetooth address of the first earphone can be the classic Bluetooth address of the master earphone, and the second classic Bluetooth address of the second earphone can be the classic Bluetooth address of the slave earphone. The classic Bluetooth address of the master earphone can be different from the classic Bluetooth address of the slave earphone. The first earphone can establish a classic Bluetooth connection with the second earphone based on the second classic Bluetooth address of the second earphone.
[0123] Alternatively, the Bluetooth connection can also be a BLE connection, whereby the first earphone can establish a BLE connection with the second earphone based on the second BLE address of the second earphone.
[0124] In some embodiments, when the first and second earpieces are initially in operation, the first earpiece is the master earpiece and the second earpiece is the slave earpiece. The Bluetooth address of the first earpiece can be a public type Bluetooth address, meaning that the first classic Bluetooth address of the first earpiece is the same as the first BLE address. Optionally, the Bluetooth address of the second earpiece can be a public type Bluetooth address, meaning that the second BLE address of the second earpiece is the same as the second classic Bluetooth address before the change; alternatively, the Bluetooth address of the second earpiece can be a random type Bluetooth address, meaning that the second BLE address of the second earpiece is different from the second classic Bluetooth address before the change.
[0125] After the terminal device establishes a classic Bluetooth connection with the first earpiece, the second earpiece monitors the classic Bluetooth connection between the first earpiece and the terminal device; or, after the terminal device establishes a classic Bluetooth connection with the first earpiece, the first earpiece synchronizes the data transmitted between itself and the terminal device via the classic Bluetooth connection to the second earpiece. This achieves master-slave synchronization between the first and second earpieces.
[0126] Furthermore, after the terminal device establishes a classic Bluetooth connection with the first earpiece, the first earpiece can synchronize the connection information corresponding to the terminal device to the second earpiece. This connection information may include, but is not limited to, frequency hopping information, channel information, and clock information. The second earpiece can monitor the classic Bluetooth connection between the first earpiece and the terminal device based on the connection information, or the first earpiece can forward the data transmitted between itself and the terminal device via the classic Bluetooth connection to the second earpiece, ensuring that the first and second earpieces can synchronously obtain the data transmitted from the terminal device to the earpiece device via the classic Bluetooth connection.
[0127] For example, combined Figure 7A To explain, Figure 7A This is a timing diagram illustrating the establishment of a Bluetooth connection between a terminal device and an earphone device in one embodiment. For example... Figure 7AAs shown, in the headphone device, the first earphone is set as the master earphone by default, with its BT address (i.e., the first classic Bluetooth address mentioned above) being A and its BLE address (i.e., the first BLE address mentioned above) being A. The second earphone is set as the slave earphone by default, with its BT address (i.e., the second classic Bluetooth address mentioned above) being B and its BLE address (i.e., the second BLE address mentioned above) being B. The first earphone and the second earphone establish a Bluetooth connection and share information such as the first earphone's BT address and the BLE addresses of both earphones. The second earphone changes its BT address from B to A, that is, changes it to be the same as the first earphone's BT address.
[0128] After the terminal device establishes a classic Bluetooth connection with the first earphone based on its BT address A, the first earphone can share the connection information of the classic Bluetooth connection corresponding to the terminal device with the second earphone, enabling data synchronization between the first and second earphones. After the terminal device establishes a first LE Audio Bluetooth connection with the first earphone based on its BLE address A, the first earphone can share relevant information (such as keys) of the first LE Audio Bluetooth connection with the second earphone. After the terminal device establishes a second LE Audio Bluetooth connection with the second earphone based on its BLE address B, the second earphone can share relevant information of the second LE Audio Bluetooth connection with the first earphone.
[0129] The terminal device establishes both a classic Bluetooth connection and an LE Audio Bluetooth connection with the headphone device, meeting the user's audio data transmission needs in different scenarios and enabling dual-mode switching for the headphone device. Furthermore, this entire process can be implemented using the standard Bluetooth protocol, requiring no additional proprietary processing, resulting in low development costs and high versatility.
[0130] In some embodiments, the first and second earpieces in the headphone device may switch master / slave roles under certain scenarios. For example, if a user removes the first earpiece while still wearing the second, the first earpiece becomes the slave earpiece, and the second earpiece becomes the master earpiece. When the first earpiece becomes the slave earpiece and the second earpiece becomes the master earpiece, the connection target of the classic Bluetooth connection of the terminal device changes from the first earpiece to the second earpiece. The first earpiece monitors the classic Bluetooth connection between the second earpiece and the terminal device, or the second earpiece synchronizes the data transmitted between itself and the terminal device via the classic Bluetooth connection to the first earpiece. However, the first LE Audio Bluetooth connection between the terminal device and the first earpiece, and the second LE Audio Bluetooth connection between the terminal device and the second earpiece remain unchanged.
[0131] For example, combined Figure 7B To explain, Figure 7BThis is a timing diagram illustrating the master-slave switching process of the headphone device in one embodiment. For example... Figure 7B As shown, after the terminal device establishes a classic Bluetooth connection and a first LE Audio Bluetooth connection with the first earphone, and then establishes a second LE Audio Bluetooth connection with the second earphone, a master-slave switch occurs between the first and second earphones. The second earphone becomes the master earphone, and the first earphone becomes the slave earphone. The connection target of the terminal device's classic Bluetooth connection changes from the first earphone to the second earphone. The first earphone can monitor the classic Bluetooth connection between the second earphone and the terminal device, or the first earphone can synchronize the data transmitted between itself and the terminal device via the classic Bluetooth connection back to itself, thus achieving data synchronization between the first and second earphones. Optionally, in this scenario, the BT address and BLE address of the first earphone, and the BLE address of the second earphone, can remain unchanged.
[0132] In some embodiments, in certain scenarios, besides the master-slave switch between the first and second earphones, the first earphone may also disconnect from the terminal device via Bluetooth and stop receiving data transmitted by the terminal device. When the status information of the first earphone meets the stop-work condition, the first earphone switches to the slave earphone, the second earphone switches to the master earphone, and the connection object of the classic Bluetooth connection of the terminal device switches from the first earphone to the second earphone; the first earphone disconnects the first LE Audio Bluetooth connection with the terminal device and does not monitor the classic Bluetooth connection between the second earphone and the terminal device, and the second earphone does not synchronize data transmitted between the first earphone and the terminal device via the classic Bluetooth connection.
[0133] Optionally, the status information includes the remaining battery power, and the shutdown condition includes the remaining battery power being lower than a battery power threshold; and / or, the status information includes the status of being placed in the earphone case, and the shutdown condition includes the first earphone being placed in the earphone case and the earphone case being closed; and / or, the status information includes the signal strength of the Bluetooth signal sent to the terminal device, and the shutdown condition includes the signal strength being lower than a strength threshold; and / or, the status information includes the distance between the device and the terminal device, and the shutdown condition includes the distance being greater than a distance threshold, but is not limited thereto.
[0134] When the status information of the first earphone meets the stop working condition, it means that the first earphone needs to disconnect the Bluetooth connection with the terminal device. In this case, the first earphone disconnects the first LE Audio Bluetooth connection with the terminal device, and the first earphone and the second earphone do not need to synchronize data.
[0135] For example, combined Figure 7C To explain, Figure 7C This is a timing diagram illustrating the master-slave switching process of the headphone device in another embodiment. (See diagram below.) Figure 7CAs shown, after the terminal device establishes a classic Bluetooth connection and a first LE Audio Bluetooth connection with the first earphone, and then establishes a second LE Audio Bluetooth connection with the second earphone, a master-slave switch occurs between the first and second earphones. The second earphone becomes the master earphone, and the first earphone becomes the slave earphone. The second earphone needs to disconnect its Bluetooth connection with the terminal device. The connection target of the terminal device's classic Bluetooth connection changes from the first earphone to the second earphone. The first earphone disconnects its first LE Audio Bluetooth connection with the terminal device, and the first earphone does not need to synchronize the data transmitted between the second earphone and the terminal device via the classic Bluetooth connection. Optionally, in this scenario, the BT address and BLE address of the first earphone, and the BLE address of the second earphone, can remain unchanged. The second LE Audio Bluetooth connection between the terminal device and the second earphone remains unchanged. Optionally, in this scenario, the BT address and BLE address of the first earphone, and the BLE address of the second earphone, can remain unchanged.
[0136] In some embodiments, the headphone device may experience disconnections and reconnections with the terminal device in certain scenarios, such as after a master-slave switch between the first and second headphones. For example, if a user places the first headphone into the charging case while still wearing the second headphone, a master-slave switch occurs between the first and second headphones. Then, if the user turns the terminal device's Bluetooth off and then back on, the terminal device will first disconnect from both the first and second headphones before reconnecting. In these scenarios, the terminal device can reconnect to the headphone device.
[0137] Optionally, the terminal device can reconnect to the headset device, which may include: the terminal device and the headset device establishing a LEAudio reconnection. After the terminal device disconnects all Bluetooth connections with the headset device, if it receives a third LE Audio broadcast signal sent by the second headset (which has switched to being the primary headset), and determines that the modified second BLE address carried by the third LE Audio broadcast signal is the same as the reconnection BLE address stored in the terminal device, a third LE Audio Bluetooth connection is established with the second headset. This reconnection BLE address is the same as the first BLE address. The third LE Audio broadcast signal is sent by the second headset after it has changed its second classic Bluetooth address to be the same as its first classic Bluetooth address, and changed its second BLE address to be the same as both its first classic Bluetooth address and its first BLE address.
[0138] After the terminal device disconnects all Bluetooth connections with the headset device, and / or before the terminal device re-establishes a Bluetooth connection with the headset device, if the second headset is the primary headset, the second headset can change its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address.
[0139] After the terminal device disconnects all Bluetooth connections with the headset device, and / or before the terminal device re-establishes a Bluetooth connection with the headset device, the second headset can determine whether the current master-slave relationship is that of the master headset. If the second headset determines that the current master-slave relationship is that of the master headset, it can determine whether the current second BLE address of the second headset is the same as the changed second classic Bluetooth address (i.e., the same as the classic Bluetooth address of the master headset), or whether the current second BLE address is the same as the first classic Bluetooth address. If the current second BLE address is different from both the changed second classic Bluetooth address and the first classic Bluetooth address, the second headset can change its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address.
[0140] After the second headset changes its second BLE address to be identical to both the first classic Bluetooth address and the changed second classic Bluetooth address, it can send a third LE Audio broadcast signal based on the changed second BLE address. This allows the terminal device receiving the third LE Audio broadcast signal to obtain the changed second BLE address. The terminal device can then establish a LE Audio reconnection with the second headset based on the changed second BLE address.
[0141] Optionally, the terminal device may store connection records for establishing Bluetooth connections with the headset device. These connection records may include the classic Bluetooth address of the headset device (i.e., the classic Bluetooth address of the primary headset, the aforementioned first classic Bluetooth address), and may also include the first BLE address of the first headset when establishing a first LE Audio Bluetooth connection with the first headset. The terminal device can use the first BLE address stored in the connection record as the back-connection BLE address. Therefore, to ensure the terminal device can successfully back-connect to the headset device that has undergone a master-slave switch, the second headset, which has switched to the primary headset, can change its second BLE address to be the same as the changed second classic Bluetooth address, i.e., the same as the first BLE address stored in the connection record. After receiving a third LE Audio broadcast signal, the terminal device determines that the BLE address corresponding to the third LE Audio broadcast signal (i.e., the changed second BLE address) is the same as the first BLE address recorded in the connection record, and can then establish a LE Audio back-connection with the second headset.
[0142] Optionally, the terminal device can reconnect to the headset device, and may further include: the terminal device and the headset device performing a classic Bluetooth reconnection. After the terminal device disconnects all Bluetooth connections with the headset device, if the classic Bluetooth reconnection conditions are met, a classic Bluetooth reconnection is initiated based on the stored classic Bluetooth reconnection address, which is the first classic Bluetooth address.
[0143] Alternatively, the classic Bluetooth reconnection conditions include at least one of the following:
[0144] (1) The Bluetooth module of the terminal device and / or the headset device is turned on;
[0145] (2) After the connection is broken when the distance between the terminal device and the earphone device exceeds the Bluetooth connection distance range, the distance between the terminal device and the earphone device will fall back within the Bluetooth connection distance range.
[0146] (3) The terminal device determines that the modified second BLE address carried by the third LE Audio broadcast signal is the same as the backlink BLE address stored in the terminal device.
[0147] The terminal device will also use the first classic Bluetooth address stored in the connection record as the classic Bluetooth back-connection address to perform a classic Bluetooth back-connection with the second earphone. Since the second earphone has switched to the main earphone, its changed second classic Bluetooth address is the same as the first classic Bluetooth address, so the terminal device can successfully perform a classic Bluetooth back-connection with the second earphone.
[0148] For example, combined Figure 7D To explain, Figure 7C This is a timing diagram illustrating the master-slave switching process in another embodiment of the headphone device. For example... Figure 7D As shown, after a master-slave switch occurs in the headset device, the terminal device disconnects the Bluetooth connection with the first headset. In certain scenarios (such as when the terminal device turns off Bluetooth), the terminal device further disconnects the Bluetooth connection with the second headset (including the classic Bluetooth connection and the second LE Audio Bluetooth connection). After the terminal device disconnects all Bluetooth connections with the headset device, and / or, before re-establishing a Bluetooth connection with the headset device, the second headset can determine whether its master-slave relationship is still that of the master headset. If it determines that it is still the master headset, it further determines whether its BLE address is the same as the master headset's BT address (i.e., whether the BLE address is A). If they are different, it changes the BLE address to A, so that both the second headset's BT address and BLE address are A. The second headset can send a third LE Audio broadcast signal based on BLE address A. After receiving this third LE Audio broadcast signal, the terminal device can establish a third LE Audio Bluetooth connection with the second headset based on BLE address A. The terminal device can also reconnect to the second headset based on BT address A, establishing a classic Bluetooth connection with the second headset.
[0149] In some embodiments, after the headset device disconnects all Bluetooth connections with the terminal device, and / or before the terminal device re-establishes a Bluetooth connection with the headset device, if the first headset is a slave headset and the first classic Bluetooth address of the first headset is the same as the current first BLE address, then the first headset changes the current first BLE address to be different from the first classic Bluetooth address.
[0150] Optionally, when the terminal device disconnects all Bluetooth connections with the headset device, the second headset, acting as the master headset, can send an address confirmation command to the first headset, acting as the slave headset. The first headset can then determine whether the current first classic Bluetooth address and first BLE address are the same based on the address confirmation command. If they are the same, the first BLE address can be changed to be different from the first classic Bluetooth address. For example, when the first headset receives the address confirmation command, if its BT address is A and its BLE address is A, the first headset can change its BLE address from A to B, enabling the terminal device to re-establish a Bluetooth LE Audio connection with the first headset based on the BLE address B.
[0151] It should be noted that addresses A and B mentioned above are only examples of Bluetooth addresses and do not represent actual Bluetooth addresses. Actual Bluetooth addresses can be set or assigned according to the Bluetooth standard protocol.
[0152] In this application embodiment, a solution is provided for establishing both classic Bluetooth and LE Audio Bluetooth connections simultaneously between the terminal device and the headphone device in various scenarios involving master-slave switching, ensuring connection success rate and stability in different scenarios. Furthermore, the above connection processes can all be implemented according to the Bluetooth standard protocol without requiring additional proprietary processing, resulting in better versatility and lower development costs.
[0153] like Figure 8 As shown, in one embodiment, a Bluetooth connection method is provided, applicable to the aforementioned headphone device, which includes a first earphone and a second earphone. The method may include the following steps:
[0154] Step 810: The first earphone sends a first LE Audio broadcast signal based on the first BLE address, so that the terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address. The first BLE address is the same as the first classic Bluetooth address corresponding to the first earphone.
[0155] Step 820: The second earphone sends a second LE Audio broadcast signal based on the second BLE address, so that the terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address.
[0156] Step 830: The first headphone receiving terminal device establishes a first LE Audio Bluetooth connection with the terminal device based on the first LE Audio connection request sent by the first BLE address, and receives a first classic Bluetooth connection request sent by the receiving terminal device based on the first classic Bluetooth address, and establishes a classic Bluetooth connection with the terminal device based on the first classic Bluetooth connection request.
[0157] Step 840: The second earphone receives the second LE Audio connection request sent by the terminal device according to the second BLE address, and establishes a second LE Audio Bluetooth connection with the terminal device according to the second LE Audio connection request.
[0158] In some embodiments, the first LE Audio broadcast signal includes a first identifier, and the second LE Audio broadcast signal includes a second identifier. The first identifier and the second identifier are the same and are used to indicate that the first earphone and the second earphone belong to the same earphone device.
[0159] In some embodiments, the second LE Audio broadcast signal includes a non-displayable flag; the non-displayable flag is used to indicate that the BLE address corresponding to the LE Audio broadcast signal is not displayed in the terminal device.
[0160] In some embodiments, the first LE Audio broadcast signal further includes a first support marker, which is used to indicate support for the LE Audio Bluetooth protocol.
[0161] In some embodiments, before receiving the first classic Bluetooth connection request sent by the terminal device according to the first classic Bluetooth address, the method may further include: if the first earphone in the discoverable state receives a query instruction sent by the terminal device, then returns a query response to the terminal device according to the query instruction, so that the terminal device obtains the first classic Bluetooth address corresponding to the first earphone according to the query response.
[0162] In some embodiments, the query instruction carries a second support flag, which is used to indicate support for the LEAudio Bluetooth protocol.
[0163] In some embodiments, step 830 may include: the first headset receiving a first classic Bluetooth connection request sent by the terminal device according to a first classic Bluetooth address, and establishing a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request; the first headset receiving an inquiry instruction sent by the terminal device through the classic Bluetooth connection, and returning an acknowledgment instruction to the terminal device according to the inquiry instruction to indicate support for the LE Audio Bluetooth protocol; the first headset receiving a first LE Audio connection request sent by the terminal device according to a first BLE address, and establishing a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request.
[0164] In this embodiment, the terminal device can quickly connect to a headphone device that supports both Bluetooth Classic and BLE Audio via Bluetooth LE Audio and Bluetooth Classic, combining BLE Audio with Bluetooth Classic to meet the user's audio transmission needs in different scenarios.
[0165] In some embodiments, the first earpiece is the master earpiece of the headphone device, and the second earpiece is the slave earpiece of the headphone device; the method further includes: the first earpiece establishing a Bluetooth connection with the second earpiece and sending a first classic Bluetooth address to the second earpiece, so that the second earpiece changes the second classic Bluetooth address of the second earpiece to be the same as the first classic Bluetooth address;
[0166] The first classic Bluetooth address is the classic Bluetooth address corresponding to the master earphone, while the second classic Bluetooth address before the change was the classic Bluetooth address corresponding to the slave earphone. The second classic Bluetooth address before the change was different from the first classic Bluetooth address.
[0167] The second BLE address corresponding to the second earphone is the same as the second classic Bluetooth address before the change; or, the second BLE address corresponding to the second earphone is different from the second classic Bluetooth address before the change.
[0168] In some embodiments, after the first earpiece establishes a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request, the method further includes: the first earpiece synchronizing the connection information corresponding to the terminal device to the second earpiece; the second earpiece monitoring the classic Bluetooth connection between the first earpiece and the terminal device according to the connection information, or the first earpiece synchronizing the data transmitted between the first earpiece and the terminal device through the classic Bluetooth connection to the second earpiece.
[0169] In some embodiments, the method further includes: when the first earpiece switches to the slave earpiece and the second earpiece switches to the master earpiece, the connection object of the classic Bluetooth connection of the terminal device switches from the first earpiece to the second earpiece; the first earpiece listens to the classic Bluetooth connection between the second earpiece and the terminal device; or, the second earpiece synchronizes the data transmitted between the second earpiece and the terminal device through the classic Bluetooth connection to the first earpiece.
[0170] In some embodiments, the method further includes: when the status information of the first earphone meets the stop working condition, the first earphone switches to the slave earphone, the second earphone switches to the master earphone, and the connection object of the classic Bluetooth connection of the terminal device switches from the first earphone to the second earphone; the first earphone disconnects the first LE Audio Bluetooth connection with the terminal device, and does not listen to the classic Bluetooth connection between the second earphone and the terminal device, and the second earphone does not synchronize the data transmitted between the first earphone and the terminal device through the classic Bluetooth connection.
[0171] Optionally, the status information includes the remaining battery power, and the shutdown condition includes the remaining battery power being lower than a battery power threshold; and / or, the status information includes the status of being placed in the earphone case, and the shutdown condition includes the first earphone being placed in the earphone case and the earphone case being closed; and / or, the status information includes the signal strength of the Bluetooth signal sent to the terminal device, and the shutdown condition includes the signal strength being lower than a strength threshold; and / or, the status information includes the distance between the earphone and the terminal device, and the shutdown condition includes the distance being greater than a distance threshold.
[0172] In some embodiments, the method further includes: after the headset device disconnects all Bluetooth connections with the terminal device, and / or before the terminal device re-establishes a Bluetooth connection with the headset device, if the second headset is the primary headset, the second headset changes its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address; the second headset sends a third LE Audio broadcast signal based on the changed second BLE address, so that the terminal device receiving the third LE Audio broadcast signal obtains the changed second BLE address; the second headset receives a third LE Audio connection request sent by the terminal device based on the changed second BLE address, and establishes a third LE Audio Bluetooth connection with the terminal device based on the third LE Audio connection request, and receives a second classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, and establishes a classic Bluetooth connection with the terminal device based on the second classic Bluetooth connection request.
[0173] In some embodiments, if the second earphone is the master earphone, the second earphone changes its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address. This includes: if the second earphone determines that the current master-slave relationship is that of the master earphone, then determining whether the current second BLE address of the second earphone is the same as the changed second classic Bluetooth address, or determining whether the current second BLE address is the same as the first classic Bluetooth address; if the current second BLE address is different from both the changed second classic Bluetooth address and the first classic Bluetooth address, then the second earphone changes its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address.
[0174] In some embodiments, the method further includes: after the headphone device disconnects all Bluetooth connections with the terminal device, and / or before the terminal device re-establishes a Bluetooth connection with the headphone device, if the first headphone is a slave headphone and the first classic Bluetooth address of the first headphone is the same as the current first BLE address, then the first headphone changes the current first BLE address to be different from the first classic Bluetooth address.
[0175] It should be noted that the description of the Bluetooth connection method for headphone devices provided in the embodiments of this application can be referred to the relevant descriptions of the Bluetooth connection methods for terminal devices provided in the above embodiments, and will not be repeated here.
[0176] In this application embodiment, a solution is provided for establishing both classic Bluetooth and LE Audio Bluetooth connections simultaneously between the terminal device and the headphone device in various scenarios involving master-slave switching, ensuring connection success rate and stability in different scenarios. Furthermore, the above connection processes can all be implemented according to the Bluetooth standard protocol without requiring additional proprietary processing, resulting in better versatility and lower development costs.
[0177] In one embodiment, a Bluetooth address control method is provided, applicable to a target Bluetooth device, which belongs to the same group of Bluetooth devices as at least one other Bluetooth device. The method includes:
[0178] After all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, determine the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices, and set the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship;
[0179] In this group of Bluetooth devices, the classic Bluetooth address of the master device is used to enable the terminal device to establish a classic Bluetooth connection with the master device; the BLE address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a LEAudio Bluetooth connection with the master device; and the BLE address of the slave device in the same group of Bluetooth devices is used to enable the terminal device to establish a LEAudio Bluetooth connection with the slave device.
[0180] In one embodiment, determining the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices, and setting the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship, includes: if the target Bluetooth device is determined to be a master device in the same group of Bluetooth devices, and the classic Bluetooth address and BLE address of the target Bluetooth device are different, then the BLE address of the target Bluetooth device is changed to be the same as the classic Bluetooth address of the target Bluetooth device.
[0181] In one embodiment, determining the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices, and setting the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship, includes: if the target Bluetooth device is determined to be a master device in the same group of Bluetooth devices, and the classic Bluetooth address and BLE address of the target Bluetooth device are the same, then the BLE address and classic Bluetooth address of the target Bluetooth device are kept unchanged.
[0182] In one embodiment, determining the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices, and setting the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship, includes: if the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices is determined to be that of a slave device, and the classic Bluetooth address and the BLE address of the target Bluetooth device are the same, then changing the BLE address of the target Bluetooth device to be different from the classic Bluetooth address of the target Bluetooth device.
[0183] In one embodiment, when a master device and a slave device establish a Bluetooth connection in the same group of Bluetooth devices, the classic Bluetooth address of the slave device is the same as that of the master device; when both the master device and the slave device establish LE Audio Bluetooth connections with the terminal device, the BLE address of the slave device is different from that of the master device.
[0184] It should be noted that the description of the Bluetooth address control method for the target Bluetooth device provided in the embodiments of this application can be referred to the relevant descriptions of the Bluetooth connection method for the terminal device and / or the Bluetooth connection method for the headphone device provided in the above embodiments, and will not be repeated here.
[0185] In this application embodiment, a solution is provided for establishing both classic Bluetooth and LE Audio Bluetooth connections simultaneously with a terminal device and the same group of Bluetooth devices in various scenarios involving master-slave switching, ensuring connection success rate and stability in different scenarios. Furthermore, the above connection processes can all be implemented according to the Bluetooth standard protocol without requiring additional proprietary special processing, resulting in better versatility and lower development costs.
[0186] like Figure 9 As shown, in one embodiment, a Bluetooth connection method is provided, which can be applied to the first device described above. The method may include the following steps:
[0187] Step 910: Send a first LE Audio broadcast signal based on the first BLE address, so that the terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address; the first BLE address is the same as the first classic Bluetooth address corresponding to the first device.
[0188] Step 920: Receive a first LE Audio connection request sent by the terminal device according to the first BLE address, establish a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request, and receive a first classic Bluetooth connection request sent by the terminal device according to the first classic Bluetooth address, establish a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request.
[0189] In one embodiment, the first LE Audio broadcast signal includes a first identity identifier, which is the same as the second identity identifier contained in the second LE Audio broadcast signal sent by the second device, and the first device and the second device belong to the same group of Bluetooth devices.
[0190] In one embodiment, the first LE Audio broadcast signal further includes a first support marker, which is used to indicate support for the LE Audio Bluetooth protocol.
[0191] In one embodiment, before receiving the first classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, the method further includes: if the first device in a discoverable state receives a query instruction sent by the terminal device, then returns a query response to the terminal device based on the query instruction, so that the terminal device obtains the first classic Bluetooth address corresponding to the first device based on the query response.
[0192] In one embodiment, the query instruction carries a second support flag, which is used to indicate support for the LEAudio Bluetooth protocol.
[0193] It should be noted that the description of the Bluetooth connection method applied to the first device provided in the embodiments of this application can be referred to the relevant description of the Bluetooth connection method applied to the terminal device provided in the above embodiments, and will not be repeated here.
[0194] In this embodiment, the terminal device can quickly establish Bluetooth LE Audio and Bluetooth LE Audio connections with devices that simultaneously support Bluetooth Classic and BLE Audio, combining BLE Audio with Bluetooth Classic to meet users' audio transmission needs in different scenarios.
[0195] like Figure 10 As shown, in one embodiment, a Bluetooth connection method is provided, which can be applied to the second device described above. The method may include the following steps:
[0196] Step 1010: Send a second LE Audio broadcast signal based on the second BLE address so that the terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address.
[0197] Step 1020: Receive a second LE Audio connection request sent by the terminal device according to the second BLE address, and establish a second LE Audio Bluetooth connection with the terminal device according to the second LE Audio connection request. The first device and the second device belong to the same group of Bluetooth devices. The second LE Audio connection request is sent by the terminal device when it detects a Bluetooth connection operation for the connection information corresponding to the Bluetooth devices in the same group.
[0198] In one embodiment, the second LE Audio broadcast signal includes a second identity identifier, which is the same as the first identity identifier contained in the first LE Audio broadcast signal sent by the first device.
[0199] In one embodiment, the second LE Audio broadcast signal includes a non-displayable flag, which indicates that the BLE address corresponding to the LE Audio broadcast signal is not displayed in the terminal device.
[0200] It should be noted that the description of the Bluetooth connection method for the second device provided in the embodiments of this application can be referred to the relevant description of the Bluetooth connection method for the terminal device provided in the above embodiments, and will not be repeated here.
[0201] In this embodiment, the user only needs to perform a Bluetooth connection operation once on the terminal device to trigger the terminal device to establish LE Audio Bluetooth connections with the first and second devices belonging to the same group, as well as establish a Classic Bluetooth connection with the first device. This allows for quick LE Audio Bluetooth and Classic Bluetooth connections with devices that support both Classic Bluetooth and BLE Audio, combining BLE Audio and Classic Bluetooth to meet the user's audio transmission needs in different scenarios.
[0202] like Figure 11 As shown, in one embodiment, a Bluetooth connection device 1100 is provided, which can be applied to the terminal device described above. The Bluetooth connection device 1100 includes a first address determination module 1110, a second address determination module 1120, an output module 1130, and a connection module 1140.
[0203] The first address determination module 1110 is used to determine the first low-power Bluetooth BLE address corresponding to the first device and the first classic Bluetooth address corresponding to the first device.
[0204] In one embodiment, the first address determination module 1110 is further configured to receive a first LEAudio broadcast signal sent by the first device, and determine the first BLE address corresponding to the first device based on the first LEAudio broadcast signal.
[0205] The second address determination module 1120 is used to determine the second BLE address corresponding to the second device, and the first device and the second device belong to the same group of Bluetooth devices.
[0206] In one embodiment, the second address determination module 1120 is further configured to receive a second LEAudio broadcast signal sent by the second device, and determine the second BLE address corresponding to the second device based on the second LEAudio broadcast signal.
[0207] Output module 1130 is used to output only one connection information corresponding to the same group of Bluetooth devices.
[0208] In one embodiment, the second LE Audio broadcast signal includes a non-displayable identifier; the non-displayable identifier is used to indicate that the BLE address corresponding to the LE Audio broadcast signal is not displayed in the terminal device; the first BLE address corresponding to the first device is the same as the first classic Bluetooth address and the second device is the same as the current second classic Bluetooth address.
[0209] The output module 1130 is further configured to output only one connection information corresponding to both the first classic Bluetooth address and the first BLE address, and not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal; or, output only one connection information corresponding to both the first classic Bluetooth address, the first BLE address, and the current second classic Bluetooth address, and not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal; or, output only one connection information corresponding to both the first classic Bluetooth address and the current second classic Bluetooth address, and not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal; or, output only one connection information corresponding to the first classic Bluetooth address, and not output the connection information corresponding to the second BLE address based on the non-displayable identifier contained in the second LE Audio broadcast signal.
[0210] The connection module 1140 is configured to, if a Bluetooth connection operation for the connection information is detected, establish a first LE Audio Bluetooth connection with a first device based on a first BLE address, establish a classic Bluetooth connection with the first device based on a first classic Bluetooth address, and establish a second LE Audio Bluetooth connection with a second device based on a second BLE address.
[0211] In one embodiment, the Bluetooth connection device 1100 further includes an identity verification module.
[0212] The identity verification module is also used to determine, based on the first LE Audio broadcast signal and the second LE Audio broadcast signal, that the first device and the second device belong to the same group of Bluetooth devices.
[0213] The connection module 1140 is also used to establish a second LE Audio Bluetooth connection with the second headset based on the second BLE address, when it is determined that the first device and the second device belong to the same group of Bluetooth devices.
[0214] In one embodiment, the first LE Audio broadcast signal includes a first identity identifier, and the second LE Audio broadcast signal includes a second identity identifier. The identity verification module is further configured to determine that the first device and the second device belong to the same group of Bluetooth devices if the first identity identifier and the second identity identifier are the same.
[0215] In one embodiment, the Bluetooth connection device 1100 further includes a support judgment module.
[0216] The support judgment module is used to parse the first LE Audio broadcast signal to determine whether the first LE Audio broadcast signal carries a first support tag based on the parsing result. The first support tag is used to indicate support for the LE Audio Bluetooth protocol. If the first LE Audio broadcast signal carries the first support tag, the connection module 1140 performs a Bluetooth connection operation for the connection information to be detected, and establishes a first LE Audio Bluetooth connection with the first device based on the first BLE address.
[0217] In one embodiment, the first address determination module 1110 is further configured to query Bluetooth devices existing within a first distance range and determine the first classic Bluetooth address corresponding to the first device based on the query response returned by the first device.
[0218] In one embodiment, the support judgment module is further configured to determine whether the first device supports the LEAudio Bluetooth protocol based on the query response; and if it is determined that the first device supports the LEAudio Bluetooth protocol, the connection module 1140 performs a Bluetooth connection operation for the connection information to be detected, and establishes a first LEAudio Bluetooth connection with the first device based on the first BLE address.
[0219] In one embodiment, the support judgment module is further configured to, after establishing a classic Bluetooth connection with the first device through the connection module 1140 based on the first classic Bluetooth address, send an inquiry instruction to the first device through the classic Bluetooth connection, the inquiry instruction being used to inquire whether the first device supports the LE Audio Bluetooth protocol; and if a confirmation instruction indicating support for the LE Audio Bluetooth protocol is received from the first device, then establish a first LE Audio Bluetooth connection with the first device through the connection module 1140 based on the first BLE address.
[0220] In this embodiment, the user only needs to perform a Bluetooth connection operation once on the terminal device to trigger the terminal device to establish LE Audio Bluetooth connections with the first and second devices belonging to the same group, as well as establish a Classic Bluetooth connection with the first device. This allows for quick LE Audio Bluetooth and Classic Bluetooth connections with devices that support both Classic Bluetooth and BLE Audio, combining BLE Audio and Classic Bluetooth to meet the user's audio transmission needs in different scenarios.
[0221] In one embodiment, the first device includes a first earphone, and the second device includes a second earphone, the first earphone and the second earphone belonging to the same earphone device; the first earphone is the master earphone of the earphone device, and the second earphone is the slave earphone of the earphone device; after the terminal device establishes a classic Bluetooth connection with the first earphone, the second earphone listens to the classic Bluetooth connection between the first earphone and the terminal device; or, after the terminal device establishes a classic Bluetooth connection with the first earphone, the first earphone synchronizes the data transmitted between the terminal device and the terminal device through the classic Bluetooth connection to the second earphone.
[0222] In one embodiment, the connection module 1140 is further configured to establish a third LE Audio Bluetooth connection with the second earphone after the terminal device disconnects all Bluetooth connections with the earphone device, if it receives a third LE Audio broadcast signal sent by the second earphone that has switched to the main earphone, and determines that the modified second BLE address carried by the third LE Audio broadcast signal is the same as the backlink BLE address stored by the terminal device, and the backlink BLE address is the same as the first BLE address.
[0223] The third LE Audio broadcast signal is sent after the second earphone changes its second classic Bluetooth address to be the same as its first classic Bluetooth address, and changes its second BLE address to be the same as both the first classic Bluetooth address and the first BLE address.
[0224] In one embodiment, the connection module 1140 is further configured to initiate a classic Bluetooth reconnection based on a stored classic Bluetooth reconnection address if the classic Bluetooth reconnection condition is met after the terminal device disconnects all Bluetooth connections with the headphone device. The classic Bluetooth reconnection address is a first classic Bluetooth address.
[0225] The classic Bluetooth reconnection conditions include at least one of the following:
[0226] The terminal device and / or headset device enable the Bluetooth module;
[0227] After the connection is lost when the distance between the terminal device and the earphone device exceeds the Bluetooth connection range, the distance between the terminal device and the earphone device will return to the Bluetooth connection range.
[0228] The terminal device determines that the modified second BLE address carried by the third LE Audio broadcast signal is the same as the backlink BLE address stored in the terminal device.
[0229] In this application embodiment, a solution is provided for establishing both classic Bluetooth and LE Audio Bluetooth connections simultaneously between the terminal device and the headphone device in various scenarios involving master-slave switching, ensuring connection success rate and stability in different scenarios. Furthermore, the above connection processes can all be implemented according to the Bluetooth standard protocol without requiring additional proprietary processing, resulting in better versatility and lower development costs.
[0230] like Figure 12 As shown, in one embodiment, a Bluetooth connection device 1200 is provided, which can be applied to the aforementioned headphone device, which includes a first headphone and a second headphone. The Bluetooth connection device 1200 may include a first broadcast module 1210, a second broadcast module 1220, a first connection module 1230, and a second connection module 1240.
[0231] The first broadcast module 1210 is used to broadcast a first BLE address and a first LE Audio signal from the first earphone, so that the terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address, the first BLE address being the same as the first classic Bluetooth address corresponding to the first earphone.
[0232] The second broadcast module 1220 is used to send a second LE Audio broadcast signal by the second headset based on the second BLE address, so that the terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address.
[0233] The first connection module 1230 is used to receive a first LE Audio connection request sent by the first earphone terminal device according to the first BLE address, establish a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request, and receive a first classic Bluetooth connection request sent by the terminal device according to the first classic Bluetooth address, and establish a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request.
[0234] The second connection module 1240 is used to receive a second LE Audio connection request sent by the terminal device according to the second BLE address by the second headset, and to establish a second LE Audio Bluetooth connection with the terminal device according to the second LE Audio connection request.
[0235] In one embodiment, the first LE Audio broadcast signal includes a first identifier, and the second LE Audio broadcast signal includes a second identifier. The first identifier and the second identifier are the same and are used to indicate that the first earphone and the second earphone belong to the same earphone device.
[0236] In one embodiment, the second LE Audio broadcast signal includes a non-displayable identifier; the non-displayable identifier is used to indicate that the BLE address corresponding to the LE Audio broadcast signal is not displayed in the terminal device.
[0237] In one embodiment, the first LE Audio broadcast signal further includes a first support marker, which is used to indicate support for the LE Audio Bluetooth protocol.
[0238] In one embodiment, the Bluetooth connectivity device 1200 further includes a response module.
[0239] The response module is used so that if the first earpiece, which is in a discoverable state, receives a query command sent by the terminal device, the first earpiece returns a query response to the terminal device according to the query command, so that the terminal device can obtain the first classic Bluetooth address corresponding to the first earpiece according to the query response.
[0240] In one embodiment, the query instruction carries a second support flag, which is used to indicate support for the LEAudio Bluetooth protocol.
[0241] In one embodiment, the first connection module 1230 is further configured to: receive a first classic Bluetooth connection request sent by the terminal device according to a first classic Bluetooth address; establish a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request; receive an inquiry instruction sent by the terminal device through the classic Bluetooth connection; return an acknowledgment instruction to the terminal device according to the inquiry instruction to indicate support for the LE Audio Bluetooth protocol; and receive a first LE Audio connection request sent by the terminal device according to a first BLE address; establish a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request.
[0242] In this embodiment, the terminal device can quickly connect to a headphone device that supports both Bluetooth Classic and BLE Audio via Bluetooth LE Audio and Bluetooth Classic, combining BLE Audio with Bluetooth Classic to meet the user's audio transmission needs in different scenarios.
[0243] In one embodiment, the first earpiece is the master earpiece of the headphone device, and the second earpiece is the slave earpiece of the headphone device. The Bluetooth connection device 1200 described above also includes a sharing module.
[0244] The sharing module is used to establish a Bluetooth connection between the first earphone and the second earphone, and send a first classic Bluetooth address to the second earphone so that the second earphone changes its second classic Bluetooth address to be the same as the first classic Bluetooth address; wherein, the first classic Bluetooth address is the classic Bluetooth address corresponding to the master earphone, and the second classic Bluetooth address before the change is the classic Bluetooth address corresponding to the slave earphone, and the second classic Bluetooth address before the change is different from the first classic Bluetooth address.
[0245] In one embodiment, the second BLE address corresponding to the second earphone is the same as the second classic Bluetooth address before the change; or, the second BLE address corresponding to the second earphone is different from the second classic Bluetooth address before the change.
[0246] In one embodiment, the Bluetooth connection device 1200 described above further includes a synchronization module.
[0247] The synchronization module is used to synchronize the connection information of the terminal device from the first earpiece to the second earpiece; and for the second earpiece to monitor the classic Bluetooth connection between the first earpiece and the terminal device based on the connection information, or for the first earpiece to synchronize the data transmitted between itself and the terminal device via the classic Bluetooth connection to the second earpiece.
[0248] In one embodiment, the synchronization module is further configured to, when the first earpiece switches to the slave earpiece and the second earpiece switches to the master earpiece, switch the connection object of the classic Bluetooth connection of the terminal device from the first earpiece to the second earpiece, and the first earpiece monitors the classic Bluetooth connection between the second earpiece and the terminal device, or the second earpiece synchronizes the data transmitted between the second earpiece and the terminal device through the classic Bluetooth connection to the first earpiece.
[0249] In one embodiment, the synchronization module is further configured to, when the status information of the first earphone meets the stop working condition, switch the first earphone to the slave earphone, switch the second earphone to the master earphone, and switch the connection object of the classic Bluetooth connection of the terminal device from the first earphone to the second earphone; disconnect the first LE Audio Bluetooth connection between the first earphone and the terminal device, and not monitor the classic Bluetooth connection between the second earphone and the terminal device, and the second earphone does not synchronize with the first earphone, and transmit data between the second earphone and the terminal device through the classic Bluetooth connection.
[0250] Optionally, the status information includes the remaining battery power, and the shutdown condition includes the remaining battery power being lower than a battery power threshold; and / or, the status information includes the status of being placed in the earphone case, and the shutdown condition includes the first earphone being placed in the earphone case and the earphone case being closed; and / or, the status information includes the signal strength of the Bluetooth signal sent to the terminal device, and the shutdown condition includes the signal strength being lower than a strength threshold; and / or, the status information includes the distance between the earphone and the terminal device, and the shutdown condition includes the distance being greater than a distance threshold.
[0251] In one embodiment, the Bluetooth connection device 1200 further includes a first modification module, which is used to modify the second BLE address of the second earphone to be the same as both the first classic Bluetooth address and the modified second classic Bluetooth address after the earphone device disconnects all Bluetooth connections with the terminal device and / or before the terminal device re-establishes a Bluetooth connection with the earphone device, if the second earphone is the master earphone.
[0252] In one embodiment, the first modification module is further configured to, after the headset device disconnects all Bluetooth connections with the terminal device, and / or before the terminal device re-establishes a Bluetooth connection with the headset device, if the second headset determines that the current master-slave relationship is that of the master headset, determine whether the current second BLE address of the second headset is the same as the modified second classic Bluetooth address, or determine whether the current second BLE address is the same as the first classic Bluetooth address; and if the current second BLE address is different from both the modified second classic Bluetooth address and the first classic Bluetooth address, then the second headset changes the second BLE address of the second headset to be the same as both the first classic Bluetooth address and the modified second classic Bluetooth address.
[0253] The second broadcast module 1220 is also used to send a third LE Audio broadcast signal by the second headset based on the modified second BLE address, so that the terminal device receiving the third LE Audio broadcast signal can obtain the modified second BLE address.
[0254] The second connection module 1240 is further configured to receive a third LE Audio connection request sent by the second headset terminal device according to the modified second BLE address, and establish a third LE Audio Bluetooth connection with the terminal device according to the third LE Audio connection request, and to receive a second classic Bluetooth connection request sent by the terminal device according to the first classic Bluetooth address, and establish a classic Bluetooth connection with the terminal device according to the second classic Bluetooth connection request.
[0255] In one embodiment, the Bluetooth connection device 1200 further includes a second modification module. The second modification module is configured to, after the headset device disconnects all Bluetooth connections with the terminal device and / or before the terminal device re-establishes a Bluetooth connection with the headset device, if the first headset is a slave headset and the first classic Bluetooth address of the first headset is the same as the current first BLE address, change the current first BLE address to be different from the first classic Bluetooth address.
[0256] In this application embodiment, a solution is provided for establishing both classic Bluetooth and LE Audio Bluetooth connections simultaneously between the terminal device and the headphone device in various scenarios involving master-slave switching, ensuring connection success rate and stability in different scenarios. Furthermore, the above connection processes can all be implemented according to the Bluetooth standard protocol without requiring additional proprietary processing, resulting in better versatility and lower development costs.
[0257] like Figure 13 As shown, in one embodiment, a Bluetooth connection device 1300 is provided, which can be applied to the first device described above. The Bluetooth connection device 1300 may include a first broadcast module 1310 and a first connection module 1320.
[0258] The first broadcast module 1310 is used to send a first LE Audio broadcast signal based on a first BLE address, so that the terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address; the first BLE address is the same as the first classic Bluetooth address corresponding to the first device.
[0259] The first connection module 1320 is configured to receive a first LE Audio connection request sent by the terminal device according to a first BLE address, establish a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request, and receive a first classic Bluetooth connection request sent by the terminal device according to a first classic Bluetooth address, establish a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request.
[0260] In one embodiment, the first LE Audio broadcast signal includes a first identity identifier, which is the same as the second identity identifier contained in the second LE Audio broadcast signal sent by the second device, and the first device and the second device belong to the same group of Bluetooth devices.
[0261] In one embodiment, the first LE Audio broadcast signal further includes a first support marker, which is used to indicate support for the LE Audio Bluetooth protocol.
[0262] In one embodiment, the Bluetooth connectivity device 1300 further includes a response module.
[0263] The response module is used to return a query response to the terminal device according to the query command if the first device in the discoverable state receives a query command sent by the terminal device, so that the terminal device can obtain the first classic Bluetooth address corresponding to the first device according to the query response.
[0264] In one embodiment, the query instruction carries a second support flag, which is used to indicate support for the LEAudio Bluetooth protocol.
[0265] In this embodiment, the terminal device can quickly establish Bluetooth LE Audio and Bluetooth LE Audio connections with devices that simultaneously support Bluetooth Classic and BLE Audio, combining BLE Audio with Bluetooth Classic to meet users' audio transmission needs in different scenarios.
[0266] like Figure 14 As shown, in one embodiment, a Bluetooth connection device 1400 is provided, which can be applied to the second device described above. The Bluetooth connection device 1400 includes a second broadcast module 1410 and a second connection module 1420.
[0267] The second broadcast module 1410 is used to send a second LE Audio broadcast signal based on the second BLE address, so that the terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address.
[0268] The second connection module 1420 is used to receive a second LE Audio connection request sent by the terminal device according to the second BLE address, and to establish a second LE Audio Bluetooth connection with the terminal device according to the second LE Audio connection request. The first device and the second device belong to the same group of Bluetooth devices. The second LE Audio connection request is sent by the terminal device when it detects a Bluetooth connection operation for the connection information corresponding to the Bluetooth device in the same group.
[0269] In one embodiment, the second LE Audio broadcast signal includes a second identity identifier, which is the same as the first identity identifier contained in the first LE Audio broadcast signal sent by the first device.
[0270] In one embodiment, the second LE Audio broadcast signal includes a non-displayable flag, which indicates that the BLE address corresponding to the LE Audio broadcast signal is not displayed in the terminal device.
[0271] In this embodiment, the user only needs to perform a Bluetooth connection operation once on the terminal device to trigger the terminal device to establish LE Audio Bluetooth connections with the first and second devices belonging to the same group, as well as establish a Classic Bluetooth connection with the first device. This allows for quick LE Audio Bluetooth and Classic Bluetooth connections with devices that support both Classic Bluetooth and BLE Audio, combining BLE Audio and Classic Bluetooth to meet the user's audio transmission needs in different scenarios.
[0272] In one embodiment, a Bluetooth address control device is provided, applied to a target Bluetooth device, the target Bluetooth device and at least one other Bluetooth device belonging to the same group of Bluetooth devices, the device including an address setting module.
[0273] The address setting module is used to determine the master-slave relationship of the target Bluetooth device in the same group of Bluetooth devices after all Bluetooth connections between the target Bluetooth device and the terminal device have been disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, and to set the classic Bluetooth address and BLE address of the target Bluetooth device according to the master-slave relationship.
[0274] Specifically, the classic Bluetooth address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a classic Bluetooth connection with the master device; the BLE address of the master device in the same group of Bluetooth devices is used to enable the terminal device to establish a LE Audio Bluetooth connection with the master device; and the BLE address of the slave device in the same group of Bluetooth devices is used to enable the terminal device to establish a LE Audio Bluetooth connection with the slave device.
[0275] In one embodiment, the address setting module is further configured to, after all Bluetooth connections between the same group of Bluetooth devices and the terminal device have been disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, if it is determined that the target Bluetooth device is the master device in the same group of Bluetooth devices and that the classic Bluetooth address and the BLE address of the target Bluetooth device are different, change the BLE address of the target Bluetooth device to be the same as the classic Bluetooth address of the target Bluetooth device.
[0276] In one embodiment, the address setting module is further configured to, after all Bluetooth connections between the same group of Bluetooth devices and the terminal device are disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, if it is determined that the target Bluetooth device is the master device in the same group of Bluetooth devices and that the classic Bluetooth address and the BLE address of the target Bluetooth device are the same, then keep the BLE address and the classic Bluetooth address of the target Bluetooth device unchanged.
[0277] In one embodiment, the address setting module is further configured to, after all Bluetooth connections between the same group of Bluetooth devices and the terminal device have been disconnected, and / or before the target Bluetooth device re-establishes a Bluetooth connection with the terminal device, if it is determined that the target Bluetooth device is a slave device in the same group of Bluetooth devices and that the classic Bluetooth address and the BLE address of the target Bluetooth device are the same, change the BLE address of the target Bluetooth device to be different from the classic Bluetooth address of the target Bluetooth device.
[0278] In one embodiment, when a master device and a slave device establish a Bluetooth connection in the same group of Bluetooth devices, the classic Bluetooth address of the slave device is the same as that of the master device; when both the master device and the slave device establish LE Audio Bluetooth connections with the terminal device, the BLE address of the slave device is different from that of the master device.
[0279] Figure 15 This is a structural block diagram of a terminal device in one embodiment. For example... Figure 15 As shown, the terminal device 1500 may include one or more of the following components: a processor 1510 and a memory 1520 coupled to the processor 1510, wherein the memory 1520 may store one or more computer programs, which may be configured to implement the Bluetooth connection method for the terminal device as described in the above embodiments when executed by one or more processors 1510.
[0280] Processor 1510 may include one or more processing cores. Processor 1510 connects to various parts within the terminal device 1500 using various interfaces and lines, and performs various functions and processes data of the terminal device 1500 by running or executing instructions, programs, code sets, or instruction sets stored in memory 1520, and by calling data stored in memory 1520. Optionally, processor 1510 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1510 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1510 and may be implemented separately through a communication chip.
[0281] The memory 1520 may include random access memory (RAM) or read-only memory (ROM). The memory 1520 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1520 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created by the terminal device 1500 during use.
[0282] The terminal device 1500 may also include a Bluetooth module, which can be used to provide Bluetooth communication functionality, establish Bluetooth connections with other electronic devices, and perform Bluetooth data transmission. The Bluetooth module may support one or more Bluetooth protocols (such as Classic Bluetooth, BLE, BLE Audio, etc.), but is not limited to these, and may change as Bluetooth protocols evolve.
[0283] Understandably, the terminal device 1500 may include more or fewer structural elements than those shown in the above block diagram, such as power modules, physical buttons, sensors, etc., and is not limited herein.
[0284] This application discloses an earphone device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to implement the Bluetooth connection method for the earphone device as described in the above embodiments.
[0285] This application discloses an electronic device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to implement the Bluetooth address control method for a target Bluetooth device as described in the above embodiments.
[0286] This application discloses an electronic device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it causes the processor to implement the Bluetooth connection method for a first device as described in the above embodiments, and / or causes the processor to implement the Bluetooth connection method for a second device as described in the above embodiments.
[0287] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the Bluetooth connection method for a terminal device as described in the above embodiments.
[0288] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the Bluetooth connection method for a headphone device as described in the above embodiments.
[0289] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the Bluetooth address control method for a target Bluetooth device as described in the above embodiments.
[0290] This application discloses a computer-readable storage medium storing a computer program, wherein when executed by a processor, the computer program implements the Bluetooth connection method for a first device as described in the above embodiments, and / or causes the processor to implement the Bluetooth connection method for a second device as described in the above embodiments.
[0291] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the Bluetooth connection method for a terminal device as described in the above embodiments.
[0292] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the Bluetooth connection method for a headphone device as described in the above embodiments.
[0293] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the Bluetooth address control method for a target Bluetooth device as described in the above embodiments.
[0294] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the Bluetooth connection method for a first device as described in the above embodiments, and / or causes the processor to implement the Bluetooth connection method for a second device as described in the above embodiments. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, ROM, etc.
[0295] Any references to memory, storage, databases, or other media used herein may include non-volatile and / or volatile memory. Suitable non-volatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache. By way of illustration and not limitation, RAM may take many forms, such as Static RAM (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
[0296] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0297] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply 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.
[0298] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0299] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0300] The Bluetooth connection method, apparatus, headphone device, and storage medium disclosed in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A Bluetooth connection method, characterized by, Applied to a terminal device, the method includes: Determine the first low-power Bluetooth BLE address corresponding to the first device, and determine the first classic Bluetooth address corresponding to the first device; Determine the second BLE address corresponding to the second device, where the first device and the second device belong to the same group of Bluetooth devices; Output only one connection information corresponding to the same group of Bluetooth devices, including: output only one connection information corresponding to the first classic Bluetooth address, and do not output the connection information corresponding to the second BLE address; If a Bluetooth connection operation for the connection information is detected, a first LE Audio Bluetooth connection is established with the first device based on the first BLE address, a classic Bluetooth connection is established with the first device based on the first classic Bluetooth address, and a second LE Audio Bluetooth connection is established with the second device based on the second BLE address, while simultaneously maintaining the first LE Audio Bluetooth connection, the classic Bluetooth connection, and the second LE Audio Bluetooth connection.
2. The method of claim 1, wherein, Determining the first low-power Bluetooth BLE address corresponding to the first device includes: Receive a first LE Audio broadcast signal sent by a first device, and determine a first BLE address corresponding to the first device based on the first LE Audio broadcast signal; and / or, Determining the second BLE address corresponding to the second device includes: Receive the second LE Audio broadcast signal sent by the second device, and determine the second BLE address corresponding to the second device based on the second LE Audio broadcast signal.
3. The method according to claim 2, characterized in that, Before establishing a second LE Audio Bluetooth connection with the second device based on the second BLE address, the method further includes: Based on the first LE Audio broadcast signal and the second LE Audio broadcast signal, it is determined that the first device and the second device belong to the same group of Bluetooth devices; The step of establishing a second LE Audio Bluetooth connection with the second device based on the second BLE address includes: If it is determined that the first device and the second device belong to the same group of Bluetooth devices, a second LE Audio Bluetooth connection is established with the second device based on the second BLE address.
4. The method according to claim 3, characterized in that, The first LE Audio broadcast signal includes a first identifier, and the second LE Audio broadcast signal includes a second identifier; determining that the first device and the second device belong to the same group of Bluetooth devices based on the first LE Audio broadcast signal and the second LE Audio broadcast signal includes: If the first identity identifier is the same as the second identity identifier, it is determined that the first device and the second device belong to the same group of Bluetooth devices.
5. The method according to claim 2, characterized in that, The second LE Audio broadcast signal includes a non-displayable identifier; the non-displayable identifier is used to indicate that the connection information corresponding to the BLE address in the LE Audio broadcast signal is not displayed on the terminal device; the first BLE address corresponding to the first device is the same as the first classic Bluetooth address and the second device is the same as the current second classic Bluetooth address; The step of outputting only one connection information corresponding to the same group of Bluetooth devices includes: Only one connection request information corresponding to both the first classic Bluetooth address and the first BLE address is output, and based on the non-displayable identifier contained in the second LE Audio broadcast signal, no connection request information corresponding to the second BLE address is output; or, Only one connection request information corresponding to the first classic Bluetooth address, the first BLE address, and the current second classic Bluetooth address is output, and based on the non-displayable identifier contained in the second LE Audio broadcast signal, no connection request information corresponding to the second BLE address is output; or, Output only one connection request information corresponding to both the first classic Bluetooth address and the current second classic Bluetooth address, and based on the non-displayable identifier contained in the second LE Audio broadcast signal, do not output the connection request information corresponding to the second BLE address; or, Only one connection information corresponding to the first classic Bluetooth address is output, and according to the non-displayable identifier contained in the second LE Audio broadcast signal, no connection information corresponding to the second BLE address is output.
6. The method according to any one of claims 2 to 5, characterized in that, After receiving the first LE Audio broadcast signal sent by the first device, the method further includes: The first LE Audio broadcast signal is parsed to determine whether the first LE Audio broadcast signal carries a first support flag based on the parsing result. The first support flag is used to indicate support for the LE Audio Bluetooth protocol. If the first LE Audio broadcast signal carries the first support tag, then the Bluetooth connection operation for the connection information is detected, and a first LE Audio Bluetooth connection is established with the first device based on the first BLE address.
7. The method according to any one of claims 1 to 5, characterized in that, Determining the first classic Bluetooth address corresponding to the first device includes: Query the Bluetooth devices that exist within the first distance range, and determine the first classic Bluetooth address corresponding to the first device based on the query response returned by the first device.
8. The method according to claim 7, characterized in that, The method further includes: Based on the query response, determine whether the first device supports the LE Audio Bluetooth protocol; If it is determined that the first device supports the LE Audio Bluetooth protocol, then the step of establishing a first LE Audio Bluetooth connection with the first device based on the first BLE address is executed.
9. The method according to any one of claims 1 to 5, characterized in that, If a Bluetooth connection operation for the connection information is detected, establishing a first LE Audio Bluetooth connection with the first device based on the first BLE address, and establishing a classic Bluetooth connection with the first device based on the first classic Bluetooth address, includes: If a Bluetooth connection operation for the connection information is detected, a classic Bluetooth connection is established with the first device based on the first classic Bluetooth address. The query command is sent to the first device via the classic Bluetooth connection. The query command is used to ask whether the first device supports the LE Audio Bluetooth protocol. If a confirmation instruction indicating support for the LE Audio Bluetooth protocol is received from the first device, a first LE Audio Bluetooth connection is established with the first device based on the first BLE address.
10. The method according to claim 1, characterized in that, The first device includes a first earphone, and the second device includes a second earphone, wherein the first earphone and the second earphone belong to the same earphone device; the first earphone is the master earphone of the earphone device, and the second earphone is the slave earphone of the earphone device; After the terminal device establishes a classic Bluetooth connection with the first earphone, the second earphone listens to the classic Bluetooth connection between the first earphone and the terminal device; or, after the terminal device establishes a classic Bluetooth connection with the first earphone, the first earphone synchronizes the data transmitted between the terminal device and the terminal device through the classic Bluetooth connection to the second earphone.
11. The method according to claim 10, characterized in that, The method further includes: After the terminal device disconnects all Bluetooth connections with the headset device, if it receives a third LE Audio broadcast signal sent by the second headset that has switched to the main headset, and determines that the modified second BLE address carried by the third LE Audio broadcast signal is the same as the backlink BLE address stored by the terminal device, a third LE Audio Bluetooth connection is established with the second headset, and the backlink BLE address is the same as the first BLE address. The third LE Audio broadcast signal is sent after the second earphone changes its second classic Bluetooth address to be the same as the first classic Bluetooth address, and changes its second BLE address to be the same as both the first classic Bluetooth address and the first BLE address.
12. The method according to claim 11, characterized in that, The method further includes: After the terminal device disconnects all Bluetooth connections with the headset device, if the classic Bluetooth reconnection conditions are met, a classic Bluetooth reconnection is initiated based on the stored classic Bluetooth reconnection address, which is the first classic Bluetooth address. The classic Bluetooth reconnection conditions include at least one of the following: The terminal device and / or the earphone device enable the Bluetooth module; After the distance between the terminal device and the earphone device exceeds the Bluetooth connection distance range and the connection is lost, the distance between the terminal device and the earphone device will return to the Bluetooth connection distance range. The terminal device determines that the modified second BLE address carried by the third LE Audio broadcast signal is the same as the backlink BLE address stored in the terminal device.
13. A Bluetooth connection method, characterized in that, Applied to an earphone device, the earphone device including a first earphone and a second earphone, the method includes: The first earphone sends a first LE Audio broadcast signal based on the first BLE address, so that the terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address. The first BLE address is the same as the first classic Bluetooth address corresponding to the first earphone. The second earphone sends a second LE Audio broadcast signal based on the second BLE address, so that the terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address; The first earphone receives a first LE Audio connection request sent by the terminal device according to the first BLE address, establishes a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request, and receives a first classic Bluetooth connection request sent by the terminal device according to the first classic Bluetooth address, establishes a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request, and maintains the first LE Audio Bluetooth connection and the classic Bluetooth connection. The second earphone receives a second LE Audio connection request sent by the terminal device based on the second BLE address, and establishes a second LE Audio Bluetooth connection with the terminal device based on the second LE Audio connection request, and maintains the second LE Audio Bluetooth connection; wherein, the first LE Audio connection request, the first classic Bluetooth connection request, and the second LE Audio connection request are sent by the terminal device when it detects a Bluetooth connection operation for the output connection information, and the terminal device only outputs a connection information corresponding to the first classic Bluetooth address, and does not output a connection information corresponding to the second BLE address.
14. The method according to claim 13, characterized in that, The first LE Audio broadcast signal includes a first identity identifier, and the second LE Audio broadcast signal includes a second identity identifier. The first identity identifier is the same as the second identity identifier, and is used to indicate that the first earphone and the second earphone belong to the same earphone device.
15. The method according to claim 13, characterized in that, The second LE Audio broadcast signal includes a non-displayable flag; the non-displayable flag is used to indicate that the BLE address corresponding to the LE Audio broadcast signal is not displayed in the terminal device.
16. The method according to any one of claims 13 to 15, characterized in that, The first LE Audio broadcast signal also includes a first support marker, which is used to indicate support for the LE Audio Bluetooth protocol.
17. The method according to any one of claims 13 to 15, characterized in that, Before receiving the first classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, the method further includes: If the first earphone, which is in a discoverable state, receives a query command sent by the terminal device, it returns a query response to the terminal device according to the query command, so that the terminal device can obtain the first classic Bluetooth address corresponding to the first earphone based on the query response.
18. The method according to claim 17, characterized in that, The query command carries a second support flag, which is used to indicate support for the LE Audio Bluetooth protocol.
19. The method according to any one of claims 13 to 15, characterized in that, The first earphone receives a first LE Audio connection request sent by the terminal device according to the first BLE address, establishes a first LE Audio Bluetooth connection with the terminal device according to the first LE Audio connection request, and receives a first Classic Bluetooth connection request sent by the terminal device according to the first Classic Bluetooth address, establishes a Classic Bluetooth connection with the terminal device according to the first Classic Bluetooth connection request, including: The first earphone receives a first classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, and establishes a classic Bluetooth connection with the terminal device based on the first classic Bluetooth connection request; The first earphone receives an inquiry command sent by the terminal device through the classic Bluetooth connection, and returns an confirmation command to the terminal device to indicate support for the LE Audio Bluetooth protocol according to the inquiry command; The first earphone receives a first LE Audio connection request sent by the terminal device based on the first BLE address, and establishes a first LE Audio Bluetooth connection with the terminal device based on the first LE Audio connection request.
20. The method according to any one of claims 13 to 15, characterized in that, The first earphone is the master earphone of the headphone device, and the second earphone is the slave earphone of the headphone device; the method further includes: The first earphone establishes a Bluetooth connection with the second earphone and sends the first classic Bluetooth address to the second earphone, so that the second earphone changes the second classic Bluetooth address of the second earphone to be the same as the first classic Bluetooth address; Wherein, the first classic Bluetooth address is the classic Bluetooth address corresponding to the master earphone, and the second classic Bluetooth address before the change is the classic Bluetooth address corresponding to the slave earphone, wherein the second classic Bluetooth address before the change is different from the first classic Bluetooth address.
21. The method according to claim 20, characterized in that, The second BLE address corresponding to the second earphone is the same as the second classic Bluetooth address before the change; or, the second BLE address corresponding to the second earphone is different from the second classic Bluetooth address before the change.
22. The method according to claim 20, characterized in that, After the first earphone establishes a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request, the method further includes: The first earpiece synchronizes the connection information corresponding to the terminal device to the second earpiece; The second earpiece monitors the classic Bluetooth connection between the first earpiece and the terminal device based on the connection information, or... The first earphone will synchronize the data transmitted between itself and the terminal device via the classic Bluetooth connection to the second earphone.
23. The method according to claim 22, characterized in that, The method further includes: When the first earphone switches to the slave earphone and the second earphone switches to the master earphone, the connection target of the classic Bluetooth connection of the terminal device switches from the first earphone to the second earphone. The first earphone listens to the classic Bluetooth connection between the second earphone and the terminal device, or the second earphone synchronizes the data transmitted between the second earphone and the terminal device through the classic Bluetooth connection to the first earphone.
24. The method according to claim 22, characterized in that, The method further includes: When the status information of the first earphone meets the stop working condition, the first earphone switches to the slave earphone, the second earphone switches to the master earphone, and the connection object of the classic Bluetooth connection of the terminal device switches from the first earphone to the second earphone; The first earphone disconnects from the first LE Audio Bluetooth connection with the terminal device, and does not monitor the classic Bluetooth connection between the second earphone and the terminal device, nor does the second earphone synchronize with the first earphone the data transmitted between the second earphone and the terminal device via the classic Bluetooth connection.
25. The method according to claim 24, characterized in that, The status information includes the remaining battery power, and the stop-work condition includes the remaining battery power being lower than a battery power threshold; and / or... The status information includes the state of being placed in the earphone case, and the stop-working condition includes the first earphone being placed in the earphone case and the earphone case being closed; and / or, The status information includes the signal strength of the Bluetooth signal sent to the terminal device, and the stop-work condition includes the signal strength being lower than a strength threshold; and / or, The status information includes the distance between the device and the terminal, and the stop working condition includes the distance being greater than a distance threshold.
26. The method according to any one of claims 23 to 25, characterized in that, The method further includes: After the headset disconnects all Bluetooth connections with the terminal device, and / or before the terminal device re-establishes a Bluetooth connection with the headset, if the second headset is the primary headset, the second headset will change its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address. The second earphone sends a third LE Audio broadcast signal based on the modified second BLE address, so that the terminal device receiving the third LE Audio broadcast signal can obtain the modified second BLE address; The second earphone receives a third LE Audio connection request sent by the terminal device based on the modified second BLE address, and establishes a third LE Audio Bluetooth connection with the terminal device based on the third LE Audio connection request. It also receives a second classic Bluetooth connection request sent by the terminal device based on the first classic Bluetooth address, and establishes a classic Bluetooth connection with the terminal device based on the second classic Bluetooth connection request.
27. The method according to claim 26, characterized in that, If the second earphone is the primary earphone, then the second earphone will change its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address, including: If the second earphone determines that the current master-slave relationship is that the second earphone is the master earphone, then it is determined whether the current second BLE address of the second earphone is the same as the changed second classic Bluetooth address, or it is determined whether the current second BLE address is the same as the first classic Bluetooth address. If the current second BLE address is different from both the changed second classic Bluetooth address and the first classic Bluetooth address, then the second earphone will change its second BLE address to be the same as both the first classic Bluetooth address and the changed second classic Bluetooth address.
28. The method according to claim 26, characterized in that, The method further includes: After the headset disconnects all Bluetooth connections with the terminal device, and / or before the terminal device re-establishes a Bluetooth connection with the headset, if the first headset is a slave headset and the first classic Bluetooth address of the first headset is the same as the current first BLE address, then the first headset will change the current first BLE address to be different from the first classic Bluetooth address.
29. A Bluetooth connection device, characterized in that, Applied to a terminal device, the device includes: The first address determination module is used to determine the first low-power Bluetooth BLE address corresponding to the first device, and to determine the first classic Bluetooth address corresponding to the first device. The second address determination module is used to determine the second BLE address corresponding to the second device, wherein the first device and the second device belong to the same group of Bluetooth devices. The output module is used to output only one connection information corresponding to the same group of Bluetooth devices; The connection module is configured to, if a Bluetooth connection operation for the connection information is detected, establish a first LE Audio Bluetooth connection with the first device based on the first BLE address, establish a classic Bluetooth connection with the first device based on the first classic Bluetooth address, and establish a second LE Audio Bluetooth connection with the second device based on the second BLE address, while simultaneously maintaining the first LE Audio Bluetooth connection, the classic Bluetooth connection, and the second LE Audio Bluetooth connection. The output module is further configured to output only one connection information corresponding to the first classic Bluetooth address, and not to output the connection information corresponding to the second BLE address.
30. A Bluetooth connection device, characterized in that, Applied to an earphone device, the earphone device including a first earphone and a second earphone, the device includes: The first broadcast module is used to send a first LE Audio broadcast signal from the first earphone based on the first BLE address, so that the terminal device receiving the first LE Audio broadcast signal can obtain the first BLE address, wherein the first BLE address is the same as the first classic Bluetooth address corresponding to the first earphone; The second broadcast module is used to send a second LE Audio broadcast signal by the second headset based on the second BLE address, so that the terminal device receiving the second LE Audio broadcast signal can obtain the second BLE address; The first connection module is configured to receive a first LE Audio connection request sent by the terminal device according to the first BLE address, establish a first LEAudio Bluetooth connection with the terminal device according to the first LE Audio connection request, and receive a first classic Bluetooth connection request sent by the terminal device according to the first classic Bluetooth address, establish a classic Bluetooth connection with the terminal device according to the first classic Bluetooth connection request, and maintain the first LE Audio Bluetooth connection and the classic Bluetooth connection. The second connection module is used to receive a second LE Audio connection request sent by the terminal device according to the second BLE address via the second headset, and to establish a second LEAudio Bluetooth connection with the terminal device according to the second LE Audio connection request, and maintain the second LE Audio Bluetooth connection; wherein, the first LE Audio connection request, the first classic Bluetooth connection request, and the second LE Audio connection request are sent by the terminal device when it detects a Bluetooth connection operation for the output connection information, and the terminal device only outputs a connection information corresponding to the first classic Bluetooth address, and does not output a connection information corresponding to the second BLE address.
31. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 12 or 13 to 28.
32. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 12 or 13 to 28.
Citation Information
Patent Citations
Bluetooth connection method and electronic equipment
CN112469015A
Bluetooth connection method and device, computer equipment and readable storage medium
CN115119190A
Bluetooth connection method and device and Bluetooth address configuration method and device
CN116233807A
Bluetooth connection method and apparatus, electronic device, and storage medium
WO2023065881A1