Connection method of Bluetooth device and Bluetooth device
By setting up a sub-device with shared set of identity resolution code in a Bluetooth device, using the pairing connection between the first sub-device and the terminal device, the automatic pairing connection of the second sub-device is realized, and the stability of broadcast packets when multiple sub-device is connected is solved. burden, improves connection stability and user experience.
Patent Information
- Application Number
- CN202311022599.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
Multiple sub-device in Bluetooth devices send broadcast packets separately when connected, affecting the stability of the connection and user experience.
By setting the first sub-device and the second sub-device of the shared set of identity resolution code in the Bluetooth device, the first sub-device pairs and connects with the terminal device after receiving the pairing request, and then the second sub-device pairs with the terminal device based on the initialization connection. connect.
It reduces the number of connected devices that users see in terminal devices, reduces the possibility of user error operations, improves the stability and speed of Bluetooth device connections, and improves the user experience.
Smart Images

Figure CN119497252A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of wireless communications, and in particular to a connection method for a Bluetooth device and a Bluetooth device. Background Art
[0002] Bluetooth technology is a short-range wireless communication technology that allows two devices to communicate without a network infrastructure. BLE Audio (Bluetooth low energy Audio) Bluetooth low energy audio technology can provide higher audio quality and lower power consumption.
[0003] Generally, a Bluetooth device may include a set of multiple sub-devices. When the Bluetooth device turns on the Bluetooth connection function, the multiple sub-devices will send out broadcast data packets respectively. Then, the multiple sub-devices will establish connections with the terminal based on their broadcast data packets respectively, affecting the stability of the Bluetooth device connection. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a connection method of a Bluetooth device and a Bluetooth device.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for connecting a Bluetooth device is provided, wherein the Bluetooth device includes a first sub-device and a second sub-device that share a package identity resolution code, and the method includes:
[0006] In response to receiving a pairing operation for the Bluetooth device, the first sub-device sends a non-directional broadcast packet, where the non-directional broadcast packet is used for a terminal device to identify the Bluetooth device;
[0007] In response to receiving a first pairing request from a target terminal device to be connected, the first sub-device is paired and connected with the target terminal device according to the address of the target terminal device carried in the first pairing request;
[0008] After the first sub-device is successfully paired and connected with the target terminal device, based on the initialization connection between the first sub-device and the second sub-device, the second sub-device is paired and connected with the target terminal device.
[0009] Optionally, the initialization connection between the first sub-device and the second sub-device is connected in the following manner:
[0010] When the Bluetooth device is turned on, the second sub-device sends an initialization directional broadcast packet to the first sub-device, wherein the initialization directional broadcast packet carries the address of the first sub-device;
[0011] In response to receiving the initialization directional broadcast packet, the first sub-device establishes an initialization connection with the second sub-device and sends a notification message to the second sub-device, where the notification message is used to notify the second sub-device to turn off broadcasting.
[0012] Optionally, the non-directional broadcast packet includes a package identity resolution code of the Bluetooth device, and the initialization connection between the first sub-device and the second sub-device, the second sub-device is paired and connected with the target terminal device, including:
[0013] The second sub-device receives the address of the target terminal device sent by the first sub-device based on the initialization connection;
[0014] The second sub-device sends a first directional broadcast packet, wherein the first directional broadcast packet includes the address of the target terminal device and the set identification code of the Bluetooth device, so that the target terminal device, based on the set identification code and the identification, identifies that the second sub-device and the first sub-device belong to the same set;
[0015] In response to receiving a second pairing request from the target terminal device, the second sub-device is paired and connected with the target terminal device.
[0016] Optionally, the method further comprises:
[0017] In response to receiving a reconnection operation for the Bluetooth device, according to the address of the paired terminal device in the Bluetooth device, the target sub-device in the Bluetooth device sends a second directional broadcast packet, wherein the second directional broadcast packet includes the address of the paired terminal device, and the target sub-device is a powered-on sub-device of the first sub-device and the second sub-device;
[0018] When the target sub-device receives the connection request from the paired terminal device, the target sub-device is paired and connected with the paired terminal device.
[0019] Optionally, the Bluetooth device includes multiple sub-devices that share a set identity resolution code, the first sub-device is any sub-device among the multiple sub-devices, and the second sub-device is other sub-device among the multiple sub-devices except the first sub-device.
[0020] Optionally, the Bluetooth device is a Bluetooth headset using Bluetooth low energy audio technology.
[0021] According to a second aspect of an embodiment of the present disclosure, a Bluetooth device is provided, the Bluetooth device comprising a first sub-device and a second sub-device that share a package identity resolution code:
[0022] The first sub-device is used to send a non-directional broadcast packet in response to receiving a pairing operation for the Bluetooth device, wherein the non-directional broadcast packet is used for the terminal device to identify the Bluetooth device;
[0023] The first sub-device is further configured to, in response to receiving a first pairing request from a target terminal device to be connected, pair and connect with the target terminal device according to the address of the target terminal device carried in the first pairing request;
[0024] The second sub-device is used to pair and connect with the target terminal device based on the initialization connection between the first sub-device and the second sub-device after the first sub-device is successfully paired and connected with the target terminal device.
[0025] Optionally, the initialization connection between the first sub-device and the second sub-device is connected in the following manner:
[0026] When the Bluetooth device is turned on, the second sub-device sends an initialization directional broadcast packet to the first sub-device, wherein the initialization directional broadcast packet carries the address of the first sub-device;
[0027] In response to receiving the initialization directional broadcast packet, the first sub-device establishes an initialization connection with the second sub-device and sends a notification message to the second sub-device, where the notification message is used to notify the second sub-device to turn off broadcasting.
[0028] Optionally, the non-directional broadcast packet includes a package identity resolution code of the Bluetooth device, and the second sub-device is paired and connected with the target terminal device based on the initialization connection between the first sub-device and the second sub-device, including:
[0029] The second sub-device is further used to receive the address of the target terminal device sent by the first sub-device based on the initialization connection;
[0030] The second sub-device is further used to send a first directional broadcast packet, wherein the first directional broadcast packet includes the address of the target terminal device and the set identification code of the Bluetooth device, so that the target terminal device, based on the set identity resolution code and the identification, identifies that the second sub-device and the first sub-device belong to the same set;
[0031] The second sub-device is further configured to pair and connect with the target terminal device in response to receiving a second pairing request from the target terminal device.
[0032] Optionally, the target sub-device in the Bluetooth device is used to respond to receiving a reconnection operation for the Bluetooth device, and according to the address of the paired terminal device in the Bluetooth device, the target sub-device in the Bluetooth device sends a second directional broadcast packet, wherein the second directional broadcast packet includes the address of the paired terminal device, and the target sub-device is a powered-on sub-device between the first sub-device and the second sub-device;
[0033] The target sub-device is used to pair and connect with the paired terminal device when the target sub-device receives a connection request from the paired terminal device.
[0034] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0035] In the present disclosure, in response to receiving a pairing operation for a Bluetooth device, that is, when the Bluetooth device is to be paired and connected with other devices, the first sub-device sends a non-directional broadcast packet. At this time, based on the non-directional broadcast packet, the first sub-device can be discovered by other terminal devices. After that, in response to the first sub-device receiving the first pairing request of the target terminal device, the first sub-device is paired and connected with the target terminal device. After the first sub-device is paired and connected, based on the initialization connection between the first sub-device and the second sub-device, the second sub-device can be paired and connected with the target terminal device. Thus, when the sub-devices of the Bluetooth device perform scanning broadcasts, only the first sub-device can send a non-directional broadcast packet, so that only the Bluetooth device is displayed in the terminal device during the scanning phase, without the need to display the sub-devices separately, reducing user troubles, reducing unexpected behaviors of users to a certain extent, avoiding stability problems caused by user's erroneous operations, and ensuring the stability of the Bluetooth device connection. At the same time, the second sub-device can realize the pairing connection with the target terminal device based on the initialization connection, and the process is not perceived by the user, further improving the user experience, and can not only realize the fast connection of the Bluetooth device, but also avoid the connection burden caused by sending broadcast packets to the Bluetooth device when multiple sub-devices are connected.
[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0038] Figure 1 The present invention is a flowchart showing a method for connecting a Bluetooth device according to an exemplary embodiment.
[0039] Figure 2The figure is a schematic diagram of a scenario of a Bluetooth device and a terminal device according to an exemplary embodiment.
[0040] Figure 3 The present invention is a timing flow chart showing pairing and connection between a target terminal device and a Bluetooth device according to an exemplary embodiment.
[0041] Figure 4 The present invention is a timing flow chart showing reconnection between a paired terminal device and a Bluetooth device according to an exemplary embodiment.
[0042] Figure 5 The present invention is a block diagram of a Bluetooth device according to an exemplary embodiment. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the application scenario of the disclosed solution is first described below.
[0044] Bluetooth technology is a short-range wireless communication technology that allows two devices to communicate without a network infrastructure. BLE Audio (Bluetooth low energy Audio) Bluetooth low energy audio technology can provide higher audio quality and lower power consumption.
[0045] Typically, multiple earbuds, speakers, or other Bluetooth devices can be configured as a group to provide multi-channel audio services (or other services) by sharing a SIRK (Set Identity Resolving Key) based on the CSIP (Coordinated Set Identification Profile) / CSIS (Coordinated Set Identification Service) protocol.
[0046] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0047] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0048] The “first” and “second” in the names such as “first” and “second” mentioned in the embodiments of the present disclosure are used for name indication and do not mean “first” or “second” in order.
[0049] In the related art, when a group of Bluetooth devices that share SIRK turn on the Bluetooth connection function, multiple sub-devices will send out broadcast data packets respectively. When connecting, multiple connectable devices will be scanned and displayed on mobile phones, computers, TVs and other terminal devices with screens, but in fact these connectable devices belong to the same group of Bluetooth devices. The user only needs to click on one of the connectable devices to connect the entire group of Bluetooth devices. However, when multiple connectable devices are displayed, it is inconvenient for the user to select the connection operation, which may cause a connection burden on the Bluetooth device.
[0050] In order to solve the above-mentioned problems, the present disclosure provides the following embodiments. Figure 1 FIG. 1 is a flow chart showing a method for connecting a Bluetooth device according to an exemplary embodiment. Figure 1 As shown, the Bluetooth device includes a first sub-device and a second sub-device that share a package identity resolution code, and the method includes:
[0051] In step 11, in response to receiving a pairing operation for a Bluetooth device, the first sub-device sends a non-directional broadcast packet, where the non-directional broadcast packet is used for the terminal device to identify the Bluetooth device.
[0052] When using the CSIP protocol for Bluetooth connection, the CSIP protocol specifies two roles, the set coordinator and the set member, where the set coordinator is the identification device of the set device, such as the terminal device; the set member is the identified set member device, such as the Bluetooth device. For example, during the Bluetooth connection between a mobile phone and a Bluetooth headset, the mobile phone, as the set coordinator, accesses and identifies the connected Bluetooth headset, and the Bluetooth headset can be identified by the mobile phone as a set member.
[0053] As an example, the Bluetooth device is a Bluetooth headset using Bluetooth low energy audio technology. The Bluetooth headset may include a left earplug and a right earplug. The left earplug and the right earplug may share a SIRK, that is, the two belong to the same set.
[0054] The user can trigger a pairing operation on the Bluetooth device by operating the Bluetooth device. The pairing operation is used to trigger the Bluetooth device to pair. The Bluetooth device can be discovered by any terminal device to pair with the terminal device.
[0055] Specifically, when performing Bluetooth pairing, if the address of the terminal device to be connected to the Bluetooth device is unknown to the Bluetooth device, the Bluetooth device can send a non-directional broadcast packet, which contains the package identity resolution code, the package identification code and the Bluetooth address of the first sub-device, so that the Bluetooth device can be discovered by the terminal device through the non-directional broadcast packet. Figure 2 The scene diagram shown, wherein 202 and 203 are used to represent multiple sub-devices in the Bluetooth device, such as 202 represents the first sub-device, 203 represents the second sub-device, and 201 and 204 represent terminal devices.
[0056] In this embodiment, in order to ensure the accuracy and stability of Bluetooth device identification, a non-directional broadcast packet can be sent by the first sub-device. Within the range of Bluetooth allowed connection, any terminal device in Bluetooth search can receive the non-directional broadcast packet sent by the first sub-device. After receiving the non-directional broadcast packet, the terminal device can parse the non-directional broadcast packet to identify the Bluetooth device, and further, the identification of the Bluetooth device can be displayed in the display interface of the terminal device. At this time, for a group of Bluetooth devices, only one sub-device will send the non-directional broadcast packet, so that only one device identification will be displayed for a group of Bluetooth devices in the terminal device, thereby avoiding the identification of multiple sub-devices belonging to the same group of Bluetooth devices being displayed in the terminal device at the same time.
[0057] In step 12, in response to receiving a first pairing request from a target terminal device to be connected, the first sub-device is paired and connected with the target terminal device according to the address of the target terminal device carried in the first pairing request.
[0058] Specifically, in step 11, the first sub-device sends a non-directional broadcast packet, so that the first sub-device can be discovered by multiple terminal devices. The terminal device can parse the non-directional broadcast packet after receiving it, and then display the Bluetooth device in the connection list of the display interface after the parsing is completed.
[0059] Accordingly, the user can select the Bluetooth device he wants to connect to in the connection list. For example, if the user selects the Bluetooth device in the connection list of the terminal device, the terminal device can be triggered to send a first pairing request to the first sub-device, and the target terminal device is the target terminal device that wants to establish a connection with the first sub-device. The first sub-device can pair and connect with the target terminal device according to the address of the target terminal device carried in the received first pairing request.
[0060] In step 13, after the first sub-device is paired and connected with the target terminal device successfully, based on the initialization connection between the first sub-device and the second sub-device, the second sub-device is paired and connected with the target terminal device.
[0061] Among them, based on the initialization connection, a wireless connection relationship is established between the first sub-device and the second sub-device. In this embodiment, after the first sub-device is paired and connected, the second sub-device can be paired and connected with the target terminal device based on the initialization connection between it and the first sub-device, without having to connect to the target terminal device by sending a non-directional broadcast packet.
[0062] In the present disclosure, in response to receiving a pairing operation for a Bluetooth device, that is, when the Bluetooth device is to be paired and connected with other devices, the first sub-device sends a non-directional broadcast packet. At this time, based on the non-directional broadcast packet, the first sub-device can be discovered by other terminal devices. After that, in response to the first sub-device receiving the first pairing request of the target terminal device, the first sub-device is paired and connected with the target terminal device. After the first sub-device is paired and connected, based on the initialization connection between the first sub-device and the second sub-device, the second sub-device can be paired and connected with the target terminal device. Thus, when the sub-devices of the Bluetooth device perform scanning broadcasts, only the first sub-device can send a non-directional broadcast packet, so that only the Bluetooth device is displayed in the terminal device during the scanning phase, without the need to display the sub-devices separately, reducing user troubles, reducing unexpected behaviors of users to a certain extent, avoiding stability problems caused by user's erroneous operations, and ensuring the stability of the Bluetooth device connection. At the same time, the second sub-device can realize the pairing connection with the target terminal device based on the initialization connection, and the process is not perceived by the user, further improving the user experience, and can not only realize the fast connection of the Bluetooth device, but also avoid the connection burden caused by sending broadcast packets to the Bluetooth device when multiple sub-devices are connected.
[0063] As an example, the Bluetooth device includes multiple sub-devices that share a package identity resolution code, the first sub-device is any sub-device among the multiple sub-devices, and the second sub-device is other sub-device among the multiple sub-devices except the first sub-device.
[0064] Among them, one of the Bluetooth devices can be selected as the first sub-device in the factory settings, and the address of the first sub-device can be stored in the remaining second sub-devices to facilitate the establishment of a connection between the first sub-device and the second sub-device.
[0065] Therefore, through the above scheme, when a Bluetooth device contains multiple sub-devices, when they are paired and connected, only one of the sub-devices sends a non-directional broadcast, and the other sub-devices do not need to send, thereby effectively reducing the resource occupation of the Bluetooth device by the Bluetooth device connection and improving the connection efficiency of the Bluetooth device.
[0066] In a possible embodiment, an exemplary implementation manner in which the initialization connection between the first sub-device and the second sub-device is connected in the following manner may include:
[0067] When the Bluetooth device is turned on, the second sub-device sends an initialization directional broadcast packet to the first sub-device, wherein the initialization directional broadcast packet carries the address of the first sub-device; in response to receiving the initialization directional broadcast packet, the first sub-device establishes an initialization connection with the second sub-device and sends a notification message to the second sub-device, wherein the notification message is used to notify the second sub-device to turn off the broadcast.
[0068] The applicant has found through research that in the related art, multiple sub-devices of a Bluetooth device only establish wireless connections, and each sub-device can simultaneously and separately initiate broadcast packets to the terminal device. When a user initiates connection requests to multiple sub-devices, it may cause performance problems of the Bluetooth device and increase the connection burden of the Bluetooth device.
[0069] Based on this, in the embodiment of the present disclosure, after the Bluetooth device is powered on, the first sub-device and the second sub-device in the Bluetooth device are initialized to connect. The initial connection of the Bluetooth device can determine the first sub-device and temporarily close the broadcast channel of the second sub-device.
[0070] Specifically, before the Bluetooth device leaves the factory, the address of the first sub-device can be stored in the second sub-device, and the first sub-device and the second sub-device share a set identity resolution code. After the Bluetooth device is powered on, the second sub-device sends an initialization broadcast packet carrying the address of the first sub-device. The initialization broadcast packet is a directional broadcast packet and can only be scanned and received by the first sub-device. After power-on, the first sub-device turns on the scanning mode. After scanning the initialization broadcast packet of the second sub-device, it immediately initiates a connection to the second sub-device to establish a Bluetooth connection between the first sub-device and the second sub-device, that is, the initialization connection. And send a notification message to the second sub-device to notify the second sub-device to turn off the broadcast. Then, when the Bluetooth devices are paired and connected, only one of the sub-devices sends a non-directional broadcast packet.
[0071] Therefore, through the above technical solution, multiple sub-devices in the Bluetooth device are initialized for connection, so that each sub-device can be interconnected, avoiding multiple sub-devices in the Bluetooth device sending broadcast packets at the same time to cause connection burden and reduce the Bluetooth connection speed of the Bluetooth device.
[0072] For example, the user can perform gesture touch or key operation on the Bluetooth device to trigger the corresponding connection operation, such as pairing operation and reconnection operation, wherein the pairing operation is used to trigger the Bluetooth device to pair and connect, and the reconnection operation is used to trigger the Bluetooth device to reconnect, that is, the Bluetooth device is discovered by the terminal device that has been paired and connected, and re-pairs and connects with the terminal device that has been paired and connected before.
[0073] Users can customize the different operations of Bluetooth devices, or they can operate based on the default configuration. For example, in the default setting, long pressing the mode button in the Bluetooth device for more than N seconds is a reconnection operation; pressing the mode button in the Bluetooth device for less than N seconds is a pairing operation. Among them, the connection operation can be set according to the actual application scenario, and this disclosure does not limit this. It only needs to ensure that different operations are set for different connection methods.
[0074] For example, when the Bluetooth device is a Bluetooth headset, when the user presses the mode key of the Bluetooth headset, the user's key press time can be detected. If the key press time is less than N seconds, the pairing operation is detected. If the key press time is greater than three seconds, the reconnection operation is detected. As an example, the user can operate any sub-device in the Bluetooth device, and the sub-device that receives the operation can determine whether the user's operation is a pairing operation or a reconnection operation in the above manner.
[0075] Therefore, the above technical solution can quickly and accurately determine the connection mode of the Bluetooth device, and can also improve the diversity of Bluetooth device connections.
[0076] Optionally, the non-directional broadcast packet sent by the first sub-device can be a connectable non-directional broadcast, which includes broadcast data and scan response data, which indicates that the current Bluetooth device can accept connection requests from any other device. After the non-directional broadcast packet is received by the terminal device, the Bluetooth connection between the target terminal device and the first sub-device can be achieved using the CSIP protocol. For example, the target terminal device can read the set identity resolution code, the number of set members, and the set member serial number characteristics in the non-directional broadcast packet sent by the first sub-device, lock it with the first sub-device through LTK (Long Term Key), and establish a long-term pairing connection relationship. Among them, the method of pairing and connecting with the first sub-device based on the first pairing request can be based on the general connection method in BLE Audio in the field, which is not limited here.
[0077] In a possible embodiment, the non-directional broadcast packet includes the package identity resolution code of the Bluetooth device, and the exemplary implementation manner of pairing and connecting the second sub-device with the target terminal device based on the initialization connection between the first sub-device and the second sub-device may include:
[0078] The second sub-device receives the address of the target terminal device sent by the first sub-device based on the initialization connection.
[0079] Among them, the first sub-device has been paired and connected with the target terminal device at this time, so the terminal device to be connected by other sub-devices in the Bluetooth device must also be the target terminal device. In the embodiment, the first sub-device can send the address of the target terminal device to the second sub-device based on the initial connection to directly notify the second sub-device of the target terminal device it needs to connect to, without allowing other terminal devices to discover the second sub-device.
[0080] The second sub-device sends a first directional broadcast packet, which includes the address of the target terminal device and the set identification code of the Bluetooth device, so that the target terminal device can resolve the set identity code and identify that the second sub-device and the first sub-device belong to the same set.
[0081] Among them, when initializing the connection, the first sub-device sends a notification message to the second sub-device to notify the second sub-device to stop broadcasting. In this case, after the first sub-device is successfully paired and connected with the target terminal device, a notification message can be sent to the second sub-device to notify the second sub-device to send a directed broadcast packet so that the second sub-device can be paired and connected with the target terminal device.
[0082] In response to receiving a second pairing request from the target terminal device, the second sub-device is paired and connected with the target terminal device.
[0083] Wherein, the first directional broadcast packet contains the address of the target terminal device, and other terminal devices will directly ignore this directional broadcast packet, and the second sub-device will not receive the search request and connection request sent by other terminal devices, and it will only be recognized by the target terminal device. Wherein, the target terminal device receives the first directional broadcast packet, and can identify that the first directional broadcast packet is sent to the target terminal device by parsing it. And the set identification code RSI in the first directional broadcast packet can be parsed, wherein the set identification code RSI is generated based on the set identity resolution code SIRK shared by the first sub-device and the second sub-device, and its generation method can be generated based on the CSIP protocol, which will not be repeated here.
[0084] Afterwards, by parsing the set identification code RSI, it is determined that the second sub-device and the paired first sub-device have the same set identity resolution code SIRK, and it can be confirmed that the two are Bluetooth devices belonging to the same set.
[0085] In this embodiment, after identifying the second sub-device, the target terminal device can automatically initiate a second pairing request, and in response to receiving the second pairing request of the target terminal device, the second sub-device is paired and connected with the target terminal device. The way in which the second sub-device is paired and connected with the target terminal device can be based on the general connection method in BLE Audio in the art, which is not limited here. Figure 3 , which is a timing flow chart of pairing and connecting the target terminal device with the Bluetooth device.
[0086] Therefore, through the above technical solution, the second sub-device is a sub-device paired with the first sub-device as the same set, so the second sub-device needs to be connected to the same target terminal device as the first sub-device. On this basis, in order to avoid being connected or searched by other terminal devices, the second sub-device needs to send a first directional broadcast packet to the target terminal device according to the address of the target terminal device, so that other terminal devices cannot search for the second sub-device, which can improve the Bluetooth connection speed of the Bluetooth device, and automatically connect to the second sub-device after the first sub-device is successfully paired and connected, ensuring the connection reliability between the target terminal device and the Bluetooth device.
[0087] In a possible embodiment, the method may further include:
[0088] In response to receiving a reconnection operation for a Bluetooth device, the target sub-device in the Bluetooth device sends a second directional broadcast packet according to the address of the paired terminal device in the Bluetooth device, wherein the second directional broadcast packet includes the address of the paired terminal device, and the target sub-device is a powered-on sub-device of the first sub-device and the second sub-device. The paired terminal device is a terminal device that has established a paired connection with the Bluetooth device.
[0089] When the target sub-device receives the connection request from the paired terminal device, the target sub-device is paired and connected with the paired terminal device.
[0090] When a reconnection operation is received for a Bluetooth device, it means that the Bluetooth device is going to reconnect with the terminal that has been paired and connected before. At this time, the powered-on target sub-device in the Bluetooth device can automatically send a second directional broadcast packet carrying the address of the paired terminal device. The target sub-device can be the first sub-device or the second sub-device, or the first sub-device and the second sub-device.
[0091] A directional broadcast packet may include two addresses: the address of the broadcaster and the address of the initiator. Therefore, in this embodiment, based on the second directional broadcast packet sent by the target sub-device, the second directional broadcast packet includes the address of the target sub-device and the address of the paired terminal device. Then, when the paired terminal device receives the second directional broadcast packet sent to itself, since the Bluetooth device has been paired and connected with the paired terminal device before, when the target sub-device is displayed in the paired terminal device, the logo of its corresponding Bluetooth device can be displayed, that is, the same logo is displayed for multiple sub-devices, avoiding repeated display of the logo of the target sub-device on the interface of the paired terminal device, reducing the possibility of unexpected user operations, improving the stability of the Bluetooth connection, and improving the speed of the Bluetooth connection of the Bluetooth device. Afterwards, the user can select the corresponding Bluetooth device in the display interface of the paired terminal device according to its own needs, thereby triggering a connection request, that is, sending a connection request to the target sub-device. When the target sub-device receives the connection request from the paired terminal device, the target sub-device is paired and connected with the paired terminal device. See. Figure 4 , which is a timing flow chart of reconnecting a paired terminal device with a Bluetooth device.
[0092] Therefore, through the above technical solution, when a reconnection operation is received for a Bluetooth device, the target sub-device sends a directional broadcast packet, so other terminal devices within the Bluetooth connection range will not search for the target sub-device, nor will they pair and connect with the target sub-device. Therefore, the Bluetooth connection speed of the Bluetooth device can be increased and the user experience can be improved.
[0093] Based on the same inventive concept, the embodiment of the present disclosure also provides a Bluetooth device, such as Figure 5 As shown, the Bluetooth device 10 includes a first sub-device 11 and a second sub-device 12 that share a package identity resolution code:
[0094] The first sub-device 11 is used for sending a non-directional broadcast packet in response to receiving a pairing operation for the Bluetooth device, wherein the non-directional broadcast packet is used for the terminal device to identify the Bluetooth device;
[0095] The first sub-device 11 is further configured to, in response to receiving a first pairing request from a target terminal device to be connected, pair and connect with the target terminal device according to the address of the target terminal device carried in the first pairing request;
[0096] The second sub-device 12 is used for pairing and connecting with the target terminal device based on the initialization connection between the first sub-device and the second sub-device after the first sub-device is successfully paired and connected with the target terminal device.
[0097] Optionally, the initialization connection between the first sub-device and the second sub-device is connected in the following manner:
[0098] When the Bluetooth device is turned on, the second sub-device sends an initialization directional broadcast packet to the first sub-device, wherein the initialization directional broadcast packet carries the address of the first sub-device;
[0099] In response to receiving the initialization directional broadcast packet, the first sub-device establishes an initialization connection with the second sub-device and sends a notification message to the second sub-device, where the notification message is used to notify the second sub-device to turn off broadcasting.
[0100] Optionally, the non-directional broadcast packet includes a package identity resolution code of the Bluetooth device, and the second sub-device is paired and connected with the target terminal device based on the initialization connection between the first sub-device and the second sub-device, including:
[0101] The second sub-device is further used to receive the address of the target terminal device sent by the first sub-device based on the initialization connection;
[0102] The second sub-device is further used to send a first directional broadcast packet, wherein the first directional broadcast packet includes the address of the target terminal device and the set identification code of the Bluetooth device, so that the target terminal device, based on the set identity resolution code and the identification, identifies that the second sub-device and the first sub-device belong to the same set;
[0103] The second sub-device is further configured to pair and connect with the target terminal device in response to receiving a second pairing request from the target terminal device.
[0104] Optionally, the target sub-device in the Bluetooth device is used to respond to receiving a reconnection operation for the Bluetooth device, and according to the address of the paired terminal device in the Bluetooth device, the target sub-device in the Bluetooth device sends a second directional broadcast packet, wherein the second directional broadcast packet includes the address of the paired terminal device, and the target sub-device is a powered-on sub-device between the first sub-device and the second sub-device;
[0105] The target sub-device is used to pair and connect with the paired terminal device when the target sub-device receives a connection request from the paired terminal device.
[0106] Optionally, the Bluetooth device includes multiple sub-devices that share a set identity resolution code, the first sub-device is any sub-device among the multiple sub-devices, and the second sub-device is other sub-device among the multiple sub-devices except the first sub-device.
[0107] Optionally, the Bluetooth device is a Bluetooth headset using Bluetooth low energy audio technology.
[0108] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0109] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the Bluetooth device connection method provided by the present disclosure are implemented.
[0110] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned connection method for a Bluetooth device when executed by the programmable device.
[0111] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0112] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for connecting a Bluetooth device, characterized in that: The Bluetooth device includes a first sub-device and a second sub-device that share a package identity resolution code, and the method includes: In response to receiving a pairing operation for the Bluetooth device, the first sub-device sends a non-directional broadcast packet, where the non-directional broadcast packet is used for a terminal device to identify the Bluetooth device; In response to receiving a first pairing request from a target terminal device to be connected, the first sub-device is paired and connected with the target terminal device according to the address of the target terminal device carried in the first pairing request; After the first sub-device is successfully paired and connected with the target terminal device, based on the initialization connection between the first sub-device and the second sub-device, the second sub-device is paired and connected with the target terminal device.
2. The method according to claim 1, characterized in that The initialization connection between the first sub-device and the second sub-device is connected in the following manner: When the Bluetooth device is turned on, the second sub-device sends an initialization directional broadcast packet to the first sub-device, wherein the initialization directional broadcast packet carries the address of the first sub-device; In response to receiving the initialization directional broadcast packet, the first sub-device establishes an initialization connection with the second sub-device and sends a notification message to the second sub-device, where the notification message is used to notify the second sub-device to turn off broadcasting.
3. The method according to claim 1, characterized in that The non-directional broadcast packet includes the package identity resolution code of the Bluetooth device, and the initialization connection between the first sub-device and the second sub-device, the second sub-device is paired and connected with the target terminal device, including: The second sub-device receives the address of the target terminal device sent by the first sub-device based on the initialization connection; The second sub-device sends a first directional broadcast packet, wherein the first directional broadcast packet includes the address of the target terminal device and the set identification code of the Bluetooth device, so that the target terminal device, based on the set identification code and the identification, identifies that the second sub-device and the first sub-device belong to the same set; In response to receiving a second pairing request from the target terminal device, the second sub-device is paired and connected with the target terminal device.
4. The method according to claim 1, characterized in that: The method further comprises: In response to receiving a reconnection operation for the Bluetooth device, according to the address of the paired terminal device in the Bluetooth device, the target sub-device in the Bluetooth device sends a second directional broadcast packet, wherein the second directional broadcast packet includes the address of the paired terminal device, and the target sub-device is a powered-on sub-device of the first sub-device and the second sub-device; When the target sub-device receives the connection request from the paired terminal device, the target sub-device is paired and connected with the paired terminal device.
5. The method according to claim 1, characterized in that The Bluetooth device includes a plurality of sub-devices that share a package identity resolution code, the first sub-device is any sub-device among the plurality of sub-devices, and the second sub-device is a sub-device among the plurality of sub-devices except the first sub-device.
6. The method according to claim 1, characterized in that The Bluetooth device is a Bluetooth headset using Bluetooth low energy audio technology.
7. A Bluetooth device, characterized in that: The Bluetooth device includes a first sub-device and a second sub-device that share a package identity resolution code: The first sub-device is used to send a non-directional broadcast packet in response to receiving a pairing operation for the Bluetooth device, wherein the non-directional broadcast packet is used for the terminal device to identify the Bluetooth device; The first sub-device is further configured to, in response to receiving a first pairing request from a target terminal device to be connected, pair and connect with the target terminal device according to the address of the target terminal device carried in the first pairing request; The second sub-device is used to pair and connect with the target terminal device based on the initialization connection between the first sub-device and the second sub-device after the first sub-device is successfully paired and connected with the target terminal device.
8. The Bluetooth device according to claim 7, characterized in that: The initialization connection between the first sub-device and the second sub-device is connected in the following manner: When the Bluetooth device is turned on, the second sub-device sends an initialization directional broadcast packet to the first sub-device, wherein the initialization directional broadcast packet carries the address of the first sub-device; In response to receiving the initialization directional broadcast packet, the first sub-device establishes an initialization connection with the second sub-device and sends a notification message to the second sub-device, where the notification message is used to notify the second sub-device to turn off broadcasting.
9. The Bluetooth device according to claim 7, characterized in that: The non-directional broadcast packet includes the package identity resolution code of the Bluetooth device, and the second sub-device is paired and connected with the target terminal device based on the initialization connection between the first sub-device and the second sub-device, including: The second sub-device is further used to receive the address of the target terminal device sent by the first sub-device based on the initialization connection; The second sub-device is further used to send a first directional broadcast packet, wherein the first directional broadcast packet includes the address of the target terminal device and the set identification code of the Bluetooth device, so that the target terminal device, based on the set identity resolution code and the identification, identifies that the second sub-device and the first sub-device belong to the same set; The second sub-device is further configured to pair and connect with the target terminal device in response to receiving a second pairing request from the target terminal device.
10. The Bluetooth device according to claim 7, characterized in that: The target sub-device in the Bluetooth device is used to respond to receiving a reconnection operation for the Bluetooth device, and according to the address of the paired terminal device in the Bluetooth device, the target sub-device in the Bluetooth device sends a second directional broadcast packet, wherein the second directional broadcast packet includes the address of the paired terminal device, and the target sub-device is a powered-on sub-device between the first sub-device and the second sub-device; The target sub-device is used to pair and connect with the paired terminal device when the target sub-device receives a connection request from the paired terminal device.