Detailed Description
First, words involved in the embodiments of the present application will be described. It will be understood that this description is for a clearer understanding of embodiments of the application and is not necessarily to be construed as limiting the embodiments of the application.
Bluetooth device in the embodiment of the application, bluetooth earphone, bluetooth sound, intelligent glasses, intelligent watch and the like can be called Bluetooth device.
Electronic device in the embodiment of the present application, a terminal device such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or the like may be referred to as an electronic device.
The conventional bluetooth connection method is that, as shown in fig. 1, an electronic device is a mobile phone 110, a bluetooth device is a bluetooth headset 120, and the bluetooth headset 120 and the mobile phone 110 establish a bluetooth connection for the first time for introduction. The bluetooth headset 120 transmits an undirected broadcast data frame adv_ind (may be referred to as broadcast information) to the surroundings as a broadcaster advertiser, for example, the bluetooth headset 120 may transmit adv_ind through any one of the broadcast channels 37-39, fig. 1 exemplifies that the bluetooth headset 120 transmits adv_ind through the broadcast channel 37, and the adv_ind may include device identification information of the bluetooth headset 120, for example, a media access Control Address (MEDIA ACCESS Control Address, abbreviated as MAC Address) of the bluetooth headset 120, a device name of the bluetooth headset 120, and the like.
Referring to fig. 1, the mobile phone 110 may scan adv_ind as a connector observer, and discover the bluetooth headset 120 through the device identification information of the bluetooth headset 120 included in adv_ind. The mobile phone 110 may send a connection request data frame connect_req (may be referred to as a connection request) to the bluetooth headset 120, for example, the mobile phone 110 may send the connect_req through any one of the data channels 0-36, and fig. 1 illustrates that the mobile phone 110 sends the connect_req through the data channel 36.
The connect_req may include device identification information of the mobile phone 110 and device identification information of the bluetooth headset 120, for example, including a MAC address of the mobile phone 110 and a MAC address of the bluetooth headset 120. After the bluetooth headset 120 receives the connect_req, the bluetooth headset 120 and the mobile phone 110 enter a bluetooth pairing phase, and the bluetooth headset 120 and the mobile phone 110 together generate a communication key link in the bluetooth pairing phase. Then, the bluetooth headset 120 binds and stores the generated link key and the device identification information of the mobile phone 110, the mobile phone 110 binds and stores the link key and the device identification information of the bluetooth headset 120, and the bluetooth headset 120 and the mobile phone 110 can encrypt the data communicated with each other through the link key, which indicates that the bluetooth connection is established between the two.
As shown in fig. 1, when the bluetooth headset 120 and the mobile phone 110 are disconnected and then reconnected, the bluetooth headset 120 may transmit a directional broadcast data frame adv_direct_ind (which may be referred to as broadcast information) to the mobile phone 110 through the broadcast channel 37, where the adv_direct_ind includes device identification information of the bluetooth headset 120 and device identification information of the mobile phone 110, such as a MAC address of the bluetooth headset 120 and a MAC address of the mobile phone 110. The handset 110 receives adv_direct_ind sent by the bluetooth headset 120 and can send connect_req to the bluetooth headset 120 over the data channel 36. The bluetooth headset 120 and the mobile phone 110 may check whether the link key of the other party is stored based on the received identification information of the other party, if the link key of the other party is stored, the data of the other party in communication may be encrypted based on the link key, and if the link key of the other party is not stored, the bluetooth pairing stage described above may be performed again.
It is found that under the condition that both the electronic device and the Bluetooth device support the Bluetooth technology, a user can manually trigger the electronic device held by the user to establish Bluetooth connection with the Bluetooth device, the electronic device can send a CONNECT_REQ to the Bluetooth device in response to the triggering operation of the user, but the Bluetooth device receives the CONNECT_REQ of any electronic device and agrees to the CONNECT_REQ, so that the Bluetooth device has no requirement on the identity of the electronic device, and the Bluetooth device can establish Bluetooth connection with any electronic device indiscriminately. Assuming that the user a holds the bluetooth device, i.e. the bluetooth headset 120, and the user B holds the electronic device, i.e. the mobile phone 110, the user B can operate and trigger the mobile phone 110 to establish bluetooth connection with the bluetooth headset 120, so that the problem that the communication security between the two devices is affected due to unsafe identity of the electronic device is easily brought.
Based on the above-mentioned problems, a bluetooth connection method for increasing the authentication of an electronic device is needed to be searched, so that a bluetooth device can establish a bluetooth connection with the electronic device passing the authentication, and further the security of establishing the bluetooth connection between the bluetooth device and the electronic device is improved.
Therefore, in the method, in the process of establishing bluetooth connection between the first electronic device and the bluetooth device, a user may perform a triggering operation on a communication management application of the first electronic device (may also be referred to as a third device), the communication management application logs in a user account (may also be referred to as a first user account), the first electronic device may control the bluetooth device (may also be referred to as the first device) to switch from a normal mode (may also be referred to as a second mode) to a strong binding mode (may also be referred to as the first mode) in response to the triggering operation of the user, then, when the bluetooth device in the strong binding mode and the second electronic device (may also be referred to as the second device) establish bluetooth connection for the first time, the bluetooth device in the strong binding mode may verify the identity of the second electronic device, for example, determine whether the user account of the communication management application of the second electronic device logs in (may also be referred to as the second user account) is the same as the user account of the first electronic device, or determine whether the second electronic device is a device authorized by bluetooth device, and after the bluetooth device and the second electronic device establish bluetooth connection with the second electronic device by the second account.
Therefore, the Bluetooth device is in a strong binding mode, the identity of the second device which can be connected with the Bluetooth device can be verified, the problem that the Bluetooth device is indiscriminately connected with any electronic device is avoided, and the safety of Bluetooth connection between the Bluetooth device and the electronic device is improved.
The electronic device may establish a bluetooth connection with the bluetooth device using a standard bluetooth protocol. In the case where the electronic device employs the standard bluetooth protocol, the broadcast information such as adv_ind and the connection request such as connect_req transmitted by the electronic device may include device identification information of the electronic device itself.
The embodiment of the application provides a private Bluetooth protocol, and the electronic equipment can also adopt the private Bluetooth protocol to establish Bluetooth connection with Bluetooth equipment. In the case that the electronic device adopts the private bluetooth protocol, the broadcast information and the connection request sent by the electronic device include identification information of the electronic device, and the identification information of the electronic device can also include account identification information of an account of a user logged in by the electronic device on the basis of including the device identification information.
The account identification information of the user account may include information identifying the user account such as a mobile phone number, a mail address, or an account name used for registering the user account.
In one possible implementation, the user account may be a user account that is logged in by both a system application and a third party application of the electronic device, for example, the system application may be a setup application of the electronic device, and the third party application may be a communication management application. For the electronic equipment supporting login of the same user account in both the system application and the third party application, the electronic equipment is called as the electronic equipment and the Bluetooth equipment are connected by adopting a private Bluetooth communication protocol to establish Bluetooth connection, and both the system application and the third party application of the electronic equipment support the adoption of the private Bluetooth communication protocol to establish Bluetooth connection with the Bluetooth equipment.
In another possible implementation manner, the user account may be a user account that can be logged in by a third party application of the electronic device, but the same user account cannot be logged in by a system application of the electronic device. For such electronic devices that do not support logging in the same user account in both the system application and the third party application, the electronic device itself is said to establish a bluetooth connection with a bluetooth device using a standard bluetooth communication protocol, the system application of the electronic device supports establishing a bluetooth connection with the bluetooth device using a standard bluetooth communication protocol, and the third party application of the electronic device supports establishing a bluetooth connection with the bluetooth device using a private bluetooth communication protocol.
It should be emphasized that the user account introduced in the embodiment of the present application is a user account under the same operating system, for example, in an example of an electronic device that does not support logging in the same user account in both a system application and a third party application, the third party application supports a user account logging in the operating system a, which may be a user account not supported by the system application, which may also be a user account not supported by the system application, which may be a user account not supported by the system application, but which may be a user account logging in the operating system B.
Next, an application scenario of the technical solution of the present application is exemplarily described. The Bluetooth connection method provided by the technical scheme of the application can comprise three stages, namely a Bluetooth connection stage of the Bluetooth device in a common mode, a mode switching stage of the Bluetooth device and a Bluetooth connection stage of the Bluetooth device in a strong binding mode.
In connection with fig. 2, a bluetooth device (may also be referred to as a first device) is taken as a bluetooth headset 120, an electronic device (may also be referred to as a third device) is taken as a mobile phone 110, an electronic device (may also be referred to as a second device) is taken as a mobile phone 130, a bluetooth connection is established between the mobile phone 110 and the bluetooth headset 120 in a normal mode (may also be referred to as a second mode) in a bluetooth connection stage of the bluetooth device in the normal mode, the mobile phone 110 controls the bluetooth headset 120 to be switched from the normal mode to a strong binding mode in a mode switching stage of the bluetooth device, and the mobile phone 130 establishes a bluetooth connection with the bluetooth headset 120 in the strong binding mode.
The following embodiments are described with reference to fig. 2 for the three stages of the bluetooth connection method provided in the above-described embodiment of the present application.
The Bluetooth connection stage of the Bluetooth device in the normal mode is entered first.
In some embodiments, the mobile phone 110 may be equipped with a communication management application, and the communication management application of the mobile phone 110 may establish a bluetooth connection with the bluetooth headset 120 in the normal mode using a proprietary bluetooth communication protocol.
The bluetooth headset may send adv_ind, after the mobile phone 110 scans adv_ind sent by the bluetooth headset 120, the mobile phone 110 may send connect_req to the bluetooth headset 120, where adv_ind may include device identification information of the bluetooth headset 120, and connect_req may include device identification information of the mobile phone 110 and account identification information of a user account (also referred to as a first user account) registered by the communication management application. Then, the bluetooth headset 120 may agree to the connect_req and store the device identification information of the mobile phone 110 and the account identification information of the user account.
In the case where the bluetooth headset 120 in the normal mode transmits adv_ind, it receives connect_req transmitted by any electronic device, and the bluetooth headset 120 agrees to indicate that the bluetooth headset 120 in the normal mode can establish bluetooth connection with any electronic device without distinction,
It should be noted that, the implementation of the bluetooth connection stage of the bluetooth device in the normal mode may be referred to in the following detailed description of the embodiment shown in fig. 3, which is not described here.
Thereafter, a mode switch phase of the bluetooth device may be entered.
In some embodiments, the handset 110 may be installed with a communication management application that logs into the user account that controls the bluetooth headset 120 to switch from the normal mode to the strongly bound mode.
Illustratively, the user interface of the communication management application of the mobile phone 110 may display a strong binding mode switching control, and after the user triggers the strong binding mode switching control, the mobile phone 110 may send mode switching indication information (may also be referred to as first indication information) to the bluetooth headset 120. After receiving the mode switching indication information, the Bluetooth headset can switch the common mode of the Bluetooth headset to a strong binding mode.
It should be noted that, the user interface of the communication management application displays the strong binding mode switching control only as an example, the content displayed by the user interface of the communication management application is not limited in the present application, and after the user operation triggers the user interface, the mobile phone 110 may control the bluetooth headset 120 to switch to the strong binding mode.
The bluetooth headset 120 in the strong binding mode may perform identity verification on other electronic devices such as the mobile phone 130 that requests to establish a bluetooth connection, which indicates that the bluetooth headset 120 in the strong binding mode no longer establishes a bluetooth connection with any electronic device indiscriminately, but establishes a bluetooth connection with an electronic device that passes the identity verification.
It should be noted that, the functions of installing the communication management application and the communication management application in the mobile phone 110 are only examples, and the mobile phone may also be installed with a system application capable of logging in the user account, and the system application may also support the same functions as the communication management application. In addition, the communication management application may include more functions than the above examples, and reference may be made to the description related to the embodiment shown in fig. 4, which is not limited by the present application.
The mode switching phase of the bluetooth device is implemented in the following detailed description of the embodiment shown in fig. 4, which will not be explained here.
And then, entering the Bluetooth connection stage of the Bluetooth device in the strong binding mode.
Referring to fig. 2, in the case where the mobile phone 130 requests to establish a bluetooth connection with the bluetooth headset 120, the bluetooth headset 120 in the strong binding mode can verify the identity of the mobile phone 130, the identity of the mobile phone 130 is verified, and the mobile phone 130 and the bluetooth headset 120 can establish a bluetooth connection. The identity of the handset is not verified, and the handset 130 cannot establish a bluetooth connection with the bluetooth headset 120.
In some embodiments, after the mobile phone 130 scans adv_ind sent by the bluetooth headset, the mobile phone 130 may send a connect_req to the bluetooth headset 120, where the bluetooth headset 120 determines that the connect_req includes account identification information of a user account of the mobile phone 110 stored in a trust list of the bluetooth headset 120 (taking a storage area of the first device may be a trust list of the bluetooth headset 120 as an example), or the bluetooth headset 120 determines that the connect_req includes device identification information of an electronic device stored in the trust list (i.e. the identification information of the trust device includes device identification information of the electronic device), which indicates that the bluetooth headset 120 determines that the electronic device sending the connect_req belongs to a trust device, and the mobile phone 130 may establish a bluetooth connection with the mobile phone 130 through identity verification.
In some embodiments, after the bluetooth headset 120 receives the connect_req sent by the mobile phone 130, the bluetooth headset 120 determines that the connect_req does not include the account identification information of the user account of the mobile phone 110 and the device identification information of the electronic device stored in the trust list, and the bluetooth headset 120 may refuse to establish a bluetooth connection with the mobile phone 130.
In some embodiments, after the bluetooth headset 120 receives the connect_req sent by the mobile phone 130, the bluetooth headset 120 determines that the connect_req does not include the account identification information of the user account of the mobile phone 110 and the device identification information of the electronic device stored in the trust list. However, in the case where the bluetooth connection is still established between the mobile phone 110 and the bluetooth headset 120, the bluetooth headset 120 may send a connection request prompt (also referred to as a prompt) to the mobile phone 110, where the connection request prompt is used to prompt the user holding the mobile phone 110 that the mobile phone 130 wants to establish a bluetooth connection with the bluetooth headset 120.
The bluetooth headset 120 may then establish a bluetooth connection with the handset 130 if the user agrees to the request connection prompt. In the case where the user refuses the request connection prompt, the bluetooth headset 120 may refuse to establish a bluetooth connection with the handset 130.
It should be noted that the procedure of verifying the identity of the mobile phone 130 by the bluetooth device in the strong binding mode described above is only an example, and the bluetooth connection stage of the bluetooth device in the strong binding mode may include more authentication modes, which will be described in detail in the embodiments shown in fig. 5-9 below, and will not be described herein.
Therefore, the bluetooth headset 120 switched from the normal mode to the strong binding mode can establish bluetooth connection with any electronic device without any difference, but can establish bluetooth connection with the electronic device passing through identity authentication, so that the security of the identity of the electronic device establishing bluetooth connection with the bluetooth headset 120 can be ensured, and the security of data communication between the bluetooth headset 120 and the mobile phone 130 is further improved.
Next, the bluetooth connection stage of the bluetooth device in the normal mode as set forth above is described in detail with reference to fig. 3, and in this embodiment, the electronic device is taken as the mobile phone 110, and the bluetooth device is taken as the bluetooth headset 120 as an example.
As shown in fig. 3, the process of establishing a bluetooth connection between the mobile phone 110 and the bluetooth headset 120 in the normal mode may include the following steps:
s301 the bluetooth headset 120 transmits adv_ind to the surroundings.
May be referred to as bluetooth headset 120 broadcasting ADV IND to the surroundings.
In some embodiments, adv_ind may include device identification information for the bluetooth headset 120 device.
Illustratively, the device identification information of the device of the bluetooth headset 120 may include information that may uniquely identify the bluetooth headset 120, such as a MAC address of the bluetooth headset 120, a device name of the bluetooth headset 120, or custom data of a user.
The application does not limit the information type and the information quantity of the device identification information of the Bluetooth headset 120 device, and can enable other electronic devices to uniquely identify the Bluetooth headset 120 based on the device identification information of the Bluetooth headset 120 device.
S302, the mobile phone 110 scans ADV_IND sent by the Bluetooth headset 120 and sends CONNECT_REQ to the Bluetooth headset 120.
In some embodiments, the handset 110 itself may send a connect_req (also referred to as first communication connection request information) to the bluetooth headset 120 using standard bluetooth protocols, which may include device identification information for the handset 110.
Illustratively, the device identification information of the mobile phone 110 may include a MAC address of the mobile phone 110, a device name of the mobile phone 110, or custom data of the user.
The application is not limited to the information type and the information quantity of the equipment identification information of the mobile phone 110, and other electronic equipment or Bluetooth equipment can only identify the mobile phone 110 based on the equipment identification information of the mobile phone 110.
In some embodiments, the mobile phone 110 may itself send a connect_req to the bluetooth headset 120 using a private bluetooth protocol, where the connect_req may include device identification information of the mobile phone 110, and the device identification information of the mobile phone 110 may include device identification information of the mobile phone 110 and account identification information of the user account a on which the mobile phone 110 logs.
For example, the account identification information of the user account a may include identification information of the user account a itself, such as a mobile phone number or a mail address associated with the user registering the user account a, or information that an account name set when the user registers the user account may be different from other user accounts.
Also for example, the account identification information of the user account a may include account identification information of a home account to which the user account a belongs, such as an account name of the home account, an identification code of the home account, and the like, which may be different from other home accounts.
Next, taking an example that the mobile phone 110 is installed with a communication management application, an implementation manner that the mobile phone 110 scans adv_ind sent by the bluetooth headset 120 and sends connect_req to the bluetooth headset 120 will be described.
In one possible implementation, after the communication management application of the mobile phone 110 logs in to the user account a, the communication management application may scan for adv_ind sent by the bluetooth headset 120, and the communication management application may send connect_req to the bluetooth headset 120.
In some embodiments, the handset 110 includes a communication management application and a communication module including a Bluetooth chip. The user interface of the communication management application may include a device scan control, after the user triggers the device scan control, the communication management application may control the bluetooth chip to scan other peripheral electronic devices or adv_ind sent by the bluetooth device, and after the bluetooth chip scans adv_ind of the bluetooth headset 120, report the adv_ind to the communication management application. Then, the user interface of the communication management application may display the device identification information of the bluetooth headset 120 included in the adv_ind, for example, a device name of the bluetooth headset 120. The user interface of the communication management application may further display a device connection control, the user may trigger the device connection control, and the communication management application may control the bluetooth chip to send connect_req to the bluetooth headset 120 that sends adv_ind in response to a triggering operation of the user.
It should be noted that, the device scan control and the device connection control displayed on the user interface of the communication management application in the above examples are only examples, and the application is not limited thereto, so that the function of enabling the mobile phone 110 to send connect_req to the bluetooth headset 120 and enabling the mobile phone 110 to scan surrounding electronic devices and bluetooth devices after triggering the user operation can be achieved.
S303, the bluetooth headset 120 transmits connection confirmation information to the mobile phone 110 in response to the connect_req.
The bluetooth headset 120 is in a normal mode and can establish a bluetooth connection with any one of the electronic devices without distinction.
In some embodiments, after the bluetooth headset 120 receives the connect_req, the bluetooth headset 120 may send connection confirmation information to the mobile phone 110, where the connection confirmation information is used to prompt the mobile phone 110, and the bluetooth headset 120 agrees to the connection request of the connect_req, which indicates that the bluetooth connection between the bluetooth headset 120 and the mobile phone 110 is successfully established, and both may perform data communication.
Next, the mode switching stage of the aforementioned bluetooth device will be described in detail with reference to fig. 4.
In this embodiment, the electronic device is taken as the mobile phone 110, the bluetooth device is the bluetooth headset 120, the mobile phone 110 has established bluetooth connection with the bluetooth headset 120 in the normal mode by adopting the private bluetooth protocol, and the mobile phone 110 is installed with a communication management application, which has logged in the user account a as an example.
It should be noted that, the communication management application installed in the mobile phone 110 is only an example, and other third party applications of the mobile phone 110 may log in the user account a, or system applications such as a setup application of the mobile phone 110 may log in the user account a, and functions of any other third party application and any system application are the same as those of the communication management application described in the following embodiments.
As shown in fig. 4, the mode switching phase of the bluetooth device may include the steps of:
S401, the mobile phone 110 sends mode switching indication information to the bluetooth headset 120.
In some embodiments, the mode switch indication information (may also be referred to as first indication information) is used to indicate that the bluetooth headset 120 is switched from the normal mode to the strong binding mode.
It should be noted that, the first indication information may also be used to instruct the bluetooth headset 120 to switch from other modes to the strong binding mode, which is not limited by the present application.
In an example where the mobile phone 110 includes a communication management application and a bluetooth chip, a user interface of the communication management application of the mobile phone 110 may display a strong binding mode switching control, the user triggers the strong binding mode switching control, and the communication management application may control the bluetooth chip to send mode switching indication information to the bluetooth headset 120 in response to a triggering operation of the user, so as to control the bluetooth headset 120 to switch from a normal mode to a strong binding mode.
In addition, in some embodiments, the user interface of the communication management application of the mobile phone 110 may further display a normal mode switching control, where the user triggers the normal mode switching control, and the communication management application may control the bluetooth chip to send another mode switching indication information to the bluetooth headset 120 in response to the triggering operation of the user, so as to control the bluetooth headset 120 to switch from the strong binding mode to the normal mode.
It should be noted that, the other mode switch indication information may also be used to indicate that the bluetooth headset 120 is switched from the other mode to the normal mode, which is not limited in the present application.
It should be further noted that, the user interface of the communication management application displays the normal mode switching control and the strong binding mode switching control only as examples, and the present application is not limited to the content displayed by the user interface of the communication management application, and the bluetooth headset 120 may be triggered to control the mode switching.
S402, the bluetooth headset 120 switches from the normal mode to the strong binding mode in response to the mode switching indication information.
After receiving the mode switching indication information sent by the mobile phone 110, the bluetooth headset 120 can switch its own normal mode to the strong binding mode.
The normal mode bluetooth headset 120 may establish a bluetooth connection with any electronic device without distinction. For example, the bluetooth headset 120 in the normal mode receives the connect_req sent by any electronic device, and may directly agree to the connect_req.
After receiving the connect_req sent by the electronic device, the bluetooth headset 120 in the strong binding mode performs authentication on the electronic device, and grants the connect_req connection request if the electronic device passes the authentication.
S403, the mobile phone 110 sets the owner information.
In some embodiments, the user interface of the communication management application of the mobile phone 110 may further display a main information setting control, and after the user operates the main information setting control, the user may input main information in the user interface, where the main information may be used to contact the user holding the mobile phone 110. Illustratively, the owner information may be a mobile phone number, a mailbox address, etc. of the user.
It should be noted that, the main information setting control of the user interface display of the communication management application is only an example, the content displayed by the user interface of the communication management application is not limited in the present application, and the user may input main information (may also be referred to as a contact manner of the mobile phone 110, and the device identifier of the trusted device may include the contact manner of the mobile phone 110).
S404, the mobile phone 110 transmits the main information to the bluetooth headset 120.
After recognizing the user input of the owner information, the mobile phone 110 may send it to the bluetooth headset 120.
In the example where the mobile phone 110 includes a communication management application and a bluetooth chip, the communication management application may control the bluetooth chip to transmit the owner information to the bluetooth headset 120 after recognizing that the owner information is input by the user.
It should be noted that the execution steps of S403 to S404 are not limited, and the user may trigger the operation to input the owner information, S403 may be executed first, and then S404 and S302 are executed simultaneously, the mobile phone 110 sends a connect_req to the bluetooth headset 120, where the connect_req may further include the owner information on the basis of including the device identification information of the mobile phone 110 and the account identification information of the user account a.
S405, the Bluetooth headset 120 stores the device identification information of the mobile phone 110, the account identification information of the user account A and the owner information into a trust list.
In the embodiment of the present application, the trust list is used to store identification information of trusted devices of the bluetooth headset 120. For example, device identification information of the trusted device, account identification information of the user account to which the trusted device is logged, and owner information of the trusted device may be stored.
The mobile phone 110 controls the bluetooth headset 120 to switch from the normal mode to the strong binding mode, which indicates that the mobile phone 110 is a trusted device of the bluetooth headset 120, and the bluetooth headset 120 can send the device identification information of the mobile phone 110, the account identification information of the user account a, and the owner information to the trust list.
In some embodiments, in the process of establishing the bluetooth connection between the bluetooth headset 120 and the mobile phone 110, the bluetooth headset 120 may generate a link together with the mobile phone 110, and the bluetooth headset 120 may bind and store the link and the device identification information of the mobile phone 110, the account identification information of the user account a, and the owner information to the trust list.
Furthermore, in some embodiments, where the bluetooth headset 120 is in a strong binding mode, the handset 110 may add the identification information of the electronic device to the trust list of the bluetooth device 120. Indicating that the handset 110 may add a trusted device to the bluetooth headset 120.
For example, the user interface of the communication management application of the mobile phone 110 may further display a trusted device adding control, and after the user operates the trusted device adding control, the user may input identification information of the electronic device, for example, device identification information of the electronic device, account identification information of an account number of the user logged in by the electronic device, and so on. The identification information of the electronic device may indicate a trusted device of the bluetooth headset 120, which may be authenticated by the bluetooth headset 120 in a strongly binding mode.
It should be noted that, the trust device adding control for the user interface display of the communication management application is only an example, and the application does not limit the content displayed by the user interface of the communication management application, and can be used for a user to input the identification information of the electronic device.
In addition, in some embodiments, the bluetooth headset 120 may further include a general list for storing identification information of an electronic device that establishes a bluetooth connection with the bluetooth headset 120 in a general mode. The electronic device identification information stored in the trust list may be synchronized to the common list.
From the above, the mobile phone 110 can control the bluetooth headset 120 to switch to the strong binding mode, increase the link of the bluetooth headset 120 for the authentication of the electronic device requesting bluetooth connection, avoid the problem that the bluetooth headset 120 does not have a difference to establish bluetooth connection with any electronic device, and ensure the security of the identity of the electronic device successfully establishing bluetooth connection with the bluetooth headset 120.
Next, the bluetooth connection stage of the bluetooth device in the aforementioned strong binding mode will be described in detail with reference to fig. 5 to 9. Fig. 5 to fig. 9 correspond to the first embodiment to the fifth embodiment, respectively, and each embodiment takes the mobile phone 130 to request to establish a bluetooth connection with the bluetooth headset 120 as an example.
It should be noted that, in the embodiment of the present application, in the case that the mobile phone 110 logs in to the user account, the logged-in user account may be referred to as a first user account (for example, a user account a described later), and in the case that the mobile phone 130 logs in to the user account, the logged-in user account may be referred to as a second user account (for example, a user account a or a user account B described later).
Embodiment one:
In the first embodiment, the mobile phone 110 and the bluetooth headset 120 still establish a bluetooth connection, and the mobile phone 110 uses the steps shown in fig. 4 to control the bluetooth headset 120 to switch from the normal mode to the strong binding mode, and the mobile phone 130 itself requests to establish a bluetooth connection with the bluetooth headset 120 using the standard bluetooth communication protocol.
As shown in fig. 5, the bluetooth connection phase of the bluetooth device in the strong binding mode may include the following steps:
S501, the bluetooth headset 120 transmits adv_ind to the surroundings.
In some embodiments, the bluetooth headset 120 may stop sending adv_ind to the surroundings while the handset 110 and bluetooth headset 120 still establish a bluetooth connection. The user can operate to trigger the Bluetooth headset to enter the Bluetooth pairing state again, and ADV_IND can be continuously sent to the surrounding.
Illustratively, the earphone cabin of the bluetooth earphone includes a key, which can be pressed by the user for a long time, to trigger the bluetooth earphone to send adv_ind again to establish bluetooth connection with other electronic devices, indicating that the bluetooth earphone 120 can establish bluetooth connection with two or more electronic devices simultaneously.
It should be noted that, the above manner of triggering the bluetooth headset to send adv_ind again by the user operation is only an example, or the body of the bluetooth headset may include a key, the user may double click the key to trigger the bluetooth headset to send adv_ind again, and the triggering manner of the key is not limited for the position of the key.
It should be noted that, other implementations of S501 may refer to the description of S301, which is not described herein.
S502, the mobile phone 130 scans ADV_IND sent by the Bluetooth headset 120 and sends CONNECT_REQ to the Bluetooth headset 120 by adopting a standard Bluetooth communication protocol.
The mobile phone 130 itself adopts a standard bluetooth communication protocol, which indicates that the system application of the mobile phone 130 does not log in the user account, and the connect_req (which may also be referred to as second communication connection request information) sent by the system application of the mobile phone 130 includes the device identification information of the mobile phone 130.
In some embodiments, the handset 110 includes a system application and a communication module that includes a Bluetooth chip.
The user interface of the system application may include a device scan control, after the user triggers the device scan control, the system application may control the bluetooth chip to scan other peripheral electronic devices or adv_ind sent by the bluetooth device, and after the bluetooth chip scans adv_ind of the bluetooth headset 120, report the adv_ind to the system application. The user interface of the system application may then display device identification information of the bluetooth headset 120 device, such as the device name of the bluetooth headset 120, included in the ADV IND. The user interface of the system application may also display a device connection control, which the user may trigger, and in response to a triggering operation by the user, the system application may control the bluetooth chip to transmit connect_req to the bluetooth headset 120 that transmits adv_ind.
It should be noted that, the content displayed by the user interface of the system application in the above example is only an example, and the application is not limited thereto, and the function of enabling the mobile phone 110 to send connect_req to the bluetooth headset 120 and enabling the mobile phone 110 to scan surrounding electronic devices and bluetooth devices after triggering the user operation can be achieved.
Furthermore, in some embodiments, the following step 1 may also be employed instead of S502:
Step 1, the mobile phone 130 scans adv_ind sent by the bluetooth headset 120, and sends connect_req to the bluetooth headset 120 using a proprietary bluetooth communication protocol.
In some embodiments, the handset 130 installs a communication management application that has logged into a user account B that is different from the user account a that the communication management application of the handset 110 has logged into.
The communication management application of the mobile phone 130 may use a private bluetooth communication protocol to send a connect_req to the bluetooth headset 120, where the connect_req includes device identification information of the mobile phone 130 and account identification information of the user account B. The implementation manner may be referred to S302 for a description of an embodiment of the mobile phone 110 including the communication management application and the communication module, which is not described herein.
Based on the above, in the case where the system application of the mobile phone 130 establishes bluetooth connection with the bluetooth headset 120 using the standard bluetooth communication protocol, after the communication management application of the mobile phone 130 logs in the user account B, the communication management application of the mobile phone 130 may request to establish bluetooth connection with the bluetooth headset 120 using the private bluetooth communication protocol.
The bluetooth headset 120 determines that the handset 130 employs the standard bluetooth communication protocol in response to the connect_req S503.
In some embodiments, the connect_req may include a flag bit for indicating the bluetooth communication protocol employed by the electronic device that sent the connect_req.
Illustratively, the flag bit of the connect_req is1, which indicates that the electronic device transmits the connect_req using the private bluetooth communication protocol, and the connect_req may include device identification information of the electronic device and account identification information of the logged-in user account.
The value of the flag bit of the connect_req is 0, indicating that the electronic device is transmitting the connect_req using the standard bluetooth communication protocol, which may include device identification information of the electronic device.
The bluetooth headset 120 determines that the flag bit of the received connect_req indicates that the mobile phone 130 adopts a standard bluetooth communication protocol, and the bluetooth headset 120 may determine that the connect_req does not include account identification information of the user account on which the mobile phone 130 logs.
In addition, in the case where step 1 is employed instead of S502, step 2 may be employed instead of S503 as follows:
step 2, the bluetooth headset 120 determines that the handset 130 employs the private bluetooth communication protocol in response to the connect_req.
The bluetooth headset 120 determines that the flag bit of the received connect_req indicates that the mobile phone 130 employs the private bluetooth communication protocol, and the bluetooth headset 120 may determine that the connect_req includes device identification information of the mobile phone 130 and account identification information of the logged-in user account B.
S504 the bluetooth headset 120 determines that the device identification information of the handset 130 is not in the trust list.
Based on the above description, the trust list may store identification information of trusted devices of the bluetooth headset 120. The bluetooth headset 120 determines that the trust list does not store device identification information for the handset 130, indicating that the handset 130 is not yet a trusted device for the bluetooth headset 120.
In addition, in the case where step 1 is used instead of S502 and step 2 is used instead of S503, the following step 3 may be used instead of S504:
In step 3, the bluetooth headset 120 determines that the device identification information of the mobile phone 130 and the account identification information of the user account B are not in the trust list.
The bluetooth headset 120 determines that the flag bit of the received connect_req indicates that the mobile phone 130 adopts the private bluetooth communication protocol, the bluetooth headset 120 may determine that the connect_req includes the device identification information of the mobile phone 130 and the account identification information of the logged-in user account B, and the bluetooth headset 120 may determine whether to store the device identification information in the trust list.
The bluetooth headset 120 may determine that the account identification information of the user account B is different from the account identification information of the user account a stored in itself, and the device identification information of the mobile phone 130 is not stored in the trust list, which indicates that the mobile phone 130 is not a trusted device of the bluetooth headset 120 yet.
S505, the Bluetooth headset 120 sends the connection request prompt message of the mobile phone 130 to the mobile phone 110.
The mobile phone 110 and the bluetooth headset 120 still maintain bluetooth connection, and in the case that the bluetooth headset determines that the mobile phone 130 is not a self-trusted device, the bluetooth headset 120 may send a connection request prompt message of the mobile phone 130 to the mobile phone 110, so as to further perform identity verification on the mobile phone 130.
In some embodiments, the request connection prompt is used to prompt the user holding the handset 110, and the handset 130 requests to establish a bluetooth connection with the bluetooth headset 120.
The communication management application pop-up window of the mobile phone 110 may be exemplified, and the window displays the request connection prompt information, and the display mode of the request connection prompt information is not limited in the present application.
S506, the mobile phone 110 responds to the consent operation of the user for requesting the connection prompt information and sends verification consent indication information to the Bluetooth headset 120.
In some embodiments, the consent operation requesting the connection prompt information refers to the user operating to consent the bluetooth headset 120 to establish a bluetooth connection with the handset 130.
The authentication approval indication information (may also be referred to as second indication information) is used to indicate that the bluetooth headset 120 approves the connect_req sent by the mobile phone 130, indicating that the mobile phone 110 approves the bluetooth headset 120 to establish a bluetooth connection with the mobile phone 130.
In the example where the communication management application of the mobile phone 110 pops up, and where the mobile phone 110 includes a communication management application and a bluetooth chip, the window may further include an approval control, which the user may operate to trigger, and then the communication management application may control the bluetooth chip to send verification approval indication information to the bluetooth headset 120.
It should be noted that, the content displayed by the user interface of the communication management application is not limited in the present application, and the user may trigger the operation to agree that the bluetooth headset 120 and the mobile phone 130 establish bluetooth connection.
S507, the bluetooth headset 120 adds the identification information of the mobile phone 130 to the trust list in response to the authentication consent indication information.
In the case of performing S502 to S504, the identification information of the cellular phone 130 includes its device identification information.
In the case of performing steps 1-3, the identification information of the mobile phone 130 includes its device identification information and account identification information of the user account B to which it is logged.
S508, the bluetooth headset 120 transmits connection confirmation information to the mobile phone 130 in response to the authentication approval indication information.
In some embodiments, when the bluetooth headset 120 receives the verification approval indication information, the bluetooth headset 120 may send connection confirmation information to the mobile phone 130, where the connection confirmation information is used to prompt the mobile phone 130, and the bluetooth headset 120 approves the connection request, which is a connection request, indicating that the bluetooth headset 120 and the mobile phone 130 have successfully established a bluetooth connection, and both may perform data communication.
The execution order of S507 and S508 is not limited in the present application, and S508 may be executed first and then S507 may be executed.
S509, the mobile phone 110 responds to the consent operation of the user for requesting the connection prompt information, and the device identification information of the mobile phone 130 is uploaded to the cloud server.
In some embodiments, the connection request prompt information sent by the bluetooth headset 120 to the mobile phone 110 may include device identification information of the mobile phone 130, and after the user performs the consent operation on the connection request prompt information, the communication management application of the mobile phone 110 may upload the device identification information of the mobile phone 130 to the cloud server, that is, to the cloud account of the user account a of the communication management application.
In this way, the user using the electronic device logged in with the user account a may be prompted, the mobile phone 130 is a trusted device of the bluetooth headset 120, and the mobile phone 130 may establish a bluetooth connection with the bluetooth headset 120.
Note that S509 is an optional execution step. The execution sequence of S506 and S509 is not limited in the present application, and they may be executed simultaneously or sequentially.
In addition, in some embodiments, there may be a case where the user performs a rejection operation for requesting the connection prompt information, the following step 4 may be adopted instead of S506, and the following step 5 may be adopted instead of S508. It is indicated that in the first embodiment, steps 4 and 5 can be continued after S501-S505 are performed, and S507 and S509 are not performed any more.
Step 4, the mobile phone 110 sends verification rejection indication information to the bluetooth headset 120 in response to the rejection operation of the user for requesting the connection prompt information.
In some embodiments, the refusal operation of requesting the connection prompt information means that the user operates to refuse the bluetooth headset 120 to establish a bluetooth connection with the mobile phone 130.
The authentication rejection indication information (may also be referred to as third indication information) is used to instruct the bluetooth headset 120 to reject the connect_req sent by the mobile phone 130, indicating that the mobile phone 110 rejects the bluetooth headset 120 from establishing a bluetooth connection with the mobile phone 130.
In the example where the communication management application of the mobile phone 110 pops up, and where the mobile phone 110 includes a communication management application and a bluetooth chip, the window may further include a rejection control, which the user may operate to trigger, and then the communication management application may control the bluetooth chip to send authentication rejection indication information to the bluetooth headset 120.
It should be noted that, the content displayed by the user interface of the communication management application is not limited in the present application, and the user may trigger the operation to refuse the bluetooth headset 120 to establish bluetooth connection with the mobile phone 130.
In step 5, the bluetooth headset 120 transmits connection error information to the mobile phone 130 in response to the authentication rejection indication information.
In some embodiments, when the bluetooth headset 120 receives the authentication rejection indication information, the bluetooth headset 120 may send a connection error message (the connection error message is information for indicating that the bluetooth headset 120 rejects to establish a bluetooth connection with the mobile phone 130) to the mobile phone 130, where the connection error message is used to prompt the mobile phone 130, and the bluetooth headset 120 rejects the connection request, which is a connection_req, indicating that the bluetooth connection between the bluetooth headset 120 and the mobile phone 130 fails to be established.
From the above, after the bluetooth headset 120 is switched to the strong binding mode, in the process that the bluetooth headset 120 verifies the identity of the electronic device (the above and the mobile phone 130) that requests the bluetooth connection, the verification may be assisted by another electronic device (the above-mentioned mobile phone 110), so as to ensure the security of the identity of the electronic device that successfully establishes the bluetooth connection with the bluetooth headset 120.
Embodiment two:
In the second embodiment, the mobile phone 110 and the bluetooth headset 120 are disconnected, and the mobile phone 110 adopts the steps shown in fig. 4 to control the bluetooth headset 120 to switch from the normal mode to the strong binding mode, the system application of the mobile phone 130 does not log in the user account, and the communication management application is not installed, and the mobile phone 130 itself requests to establish bluetooth connection with the bluetooth headset 120 by adopting the standard bluetooth communication protocol.
As shown in fig. 6, the bluetooth connection phase of the bluetooth device in the strong binding mode may include the following steps:
S601, the bluetooth headset 120 transmits adv_ind to the surroundings.
It should be noted that, the implementation of S601 may refer to the description of S301, which is not described herein.
S602, the mobile phone 130 scans adv_ind sent by the bluetooth headset 120, and sends connect_req to the bluetooth headset 120 using a standard bluetooth communication protocol.
S603, the bluetooth headset 120 determines that the mobile phone 130 adopts the standard bluetooth communication protocol in response to the connect_req.
S604 the bluetooth headset 120 determines that the device identification information of the mobile phone 130 is not in the trust list.
It should be noted that, the implementation manner of S602-S604 may refer to the description of S502-S504, and will not be described herein.
S605, the bluetooth headset 120 transmits the connection error message to the mobile phone 130.
In some embodiments, when the bluetooth headset 120 determines that the mobile phone 130 adopts the standard bluetooth communication protocol and the device identification information of the mobile phone 130 is not in the trust list, it indicates that the mobile phone 130 is not a trusted device of the bluetooth headset 120, and because the bluetooth headset 120 does not maintain a bluetooth connection with the mobile phone 110, the bluetooth headset 120 cannot perform data communication with the mobile phone 110, the bluetooth headset 120 cannot further perform identity verification on the mobile phone 130, and it may be determined that the connection request of connect_req sent by the mobile phone 130 is not passed by the bluetooth headset 120.
It should be noted that, other implementations of S605 may refer to the description of step 5 in the first embodiment, and will not be described again.
From the above, after the bluetooth headset 120 is switched to the strong binding mode, the electronic device that fails the authentication cannot establish bluetooth connection with the bluetooth headset 120, so that the problem of communication security of the two devices caused by unsafe identity of the electronic device can be avoided.
Embodiment III:
In the third embodiment, the mobile phone 110 and the bluetooth headset 120 are disconnected, and the mobile phone 110 adopts the steps shown in fig. 4 to control the bluetooth headset 120 to switch from the normal mode to the strong binding mode, and the mobile phone 130 installs a communication management application, where the user account B logged in by the communication management application is different from the user account a logged in by the mobile phone 110.
As shown in fig. 7, the bluetooth connection phase of the bluetooth device in the strong binding mode may include the following steps:
s701, the bluetooth headset 120 transmits adv_ind to the surroundings.
It should be noted that, the implementation of S701 may refer to the description of S301, which is not described herein.
S702, the mobile phone 130 scans ADV_IND sent by the Bluetooth headset 120 and sends CONNECT_REQ to the Bluetooth headset 120 by adopting a private Bluetooth communication protocol.
In some embodiments, the mobile phone 130 itself adopts a private bluetooth communication protocol, a system application of the mobile phone 130 logs in the user account B, and an installed communication management application logs in the user account B, and the system application or the communication management application may use the private bluetooth communication protocol to request to establish bluetooth connection with the bluetooth headset 120, where the connect_req includes device identification information of the mobile phone 130 and account identification information of the user account B.
In some embodiments, the mobile phone 130 itself adopts a standard bluetooth communication protocol, and a communication management application installed on the mobile phone 130 logs in to the user account B, and the communication management application may establish a bluetooth connection with the bluetooth headset 120 using a private bluetooth communication protocol, where the connect_req includes device identification information of the mobile phone 130 and account identification information of the user account B.
It should be noted that, for other implementation manners of S702, reference may be made to the description of step 1 in example one.
The bluetooth headset 120 determines that the handset 130 employs the private bluetooth communication protocol in response to the connect_req S703.
S704, the bluetooth headset 120 determines that the device identification information of the mobile phone 130 and the account identification information of the user account B are not in the trust list.
It should be noted that, the implementation manners of S703-S704 may refer to the descriptions of step 2 and step 3 in the first embodiment, and will not be described again.
S705, the bluetooth headset 120 transmits connection error information including owner information to the mobile phone 130.
In some embodiments, the connection error information may include owner information.
It should be noted that, for other implementation manners of S705, reference may be made to the description of step 5 in example one.
S706, the mobile phone 130 displays the owner information.
In some embodiments, it may be a user interface popup window of the communication management application of the mobile phone 130 that displays owner information so that a user holding the mobile phone 130 may contact a user holding the mobile phone 110 through the owner information. The application does not limit the display mode of the machine owner information.
In view of the above, in the case where the bluetooth headset 120 is picked up, the possibility that the bluetooth headset 120 is retrieved may be increased by the owner information that the bluetooth headset 120 transmits to the electronic device that cannot establish the bluetooth connection.
Embodiment four:
In the fourth embodiment, the mobile phone 110 may disconnect from the bluetooth connection with the bluetooth headset 120, and the mobile phone 110 may still maintain the bluetooth connection with the bluetooth headset 120, which is not limited in the present application.
In the fourth embodiment, the mobile phone 110 uses the steps shown in fig. 4 to control the bluetooth headset 120 to switch from the normal mode to the strong binding mode. The mobile phone 130 itself requests to establish bluetooth connection with the bluetooth headset 120 using a standard bluetooth communication protocol, and the mobile phone 130 installs a communication management application, and the communication management application logs in to the user account a, which is the same as the user account a logged in by the communication management application of the mobile phone 110.
As shown in fig. 8, the bluetooth connection phase of the bluetooth device in the strong binding mode may include the following steps:
s801, the bluetooth headset 120 transmits adv_ind to the surroundings.
It should be noted that, the implementation of S801 may refer to the description of S501, which is not described herein.
S802, the mobile phone 130 scans adv_ind sent by the bluetooth headset 120, and sends connect_req to the bluetooth headset 120 using the proprietary bluetooth communication protocol.
In some embodiments, the connect_req includes device identification information of the mobile phone 130, and account information of the user account a registered by the communication management application of the mobile phone 130.
S803 the bluetooth headset 120 determines that the handset 130 employs a proprietary bluetooth communication protocol in response to the connect_req.
It should be noted that, the implementation manner of S802-S803 can be referred to the description of step 1-step 2 in the first embodiment, and will not be described herein.
S804, the Bluetooth headset 120 determines that the account identification information of the user account A included in the CONNECT_REQ is the same as the account identification information of the user account A stored in the trust list of the Bluetooth headset 120.
S805 the bluetooth headset 120 adds the device identification information of the mobile phone 130 to the trust list.
Illustratively, the bluetooth headset may bind and store the account identification information of the user account a, the device identification information of the mobile phone 110, and the device identification information of the mobile phone 130 to the trust list.
S806, the bluetooth headset 120 transmits the connection confirmation information to the mobile phone 130.
It should be noted that, the implementation of S806 may refer to the description of S508, which is not described herein.
S807, the mobile phone 130 uploads the device identification information of the mobile phone 130 to the cloud server in response to the connection confirmation information.
In some embodiments, after the mobile phone 130 and the bluetooth headset 120 successfully establish a bluetooth connection, the communication management application of the mobile phone 130 may upload the device identification information of the mobile phone 130 to the cloud server, that is, to the cloud account of the user account a of the communication management application. The user using the electronic device logged in with the user account a may be prompted, the mobile phone 130 is a trusted device of the bluetooth headset 120, and the mobile phone 130 may establish a bluetooth connection with the bluetooth headset 120.
Note that S807 is an optional execution step.
From the above, after the bluetooth headset 120 is switched to the strong binding mode, the identity of the electronic device (i.e. the mobile phone 130 described above) can be verified with the aid of the logged-in user account, and the electronic device logged in the same user account can be verified with the identity of the bluetooth headset 120, so as to ensure the security of the identity of the electronic device that successfully establishes bluetooth connection with the bluetooth headset 120.
It should be understood that when bluetooth of the electronic device is in an active state, it may send adv_ind to the surroundings, or may scan adv_ind sent by other electronic devices or bluetooth devices around, and the bluetooth devices are the same.
The first to fourth embodiments describe the procedure in which the handset 130 requests the bluetooth headset 120 to establish a bluetooth connection, and the fifth embodiment describes the procedure in which the bluetooth headset 120 requests the handset 130 to establish a bluetooth connection.
Fifth embodiment:
in the fifth embodiment, the mobile phone 110 may disconnect from the bluetooth connection with the bluetooth headset 120, and the mobile phone 110 may still maintain the bluetooth connection with the bluetooth headset 120, which is not limited in the present application.
In the fifth embodiment, the mobile phone 110 uses the steps shown in fig. 4 to switch the bluetooth headset 120 from the normal mode to the strong binding mode. The mobile phone 130 itself adopts a private bluetooth communication protocol, the mobile phone 130 installs a communication management application, and the communication management application logs in the user account a, which is the same as the user account a logged in by the communication management application of the mobile phone 110.
As shown in fig. 9, the bluetooth connection phase of the bluetooth device in the strong binding mode may include the following steps:
s901, the mobile phone 130 transmits adv_ind to the surrounding.
Also referred to as the handset 130 broadcasting ADV IND to the surroundings.
In some embodiments, the mobile phone 130 includes a system application and a bluetooth chip, where the system application of the mobile phone 130 also logs in the user account a, and in the case that the bluetooth function of the system application is started, the system application of the mobile phone 130 may control the bluetooth chip to send adv_ind to the surroundings, where adv_ind includes device identification information of the mobile phone 130 and account identification information of the user account a.
In some embodiments, the mobile phone 130 also includes a communication management application and a bluetooth chip, where the communication management application of the mobile phone 130 also logs in the user account a, and in the case that the bluetooth function of the communication management application is started, the communication management application of the mobile phone 130 may control the bluetooth chip to send adv_ind to the surroundings, where the adv_ind includes device identification information of the mobile phone 130 and account identification information of the user account a.
Illustratively, the device identification information of the mobile phone 130 may include a MAC address of the mobile phone 130, a device name of the mobile phone 130, or custom data of the user. The application is not limited to the information type and the information quantity of the device identification information of the mobile phone 130, and can enable other electronic devices to uniquely identify the mobile phone 130 based on the device identification information of the mobile phone 130.
S902, the Bluetooth headset 120 scans ADV_IND sent by the mobile phone 130, and determines that the mobile phone 130 adopts a private Bluetooth communication protocol.
In some embodiments, adv_ind may include a flag bit for indicating a bluetooth communication protocol employed by the electronic device transmitting adv_ind.
It should be noted that, the description of the flag bit of adv_ind may refer to the description of the flag bit of connect_req in S503, and will not be repeated here.
The bluetooth headset 120 determines that the flag bit of the received adv_ind indicates that the mobile phone 130 adopts the private bluetooth communication protocol, the bluetooth headset 120 may determine that the adv_ind includes account identification information of the user account a registered by the mobile phone 130, and the bluetooth headset 120 may continue to execute S903.
S903, the Bluetooth headset 120 determines that the account identification information of the user account A included in the ADV_IND is the same as the account identification information of the user account A stored in the trust list of the Bluetooth headset 120.
S904, the bluetooth headset 120 transmits connect_req to the mobile phone 130.
In some embodiments, the bluetooth headset 120 determines that the handset 130 is logged in to the same user account a as the trusted device handset 110, and the bluetooth headset 120 may automatically send a connect_req (also referred to as third communication connection request information) to the handset 130.
In some embodiments, the connect_req may include account identification information of the user account a registered by the mobile phone 110 and device identification information of the bluetooth headset 120 stored in the bluetooth headset 120.
S905, the mobile phone 130 transmits connection confirmation information to the bluetooth headset 120 in response to the connect_req.
In some embodiments, the mobile phone 130 determines that the account identification information of the user account a included in the connect_req is the same as the account identification information of the user account a logged in by the mobile phone 130, and the mobile phone 130 may automatically send connection confirmation information to the bluetooth headset 120 based on the device identification information of the bluetooth headset 120, where the connection confirmation information is information for indicating that the mobile phone 130 agrees to establish a bluetooth connection with the bluetooth headset 120.
The connection confirmation information is used for the bluetooth headset 120, and the mobile phone 130 agrees to the connection request of connect_req, which indicates that the bluetooth headset 120 and the mobile phone 130 successfully establish a bluetooth connection, and the two can perform data communication
S906, the mobile phone 130 uploads the device identification information of the mobile phone 130 to the cloud server.
Note that, the embodiment of S906 may be referred to the description of S807, and S906 is an optional execution step.
From the above, after the bluetooth headset 120 is switched to the strong binding mode, the bluetooth headset 120 can automatically establish bluetooth connection with an electronic device logging in the same user account, and further reduce user operation on the basis of ensuring the security of the identity of the electronic device successfully establishing bluetooth connection with the bluetooth headset 120, so as to improve the user experience of the user.
The embodiment of the application also provides a computer readable storage medium storing a computer program, and the computer program can realize one or more steps of any Bluetooth connection method when being executed by a computer.
The computer readable storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Another embodiment of the application also provides a computer program product containing instructions. The computer program product is capable of implementing one or more of the steps of any of the bluetooth connection methods described above when executed by a computer.
The electronic device, the computer readable storage medium and the computer program product provided in this embodiment are used to execute the corresponding bluetooth connection method provided above, so the beneficial effects thereof can be referred to the beneficial effects in the corresponding bluetooth connection method provided above, and will not be described herein.
The terms first, second, third and the like in the description and in the claims and in the drawings are used for distinguishing between different objects and not for limiting the specified order.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
While the application has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that the foregoing embodiments may be modified or equivalents may be substituted for some of the features thereof, and that the modifications or substitutions do not depart from the spirit and scope of the embodiments of the application.