Bluetooth equipment configuration method and device, electronic equipment and storage medium
By configuring the combination identification information of Bluetooth devices and making it identify it as the same Bluetooth device collection, the problem that Bluetooth devices cannot be used normally is solved, and normal coordinated and synchronous use between devices is achieved.
Patent Information
- Application Number
- CN202311261239.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-03-28
AI Technical Summary
In some scenarios, some Bluetooth devices in the Bluetooth device collection cannot be used normally with other Bluetooth devices, which affects the normal use of users.
By acquiring the first combined identification information and configuring the combined identification information of the first Bluetooth device and the second Bluetooth device as the first combined identification information, both can be identified as belonging to the same set of Bluetooth devices, so that combined use is performed normally.
Ensure that the first Bluetooth device and the second Bluetooth device can be used normally, meet the user's usage needs, and improve the user experience.
Smart Images

Figure CN119729423A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a Bluetooth device configuration method, device, electronic device and storage medium. Background Art
[0002] Many Bluetooth devices on the market can be used as a device set. For example, Bluetooth headsets and Bluetooth speaker systems all work together as a Bluetooth device set. The Bluetooth devices in the same device set can establish a Bluetooth connection with external electronic devices as a whole and transmit data. The Bluetooth devices in the same device set can be synchronized with each other. At present, in some scenarios, some Bluetooth devices in the Bluetooth device set may not be able to be used normally in combination with other Bluetooth devices, affecting the normal use of users. Summary of the invention
[0003] The embodiments of the present application disclose a Bluetooth device configuration method, apparatus, electronic device and storage medium, which can ensure that a first Bluetooth device and a second Bluetooth device are used in combination normally, thereby meeting the user's usage requirements.
[0004] The present application embodiment discloses a Bluetooth device configuration method, which is applied to a first Bluetooth device, and the method includes:
[0005] When it is determined that pairing with the second Bluetooth device is required, obtaining first combination identification information;
[0006] configuring the combined identification information of the first Bluetooth device as the first combined identification information;
[0007] The first combination identification information is sent to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
[0008] The present application embodiment discloses a Bluetooth device configuration method, which is applied to a second Bluetooth device, and the method includes:
[0009] receiving first combination identification information sent by a first Bluetooth device; the first combination identification information is sent by the first Bluetooth device when determining that pairing with the second Bluetooth device is required;
[0010] The combination identification information of the second Bluetooth device is configured as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
[0011] The embodiment of the present application discloses a Bluetooth device configuration device, which is applied to a first Bluetooth device, and the device includes:
[0012] A combination identification acquisition module, used to acquire first combination identification information when it is determined that pairing with a second Bluetooth device is required;
[0013] A configuration module, configured to configure the combination identification information of the first Bluetooth device as the first combination identification information;
[0014] The combination identification sending module is used to send the first combination identification information to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
[0015] The embodiment of the present application discloses a Bluetooth device configuration device, which is applied to a second Bluetooth device, and the device includes:
[0016] A combination identification receiving module, used to receive first combination identification information sent by a first Bluetooth device; the first combination identification information is sent by the first Bluetooth device when it is determined that pairing with the second Bluetooth device is required;
[0017] A configuration module is used to configure the combination identification information of the second Bluetooth device as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
[0018] An embodiment of the present application discloses an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method described in any of the above embodiments.
[0019] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0020] The Bluetooth device configuration method, apparatus, electronic device and storage medium disclosed in the embodiment of the present application, when the first Bluetooth device determines that it needs to be paired with the second Bluetooth device, obtains the first combination identification information, configures the combination identification information of the first Bluetooth device as the first combination identification information, and sends the first combination identification information to the second Bluetooth device to configure the combination identification information of the second Bluetooth device as the first combination identification information. In the embodiment of the present application, when the first Bluetooth device needs to be paired with the second Bluetooth device to be used in combination, the combination identification information of the first Bluetooth device may be inconsistent with the combination identification information of the second Bluetooth device. Therefore, the first Bluetooth device and the second Bluetooth device are both configured with the same first combination identification information, so that the first Bluetooth device and the second Bluetooth device can be identified as belonging to the first Bluetooth device set, which can ensure that the first Bluetooth device and the second Bluetooth device can be used normally in combination, meeting the user's usage needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1A An application scenario diagram of a Bluetooth device configuration method in an embodiment;
[0023] Figure 1B It is an application scenario diagram of a Bluetooth device configuration method in another embodiment;
[0024] Figure 2 A timing diagram of a Bluetooth device configuration method in one embodiment;
[0025] Figure 3 A flowchart of a method for configuring a Bluetooth device in one embodiment;
[0026] Figure 4 A flowchart of a method for configuring a Bluetooth device in another embodiment;
[0027] Figure 5A A schematic diagram of a timing sequence in which the first Bluetooth device successfully decrypts in an embodiment;
[0028] Figure 5B A schematic diagram of a timing sequence of a first Bluetooth device failing to decrypt in an embodiment;
[0029] Figure 5C A timing diagram of a Bluetooth device configuration method in another embodiment;
[0030] Fig. 6A It is an application scenario diagram of a Bluetooth device configuration method in another embodiment;
[0031] Figure 6B A timing diagram of a Bluetooth device configuration method in another embodiment;
[0032] Figure 7 A flowchart of a method for configuring a Bluetooth device in another embodiment;
[0033] Figure 8 is a schematic diagram of the structure of an LE Audio broadcast signal in one embodiment;
[0034] Fig. 9A A timing diagram of a second electronic device establishing LE Audio Bluetooth connections with a first Bluetooth device and a second Bluetooth device for the first time in an embodiment;
[0035] Fig. 9B A timing diagram of a second electronic device establishing an LE Audio Bluetooth connection with a first Bluetooth device not for the first time in an embodiment;
[0036] Fig. 9C It is a timing diagram of another embodiment in which the second electronic device establishes an LE Audio Bluetooth connection with the first Bluetooth device not for the first time;
[0037] Fig.10 A flowchart of a method for configuring a Bluetooth device in another embodiment;
[0038] Fig.11 A block diagram of a Bluetooth device configuration apparatus in one embodiment;
[0039] Fig.12 A block diagram of a Bluetooth device configuration apparatus in another embodiment;
[0040] Fig.13 FIG. 4 is a structural block diagram of a Bluetooth device in an embodiment. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0042] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, 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.
[0043] It is understood that the terms "first", "second", etc. used in this application can be used to describe various elements in this article, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of this application, the first Bluetooth device can be referred to as the second Bluetooth device, and similarly, the second Bluetooth device can be referred to as the first Bluetooth device. Both the first Bluetooth device and the second Bluetooth device are Bluetooth devices, but they are not the same Bluetooth device. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the schemes, or any combination of multiple schemes.
[0044] In the related technology, when an external electronic device establishes a Bluetooth connection with a Bluetooth device in a Bluetooth device set for the first time, it will store information such as the Bluetooth address of each Bluetooth device in the Bluetooth device set, the combination identification information corresponding to the Bluetooth device set, etc., and in subsequent use, the stored information can be directly used to connect back to each Bluetooth device in the Bluetooth device set.
[0045] In certain scenarios, for example, when a Bluetooth device in a Bluetooth device set is lost or malfunctions during actual use, after the user's newly purchased Bluetooth device is added to the Bluetooth device set, the external electronic device stores the Bluetooth address of the original lost or malfunctioning Bluetooth device, but does not store the Bluetooth address of the newly purchased Bluetooth device. Therefore, although the newly purchased Bluetooth device is added to the Bluetooth device set, the external electronic device cannot establish a Bluetooth connection with the newly purchased Bluetooth device, resulting in the newly purchased Bluetooth device being unable to be used normally.
[0046] The embodiments of the present application disclose a Bluetooth device configuration method, apparatus, electronic device and storage medium, which can ensure that a first Bluetooth device and a second Bluetooth device are used in combination normally, thereby meeting the user's usage requirements.
[0047] Figure 1A FIG. 1 is an application scenario diagram of a Bluetooth device configuration method in an embodiment. Figure 1AAs shown, the first Bluetooth device 110 and the second Bluetooth device 120 can establish a communication connection, and the first Bluetooth device 110 and the second Bluetooth device 120 may include but are not limited to earphones, mobile phones, wearable devices, speaker devices, smart home devices, etc. Further, the first Bluetooth device 110 and the second Bluetooth device 120 may be TWS (True Wireless Stereo) earphones, for example, the first Bluetooth device 110 may be a left earphone and the second Bluetooth device 120 may be a right earphone, or the first Bluetooth device may be a right earphone and the second Bluetooth device 120 may be a left earphone.
[0048] In the embodiment of the present application, the first Bluetooth device 110 and the second Bluetooth device 120 can be used in combination, and the two can belong to the same Bluetooth device set to achieve synchronous and coordinated use between the two. Further, the second Bluetooth device 120 can be an electronic device that the user expects to be used in combination with the first Bluetooth device 110, for example, the first Bluetooth device 110 is a Bluetooth speaker, and the second Bluetooth device 120 can be another Bluetooth speaker that needs to be used synchronously and coordinated with the first Bluetooth device 110; for another example, the first Bluetooth device 110 is a headset, and the second Bluetooth device 120 can be another headset that needs to be used synchronously and coordinated with the first Bluetooth device 110.
[0049] Each Bluetooth device may be provided with combination identification information, which can be used to identify the Bluetooth device set to which the Bluetooth device belongs. Bluetooth devices belonging to different Bluetooth device sets may correspond to different combination identification information, and Bluetooth devices belonging to the same Bluetooth device set may correspond to the same combination identification information. External devices may identify multiple Bluetooth devices as a Bluetooth device set through the combination identification information, so that the Bluetooth devices belonging to the same Bluetooth device set can be used in a coordinated and synchronous manner. For example, different pairs of Bluetooth headsets may correspond to different combination identification information, thereby ensuring that there will be no confusion when using the Bluetooth headsets, and each pair of Bluetooth headsets can be used differently from other pairs of Bluetooth headsets.
[0050] In an embodiment of the present application, when the first Bluetooth device 110 determines that it needs to be paired with the second Bluetooth device 120 to be used in combination, the first combination identification information is obtained, and the combination identification information of the first Bluetooth device 110 is configured as the first combination identification information. The first Bluetooth device 110 and the second Bluetooth device 120 can establish a communication connection, and the communication connection method may include but is not limited to a Bluetooth connection (such as a classic Bluetooth connection, a BLE connection, etc.). The first Bluetooth device 110 can send the first combination identification information to the second Bluetooth device 120, so that the second Bluetooth device 120 configures its own combination identification information as the first combination identification information. The first Bluetooth device 110 and the second Bluetooth device 120 are both configured with the same first combination identification information, which can ensure that the first Bluetooth device and the second Bluetooth device are used normally in combination.
[0051] In some embodiments, the Bluetooth devices in the Bluetooth device set can perform Bluetooth data transmission with external devices based on BLE Audio (Bluetooth Low Energy Audio) technology. As a mainstream technology vigorously promoted by Bluetooth in recent years, BLE Audio technology can bring people wireless audio services with lower power consumption, lower cost, higher quality, and lower latency. CSIP (Coordinated Set Identification Profile) is provided in BLE Audio technology, which allows multiple Bluetooth devices belonging to the same Bluetooth device set to achieve the purpose of coordinated synchronization when interacting with external devices. The protocol mainly describes how external devices identify multiple independent Bluetooth devices in a Bluetooth device set as the same set. In CSIP, for multiple Bluetooth devices belonging to the same Bluetooth device set, the same SIRK (Set Identity Resolving Key) can be used, that is, Bluetooth devices with the same SIRK are identified as the same Bluetooth device set.
[0052] In the related art, when an external device is connected to a Bluetooth device in a Bluetooth device set that supports BLE Audio technology for the first time, each Bluetooth device in the Bluetooth device set can send a LEAudio broadcast signal. When the external device receives the LEAudio broadcast signal sent by one or more Bluetooth devices, the device information of each Bluetooth device can be displayed in the display interface. The user can select one of the Bluetooth devices (such as Bluetooth device A) for connection operation, and the external device establishes a LEAudio Bluetooth connection with the selected Bluetooth device (such as Bluetooth device A) and obtains the corresponding SIRK. When the external device receives the LEAudio broadcast signal from another Bluetooth device (such as Bluetooth device B), it can parse the LEAudio broadcast signal of the other Bluetooth device (such as Bluetooth device B) to determine whether the SIRK of the other Bluetooth device (such as Bluetooth device B) is consistent with the SIRK of the Bluetooth device (such as Bluetooth device A) that establishes the LEAudio Bluetooth connection, that is, to determine whether the two belong to the same Bluetooth set. If it is confirmed that the two belong to the same Bluetooth set, the external device can establish a LEAudio Bluetooth connection with the other Bluetooth device (such as Bluetooth device B). In this way, the external device can accurately identify multiple Bluetooth devices belonging to the same Bluetooth device set, and establish LEAudio Bluetooth connections respectively, so as to achieve coordinated and synchronous use of multiple Bluetooth devices in the same Bluetooth device set.
[0053] The external device will store the information of the Bluetooth device set, such as the SIRK of the Bluetooth device set, the Bluetooth address of each Bluetooth device, etc. In subsequent use, the external device can directly connect back to each Bluetooth device based on the stored information of the Bluetooth device set and establish a LEAudio Bluetooth connection with each Bluetooth device, without the need to perform the process specified in the CSIP protocol to identify whether the Bluetooth devices are in the same Bluetooth set. However, in some scenarios, the external device may not be able to connect to some Bluetooth devices in the Bluetooth set. For example, when Bluetooth device B in the Bluetooth device set is lost or fails during actual use, the user's newly purchased Bluetooth device C replaces Bluetooth device B and adds it to the Bluetooth device set. The SIRK of the Bluetooth device set will be configured. After the external device reconnects to Bluetooth device A in the Bluetooth device set, it reads that the SIRK of Bluetooth device A has not changed, then it will continue to reconnect based on the stored information of the Bluetooth device set, such as continuing to initiate a LEAudio Bluetooth connection to the Bluetooth address of Bluetooth device B. However, since Bluetooth device B has been replaced by Bluetooth device C, the external device will not be able to connect to Bluetooth device C. The user can only use Bluetooth device A, but cannot use Bluetooth device C in combination with Bluetooth device A.
[0054] Figure 1B FIG. 1 is an application scenario diagram of a method for configuring a Bluetooth device in another embodiment. Figure 1BAs shown, since the first Bluetooth device 110 and the second Bluetooth device 120 both configure the combination identification information, that is, the combination identification information of the first Bluetooth device 110 and the second Bluetooth device 120 is updated, assuming that the second Bluetooth device 120 is a replaced Bluetooth device, after the external device 130 connects back to the first Bluetooth device 110, the combination identification information of the first Bluetooth device 110 is read as the first combination identification information, and it is detected that the combination identification information of the Bluetooth device set to which the first Bluetooth device 110 belongs is updated, the external device will be triggered to perform the process of identifying whether the Bluetooth devices are the same Bluetooth set as specified in the CSIP protocol, so that it can be identified that the second Bluetooth device 120 belongs to the same Bluetooth device set, and a Bluetooth connection is established with the second Bluetooth device 120, to ensure that the first Bluetooth device 110 and the second Bluetooth device 120 are used in combination normally.
[0055] Further, after the external device 130 establishes Bluetooth connections with both the first Bluetooth device 110 and the second Bluetooth device 120, the first Bluetooth device 110 and the second Bluetooth device 120 may be assigned different roles (eg, the left earphone plays the left channel audio, and the right earphone plays the right channel audio).
[0056] Optionally, the external device 130 may include but is not limited to a mobile phone, a wearable device, a vehicle-mounted terminal, a tablet computer, a PC (Personal Computer), a PDA (Personal Digital Assistant), etc.
[0057] It should be noted that the number of Bluetooth devices contained in a Bluetooth device collection is not limited to Figure 1A and Figure 1B The 2 shown in the figure may also be 3, 4, etc., and the number is not limited in the embodiments of the present application.
[0058] Figure 2 FIG. 1 is a timing diagram of a method for configuring a Bluetooth device in an embodiment. Figure 2 As shown, the Bluetooth device configuration method may include the following steps:
[0059] 1. When the first Bluetooth device determines that it needs to be paired with the second Bluetooth device, the first Bluetooth device obtains first combination identification information.
[0060] 2. The first Bluetooth device configures its own combination identification information as the first combination identification information.
[0061] Furthermore, the first Bluetooth device updates its own combination identification information from the second combination identification information to the first combination identification information.
[0062] 3. The first Bluetooth device sends first combination identification information to the second Bluetooth device.
[0063] 4. The second Bluetooth device receives the first combination identification information sent by the first Bluetooth device, and configures the self-transmitted combination identification information as the first combination identification information.
[0064] like Figure 3 As shown, in one embodiment, a Bluetooth device configuration method is provided, which can be applied to the first Bluetooth device mentioned above, and the method may include the following steps:
[0065] Step 310: When it is determined that pairing with a second Bluetooth device is required, first combination identification information is obtained.
[0066] The first Bluetooth device and the second Bluetooth device may be two Bluetooth devices to be used in combination, and the combined use may refer to the first Bluetooth device and the second Bluetooth device being identifiable by an external device as belonging to the same Bluetooth device set, so as to achieve the effect of coordinated and synchronous use of the two. For example, the first Bluetooth device and the second Bluetooth device may be two headphones to be used in combination; or the first Bluetooth device and the second Bluetooth device may be two speakers to be used in combination, etc., but is not limited thereto.
[0067] The first Bluetooth device needs to be paired with the second Bluetooth device to be used in combination, which may refer to the first Bluetooth device and the second Bluetooth device needing to perform a pairing operation specified in the Bluetooth protocol. During the pairing operation, the first Bluetooth device and the second Bluetooth device may mutually negotiate a Bluetooth communication key, which may be used to encrypt data transmitted between the first Bluetooth device and the second Bluetooth device to ensure the security of the Bluetooth communication between the two. For specific pairing operations, reference may be made to the relevant provisions in the Bluetooth communication protocol, which will not be described in detail here.
[0068] In some embodiments, the situation where the first Bluetooth device needs to be paired with the second Bluetooth device includes: the first Bluetooth device does not store a pairing record corresponding to the second Bluetooth device; and / or the second Bluetooth device does not store a pairing record corresponding to the first Bluetooth device. The pairing record is used to record information corresponding to the pairing operation between the first Bluetooth device and the second Bluetooth device. For example, the pairing record stored in the first Bluetooth device may include the Bluetooth address (such as BLE address, etc.), key, etc. of the second Bluetooth device, and the pairing record stored in the second Bluetooth device may include the Bluetooth address (such as BLE address, etc.), key, etc. of the first Bluetooth device.
[0069] The first Bluetooth device needs to be paired with the second Bluetooth device, which means that the first Bluetooth device and the second Bluetooth device have not been paired before and these are the first time that the two Bluetooth devices establish a Bluetooth connection, for example, the first Bluetooth device and / or the second Bluetooth device are new and unused headphones; or the first Bluetooth device and the second Bluetooth device have been paired before but either of the Bluetooth devices has deleted the pairing record, for example, the first Bluetooth device and / or the second Bluetooth device has been restored to factory settings, in which case all stored pairing records will be deleted.
[0070] In the case where the first Bluetooth device needs to be paired with the second Bluetooth device to be used in combination, the combination identification information of the first Bluetooth device may be inconsistent with the combination identification information of the second Bluetooth device. For example, the second Bluetooth device is a newly purchased Bluetooth device by the user, so the second Bluetooth device may not be configured with combination identification information (the combination identification information of the second Bluetooth device is empty), or the combination identification information configured by the second Bluetooth device is the combination identification information configured at the time of production, which is often different from the combination identification information configured by the first Bluetooth device. For another example, the second Bluetooth device is a Bluetooth device that has been paired with the first Bluetooth device, that is, an old Bluetooth device, which has been used in combination before, but the second Bluetooth device has been restored to factory settings. Although the second Bluetooth device is configured with the same combination identification information as the first Bluetooth device before restoring the factory settings, the second Bluetooth device may delete the configured combination identification information after restoring the factory settings, or restore the configured combination identification information to the combination identification information configured at the time of production (that is, the combination identification information configured by the first Bluetooth device is not necessarily the same).
[0071] Therefore, in the embodiment of the present application, when the first Bluetooth device determines that it needs to be paired with the second Bluetooth device, the first combination identification information can be obtained. Optionally, the first combination identification information can be generated by the first Bluetooth device, or generated in the first electronic device and then sent to the first Bluetooth device. The first electronic device can be a terminal device (such as a mobile phone, a wearable device, etc.) that establishes a communication connection with the first Bluetooth device, and the first electronic device can also be an electronic device used in conjunction with the first Bluetooth device. For example, the first Bluetooth device and the second Bluetooth device are headphones, and the first electronic device can be a headphone box, etc.
[0072] Step 320: configure the combined identification information of the first Bluetooth device as first combined identification information.
[0073] After the first Bluetooth device acquires the first combination identification information, it can configure its own combination identification information as the first combination identification information. Further, the first Bluetooth device configuring its own combination identification information as the first combination identification information can mean that the first Bluetooth device stores the first combination identification information in a memory (such as a non-volatile memory, etc.).
[0074] Step 330: Send the first combination identification information to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information.
[0075] In some embodiments, the first Bluetooth device can establish a communication connection with the second Bluetooth device, and the communication connection may include but is not limited to a classic Bluetooth connection, a BLE connection, etc., and send the first combination identification information to the second Bluetooth device. After the second Bluetooth device receives the first combination identification information sent by the first Bluetooth device, it can configure its own combination identification information as the first combination identification information. The combination identification information of the first Bluetooth device and the second Bluetooth device is the same, both are the first combination identification information, so they can be recognized by external devices as belonging to the first Bluetooth device set indicated by the first combination identification information, thereby realizing the coordinated and synchronous use of the first Bluetooth device and the second Bluetooth device.
[0076] In some embodiments, when it is determined that pairing with a second Bluetooth device is required, if the first Bluetooth device is currently configured with the second combination identification information, that is, the current combination identification information of the first Bluetooth device is the second combination identification information, it means that the combination identification information corresponding to the Bluetooth device set to which the first Bluetooth device belongs is the second combination identification information. If the combination identification information of the second Bluetooth device is also directly configured as the second combination identification information, in the scenario of external device backconnection, assuming that the second Bluetooth device is a new Bluetooth device and has not been connected to an external device, the situation in the related art that the external device cannot connect to the second Bluetooth device will occur, and therefore, the combination identification information configured for the first Bluetooth device needs to be updated.
[0077] The first combination identification information obtained by the first Bluetooth device is different from the second combination identification information. After the first Bluetooth device obtains the first combination identification information, it can update its own combination identification information from the second combination identification information to the first combination identification information. It should be noted that the first Bluetooth device updates its own combination identification information from the second combination identification information to the first combination identification information, which can be understood as the Bluetooth device set to which the first Bluetooth device belongs is changed from the second Bluetooth device set indicated by the second combination identification information to the first Bluetooth device set indicated by the first combination identification information, and can also be understood as the Bluetooth device set to which the first Bluetooth device belongs remains unchanged, but the combination identification information corresponding to the Bluetooth device set to which the first Bluetooth device belongs is changed to the first combination identification information.
[0078] Furthermore, the first Bluetooth device may delete the second combination identification information currently configured, and then configure its own combination identification information as the first combination identification information. It should be noted that the first Bluetooth device may delete the second combination identification information currently configured before obtaining the first combination identification information, or may delete the second combination identification information currently configured after obtaining the first combination identification information, and the embodiments of the present application are not limited to this.
[0079] Since the combination identification information of the first Bluetooth device has been updated, after the external second electronic device reconnects to the first Bluetooth device, the combination identification information of the first Bluetooth device is read as the first combination identification information, and it is detected that the combination identification information of the Bluetooth device set to which the first Bluetooth device belongs has been updated, indicating that the Bluetooth devices in the Bluetooth device set have changed. The external second electronic device can identify whether the second Bluetooth device belongs to the same Bluetooth device set as the first Bluetooth device according to the process specified in the CSIP protocol. Since the combination identification information of the second Bluetooth device is the same as that of the first Bluetooth device (both are the first combination identification information), the external second electronic device can establish a Bluetooth connection with the second Bluetooth device, ensuring that the first Bluetooth device and the second Bluetooth device are used in combination normally, being compatible with more scenarios in the actual use of users, meeting the user's usage needs, and improving the user experience.
[0080] In an embodiment of the present application, when a first Bluetooth device needs to be paired with a second Bluetooth device to be used in combination, it may be that the combination identification information of the first Bluetooth device is inconsistent with the combination identification information of the second Bluetooth device. Therefore, the first Bluetooth device and the second Bluetooth device are both configured with the same first combination identification information, so that the first Bluetooth device and the second Bluetooth device can both be identified as belonging to the first Bluetooth device set, which can ensure that the first Bluetooth device and the second Bluetooth device can be used in combination normally, thereby meeting the user's usage needs.
[0081] like Figure 4 As shown, in another embodiment, a Bluetooth device configuration method is provided, which can be applied to the first Bluetooth device mentioned above, and the method may include the following steps:
[0082] Step 402 , determining whether pairing with a second Bluetooth device is required, if so, executing step 404 , if not, executing step 410 .
[0083] The first Bluetooth device can determine whether it needs to be paired with the second Bluetooth device to be used in combination. If it is determined that it needs to be paired with the second Bluetooth device, it can obtain the first combination identification information, configure its own combination identification information as the first combination identification information, and synchronize the first combination identification information to the second Bluetooth device, so that the second Bluetooth device also configures its own combination identification information as the first combination identification information.
[0084] The first Bluetooth device determines whether to pair with the second Bluetooth device by using any of the following methods:
[0085] Method 1: The first Bluetooth device can establish a communication link with the second Bluetooth device, generate encrypted data according to the stored key, and send the encrypted data to the second Bluetooth device through the communication link, so that the second Bluetooth device can decrypt the encrypted data. If the first Bluetooth device receives the decryption failure information sent by the second Bluetooth device, it can be determined that it needs to be paired with the second Bluetooth device; if the first Bluetooth device receives the decryption success information sent by the second Bluetooth device, it is determined that it does not need to be paired with the second Bluetooth device.
[0086] Since a key for Bluetooth communication encryption is generated during the pairing operation of the Bluetooth connection, if the first Bluetooth device and the second Bluetooth device have been paired before, they both store each other's pairing records, that is, they both store the key generated during the pairing operation. The first Bluetooth device can establish a communication link with the second Bluetooth device, and optionally, the communication link can include an ACL (Asynchronous Connection-oriented Link) link, etc., but is not limited thereto.
[0087] The first Bluetooth device can determine whether a key corresponding to a third Bluetooth device is stored, and the third Bluetooth device can refer to a Bluetooth device that has been paired with the first Bluetooth device and used in combination. If a key corresponding to the third Bluetooth device is stored, the key can be used to generate encrypted data, and the encrypted data can be sent to the second Bluetooth device through the communication link with the second Bluetooth device. After the second Bluetooth device receives the encrypted data sent by the first Bluetooth device, it can try to decrypt the encrypted data. If the second Bluetooth device stores the same key, the encrypted data can be successfully decrypted and a decryption success message can be sent to the first Bluetooth device. After the first Bluetooth device receives the decryption success message sent by the second Bluetooth device, it can confirm that the second Bluetooth device is the Bluetooth device that was paired with the first Bluetooth device and used in combination (that is, the third Bluetooth device) according to the decryption success message, indicating that the device member of the Bluetooth device set has not changed, and the two do not need to be paired again. The second Bluetooth device and the first Bluetooth device are currently configured with the second combination identification information, and there is no need to reconfigure the combination identification information.
[0088] Figure 5A This is a timing diagram of a successful decryption of the first Bluetooth device in an embodiment. Figure 5AAs shown, a first Bluetooth device establishes a communication link with a second Bluetooth device, the first Bluetooth device generates encrypted data according to a stored key, and sends the encrypted data to the second Bluetooth device. The second Bluetooth device can decrypt the received encrypted data, and after successful decryption, it can send a decryption success message to the first Bluetooth device. The first Bluetooth device receives the decryption success message and can keep the currently configured second combination identification information.
[0089] If the second Bluetooth device fails to decrypt the encrypted data, it means that the same key is not stored in the second Bluetooth device, and a decryption failure message can be sent to the first Bluetooth device. After the first Bluetooth device receives the decryption failure message sent by the second Bluetooth device, it can confirm that the second Bluetooth device does not store the pairing record corresponding to the first Bluetooth device according to the decryption failure message, and the first Bluetooth device needs to be paired with the second Bluetooth device, which means that the second Bluetooth device is not a Bluetooth device that has been paired with the first Bluetooth device for combined use (i.e., not the third Bluetooth device), that is, the device member of the Bluetooth device set has changed, or the second Bluetooth device is the third Bluetooth device but the pairing record has been deleted. At this time, the combination identification information of the second Bluetooth device may not be the second combination identification information. Therefore, the second Bluetooth device and the first Bluetooth device need to reconfigure the combination identification information.
[0090] Figure 5B FIG. 1 is a timing diagram of a first Bluetooth device decryption failure in an embodiment. Figure 5A As shown, a first Bluetooth device establishes a communication link with a second Bluetooth device, the first Bluetooth device generates encrypted data according to a stored key, and sends the encrypted data to the second Bluetooth device. The second Bluetooth device can decrypt the received encrypted data, and after the decryption fails, it can send a decryption failure message to the first Bluetooth device. The first Bluetooth device receives the decryption failure message, can obtain the first combination identification information, and configure its own combination identification information as the first combination identification information. The first Bluetooth device can send the first combination identification information to the second Bluetooth device, and the second Bluetooth device can also configure its own combination identification information as the first combination identification information.
[0091] In some embodiments, the first Bluetooth device may be a master device in a Bluetooth device set, and the second Bluetooth device may be a slave device in a Bluetooth device set. When the first Bluetooth device and the second Bluetooth device are used in combination, a classic Bluetooth connection may be established between the first Bluetooth device and the second Bluetooth device, and the classic Bluetooth address of the first Bluetooth device is the same as the classic Bluetooth address of the second Bluetooth device. Before establishing a communication link with the first Bluetooth device, the second Bluetooth device may first change its own classic Bluetooth address to the classic Bluetooth address of the first Bluetooth device (such as address A). The first Bluetooth device and the second Bluetooth device may initiate a Bluetooth connection request to the same classic Bluetooth address (such as address A), so that an ACL link of a classic Bluetooth connection may be established between the two. Since the classic Bluetooth address of the second Bluetooth device is changed to the classic Bluetooth address of the first Bluetooth device when the two establish a connection, the first Bluetooth device cannot distinguish whether the currently connected second Bluetooth device is a Bluetooth device that has been paired with the first Bluetooth device and used in combination before. Therefore, it can be verified through encrypted data to determine whether pairing is required, and then determine whether the combination identification information needs to be reconfigured.
[0092] For example, Figure 5C FIG. 1 is a timing diagram of a method for configuring a Bluetooth device in another embodiment. Figure 5C As shown, the first Bluetooth device may be a master headset, the second Bluetooth device may be a slave headset, and the combined identification information may be a SIRK. The master headset and the slave headset may establish a classic Bluetooth connection (such as establishing an ACL link of classic Bluetooth), and the master headset may determine whether the key for the wireless connection is stored locally, that is, the key previously generated by pairing with the slave headset (not necessarily the currently connected slave headset). If the key for the wireless connection is stored locally, the master headset may generate encrypted data based on the key and send it to the slave headset. After receiving the encrypted data, the slave headset may determine whether the encrypted data can be decrypted. If the decryption fails, a message indicating that the decryption failed may be replied to the master headset. After receiving the message indicating that the decryption failed, the master headset may delete the local SIRK (such as SIRK2) and determine whether there is a SIRK. Since the original SIRK (such as SIRK2) has been deleted, there is no SIRK currently, and it may be further determined whether it is the master headset. If it is the master headset, a new SIRK (such as SIRK1) may be generated and the new SIRK (such as SIRK1) may be synchronized to the slave headset. After receiving the SIRK sent by the master headset, the slave headset can determine whether it is the same as its current SIRK. If different, the SIRK is updated (for example, updated to SIRK1).
[0093] If the slave earphone can successfully decrypt the encrypted data, it can reply a message of successful decryption to the master earphone. After receiving the message of successful decryption, the master earphone can keep the current SIRK (such as SIRK2). Optionally, the master earphone can also synchronize the current SIRK (such as SIRK2) to the slave earphone. After receiving the SIRK sent by the master earphone, the slave earphone can determine whether it is the same as its current SIRK. If it is different, it updates the SIRK (such as updating to SIRK2). This ensures that the SIRK of the master earphone is the same as that of the slave earphone, and can be recognized by external devices as belonging to the same pair of earphones.
[0094] In an embodiment of the present application, communication encryption between the first Bluetooth device and the second Bluetooth device can be used to determine whether pairing is required. When a user replaces a Bluetooth device in a Bluetooth device set, the main Bluetooth device in the Bluetooth device set can delete the original second combination identification information and generate new first combination identification information. The combination identification information of the first Bluetooth device and the second Bluetooth device are both configured as the first combination identification information to ensure that the combination identification information of the two is consistent, and can trigger the external device to re-perform the identification process specified by CSIP to ensure that the newly added second Bluetooth device can normally establish a Bluetooth connection with the external device.
[0095] Method 2: The first Bluetooth device can obtain the Bluetooth address of the second Bluetooth device. If the first Bluetooth device does not store a pairing record corresponding to the Bluetooth address of the second Bluetooth device, it is determined that pairing with the second Bluetooth device is required; if the first Bluetooth device stores a pairing record corresponding to the Bluetooth address of the second Bluetooth device, it is determined that pairing with the second Bluetooth device is not required.
[0096] The first Bluetooth device may obtain the Bluetooth address of the second Bluetooth device and determine whether a pairing record corresponding to the Bluetooth address is stored. Optionally, the Bluetooth address of the second Bluetooth device may include a BLE address, etc.
[0097] If the first Bluetooth device stores a pairing record corresponding to the Bluetooth address of the second Bluetooth device, it means that the second Bluetooth device is a Bluetooth device that has been paired with the first Bluetooth device before and used in combination. The two do not need to be paired again. The second Bluetooth device and the first Bluetooth device are currently configured with the second combination identification information, and there is no need to reconfigure the combination identification information.
[0098] If the first Bluetooth device does not store a pairing record corresponding to the Bluetooth address of the second Bluetooth device, and the first Bluetooth device needs to be paired with the second Bluetooth device, it means that the second Bluetooth device is not a Bluetooth device that has been paired with the first Bluetooth device for combined use before, that is, the device member of the Bluetooth device set has changed, or the second Bluetooth device is a Bluetooth device that has been paired with the first Bluetooth device for combined use before, but the first Bluetooth device has deleted the pairing record, and at this time, the combination identification information of the first Bluetooth device may also be different from the combination identification information of the second Bluetooth device. Therefore, the second Bluetooth device and the first Bluetooth device need to reconfigure the combination identification information.
[0099] In some embodiments, the first Bluetooth device may include a first headset, the second Bluetooth device may include a second headset, and the first headset may obtain the Bluetooth address of the second headset through the device box interaction. When the first headset and the second headset are both placed in the headset box, the first headset may receive the Bluetooth address of the second headset sent by the headset box.
[0100] For example, Fig. 6A FIG. 1 is an application scenario diagram of a method for configuring a Bluetooth device in another embodiment. Fig. 6A As shown, when the first earphone 602 and the second earphone 604 are both placed in the earphone box 606, the earphone box 606 establishes communication connections with the first earphone 602 and the second earphone 604 respectively, and the second earphone 604 can send its own BLE address to the earphone box 606. After receiving the BLE address sent by the second earphone, the earphone box 606 can send the BLE address of the second earphone 604 to the first earphone 602. The first earphone 602 can determine whether a pairing record corresponding to the BLE address of the second earphone 604 is stored. If a pairing record corresponding to the BLE address of the second earphone 604 is not stored, the first earphone 602 can delete the local SIRK (such as SIRK2), generate a new SIRK (such as SIRK1), and synchronize the new SIRK (such as SIRK1) to the second earphone 604. The second earphone 604 can update its own SIRK (such as updated to SIRK1).
[0101] Optionally, the first headset 602 may synchronize SIRK with the second headset 604 by establishing a BLE connection with the second headset 604 based on the BLE address of the second headset 604, and then synchronizing SIRK (such as SIRK1) with the second headset 604 through the BLE address; or a classic Bluetooth connection may be established between the first headset 602 and the second headset 604, and the first headset 602 may synchronize SIRK (such as SIRK1) with the second headset 604 through the classic Bluetooth connection; or, the first headset 602 may also send SIRK (such as SIRK1) to the headset box 606, which is forwarded to the second headset 604 by the headset box 606. The embodiment of the present application does not limit the method of synchronizing SIRK.
[0102] In an embodiment of the present application, the first Bluetooth device can determine whether it needs to pair with the second Bluetooth device by judging whether a pairing record corresponding to the Bluetooth address of the second Bluetooth device is stored, thereby determining whether it needs to generate new first combination identification information and configure it. This can ensure that when a user replaces a Bluetooth device in a Bluetooth device set, the combination identification information of the newly added second Bluetooth device is consistent with that of the first Bluetooth device, and can trigger the external device to re-perform the identification process specified by CSIP, thereby ensuring that the newly added second Bluetooth device can normally establish a Bluetooth connection with the external device.
[0103] Mode 3: The first Bluetooth device includes a first headset, and the second Bluetooth device includes a second headset. When both the first headset and the second headset are placed in an earphone box, if the first headset receives target notification information sent by the earphone box, it is determined that pairing with the second headset is required. The target notification information is sent by the earphone box when it is detected that the Bluetooth address of the second headset is different from the Bluetooth address of the third headset.
[0104] The earphone box may store the Bluetooth address (such as BLE address, etc.) of a third earphone, which is a earphone that has been paired with the first earphone. When the first earphone and the second earphone are both placed in the earphone box, the second earphone may send its own Bluetooth address to the earphone box, and the earphone box may compare the Bluetooth address of the second earphone with the stored Bluetooth address of the third earphone. If the two are different, it means that the second earphone is not the third earphone that has been paired with the first earphone before, and a target notification message may be sent to the first earphone. The target notification message may be used to trigger the first earphone to generate the first combination identification information.
[0105] For example, Figure 6B FIG. 1 is a timing diagram of a method for configuring a Bluetooth device in another embodiment. Figure 6BAs shown, the first earphone can be the master earphone, and the second earphone can be the slave earphone. Both the master earphone and the slave earphone can be placed in an earphone box, and the earphone box establishes communication connections with the two earphones respectively. The slave earphone can send its own BLE address to the earphone box, and the earphone box can determine whether the received BLE address is the same as the stored BLE address of the slave earphone. If they are the same, it means that the slave earphone is a slave earphone that has been used in combination with the master earphone before, and there is no need to update SIRK. If the received BLE address is different from the stored BLE address of the slave earphone, it means that the slave earphone is not a slave earphone that has been used in combination with the master earphone before, and a notification to update SIRK can be sent to the master earphone. After the master earphone receives the notification of updating SIRK sent by the earphone box, it can delete the local SIRK (such as SIRK2) and determine whether there is a SIRK. Since the original SIRK (such as SIRK2) has been deleted, there is no SIRK at present, and it can be further determined whether it is the master earphone. If it is the master earphone, a new SIRK (such as SIRK1) can be generated and synchronized to the slave earphone. After the slave earphone receives the SIRK sent by the master earphone, it can determine whether there is a SIRK locally. If there is a SIRK locally, it can further determine whether the received SIRK is the same as the local SIRK. If they are different, the SIRK is updated (such as updated to SIRK1). If there is no SIRK locally, the SIRK can be directly updated (such as updated to SIRK1).
[0106] In the embodiment of the present application, the earphone box can determine whether the first earphone and the second earphone need to be paired through the machine-box interaction, so as to further determine whether new first combination identification information needs to be generated and configured. This can ensure that when the user changes the earphones, the combination identification information of the newly added second earphone is consistent with that of the first earphone, and can trigger the external device to re-perform the identification process specified by CSIP, so as to ensure that the newly added second earphone can normally establish a Bluetooth connection with the external device, thereby realizing the normal use of the two earphones.
[0107] Step 404: Obtain first combination identification information.
[0108] In some embodiments, the first Bluetooth device may acquire the first combination identification information in a manner including, but not limited to, any of the following acquisition manners:
[0109] Acquisition method 1: Generate first combination identification information according to a preset method.
[0110] The first Bluetooth device generates the first combination identification information according to a preset method, which may include: generating the first combination identification information based on the target BLE address, the target BLE address including any one of the BLE address of the first Bluetooth device and the BLE address of the second Bluetooth device; or randomly generating a combination identification information as the first combination identification information.
[0111] The first Bluetooth device can obtain the target BLE address and generate the first combined identification information according to the target BLE address in a specific manner. Optionally, the specific manner can be to directly use the target BLE address as a partial field of the first combined identification information to generate the first combined identification information. Furthermore, the target BLE address can be used as a partial field of the first combined identification information, and the partial field can be combined with the first preset field to generate the first combined identification information. The first preset field can refer to the pre-defined field information in the combined identification information, or it can be randomly generated field information. For example, the first combined identification information may include a first SIRK, and the SIRK may be 128 bytes. The BLE address (48 bytes) can be directly used as a partial field of the first SIRK, for example, SIRK = BLE address || first preset field.
[0112] Optionally, the specific method may also be to perform a hash calculation on the target BLE address, and use the calculation result as a partial field of the first combination identification information to generate the first combination identification information. Furthermore, the calculation result may be combined with the second preset field to generate the first combination identification information, for example, SIRK=HASH||second preset field, where HASH represents the result of performing a hash calculation on the target BLE address. Among them, the first preset field and the second preset field may be the same or different, and may be set according to actual conditions. Since the BLE address is unique, it can be ensured that the generated first combination identification information is also unique, and will not be confused with the combination identification information of other Bluetooth device sets, thereby improving the accuracy of the use of Bluetooth device sets.
[0113] In some embodiments, the first Bluetooth device may also randomly generate a combination identification information as the target combination identification information. The first Bluetooth device may pre-store various fields of the target combination identification information and randomly generate field values in each field to obtain unique target combination identification information, thereby improving the accuracy of the use of the Bluetooth device set.
[0114] Acquisition method 2: receiving first combination identification information sent by the first electronic device, where the first combination identification information is generated by the first electronic device according to a preset method.
[0115] The first electronic device may be a terminal device (such as a mobile phone, wearable device, etc.) that establishes a communication connection with the first Bluetooth device, or may be an electronic device used in conjunction with the first Bluetooth device. For example, the first Bluetooth device and the second Bluetooth device are headphones, and the first electronic device may be a headphone box, etc.
[0116] The manner in which the first electronic device generates the first combination identification information according to a preset manner may be similar to the manner in which the first Bluetooth device generates the first combination identification information according to a preset manner described in the above embodiment, and will not be repeated here. It should be noted that other manners may also be used to generate the first combination identification information, and are not limited to the above-mentioned manners.
[0117] In an embodiment of the present application, the first combination identification information can be generated in a preset manner, and the generated first combination identification information can be ensured to be different from the second combination identification information originally configured by the first Bluetooth device, thereby triggering the external device to re-perform the identification process specified by CSIP, thereby ensuring that the second Bluetooth device can normally establish a Bluetooth connection with the external device.
[0118] Step 406: configure the combined identification information of the first Bluetooth device as first combined identification information.
[0119] Step 408: Send the first combination identification information to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information.
[0120] Step 410: Keep the currently configured second combination identification information.
[0121] In an embodiment of the present application, the first Bluetooth device can determine whether it needs to be paired with the second Bluetooth device to be used in combination. When the first Bluetooth device needs to be paired with the second Bluetooth device, the combination identification information of the first Bluetooth device may be inconsistent with the combination identification information of the second Bluetooth device. Therefore, the first Bluetooth device and the second Bluetooth device are both configured with the same first combination identification information, so that the first Bluetooth device and the second Bluetooth device can be identified as belonging to the first Bluetooth device set, which can ensure that the first Bluetooth device and the second Bluetooth device can be used in combination normally, thereby meeting the user's usage needs.
[0122] like Figure 7 As shown, in another embodiment, a Bluetooth device configuration method is provided, which can be applied to the first Bluetooth device mentioned above, and the method may include the following steps:
[0123] Step 702 , determining whether pairing with a second Bluetooth device is required, if so, executing step 704 , if not, executing step 714 .
[0124] Step 704: Obtain first combination identification information.
[0125] Step 706: configure the combined identification information of the first Bluetooth device as first combined identification information.
[0126] Step 708: Send the first combination identification information to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information.
[0127] For the description of steps 702 to 708 , reference may be made to the relevant description in the above embodiments, which will not be repeated here.
[0128] In some embodiments, after the first Bluetooth device and the second Bluetooth device both configure their own combination identification information as the first combination identification information, the first Bluetooth device and the second Bluetooth device can both send Bluetooth broadcast signals based on the first combination identification information, and after the external second electronic device receives the Bluetooth broadcast signal, it can identify the first Bluetooth device and the second Bluetooth device as belonging to the same Bluetooth device set.
[0129] In some embodiments, the first combined identification information includes a first SIRK, and the first Bluetooth device and the second Bluetooth device are both configured with the first SIRK. The first Bluetooth device can send a LEAudio broadcast signal corresponding to the first SIRK. If the first Bluetooth device and the second Bluetooth device configure their own SIRKs with the first SIRK and establish a Bluetooth connection with an external second electronic device for the first time, the second electronic device can directly perform the identification process specified in the CSIP.
[0130] After the second electronic device receives the LEAudio broadcast signal sent by the first Bluetooth device, it can establish a LEAudio Bluetooth connection with the first Bluetooth device according to the LEAudio broadcast signal, and obtain the first SIRK corresponding to the LEAudio broadcast signal. As an implementation method, the LEAudio Bluetooth connection is established on the basis of the BLE connection, and the process of establishing the LEAudio Bluetooth connection may include querying some device parameters based on the BLE connection, and the query of the device parameters may include a SIRK query for the Bluetooth device. After the LE Audio Bluetooth connection is established, when there is a business demand, a CIS (Connected Isochronous Streams) channel may be established for business transmission. Therefore, the second electronic device can receive the first SIRK sent by the first Bluetooth device during the process of establishing a LEAudio Bluetooth connection with the first Bluetooth device.
[0131] The second Bluetooth device may also send a LEAudio broadcast signal corresponding to the first SIRK. After the second electronic device receives the LEAudio broadcast signal sent by the second Bluetooth device, it may determine whether the SIRK corresponding to the LEAudio broadcast signal is the same as the first SIRK of the first Bluetooth device. If it is determined that the SIRK corresponding to the LEAudio broadcast signal sent by the second Bluetooth device is the same as the first SIRK of the first Bluetooth device, it can be considered that the first Bluetooth device and the second Bluetooth device belong to the same Bluetooth device set, and a LEAudio Bluetooth connection request can be automatically sent to the second Bluetooth device to establish a LEAudio Bluetooth connection with the second Bluetooth device.
[0132] As an implementation method, the LE Audio broadcast signal sent by the Bluetooth device may include a special field calculated based on the SIRK. After the second electronic device receives the LE Audio broadcast signal sent by the second Bluetooth device, it can parse the LE Audio broadcast signal to obtain the target specific broadcast information and special fields carried by the LE Audio broadcast signal, and calculate the target local value based on the SIRK corresponding to the first Bluetooth device and the target specific broadcast information. If the target local value is the same as the special field, it can be determined that the first Bluetooth device and the second Bluetooth device belong to the same Bluetooth device set.
[0133] Specifically, Figure 8 As shown, the LEAudio broadcast signal may include RSI (resolvable Set Identifier), and RSI may include two parts: 1. A hash sequence 810 generated by the SIRK corresponding to the Bluetooth device; 2. A random sequence 820 generated by a random number. The hash sequence 810 may be calculated by the formula: hash = sih (SIKR, prand), where hash represents the hash sequence 810, and prand represents the random sequence 820; RSI = hash||prand. The target specific broadcast information obtained by the second electronic device parsing the LEAudio broadcast signal sent by the second Bluetooth device may be a random sequence of RSI, and the special field may be a hash sequence of RSI carried by the LEAudio broadcast signal. The second electronic device may calculate a hash value (i.e., the above-mentioned target local value) by the above formula based on the SIRK of the first Bluetooth device and the random sequence in the parsed RSI, and compare the hash value with the hash sequence of the parsed RSI. If the two are consistent, it means that the SIKR of the first Bluetooth device is the same as the SIRK of the second Bluetooth device.
[0134] For example, Fig. 9ASchematic diagram of the timing of establishing LE Audio Bluetooth connections with the first Bluetooth device and the second Bluetooth device for the first time in one embodiment. Fig. 9A As shown, the first Bluetooth device may include a first earphone in the earphone device, and the second Bluetooth device may include a second earphone in the earphone device. After the first earphone and the second earphone are configured with the same SIRK (such as SIRK1), the first earphone can send LE Audio broadcast signal 1, the second electronic device turns on the scanning mode (referring to the mode that can scan and obtain the LE Audio broadcast signal), and can scan and obtain the LE Audio broadcast signal 1 sent by the first earphone. The second electronic device can establish a LE Audio Bluetooth connection with the first earphone according to the LE Audio broadcast signal 1, and obtain the SIRK (such as SIRK1) of the first earphone. The second earphone sends a LE Audio broadcast signal 2, the second electronic device can scan and obtain the LE Audio broadcast signal 2 sent by the second earphone, and can calculate the hash value according to the SIRK (such as SIRK1) of the first earphone and the prand field in the LE Audio broadcast signal 2, and then determine whether the hash value is equal to the hash field in the LE Audio broadcast signal 2. If the hash value is equal to the hash field in the LEAudio broadcast signal 2, the second electronic device can automatically send a LEAudio connection request to the second headset and establish a LEAudio Bluetooth connection with the second headset. The second electronic device can also obtain the SIRK of the second headset. Since the SIRK of the second headset is the same as that of the first headset (both are SIRK1), the first headset and the second headset are determined to belong to the same group (i.e., the same Bluetooth device set).
[0135] Step 710: Receive a connection request sent by a second electronic device.
[0136] Step 712: Establish a Bluetooth connection with the second electronic device according to the reconnection request, and send the first combination identification information to the second electronic device, so that the second electronic device updates the combination identification information corresponding to the first Bluetooth device to the first combination identification information, and establishes a Bluetooth connection with the second Bluetooth device according to the first combination identification information.
[0137] If the first Bluetooth device has established a Bluetooth connection with the second electronic device before the first Bluetooth device and the second Bluetooth device configure their own combination identification information with the first combination identification information, that is, the second electronic device is not connected to the first Bluetooth device for the first time. The second electronic device stores the pairing record corresponding to the first Bluetooth device, such as the Bluetooth address of the first Bluetooth device, the corresponding combination identification information (such as the second combination identification information), the Bluetooth addresses of other Bluetooth devices in the same Bluetooth device set, etc. The second electronic device can send a back-connection request to the first Bluetooth device based on the stored pairing record (such as the Bluetooth address of the first Bluetooth device). After the first Bluetooth device receives the back-connection request sent by the second electronic device, it can establish a Bluetooth connection with the second electronic device. After the second electronic device establishes a Bluetooth connection with the first Bluetooth device, the first Bluetooth device can send the first combination identification information to the second electronic device. The second electronic device can determine whether the first combination identification information is the same as the previously stored combination identification information. Since the combination identification information of the first Bluetooth device is updated from the second combination identification information to the first combination identification information, the second electronic device can determine that the combination identification information of the first Bluetooth device has changed. Therefore, it can be considered that the device members in the Bluetooth device set have changed, and the identification process specified in the CSIP can be performed.
[0138] As an implementation method, before the first Bluetooth device and the second Bluetooth device configure their own SIRKs with the first SIRK, the first Bluetooth device has established a LEAudio Bluetooth connection with the second electronic device, and the second electronic device stores the second SIRK previously configured by the first Bluetooth device. After the second electronic device successfully connects back to the first Bluetooth device, the first Bluetooth device can send the first SIRK to the second electronic device, and the second electronic device can determine whether the first SIRK is the same as the stored SIRK. Since the first SIRK is different from the stored second SIRK, the second electronic device updates the SIRK corresponding to the first Bluetooth device to the first SIRK. The second Bluetooth device can send a LEAudio broadcast signal based on the first SIRK. Since the second electronic device finds that the SIRK corresponding to the first Bluetooth device has been updated, it can determine whether the SIRK of the second Bluetooth device is the same as the current SIRK of the first Bluetooth device (i.e., whether it is the first SIRK) according to the LEAudio broadcast signal when receiving the LEAudio broadcast signal sent by the second Bluetooth device. If it is determined according to the LEAudio broadcast signal that the second Bluetooth device corresponds to the first SIRK, it can be confirmed that the second Bluetooth device and the first Bluetooth device belong to the same Bluetooth device set, and a LEAudio Bluetooth connection is established with the second Bluetooth device.
[0139] For example, Fig. 9B This is a timing diagram of an embodiment in which a second electronic device establishes a LEAudio Bluetooth connection with a first Bluetooth device for a non-first time. Fig. 9BAs shown, the first Bluetooth device may include a first headset in a headset device, and the second Bluetooth device may include a second headset in a headset device. After the first headset and the second headset are configured with the same SIRK (such as SIRK1), the second electronic device connects back to the first headset, establishes a LEAudio Bluetooth connection with the first headset, and obtains the SIRK of the first headset (such as SIRK1). The second electronic device can determine whether the obtained SIRK of the first headset is the same as the previously stored SIRK (such as SIRK2). If the two are different, it means that the SIRK of the first headset has changed, and the second electronic device can update the SIRK of the first headset (such as from SIRK2 to SIRK1).
[0140] The second earphone sends LEAudio broadcast signal 2. The second electronic device can scan and obtain the LEAudio broadcast signal sent by the second earphone, and can calculate the hash value based on the SIRK of the first earphone (such as SIRK1) and the prand field in the LEAudio broadcast signal 2, and then determine whether the hash value is equal to the hash field in the LEAudio broadcast signal 2. If the hash value is equal to the hash field in the LEAudio broadcast signal, the second electronic device can automatically send a LEAudio connection request to the second earphone and establish a LEAudio Bluetooth connection with the second earphone. The second electronic device can also obtain the SIRK of the second earphone. Since the SIRK of the second earphone is the same as that of the first earphone (both are SIRK1), the first earphone and the second earphone are determined to belong to the same group (that is, the same set of Bluetooth devices).
[0141] Step 714: Keep the currently configured second combination identification information.
[0142] Step 716: Receive a connection request sent by the second electronic device.
[0143] Step 718: Establish a Bluetooth connection with the second electronic device according to the back-connection request, and send the second combination identification information to the second electronic device.
[0144] When the first Bluetooth device determines that it does not need to be paired with the second Bluetooth device, it means that the second Bluetooth device is a Bluetooth device that has been paired with the first Bluetooth device before and used in combination. Both the first Bluetooth device and the second Bluetooth device are configured with the second combination identification information. Therefore, the first Bluetooth device can maintain the currently configured second combination identification information. After the second electronic device successfully connects back to the first Bluetooth device, the first Bluetooth device can send the second combination identification information to the second electronic device. Since the second electronic device has already stored the second combination identification information, it can be determined that the combination identification information of the first Bluetooth device has not changed, indicating that the device members of the Bluetooth device set have not changed. Since the second electronic device has also been connected to the second Bluetooth device before, it stores the Bluetooth address corresponding to the second Bluetooth device, and can connect back to the second Bluetooth device based on the Bluetooth address corresponding to the second Bluetooth device.
[0145] For example, Fig. 9C This is a timing diagram of another embodiment in which a second electronic device establishes a LEAudio Bluetooth connection with a first Bluetooth device for a non-first time. Fig. 9B As shown, the first Bluetooth device may include a first headset in the headset device, and the second Bluetooth device may include a second headset in the headset device. The first headset and the second headset are both configured with the same SIRK (such as SIRK2). The second electronic device connects back to the first headset, establishes a LEAudio Bluetooth connection with the first headset, and obtains the SIRK of the first headset (such as SIRK2). The second electronic device can determine whether the SIRK of the first headset obtained is the same as the previously stored SIRK (such as SIRK2). If the two are the same, it means that the Bluetooth device set to which the first headset belongs has not changed, and the second electronic device can connect back to the second headset and establish a LEAudio Bluetooth connection with the second headset.
[0146] Optionally, the second electronic device establishes an LE Audio Bluetooth connection with the second headset. The second electronic device may also obtain the SIRK of the second headset. Since the SIRK of the second headset is the same as that of the first headset (both are SIRK2), the first headset and the second headset are determined to belong to the same group (i.e., the same Bluetooth device set).
[0147] In an embodiment of the present application, since the combination identification information of the first Bluetooth device has been updated, after the external second electronic device connects back to the first Bluetooth device, the combination identification information of the first Bluetooth device is read as the first combination identification information, and it is detected that the combination identification information of the Bluetooth device set to which the first Bluetooth device belongs has been updated, indicating that the Bluetooth devices in the Bluetooth device set have changed. The external second electronic device can identify whether the second Bluetooth device belongs to the same Bluetooth device set as the first Bluetooth device according to the process specified in the CSIP protocol. Since the combination identification information of the second Bluetooth device is the same as that of the first Bluetooth device (both are the first combination identification information), the external second electronic device can establish a Bluetooth connection with the second Bluetooth device, ensuring that the first Bluetooth device and the second Bluetooth device are used in combination normally, being compatible with more scenarios in the actual use process of users, meeting the use needs of users, and improving the user experience.
[0148] like Fig.10 As shown, in one embodiment, another Bluetooth device configuration method is provided, which can be applied to the second Bluetooth device mentioned above, and the method may include the following steps:
[0149] Step 1010: Receive first combination identification information sent by a first Bluetooth device; the first combination identification information is sent by the first Bluetooth device when it is determined that pairing with a second Bluetooth device is required.
[0150] Step 1020: configure the combination identification information of the second Bluetooth device as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
[0151] In some embodiments, the situation where the first Bluetooth device needs to be paired with the second Bluetooth device includes: the first Bluetooth device does not store a pairing record corresponding to the second Bluetooth device; and / or the second Bluetooth device does not store a pairing record corresponding to the first Bluetooth device.
[0152] In some embodiments, before step 1010, the method further includes: establishing a communication link with a first Bluetooth device; receiving encrypted data sent by the first Bluetooth device through the communication link, the encrypted data being generated by the first Bluetooth device according to a stored key; decrypting the encrypted data; if the decryption fails, sending a decryption failure message to the first Bluetooth device so that the first Bluetooth device determines that it needs to be paired with the second Bluetooth device; if the decryption is successful, sending a decryption success message to the first Bluetooth device so that the first Bluetooth device determines that it does not need to be paired with the second Bluetooth device.
[0153] In some embodiments, the classic Bluetooth address of the first Bluetooth device is the same as the classic Bluetooth address of the second Bluetooth device.
[0154] In some embodiments, the first Bluetooth device includes a first headset, the second Bluetooth device includes a second headset, and before step 1010, the method further includes:
[0155] When both the first earphone and the second earphone are placed in the earphone box, the Bluetooth address of the second earphone is sent to the earphone box, so that the earphone box sends the Bluetooth address of the second earphone to the first earphone, and the first earphone determines whether a pairing record corresponding to the Bluetooth address of the second earphone is stored, and if so, it is determined that pairing with the second earphone is not required, and if not, it is determined that pairing with the second earphone is required; or,
[0156] When the first earphone and the second earphone are both placed in the earphone box, the Bluetooth address of the second earphone is sent to the earphone box so that the earphone box determines whether the Bluetooth address of the second earphone is the same as the Bluetooth address of the third earphone, and sends target notification information to the first earphone when the Bluetooth address of the second earphone is different from the Bluetooth address of the third earphone; the third earphone is the earphone that has been paired with the first earphone; the target notification information is used to determine the need to pair with the second earphone.
[0157] It should be noted that the description of the Bluetooth device configuration method applied to the second Bluetooth device provided in the embodiment of the present application can refer to the relevant description of the Bluetooth device configuration method applied to the first Bluetooth device provided in the above embodiments, and will not be repeated here.
[0158] In an embodiment of the present application, when a first Bluetooth device needs to be paired with a second Bluetooth device to be used in combination, it may be that the combination identification information of the first Bluetooth device is inconsistent with the combination identification information of the second Bluetooth device. Therefore, the first Bluetooth device and the second Bluetooth device are both configured with the same first combination identification information, so that the first Bluetooth device and the second Bluetooth device can both be identified as belonging to the first Bluetooth device set, which can ensure that the first Bluetooth device and the second Bluetooth device can be used in combination normally, thereby meeting the user's usage needs.
[0159] like Fig.11 As shown, in one embodiment, a Bluetooth device configuration apparatus 1100 is provided, which can be applied to the first Bluetooth device mentioned above. The Bluetooth device configuration apparatus 1100 may include a combination identification acquisition module 1110 , a configuration module 1120 and a combination identification sending module 1130 .
[0160] The combination identification acquisition module 1110 is used to acquire first combination identification information when it is determined that pairing with a second Bluetooth device is required.
[0161] In some embodiments, the situation where the first Bluetooth device needs to be paired with the second Bluetooth device includes: the first Bluetooth device does not store a pairing record corresponding to the second Bluetooth device; and / or the second Bluetooth device does not store a pairing record corresponding to the first Bluetooth device.
[0162] The configuration module 1120 is configured to configure the combination identification information of the first Bluetooth device as the first combination identification information.
[0163] In some embodiments, the configuration module 1120 is further configured to delete the second combination identification information currently configured in the first Bluetooth device.
[0164] The combination identification sending module 1130 is used to send the first combination identification information to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information, and the first combination identification information is used to indicate the first Bluetooth device set.
[0165] In some embodiments, the Bluetooth device configuration apparatus 1100 further includes a determination module.
[0166] The judging module is used to judge whether pairing with a second Bluetooth device is required.
[0167] In some embodiments, the judgment module is also used to establish a communication link with a second Bluetooth device; generate encrypted data according to the stored key, and send the encrypted data to the second Bluetooth device through the communication link so that the second Bluetooth device decrypts the encrypted data; if a decryption failure message is received from the second Bluetooth device, it is determined that pairing with the second Bluetooth device is required; if a decryption success message is received from the second Bluetooth device, it is determined that pairing with the second Bluetooth device is not required.
[0168] In some embodiments, the judgment module is also used to obtain the Bluetooth address of the second Bluetooth device; if no pairing record corresponding to the Bluetooth address of the second Bluetooth device is stored, it is determined that pairing with the second Bluetooth device is required; if a pairing record corresponding to the Bluetooth address of the second Bluetooth device is stored, it is determined that pairing with the second Bluetooth device is not required.
[0169] In some embodiments, the first Bluetooth device includes a first earphone, and the second Bluetooth device includes a second earphone; the judgment module is also used to receive the Bluetooth address of the second earphone sent by the earphone box when both the first earphone and the second earphone are placed in the earphone box. If no pairing record corresponding to the Bluetooth address of the second earphone is stored, it is determined that pairing with the second earphone is required; if a pairing record corresponding to the Bluetooth address of the second earphone is stored, it is determined that pairing with the second earphone is not required.
[0170] In some embodiments, the first Bluetooth device includes a first earphone, and the second Bluetooth device includes a second earphone; the judgment module is also used to determine that pairing with the second earphone is required when both the first earphone and the second earphone are placed in an earphone box and if target notification information sent by the earphone box is received; wherein the target notification information is sent by the earphone box when it is detected that the Bluetooth address of the second earphone is different from the Bluetooth address of the third earphone; the third earphone is a earphone that has been paired with the first earphone.
[0171] In some embodiments, the combination identification acquisition module 1110 is further used to generate first combination identification information according to a preset method; or, to receive first combination identification information sent by a first electronic device, where the first combination identification information is generated by the first electronic device according to a preset method.
[0172] In some embodiments, the Bluetooth device configuration apparatus 1100 further includes a backconnection module.
[0173] The back-connection module is used to receive a back-connection request sent by the second electronic device, and establish a Bluetooth connection with the second electronic device according to the back-connection request.
[0174] The combination identification sending module 1130 is further used to send the first combination identification information to the second electronic device, so that the second electronic device updates the combination identification information corresponding to the first Bluetooth device to the first combination identification information, and establishes a Bluetooth connection with the second Bluetooth device according to the first combination identification information.
[0175] In some embodiments, the first combination identification information includes a first SIRK; the combination identification sending module 1130 is also used to send the first SIRK to a second electronic device, so that the second electronic device updates the SIRK corresponding to the first Bluetooth device to the first SIRK, and when receiving the LE Audio broadcast signal sent by the second Bluetooth device, if it is determined according to the LE Audio broadcast signal that the second Bluetooth device corresponds to the first SIRK, then an LE Audio Bluetooth connection is established with the second Bluetooth device; wherein the LE Audio broadcast signal sent by the second Bluetooth device is sent by the second Bluetooth device based on the first SIRK.
[0176] In an embodiment of the present application, when a first Bluetooth device needs to be paired with a second Bluetooth device to be used in combination, it may be that the combination identification information of the first Bluetooth device is inconsistent with the combination identification information of the second Bluetooth device. Therefore, the first Bluetooth device and the second Bluetooth device are both configured with the same first combination identification information, so that the first Bluetooth device and the second Bluetooth device can both be identified as belonging to the first Bluetooth device set, which can ensure that the first Bluetooth device and the second Bluetooth device can be used in combination normally, thereby meeting the user's usage needs.
[0177] In addition, since the combination identification information of the first Bluetooth device has been updated, after the external second electronic device reconnects to the first Bluetooth device, the combination identification information of the first Bluetooth device is read as the first combination identification information, and it is detected that the combination identification information of the Bluetooth device set to which the first Bluetooth device belongs has been updated, indicating that the Bluetooth devices in the Bluetooth device set have changed. The external second electronic device can identify whether the second Bluetooth device belongs to the same Bluetooth device set as the first Bluetooth device according to the process specified in the CSIP protocol. Since the combination identification information of the second Bluetooth device is the same as that of the first Bluetooth device (both are the first combination identification information), the external second electronic device can establish a Bluetooth connection with the second Bluetooth device, ensuring that the first Bluetooth device and the second Bluetooth device are used in combination normally, being compatible with more scenarios in the actual use process of users, meeting the use needs of users, and improving the user experience.
[0178] like Fig.12 As shown, in one embodiment, a Bluetooth device configuration apparatus 1200 is provided, which can be applied to the above-mentioned second Bluetooth device. The Bluetooth device configuration apparatus 1200 may include a combination identification receiving module 1210 and a configuration module 1220 .
[0179] The combination identification receiving module 1210 is used to receive first combination identification information sent by the first Bluetooth device; the first combination identification information is sent by the first Bluetooth device when it determines that it needs to be paired with the second Bluetooth device.
[0180] The configuration module 1220 is used to configure the combination identification information of the second Bluetooth device to the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
[0181] In some embodiments, the situation where the first Bluetooth device needs to be paired with the second Bluetooth device includes: the first Bluetooth device does not store a pairing record corresponding to the second Bluetooth device; and / or the second Bluetooth device does not store a pairing record corresponding to the first Bluetooth device.
[0182] In some embodiments, the Bluetooth device configuration apparatus 1200 further includes a decryption module.
[0183] A decryption module is used to establish a communication link with a first Bluetooth device; receive encrypted data sent by the first Bluetooth device through the communication link, the encrypted data is generated by the first Bluetooth device according to a stored key; decrypt the encrypted data; if the decryption fails, send a decryption failure message to the first Bluetooth device so that the first Bluetooth device determines that it needs to be paired with the second Bluetooth device; if the decryption is successful, send a decryption success message to the first Bluetooth device so that the first Bluetooth device determines that it does not need to be paired with the second Bluetooth device.
[0184] In some embodiments, the first Bluetooth device includes a first headset, the second Bluetooth device includes a second headset, and the Bluetooth device configuration apparatus 1200 further includes an address sending module.
[0185] The address sending module is used to send the Bluetooth address of the second earphone to the earphone box when the first earphone and the second earphone are both placed in the earphone box, so that the earphone box sends the Bluetooth address of the second earphone to the first earphone, and the first earphone determines whether a pairing record corresponding to the Bluetooth address of the second earphone is stored, and if so, it is determined that pairing with the second earphone is not required, and if not, it is determined that pairing with the second earphone is required; or, when the first earphone and the second earphone are both placed in the earphone box, send the Bluetooth address of the second earphone to the earphone box, so that the earphone box determines whether the Bluetooth address of the second earphone is the same as the Bluetooth address of the third earphone, and sends target notification information to the first earphone when the Bluetooth address of the second earphone is different from the Bluetooth address of the third earphone; the third earphone is a earphone that has been paired with the first earphone; the target notification information is used to determine that pairing with the second earphone is required.
[0186] In an embodiment of the present application, when a first Bluetooth device needs to be paired with a second Bluetooth device to be used in combination, it may be that the combination identification information of the first Bluetooth device is inconsistent with the combination identification information of the second Bluetooth device. Therefore, the first Bluetooth device and the second Bluetooth device are both configured with the same first combination identification information, so that the first Bluetooth device and the second Bluetooth device can both be identified as belonging to the first Bluetooth device set, which can ensure that the first Bluetooth device and the second Bluetooth device can be used in combination normally, thereby meeting the user's usage needs.
[0187] Fig.13 FIG. 1 is a structural block diagram of a Bluetooth device in one embodiment. Fig.13 As shown, the Bluetooth device 1300 may include one or more of the following components: a processor 1310, and a memory 1320 coupled to the processor 1310, wherein the memory 1320 may store one or more computer programs, and the one or more computer programs may be configured to implement the Bluetooth device configuration method applied to the first Bluetooth device as described in the above embodiments when executed by one or more processors 1310.
[0188] The processor 1310 may include one or more processing cores. The processor 1310 uses various interfaces and lines to connect the various parts of the entire Bluetooth device 1300, and executes various functions and processes data of the Bluetooth device 1300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1320, and calling data stored in the memory 1320. Optionally, the processor 1310 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1310 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1310, but may be implemented separately through a communication chip.
[0189] The memory 1320 may include a random access memory (RAM) or a read-only memory (ROM). The memory 1320 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the Bluetooth device 1300 during use, etc.
[0190] The Bluetooth device 1300 may also include a Bluetooth module, which may be used to provide a Bluetooth communication function, establish a Bluetooth connection with a second electronic device, 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 thereto and may change with the development of the Bluetooth protocol.
[0191] In one embodiment, the present application provides a Bluetooth device, including a memory and a processor, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the processor implements the Bluetooth device configuration method applied to a second Bluetooth device as described in the above embodiments.
[0192] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for configuring a Bluetooth device applied to a first Bluetooth device as described in the above embodiments is implemented.
[0193] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements a Bluetooth device configuration method applied to a second Bluetooth device as described in the above embodiments.
[0194] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement a Bluetooth device configuration method applied to a first Bluetooth device as described in the above embodiments.
[0195] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement a Bluetooth device configuration method applied to a second Bluetooth device as described in the above embodiments.
[0196] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.
[0197] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).
[0198] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application. It should be noted that "multiple" in the present application includes "two or more".
[0199] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0200] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0202] The above is a detailed introduction to a Bluetooth device configuration method, device, electronic device and storage medium disclosed in the embodiment of the present application. The principle and implementation method of the present application are described in detail using specific examples in this article. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. It is understandable that some technical features and technical means in the present application can also refer to the relevant provisions of the Bluetooth standard, or be combined with the relevant provisions in the Bluetooth standard.
Claims
1. A method for configuring a Bluetooth device, characterized in that: Applied to a first Bluetooth device, the method includes: When it is determined that pairing with the second Bluetooth device is required, obtaining first combination identification information; configuring the combined identification information of the first Bluetooth device as the first combined identification information; The first combination identification information is sent to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
2. The method according to claim 1, characterized in that The situation where the first Bluetooth device needs to be paired with the second Bluetooth device includes: The first Bluetooth device does not store a pairing record corresponding to the second Bluetooth device; and / or the second Bluetooth device does not store a pairing record corresponding to the first Bluetooth device.
3. The method according to claim 1, characterized in that In the case where it is determined that pairing with the second Bluetooth device is required, before obtaining the first combination identification information, the method further includes: Determine whether pairing with a second Bluetooth device is required.
4. The method according to claim 3, characterized in that The determining whether pairing with the second Bluetooth device is required includes: Establishing a communication link with a second Bluetooth device; generating encrypted data according to the stored key, and sending the encrypted data to the second Bluetooth device through the communication link, so that the second Bluetooth device decrypts the encrypted data; If the decryption failure information sent by the second Bluetooth device is received, determining that pairing with the second Bluetooth device is required; If the decryption success information sent by the second Bluetooth device is received, it is determined that pairing with the second Bluetooth device is not required.
5. The method according to claim 4, characterized in that The classic Bluetooth address of the first Bluetooth device is the same as the classic Bluetooth address of the second Bluetooth device.
6. The method according to claim 3, characterized in that The determining whether pairing with the second Bluetooth device is required includes: Obtaining a Bluetooth address of the second Bluetooth device; If no pairing record corresponding to the Bluetooth address of the second Bluetooth device is stored, determining that pairing with the second Bluetooth device is required; If a pairing record corresponding to the Bluetooth address of the second Bluetooth device is stored, it is determined that pairing with the second Bluetooth device is not required.
7. The method according to claim 6, characterized in that The first Bluetooth device includes a first headset, the second Bluetooth device includes a second headset, and obtaining the Bluetooth address of the second Bluetooth device includes: When both the first earphone and the second earphone are placed in the earphone box, a Bluetooth address of the second earphone sent by the earphone box is received.
8. The method according to claim 3, characterized in that The first Bluetooth device includes a first headset, the second Bluetooth device includes a second headset, and the determining whether pairing with the second Bluetooth device is required includes: When both the first earphone and the second earphone are placed in the earphone box, if the target notification information sent by the earphone box is received, it is determined that pairing with the second earphone is required; wherein the target notification information is sent by the earphone box when it is detected that the Bluetooth address of the second earphone is different from the Bluetooth address of the third earphone; the third earphone is the earphone that has been paired with the first earphone.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: receiving a connection request sent by a second electronic device; Establish a Bluetooth connection with the second electronic device according to the backconnection request, and send the first combination identification information to the second electronic device, so that the second electronic device updates the combination identification information corresponding to the first Bluetooth device to the first combination identification information, and establishes a Bluetooth connection with the second Bluetooth device according to the first combination identification information.
10. The method according to claim 9, characterized in that The first combination identification information includes a first combination identification resolution value SIRK; the second electronic device updates the combination identification information corresponding to the first Bluetooth device to the first combination identification information, and establishes a Bluetooth connection with the second Bluetooth device according to the first combination identification information, including: The second electronic device updates the SIRK corresponding to the first Bluetooth device to the first SIRK, and when receiving the LE Audio broadcast signal sent by the second Bluetooth device, if it is determined according to the LE Audio broadcast signal that the second Bluetooth device corresponds to the first SIRK, then an LE Audio Bluetooth connection is established with the second Bluetooth device; wherein the LE Audio broadcast signal sent by the second Bluetooth device is sent by the second Bluetooth device based on the first SIRK.
11. A method for configuring a Bluetooth device, characterized in that: Applied to a second Bluetooth device, the method comprises: receiving first combination identification information sent by a first Bluetooth device; the first combination identification information is sent by the first Bluetooth device when determining that pairing with the second Bluetooth device is required; The combination identification information of the second Bluetooth device is configured as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
12. The method according to claim 11, characterized in that The situation where the first Bluetooth device needs to be paired with the second Bluetooth device includes: The first Bluetooth device does not store a pairing record corresponding to the second Bluetooth device; and / or the second Bluetooth device does not store a pairing record corresponding to the first Bluetooth device.
13. The method according to claim 11, characterized in that Before receiving the first combination identification information sent by the first Bluetooth device, the method further includes: Establishing a communication link with a first Bluetooth device; receiving encrypted data sent by the first Bluetooth device through the communication link, wherein the encrypted data is generated by the first Bluetooth device according to a stored key; decrypting the encrypted data; If the decryption fails, sending decryption failure information to the first Bluetooth device, so that the first Bluetooth device determines that pairing with the second Bluetooth device is required; If the decryption is successful, decryption success information is sent to the first Bluetooth device, so that the first Bluetooth device determines that it is not necessary to pair with the second Bluetooth device.
14. The method according to claim 13, characterized in that The classic Bluetooth address of the first Bluetooth device is the same as the classic Bluetooth address of the second Bluetooth device.
15. The method according to claim 11, characterized in that The first Bluetooth device includes a first headset, and the second Bluetooth device includes a second headset. Before receiving the first combination identification information sent by the first Bluetooth device, the method further includes: When both the first earphone and the second earphone are placed in the earphone box, the Bluetooth address of the second earphone is sent to the earphone box, so that the earphone box sends the Bluetooth address of the second earphone to the first earphone, and the first earphone determines whether a pairing record corresponding to the Bluetooth address of the second earphone is stored, and if so, determines that pairing with the second earphone is not required, and if not, determines that pairing with the second earphone is required; or, When the first earphone and the second earphone are both placed in the earphone box, the Bluetooth address of the second earphone is sent to the earphone box so that the earphone box determines whether the Bluetooth address of the second earphone is the same as the Bluetooth address of the third earphone, and sends target notification information to the first earphone when the Bluetooth address of the second earphone is different from the Bluetooth address of the third earphone; the third earphone is a earphone that has been paired with the first earphone; and the target notification information is used to determine the need to pair with the second earphone.
16. A Bluetooth device configuration device, characterized in that: Applied to a first Bluetooth device, the apparatus comprises: A combination identification acquisition module, used to acquire first combination identification information when it is determined that pairing with a second Bluetooth device is required; A configuration module, configured to configure the combination identification information of the first Bluetooth device as the first combination identification information; The combination identification sending module is used to send the first combination identification information to the second Bluetooth device, so that the second Bluetooth device configures the combination identification information as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
17. A Bluetooth device configuration device, characterized in that: Applied to a second Bluetooth device, the apparatus comprises: A combination identification receiving module, used to receive first combination identification information sent by a first Bluetooth device; the first combination identification information is sent by the first Bluetooth device when it is determined that pairing with the second Bluetooth device is required; A configuration module is used to configure the combination identification information of the second Bluetooth device as the first combination identification information, where the first combination identification information is used to indicate the first Bluetooth device set.
18. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 10 or 11 to 15.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 or 11 to 15 is implemented.