Bluetooth secure connection method for smart systems or smart devices
By updating the verification code during the Bluetooth connection process, the problem of insufficient security of existing Bluetooth connections is solved, and a secure connection method is implemented in which reconnection is impossible even if the verification code is leaked.
Patent Information
- Application Number
- CN202211247225.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-12
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-10-12
AI Technical Summary
Existing Bluetooth connections have poor security, especially classic Bluetooth, which can be easily connected by other devices when in pairing mode. Even when using key verification during connection, low-power Bluetooth can be captured to obtain the verification code, making the connection no longer secure.
When the smart device communicates and connects with the target Bluetooth device, if verification fails, the smart device updates the verification code and continues to verify until it succeeds. The updated verification code is used during pairing to ensure that the smart device cannot connect again after the verification code is leaked.
By continuously updating the verification code, even if the verification code is leaked, other devices cannot connect again, improving the security of the Bluetooth connection.
Smart Images

Figure CN115767553B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Bluetooth communication, and in particular to a Bluetooth secure connection method for an intelligent system or intelligent device. Background Art
[0002] Bluetooth is divided into Classic Bluetooth (BR / EDR) and Bluetooth Low Energy (BLE). Conventional technology allows Classic Bluetooth to connect to other Bluetooth devices while in pairing mode, which is insecure and poses a risk of information leakage. Even when Bluetooth Low Energy (BLE) uses key verification during connection, the verification code can still be captured by packet capture. Once the verification code is captured, the connection is no longer secure.
[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a Bluetooth secure connection method for an intelligent system or intelligent device in response to the above-mentioned defects of the prior art, aiming to solve the problem of poor security of Bluetooth connection in the prior art.
[0005] The technical solutions adopted by the present invention to solve the technical problems are as follows:
[0006] A secure Bluetooth connection method for a smart device, comprising the steps of:
[0007] The smart device scans the surrounding area for target Bluetooth devices;
[0008] When the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and performs verification;
[0009] When the verification fails, the smart device updates the verification code and continues to perform verification until the verification succeeds. The smart device updates the verification code and pairs with the target Bluetooth device to complete the Bluetooth connection.
[0010] The secure Bluetooth connection method for a smart device, wherein the smart device includes: a Bluetooth management module; the smart device scans the surrounding area to see if there is a target Bluetooth device, including:
[0011] The Bluetooth management module of the smart device sends scanning information to scan the target Bluetooth device;
[0012] When the Bluetooth management module of the smart device receives the scanning result sent by the target Bluetooth device and the scanning result meets the preset condition, the target Bluetooth device exists and the scanning ends.
[0013] The secure Bluetooth connection method for a smart device, wherein the scanning result includes: consistent supplier identification codes and consistent product identification codes, and the preset condition is that the supplier identification codes are consistent and the product identification codes are consistent.
[0014] The secure Bluetooth connection method of the smart device, wherein the smart device includes: a Bluetooth instance module; the smart device communicates with the target Bluetooth device and performs verification, including:
[0015] The Bluetooth instance module of the smart device sends a connection request to the target Bluetooth device;
[0016] The Bluetooth instance module of the smart device receives the connection success callback information sent by the target Bluetooth device to establish a communication channel with the target Bluetooth device to achieve a communication connection;
[0017] The smart device sends a verification code to the target Bluetooth device through the communication channel for verification.
[0018] The secure connection method of Bluetooth for smart devices, wherein the communication channel further includes: a BLE channel and a classic Bluetooth channel;
[0019] When the verification fails, the smart device updates the verification code and continues to perform verification until the verification succeeds, the smart device updates the verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection, including:
[0020] When the smart device receives the verification failure callback information sent by the target Bluetooth device through the BLE channel, it updates the verification code according to the preset rules and sends the updated verification code to the target Bluetooth device through the BLE channel to continue the verification;
[0021] When the smart device receives the verification success callback information sent by the target Bluetooth device through the BLE channel, it updates the verification code according to the preset rule, and sends a pairing command to the target Bluetooth device through the BLE channel, so that the target Bluetooth device saves the first classic Bluetooth address carried by the pairing command;
[0022] The method for securely connecting Bluetooth to a smart device, wherein when verification fails, the smart device updates the verification code and continues to perform verification until verification succeeds, at which point the smart device updates the verification code and pairs the smart device with the target Bluetooth device to complete the Bluetooth connection, further comprising:
[0023] The smart device receives the classic Bluetooth pairing return connection information sent by the target Bluetooth device through the classic Bluetooth channel;
[0024] The smart device sends a pairing request to the target Bluetooth device through the classic Bluetooth channel; the pairing request carries a second classic Bluetooth address;
[0025] The smart device receives the comparison success information of the classic Bluetooth address through the classic Bluetooth channel to complete the Bluetooth connection.
[0026] A secure Bluetooth connection method for an intelligent system, wherein the intelligent system includes: an intelligent device and a target Bluetooth device; the method includes the steps of:
[0027] The smart device scans the surrounding area to see if there is the target Bluetooth device;
[0028] When the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and performs verification;
[0029] When the verification fails, the smart device updates the verification code and the target Bluetooth device updates the local verification code, and continues to verify until the verification succeeds. The smart device updates the verification code and the target Bluetooth device updates the local verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection.
[0030] The secure Bluetooth connection method of the intelligent system, wherein the intelligent device includes: a Bluetooth instance module; when the target Bluetooth device exists, the intelligent device communicates with the target Bluetooth device and performs verification, including:
[0031] The Bluetooth instance module of the smart device sends a connection request to the target Bluetooth device;
[0032] The target Bluetooth device receives the connection request and sends a connection success callback message to the Bluetooth instance module of the smart device;
[0033] The Bluetooth instance module of the smart device receives the connection success callback information to establish a communication channel with the target Bluetooth device to achieve a communication connection;
[0034] The smart device sends a verification code to the target Bluetooth device through the communication channel;
[0035] The target Bluetooth device receives the verification code through the communication channel and compares the verification code with a local verification code stored in the target Bluetooth device for verification.
[0036] A computer device comprises a memory and a processor, wherein the memory stores a computer program, wherein when the processor executes the computer program, it implements the steps of the Bluetooth secure connection method for a smart device as described in any one of the above items or the Bluetooth secure connection method for a smart system as described in any one of the above items.
[0037] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of the Bluetooth secure connection method for a smart device as described in any one of the above items or the Bluetooth secure connection method for a smart system as described in any one of the above items.
[0038] Beneficial effect: Regardless of whether the verification succeeds or fails, the smart device will update the verification code. Even if the verification code is leaked, other Bluetooth devices will obtain the verification code of the smart device. Since the verification code of the smart device has been updated, the other Bluetooth devices will not be able to successfully verify the next time they connect to the smart device, and will not be able to connect to the smart device via Bluetooth, thus ensuring the security of the smart device. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a functional principle block diagram of the intelligent system in the present invention.
[0040] Figure 2 This is a block diagram of the specific functional principles of the intelligent device in the present invention.
[0041] Figure 3 It is a flow chart of the scanning phase in the present invention.
[0042] Figure 4 It is a flow chart of the verification phase in the present invention.
[0043] Figure 5 It is a flow chart of the pairing stage in the present invention.
[0044] Figure 6 It is a flow chart of the data transmission stage in the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0046] Please also see Figures 1-6 The present invention provides some embodiments of a Bluetooth secure connection method for a smart device.
[0047] like Figure 1As shown, the present invention provides an intelligent system, comprising: a smart device and a target Bluetooth device. The smart device refers to a smart device worn by a user, and the target Bluetooth device refers to a device that can establish a Bluetooth connection with the smart device. The target Bluetooth device is generally also used to control the smart device. When the smart device is worn by the user, the target Bluetooth device establishes a Bluetooth connection with the smart device to achieve data transmission, and can also send control commands via the Bluetooth connection to control the smart device. Smart devices include smart headphones, smart watches, and smart glasses, which can be smart AR glasses, etc. Target Bluetooth devices include smartphones, smart tablets, computers, etc.
[0048] Specifically, if Figure 2 As shown, the smart device includes: a Bluetooth management module (Manager) and a Bluetooth instance module (Device), the Bluetooth management module is used to scan the target Bluetooth device, and the Bluetooth instance module is used to connect to the target Bluetooth device.
[0049] like Figure 3-Figure 5 As shown, a secure Bluetooth connection method for a smart device of the present invention includes the following steps:
[0050] Step S100: The smart device scans the surrounding area to see if there is a target Bluetooth device.
[0051] Step S200: When the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and verifies the target Bluetooth device.
[0052] Step S300: When the verification fails, the smart device updates the verification code and continues to perform verification until the verification succeeds. The smart device updates the verification code and pairs with the target Bluetooth device to complete the Bluetooth connection.
[0053] Specifically, when verifying, the smart device does not use keyless verification or fixed key verification, but instead uses the method of updating the verification code. Regardless of whether the verification succeeds or fails, the smart device will update the verification code. Then, even if the verification code is leaked and other Bluetooth devices obtain the verification code of the smart device, since the verification code of the smart device has been updated, the other Bluetooth devices will not be able to successfully verify the next time they connect to the smart device via Bluetooth, thus ensuring the security of the smart device.
[0054] Specifically, the Bluetooth connection between the smart device and the target Bluetooth device is divided into three stages, namely the scanning stage, the verification stage and the pairing stage. In the scanning stage, the Bluetooth of the smart device and the target Bluetooth device need to be turned on. After the smart device turns on Bluetooth, it starts scanning the target Bluetooth device. When scanning, the smart device may scan other Bluetooth devices in addition to the target Bluetooth device. It should be noted that the target Bluetooth device can control the smart device by installing a virtual controller such as an app. Only when the target Bluetooth device is scanned will the scanning end and the scanning stage is completed. Scanning other Bluetooth devices does not end the scan.
[0055] In order to accurately scan the target Bluetooth device, step S100 specifically includes:
[0056] Step S110: The Bluetooth management module of the smart device sends a scan message to scan for a target Bluetooth device.
[0057] Step S120: When the Bluetooth management module of the smart device receives the scanning result sent by the target Bluetooth device and the scanning result meets a preset condition, the target Bluetooth device exists and the scanning ends.
[0058] Step S130: When the Bluetooth management module of the smart device does not receive the scanning result, or the received scanning result does not meet the preset conditions, the target Bluetooth device does not exist, and the scanning information continues to be sent to continue scanning the target Bluetooth device until a stop scanning instruction is received, and the scanning ends.
[0059] Specifically, if Figure 3 As shown, the smart device sends a scan message to perform a scan. After receiving the scan message, the target Bluetooth device (or other Bluetooth device) sends the scan result to the smart device. If the scan result meets the preset conditions, it indicates that the target Bluetooth device exists. If the scan result received by the smart device does not meet the preset conditions or no scan result is received, it indicates that the target Bluetooth device does not exist. The smart device then continues to send scan messages to continue scanning for the target Bluetooth device until it receives a stop scan command, which can be to turn off the Bluetooth of the smart device.
[0060] The scan information carries a vendor identification code (VID) and a product identification code (PID). When the target Bluetooth device (or other Bluetooth device) receives the scan information, it obtains the vendor identification code (VID) and product identification code (PID). Some Bluetooth devices cannot control smart devices, do not store local vendor identification codes and local product identification codes, and do not compare the two. Therefore, after receiving the scan information, they do not send the scan result. Some Bluetooth devices also store local vendor identification codes and local product identification codes and compare them. However, if the vendor identification code in the scan information is inconsistent with the local vendor identification code, or the product identification code in the scan information is inconsistent with the local product identification code, the scan result sent is inconsistent with the vendor identification code or the product identification code. The target Bluetooth device stores the local vendor identification code and local product identification code, compares the vendor identification code in the scan information with the local vendor identification code, and compares the product identification code in the scan information with the local product identification code, and sends the scan result (i.e., the comparison result) to the smart device. After receiving the scan result, the smart device determines whether the scan result meets the preset conditions, which are that the supplier identification code and the product identification code are consistent.
[0061] As can be seen above, the scan results include: inconsistent supplier identification codes, consistent supplier identification codes, inconsistent product identification codes, and consistent product identification codes. If the scan result meets the preset condition, that is, the scan result shows that the supplier identification codes are consistent and the product identification codes are consistent, then the preset condition is met. If the scan result shows that the supplier identification codes are inconsistent and the product identification codes are consistent, the supplier identification codes are consistent and the product identification codes are inconsistent, or the supplier identification codes are inconsistent and the product identification codes are inconsistent, then the preset condition is not met.
[0062] Step S200 specifically includes:
[0063] Step S210: The Bluetooth instance module of the smart device sends a connection request to the target Bluetooth device.
[0064] Step S220: The Bluetooth instance module of the smart device receives the connection success callback information sent by the target Bluetooth device to establish a communication channel with the target Bluetooth device to achieve a communication connection.
[0065] Step S230: The smart device sends a verification code to the target Bluetooth device through the communication channel for verification.
[0066] Specifically, if Figure 4As shown, the smart device sends a connection request to the target Bluetooth device. After receiving the connection request, the target Bluetooth device sends a connection success callback message to the smart device, so that the smart device and the target Bluetooth device establish a communication channel and achieve a communication connection. Specifically, the communication channel includes: BLE channel and classic Bluetooth channel. The smart device establishes a BLE (Bluetooth Low Energy) channel connection with the target Bluetooth device. Then the smart device can perform verification based on the BLE channel. Specifically, the smart device sends a verification code to the target Bluetooth device through the BLE channel for verification.
[0067] Specifically, a local verification code is stored on the target Bluetooth device. After the target Bluetooth device receives the verification code sent by the smart device through the BLE channel, it compares the verification code with the local verification code. When the two are consistent, the verification is successful, and the target Bluetooth device will send a verification success callback message to the smart device through the BLE channel; when the two are inconsistent, the verification fails, and the target Bluetooth device will send a verification failure callback message to the smart device through the BLE channel.
[0068] Step S300 specifically includes:
[0069] Step S310: When the smart device receives the verification failure callback information sent by the target Bluetooth device through the BLE channel, it updates the verification code according to the preset rules and sends the updated verification code to the target Bluetooth device through the BLE channel to continue verification.
[0070] Step S320: When the smart device receives the verification success callback information sent by the target Bluetooth device through the BLE channel, it updates the verification code according to the preset rules, and sends a pairing command to the target Bluetooth device through the BLE channel, so that the target Bluetooth device saves the first classic Bluetooth address carried by the pairing command.
[0071] Step S330: The smart device receives the classic Bluetooth pairing reconnection information sent by the target Bluetooth device through the classic Bluetooth channel.
[0072] Step S340: The smart device sends a pairing request to the target Bluetooth device through the classic Bluetooth channel; the pairing request carries a second classic Bluetooth address.
[0073] Step S350: The smart device receives the comparison success information of the classic Bluetooth address through the classic Bluetooth channel to complete the Bluetooth connection.
[0074] Specifically, when the verification code is successfully verified, the target Bluetooth device updates the local verification code and sends a verification success callback message to the smart device through the BLE channel. The smart device receives the verification success callback message sent by the target Bluetooth device through the BLE channel, then the smart device updates the verification code and pairs with the target Bluetooth device. When the verification code fails to be verified, the target Bluetooth device updates the local verification code and sends a verification failure callback message to the smart device through the BLE channel. The smart device receives the verification failure callback message sent by the target Bluetooth device through the BLE channel, then the smart device updates the verification code and continues to verify. Regardless of whether the verification code is successful or failed, the target Bluetooth device will update the local verification code and the smart device will update the verification code. Even if the verification code was received by other Bluetooth devices during the previous verification process, it cannot be successfully verified with the smart device, and the Bluetooth connection cannot be made.
[0075] When the smart device establishes a communication channel with the target Bluetooth device, it can also establish a classic Bluetooth channel. Figure 5 As shown, during the pairing process, the smart device sends a pairing command to the target Bluetooth device through the BLE channel. After the target Bluetooth device receives the pairing command, it stores the first classic Bluetooth address carried in the pairing command, and then sends the classic Bluetooth pairing back connection information to the smart device through the classic Bluetooth channel. The smart device receives the classic Bluetooth pairing back connection information through the classic Bluetooth channel, and then the smart device sends a pairing request to the target Bluetooth device through the classic Bluetooth channel. After the target Bluetooth device receives the pairing request through the classic Bluetooth channel, it obtains the second classic Bluetooth address carried in the pairing request and compares the first classic Bluetooth address and the second classic Bluetooth address. If the two are consistent, the comparison is successful, and the target Bluetooth device sends a comparison success message to the smart device through the classic Bluetooth channel to realize the Bluetooth connection between the smart device and the target Bluetooth device. If the two are inconsistent, the smart device continues to send a pairing command to the target Bluetooth device through the BLE channel, so that the target Bluetooth device saves the first classic Bluetooth address carried by the pairing command. If the comparison is still unsuccessful, the Bluetooth connection is terminated.
[0076] It should be noted that when the Bluetooth connection is established, the pairing command is directly and automatically sent, and the Bluetooth connection is achieved by comparing the classic Bluetooth address. No physical button or command is required to put the classic Bluetooth device into pairing mode. In other words, it is only necessary to ensure that the Bluetooth of the smart device and the Bluetooth of the target Bluetooth device are both turned on. Based on the method of the present invention, the smart device and the target Bluetooth device can automatically establish a Bluetooth connection, which simplifies the Bluetooth connection between the smart device and the target Bluetooth device.
[0077] It is understandable that when pairing, the smart device does not directly initiate pairing with the target Bluetooth device. Even if the smart device initiates pairing with the target Bluetooth device, the target Bluetooth device will refuse pairing (if it does not refuse pairing, it will need to enter the pairing mode through a physical button or command, which is more cumbersome). The smart device then sends a pairing command to the target Bluetooth device through the BLE channel for automatic pairing.
[0078] like Figure 6 As shown in the figure, after the Bluetooth connection, it enters the data transmission stage. The Bluetooth instance module of the smart device provides a command sending task thread and a command receiving thread. Each thread has a command queue to cache commands, making the commands safer and not blocking command sending / receiving.
[0079] For a secure Bluetooth connection method for a smart device based on any of the above embodiments, please also refer to Figures 1-6 The present invention provides some embodiments of a Bluetooth secure connection method for an intelligent system. The intelligent system includes: an intelligent device and a target Bluetooth device.
[0080] like Figure 3-Figure 5 As shown, a secure Bluetooth connection method for an intelligent system of the present invention comprises the following steps:
[0081] Step A100: The smart device scans the surrounding area to see if there is the target Bluetooth device.
[0082] Step A200: When the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and performs verification.
[0083] Step A300: When the verification fails, the smart device updates the verification code and the target Bluetooth device updates the local verification code, and continues to verify until the verification succeeds. The smart device updates the verification code and the target Bluetooth device updates the local verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection.
[0084] Specifically, the smart device first scans and detects a target Bluetooth device within a preset range. It then verifies the target Bluetooth device. Regardless of whether the verification succeeds or fails, the smart device updates its verification code, and the target Bluetooth device also updates its local verification code. Even if the verification code is leaked, the smart device will not be able to connect to other Bluetooth devices due to the updated verification code, thus causing a security issue.
[0085] The smart device first determines whether there is a target Bluetooth device that can be connected to Bluetooth in the surrounding area by scanning. After scanning the target Bluetooth device, it verifies and pairs it.
[0086] Step A100 specifically includes:
[0087] Step A110: The Bluetooth management module of the smart device sends a scan message to scan a target Bluetooth device.
[0088] Step A120: The target Bluetooth device receives the scanning information and sends the scanning result to the Bluetooth management module of the smart device.
[0089] Step A130: The Bluetooth management module of the smart device receives the scanning result. When the scanning result meets a preset condition, the target Bluetooth device exists and the scanning ends.
[0090] Step A140: When the Bluetooth management module of the smart device does not receive the scanning result, or the received scanning result does not meet the preset conditions, the target Bluetooth device does not exist, and the scanning information continues to be sent to continue scanning the target Bluetooth device until a stop scanning instruction is received, and the scanning ends.
[0091] like Figure 3 As shown, before the smart device and the target Bluetooth device in the smart system are connected by Bluetooth, the target Bluetooth device stores a local supplier identification code and a local product identification code. The local supplier identification code and local product identification code here are the supplier identification code and product identification code belonging to the smart device respectively. That is to say, after the target Bluetooth device uses the supplier identification code and product identification code of the smart device as the local supplier identification code and local product identification code respectively, it can then establish a Bluetooth connection with the smart device.
[0092] Step A200 specifically includes:
[0093] Step A210: The Bluetooth instance module of the smart device sends a connection request to the target Bluetooth device.
[0094] Step A220: The target Bluetooth device receives the connection request and sends a connection success callback message to the Bluetooth instance module of the smart device.
[0095] Step A230: The Bluetooth instance module of the smart device receives the connection success callback information to establish a communication channel with the target Bluetooth device to achieve a communication connection.
[0096] Step A240: The smart device sends a verification code to the target Bluetooth device through the communication channel.
[0097] Step A250: The target Bluetooth device receives the verification code through the communication channel, and compares the verification code with a local verification code stored in the target Bluetooth device for verification.
[0098] Specifically, after the smart device scans the target Bluetooth device, the smart device establishes a communication channel with the target Bluetooth device for communication connection. The communication channel here can include a BLE channel and a classic Bluetooth channel.
[0099] like Figure 4 As shown, in the smart system, before the smart device and the target Bluetooth device are connected via Bluetooth, the target Bluetooth device stores a local verification code. The smart device sends the verification code to the target Bluetooth device via the BLE channel, and the target Bluetooth device can compare the received verification code with the stored local verification code to achieve verification.
[0100] Step A300 specifically includes:
[0101] Step A310: When the verification fails, the target Bluetooth device updates the local verification code according to a preset rule, and sends a verification failure callback message to the smart device through the BLE channel.
[0102] Step A320: The smart device receives the verification failure callback information through the BLE channel, updates the verification code according to the preset rule, and sends the updated verification code to the target Bluetooth device through the BLE channel to continue verification.
[0103] Step A330: When the verification is successful, the target Bluetooth device updates the local verification code according to the preset rules, and sends a verification success callback message to the smart device through the BLE channel.
[0104] Step A340: The smart device receives the verification success callback information through the BLE channel, updates the verification code according to the preset rule, and sends a pairing command to the target Bluetooth device through the BLE channel.
[0105] Step A350: The target Bluetooth device receives the pairing command, saves the first classic Bluetooth address carried in the pairing command, and sends classic Bluetooth pairing return information to the smart device through the classic Bluetooth channel.
[0106] Step A360: The smart device receives the classic Bluetooth pairing reconnection information through the classic Bluetooth channel.
[0107] Step A370: The smart device sends a pairing request to the target Bluetooth device through the classic Bluetooth channel; the pairing request carries a second classic Bluetooth address.
[0108] Step A380: The target Bluetooth device receives the pairing request and compares the second classic Bluetooth address with the first classic Bluetooth address. When the comparison is successful, a comparison success message is sent to the smart device through the classic Bluetooth channel.
[0109] Step A390: The smart device receives the comparison success information through the classic Bluetooth channel to complete the Bluetooth connection.
[0110] After scanning, verification is performed based on the BLE channel. The smart device in the smart system and the target Bluetooth device update the verification code based on the same preset rules. Specifically, the smart device updates the verification code based on the preset rules, and the target Bluetooth device updates the local verification code based on the same preset rules. Since the verification code is updated based on the same preset rules, the updated verification code and the updated local verification code are consistent. Since the verification code can be updated, the smart device and the target Bluetooth device based on the same preset rules can successfully verify.
[0111] like Figure 5 As shown, after successful verification, automatic pairing is performed. The smart device first sends a pairing command to the target Bluetooth device through the BLE channel. The target Bluetooth device can then receive the first classic Bluetooth address carried in the pairing command and feedback the classic Bluetooth pairing return information to the smart device through the classic Bluetooth channel. After the smart device receives the classic Bluetooth pairing return information, it sends a pairing request through the classic Bluetooth channel. The target Bluetooth device can then receive the second classic Bluetooth address carried in the pairing request, and can compare the first classic Bluetooth address with the second classic Bluetooth address. After the two are successfully compared, a comparison success message is sent to the smart device, thereby completing the Bluetooth connection.
[0112] Based on the Bluetooth secure connection method for a smart device or the Bluetooth secure connection method for a smart system according to any of the above embodiments, the present invention further provides an embodiment of a computer device.
[0113] The computer device of the present invention includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the Bluetooth secure connection method for the smart device of any of the above-mentioned embodiments, or the Bluetooth secure connection method for the smart system of any of the above-mentioned embodiments.
[0114] Based on the Bluetooth secure connection method for a smart device or the Bluetooth secure connection method for a smart system according to any of the above embodiments, the present invention further provides an embodiment of a computer-readable storage medium.
[0115] The computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the Bluetooth secure connection method for a smart device of any of the above-mentioned embodiments, or the Bluetooth secure connection method for a smart system of any of the above-mentioned embodiments.
[0116] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A secure Bluetooth connection method for a smart device, characterized in that: Including steps: The smart device scans the surrounding area for target Bluetooth devices; When the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and performs verification; When the verification fails, the smart device updates the verification code and the target Bluetooth device updates the local verification code, and continues to verify until the verification succeeds. The smart device updates the verification code and the target Bluetooth device updates the local verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection.
2. The method for secure Bluetooth connection of a smart device according to claim 1, characterized in that: The smart device includes: a Bluetooth management module; the smart device scans whether there is a target Bluetooth device around, including: The Bluetooth management module of the smart device sends scanning information to scan the target Bluetooth device; When the Bluetooth management module of the smart device receives the scanning result sent by the target Bluetooth device and the scanning result meets the preset condition, the target Bluetooth device exists and the scanning ends.
3. The method for secure Bluetooth connection of a smart device according to claim 2, wherein: The scanning result includes: the supplier identification code is consistent and the product identification code is consistent, and the preset condition is that the supplier identification code is consistent and the product identification code is consistent.
4. The method for secure Bluetooth connection of a smart device according to claim 1, wherein: The smart device includes a Bluetooth instance module; the smart device communicates with the target Bluetooth device and performs verification, including: The Bluetooth instance module of the smart device sends a connection request to the target Bluetooth device; The Bluetooth instance module of the smart device receives the connection success callback information sent by the target Bluetooth device to establish a communication channel with the target Bluetooth device to achieve a communication connection; The smart device sends a verification code to the target Bluetooth device through the communication channel for verification.
5. The method for secure Bluetooth connection of a smart device according to claim 4, characterized in that: The communication channel also includes: a BLE channel and a classic Bluetooth channel; When the verification fails, the smart device updates the verification code and continues to perform verification until the verification succeeds, the smart device updates the verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection, including: When the smart device receives the verification failure callback information sent by the target Bluetooth device through the BLE channel, it updates the verification code according to the preset rules and sends the updated verification code to the target Bluetooth device through the BLE channel to continue the verification; When the smart device receives the verification success callback information sent by the target Bluetooth device through the BLE channel, it updates the verification code according to the preset rules, and sends a pairing command to the target Bluetooth device through the BLE channel, so that the target Bluetooth device saves the first classic Bluetooth address carried by the pairing command.
6. The method for secure Bluetooth connection of a smart device according to claim 5, characterized in that: When the verification fails, the smart device updates the verification code and continues to perform verification until the verification succeeds, the smart device updates the verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection, further comprising: The smart device receives the classic Bluetooth pairing return connection information sent by the target Bluetooth device through the classic Bluetooth channel; The smart device sends a pairing request to the target Bluetooth device through the classic Bluetooth channel; the pairing request carries a second classic Bluetooth address; The smart device receives the comparison success information of the classic Bluetooth address through the classic Bluetooth channel to complete the Bluetooth connection.
7. A secure Bluetooth connection method for an intelligent system, characterized in that: The intelligent system includes: an intelligent device and a target Bluetooth device, wherein the target Bluetooth device is used to control the intelligent device; the method includes the steps of: The smart device scans the surrounding area to see if there is the target Bluetooth device; When the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and performs verification; When the verification fails, the smart device updates the verification code and the target Bluetooth device updates the local verification code, and continues to verify until the verification succeeds. The smart device updates the verification code and the target Bluetooth device updates the local verification code, and the smart device is paired with the target Bluetooth device to complete the Bluetooth connection.
8. The Bluetooth secure connection method for an intelligent system according to claim 7, characterized in that: The smart device includes: a Bluetooth instance module; when the target Bluetooth device exists, the smart device communicates with the target Bluetooth device and performs verification, including: The Bluetooth instance module of the smart device sends a connection request to the target Bluetooth device; The target Bluetooth device receives the connection request and sends a connection success callback message to the Bluetooth instance module of the smart device; The Bluetooth instance module of the smart device receives the connection success callback information to establish a communication channel with the target Bluetooth device to achieve a communication connection; The smart device sends a verification code to the target Bluetooth device through the communication channel; The target Bluetooth device receives the verification code through the communication channel and compares the verification code with a local verification code stored in the target Bluetooth device for verification.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 or the steps of the method according to any one of claims 7 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6 or the steps of the method according to any one of claims 7 to 8.
Citation Information
Patent Citations
Bluetooth connection flashlight control method and control system thereof
CN116546710A