CN113301572A - Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment - Google Patents

Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment Download PDF

Info

Publication number
CN113301572A
CN113301572A CN202110713547.6A CN202110713547A CN113301572A CN 113301572 A CN113301572 A CN 113301572A CN 202110713547 A CN202110713547 A CN 202110713547A CN 113301572 A CN113301572 A CN 113301572A
Authority
CN
China
Prior art keywords
bluetooth
equipment
scanning
broadcast data
bluetooth connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110713547.6A
Other languages
Chinese (zh)
Other versions
CN113301572B (en
Inventor
肖羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202110713547.6A priority Critical patent/CN113301572B/en
Publication of CN113301572A publication Critical patent/CN113301572A/en
Application granted granted Critical
Publication of CN113301572B publication Critical patent/CN113301572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0053Allocation of signaling, i.e. of overhead other than pilot signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for supporting authentication of entities communicating through a packet data network
    • H04L63/0876Network architectures or network communication protocols for network security for supporting authentication of entities communicating through a packet data network based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Abstract

A connection method and device of Bluetooth equipment, a storage medium and the Bluetooth equipment are provided, wherein the method comprises the following steps: receiving broadcast data of first equipment, wherein the broadcast data comprises first indication information for modifying interframe space; modifying the inter-frame interval according to the first indication information, and determining a time window according to the modified inter-frame interval; initiating a scanning request in the time window, and receiving a scanning response returned by the first device after receiving the scanning request; and establishing a first Bluetooth connection with the first equipment according to the scanning response. Therefore, the communication safety of the Bluetooth device is improved.

Description

Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment
Technical Field
The present invention relates to the field of bluetooth communications, and in particular, to a method and an apparatus for connecting bluetooth devices, a storage medium, and a bluetooth device.
Background
Bluetooth is an open global specification for wireless data and voice communications, and is a special short-range wireless technology connection that establishes a communication environment for fixed and mobile devices based on a low-cost short-range wireless connection. With the development of mobile devices such as smart phones, bluetooth technology is also widely used in communications.
The conventional bluetooth device connects to another device by using a specific bluetooth device name or a specific bluetooth device address, but the disadvantage is that the name and address can be easily obtained by packet capturing, and then the connection control can be completed by modifying the conventional bluetooth device, i.e. the conventional bluetooth connection method has poor communication security.
Disclosure of Invention
The invention solves the technical problem of how to provide a connection method of Bluetooth equipment so as to improve the communication safety of the Bluetooth equipment.
In order to solve the above problem, an embodiment of the present invention provides a method for connecting a bluetooth device, where the method includes: receiving broadcast data of first equipment, wherein the broadcast data comprises first indication information for modifying interframe space; modifying the inter-frame interval according to the first indication information, and determining a time window according to the modified inter-frame interval; initiating a scanning request in the time window, and receiving a scanning response returned by the first device after receiving the scanning request; and establishing a first Bluetooth connection with the first equipment according to the scanning response.
Optionally, the method further includes: after establishing a first Bluetooth connection with the first equipment, acquiring an identity analysis secret key of the first equipment; determining a private address of the first device according to the identity resolution key of the first device; disconnecting a first Bluetooth connection with the first device; and establishing a second Bluetooth connection with the first equipment according to the private address of the first equipment, and communicating with the first equipment through Bluetooth.
Optionally, the method further includes: and after establishing the first Bluetooth connection or the second Bluetooth connection with the first equipment, restoring the modified inter-frame space, and carrying out signal transmission with the first equipment according to the restored inter-frame space.
Optionally, the scanning response includes second indication information for restoring the modified inter-frame space, the modified inter-frame space is restored according to the second indication information, and signal transmission is performed with the first device according to the restored inter-frame space.
Optionally, the broadcast data includes a first preset identifier, and after receiving the broadcast data of the first device, the method further includes: verifying the first preset identification; and when the first preset identification passes the verification, continuing to initiate the scanning request in the time window.
Optionally, the scanning response includes a second preset identifier, and after receiving the scanning response returned by the first device after receiving the scanning request, the method further includes: verifying the second preset identification; and when the second preset identification passes the verification, continuously establishing the first Bluetooth connection with the first equipment according to the scanning response.
Optionally, all or part of data interacted with the first device is encrypted through a preset encryption algorithm.
The embodiment of the invention also provides a connection method of the Bluetooth equipment, which comprises the following steps: sending broadcast data in a broadcast mode, wherein the broadcast data comprises first indication information for modifying an interframe space; determining a time window for intercepting the scanning request according to the modified inter-frame interval; and if a scanning request initiated by the second equipment is received in the time window, returning a scanning response to the second equipment so as to establish a first Bluetooth connection with the second equipment.
Optionally, the method further includes: after establishing a first bluetooth connection with the second device, the second device obtains an identity resolution key of the device, so that the second device determines a private address of the device according to the identity resolution key; disconnecting the first bluetooth connection with the second device; and establishing a second Bluetooth connection with the second equipment according to the private address of the equipment, and communicating with the second equipment through Bluetooth.
Optionally, the method further includes: and after the first Bluetooth connection or the second Bluetooth connection is established with the second equipment, recovering the modified inter-frame space, and carrying out signal transmission with the second equipment according to the recovered inter-frame space.
Optionally, the scanning response includes second indication information for restoring the modified inter-frame space, the modified inter-frame space is restored according to the second indication information, and signal transmission is performed with the second device according to the restored inter-frame space.
Optionally, the broadcast data includes a first preset identifier, and the scanning request is continuously initiated within the time window after the second device verifies that the first preset identifier passes.
Optionally, the scan response includes a second preset identifier, and after the second device verifies that the second preset identifier passes, the first bluetooth connection with the device is continuously established.
Optionally, all or part of data interacted with the second device is encrypted through a preset encryption algorithm.
An embodiment of the present invention further provides a connection apparatus for a bluetooth device, where the apparatus includes: the device comprises a broadcast data receiving module, a frame interval modification module and a frame interval modification module, wherein the broadcast data receiving module is used for receiving broadcast data of first equipment, and the broadcast data comprises first indication information for modifying frame intervals; the interframe space modification module is used for modifying the interframe space according to the first indication information and determining a time window according to the modified interframe space; a scanning request initiating module, configured to initiate a scanning request within the time window, and receive a scanning response returned by the first device after receiving the scanning request; and the first Bluetooth connection establishing module is used for establishing a first Bluetooth connection with the first equipment according to the scanning response.
An embodiment of the present invention further provides a connection apparatus for a bluetooth device, where the apparatus includes: the system comprises a broadcast data sending module, a frame interval modification module and a frame interval modification module, wherein the broadcast data sending module is used for sending broadcast data in a broadcast mode, and the broadcast data comprises first indication information used for modifying the frame interval; the time window determining module is used for determining a time window of the monitoring scanning request according to the modified inter-frame interval; and the scanning response returning module is used for returning a scanning response to the second equipment to establish a first Bluetooth connection with the second equipment if a scanning request initiated by the second equipment is received in the time window.
An embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the connection method for the bluetooth device.
The embodiment of the present invention further provides a bluetooth device, which includes a connection apparatus of the bluetooth device, or includes a memory and a processor, where the memory stores a computer program that can be executed on the processor, and the processor executes the steps of the connection method of the bluetooth device when executing the computer program.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a connection method of Bluetooth equipment, wherein broadcast data of first equipment carries information for modifying interframe space (T _ IFS), both the equipment (the first equipment and the second equipment) can modify the T _ IFS used by the equipment according to the information, and complete subsequent signal transmission according to the modified T _ IFS to establish Bluetooth connection and complete Bluetooth pairing. In the scheme, the Bluetooth connection can be established only when both the devices can modify the T _ IFS defined by the protocol; compared with the traditional Bluetooth connection method in which both devices perform signal transmission according to the T _ IFS defined by the protocol, the T _ IFS modified by the scheme of the embodiment of the invention can be different from the content defined by the protocol, so that the communication complexity can be increased, the threshold of Bluetooth connection is caused, and the communication safety of the Bluetooth device is improved.
Furthermore, after the bluetooth connection is established between the two devices, that is, the bluetooth pairing is completed, the private address resolution function is adopted to hide the real bluetooth address of the first device, so as to further enhance the connection protection of the bluetooth.
Further, the T _ IFS is modified only in the bluetooth pairing stage to ensure that the two devices can complete bluetooth pairing based on the modified T _ IFS, and the T _ IFS defined by the protocol is still used after the two devices complete pairing, so as to avoid affecting communication between the two devices and other bluetooth devices (devices other than the two devices). Further, the first device may indicate to restore the modified T _ IFS through second indication information carried in the scan response, the first device restores the modified T _ IFS after sending the scan response, and the second device restores the modified T _ IFS according to the second indication information after receiving the scan response.
Furthermore, an identifier used for verifying the identity of the first equipment can be added in the broadcast data and the scanning response, and only the equipment passing the identity verification is subjected to Bluetooth pairing, so that all equipment supporting a Bluetooth protocol can be prevented from being connected with the second equipment and controlling the second equipment, and the safety of Bluetooth connection can be improved.
Further, the device that transmits data (which refers to one of the first device and the second device) encrypts the data to be transmitted using a preset encryption algorithm, and the device that receives data (which refers to the other of the first device and the second device) decrypts the received data using a decryption algorithm corresponding to the preset encryption algorithm, so that the content in the data can be acquired, thereby further improving the security of bluetooth communication.
Drawings
Fig. 1 is a flowchart illustrating a connection method of a bluetooth device according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a connection method of a second bluetooth device according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a connection method of a third bluetooth device according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a connection method of a fourth bluetooth device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a connection device of a first bluetooth apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a connection apparatus of a second bluetooth device according to an embodiment of the present invention.
Detailed Description
As a background, the conventional bluetooth connection method has poor communication security.
In order to solve the above problem, an embodiment of the present invention provides a method for connecting a bluetooth device, where the method includes: receiving broadcast data of first equipment, wherein the broadcast data comprises first indication information for modifying interframe space; modifying the inter-frame interval according to the first indication information, and determining a time window according to the modified inter-frame interval; initiating a scanning request in the time window, and receiving a scanning response returned by the first device after receiving the scanning request; and establishing a first Bluetooth connection with the first equipment according to the scanning response. The safety of bluetooth equipment communication can be effectively improved.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first method for connecting bluetooth devices according to an embodiment of the present invention, where the method is executed by a terminal side, the terminal may be a bluetooth device such as a mobile phone, a computer, a mobile watch, a television, an air conditioner, and for convenience of description, the terminal executing the first method for connecting bluetooth devices shown in fig. 1 is referred to as a second device. The connection method of the first bluetooth device may specifically include the following steps S101 to S104, which are detailed as follows:
step S101, receiving broadcast data of a first device, wherein the broadcast data comprises first indication information for modifying inter-frame space.
In a specific embodiment, the second device is a Master device (Master) in bluetooth connection, and the first device is a Slave device (Slave) in bluetooth connection. For example, the television and the remote controller are connected through bluetooth, the second device may be referred to as a television, and the first device may be referred to as a remote controller; as another example, the second device may be a mobile phone and the first device may be a headset connected via bluetooth. It should be noted that the first device and the second device include, but are not limited to, the above examples, and are not described here again.
The broadcast data is data transmitted by the first device through a broadcast channel, the broadcast data can be received by other bluetooth devices within a preset range near the first device, and when the second device is within the preset range, the broadcast data can be received. The broadcast data carries first indication information for modifying an Inter Frame Space (generally referred to as T _ IFS). Generally, T _ IFS is used to determine the time delay between successive packets, and is defined according to the protocol, and the T _ IFS defined by the current bluetooth protocol is typically 150 microseconds (μ s) +/-2 μ s. The first indication information may include information to modify the currently used T _ IFS to other inter-frame spaces, such as 150 μ s for the currently used T _ IFS, the second indication information may modify it to 140 μ s or 160 μ s, and so on.
And step S102, modifying the inter-frame interval according to the first indication information, and determining a time window according to the modified inter-frame interval.
After the second device receives the broadcast data of the first device, the T _ IFS used by the second device is modified according to the first indication information, and the first device and the second device determine a time window of the next signal interaction according to the modified inter-frame space (namely, the T _ IFS) so as to successfully perform signal transmission between the first device and the second device. Further, both devices (i.e., the first device and the second device) do not need to modify the T _ IFS immediately after transmitting or receiving the broadcast data, and may negotiate to modify the T _ IFS at a specific time point, which may be determined according to actual needs, and perform special communication using the modified T _ IFS.
Step S103, initiating a scanning request within the time window, and receiving a scanning response returned by the first device after receiving the scanning request.
And step S104, establishing a first Bluetooth connection with the first equipment according to the scanning response.
Alternatively, the scan request may be a paging message (paging) sent by the second device. Further, the second device may page the first device in a frequency hopping manner. And the second equipment determines the time for sending the scanning request, namely the time window according to the modified T _ IFS. Correspondingly, the first device also determines a time window according to the modified T _ IFS, receives the scanning request (i.e. the paging message) in the time window in a scanning manner, and returns a response to the scanning request (i.e. the scanning response), or a response (response) called the paging message, to the second device, and the second device listens to the scanning response in the time window. Therefore, a bluetooth Connection, that is, a Connection of an Asynchronous Connection-Less (ACL) link, is established between the first device and the second device. The first device and the second device establish a bluetooth connection (herein referred to as the first bluetooth connection), i.e., both complete the bluetooth pairing.
In one embodiment, the first device and the second device need to be able to support T _ IFS that modifies the protocol definition, and to achieve this, the hardware (e.g., bluetooth chip, etc.) of the first device and the second device may be changed. Therefore, the threshold of the Bluetooth connection can be set on hardware so as to protect the data security in the Bluetooth communication. Alternatively, the first device and the second device may both open the right to support the T _ IFS defined by the modified protocol, that is, set the threshold of the bluetooth connection in the right.
Through the method illustrated in fig. 1, the broadcast data of the first device carries information for modifying inter-frame space (T _ IFS), and both devices (the first device and the second device) can modify the T _ IFS used by themselves accordingly to disengage from the standard protocol, and complete subsequent signal transmission according to the modified T _ IFS to establish bluetooth connection, thereby completing bluetooth pairing. In the scheme, the Bluetooth connection can be established only when both the devices can modify the T _ IFS defined by the protocol; compared with the traditional Bluetooth connection method in which both devices perform signal transmission according to the T _ IFS defined by the protocol, the scheme of the embodiment of the invention can increase the communication complexity and cause the threshold of Bluetooth connection, thereby improving the communication safety of the Bluetooth devices.
In one embodiment, the connection method of the bluetooth device may further include the steps of: after the second device performs step S104 in fig. 1 to establish the first bluetooth connection with the first device, obtaining an identity resolution key of the first device; determining a private address of the first device according to the identity resolution key of the first device; disconnecting a first Bluetooth connection with the first device; and establishing a second Bluetooth connection with the first equipment according to the private address of the first equipment, and communicating with the first equipment through Bluetooth.
Among them, the private Address is also called Resolvable private Address (Resolvable private Address), which is distinguished from the Public Address (also called Public Device Address). The private address is generated by a random number and an Identity Resolving Key (IRK). The private address can be resolved only when being scanned by the device with the same IRK, and scanning and tracking by unknown Bluetooth devices can be effectively prevented. The related descriptions of the private address and the public address can be referred to the existing protocol, and are not described in detail here.
After the first Bluetooth connection is established between the first device and the second device, the second device can acquire the IRK of the first device and analyze the IRK to obtain the private address of the second device, the public address of the second device is hidden, the Bluetooth connection is reestablished by the two devices based on the private address of the second device, namely the second Bluetooth connection, so that the Bluetooth pairing between the two devices is completed, and data transmission can be performed between the two devices through Bluetooth data signals.
Optionally, after the first bluetooth connection is established between the first device and the second device, the second device may obtain the IRK of the first device and analyze the IRK to obtain the private address of the first device, that is, the private address is used by the first device in a subsequent communication process, and the public address is still used by the second device.
Or after the first bluetooth connection is established between the first device and the second device, the two devices may exchange IRKs with each other, both devices use their private addresses in the subsequent communication process, and the public addresses of both devices are hidden.
Optionally, the obtaining of the Identity Resolution Key (IRK) of the first device may include obtaining the IRK of the first device from the first device, or may include obtaining the IRK of the first device from a preset location. Further, the IRK of the other device (the other device of the first device and the second device) that needs to establish the bluetooth connection with the current device (one device of the first device and the second device) may be stored in a preset location in advance, so that when the current device needs to establish the bluetooth connection with the other device, the IRK of the other device may be directly obtained from the preset location. Further, the preset position may be a fixed position in a memory of the current device, or may be a fixed position on a server (such as a cloud platform). In a specific application scenario, the same manufacturer may store IRKs of one or more bluetooth devices produced by the same manufacturer in a memory of another device to protect its own products, and the scenario may generally be applied to a supporting product, for example, the IRK of a television remote controller may be stored in a memory of a television supporting the television remote controller.
In this embodiment, after the bluetooth connection is established between the two devices, that is, after the bluetooth pairing is completed, the private address resolution function is adopted to hide the real bluetooth address of the first device, thereby further enhancing the connection protection of the bluetooth.
In one embodiment, the connection method of the bluetooth device may further include: and after the second device establishes the first Bluetooth connection or the second Bluetooth connection with the first device, restoring the modified inter-frame space, and performing signal transmission with the first device according to the restored inter-frame space.
The inter-frame space before modification (i.e., the recovered inter-frame space) generally refers to the protocol-defined T _ IFS, i.e., 150 microseconds (μ s) +/-2 μ s.
After the two devices establish the first/second bluetooth connection, the two devices recover to use the T _ IFS defined by the protocol, that is, the T _ IFS is modified only in the bluetooth pairing stage, so as to ensure that the two devices can complete bluetooth pairing based on the modified T _ IFS, and the T _ IFS defined by the protocol is still used after the two devices complete pairing, thereby avoiding affecting communication between the two devices and other bluetooth devices (devices except the two devices).
Optionally, the scanning response includes second indication information for restoring the modified inter-frame space, the modified inter-frame space is restored according to the second indication information, and signal transmission is performed with the first device according to the restored inter-frame space.
Wherein the second indication information is used for indicating to restore the modified T _ IFS. The scanning response sent by the first device to the second device carries the second indication information to indicate that the second device recovers the modified T _ IFS, the first device recovers the modified T _ IFS after sending the scanning response, and the second device recovers the modified T _ IFS after receiving the scanning response. Further, after receiving the scan response, the second device does not immediately recover the modified T _ IFS, but recovers the modified T _ IFS after the two devices complete transmission of 6 data packets at most, and if one data packet in the 6 data packets is successfully received by the other device, the two devices are successfully connected without transmitting the rest data packets, and then directly recovers the modified T _ IFS to continue to execute the subsequent process. Correspondingly, the first device also needs to recover the modified T _ IFS after the two devices complete the data of the maximum 6 data packets. The data transmission of the maximum 6 data packets is performed according to the modified T _ IFS.
In one embodiment, the broadcast data includes a first preset identifier, and after receiving the broadcast data of the first device, the method further includes: verifying the first preset identification; and when the first preset identification passes the verification, continuing to initiate the scanning request in the time window.
The first preset identifier is an identifier used for verifying the identity of the first device, and subsequent steps are continuously executed only when the second device passes the identity verification of the first device. And if the second equipment does not pass the authentication of the first equipment, stopping Bluetooth pairing. Optionally, after the second device fails to authenticate the first device, the first device and/or the second device may generate an error prompt to notify the user using the first device and/or the second device that the bluetooth pairing has failed.
Optionally, the first preset identifier may include a name of the bluetooth of the first device, a name or an Identification number (Identification, abbreviated as ID) of the first device, and the like, which can be used for identity authentication.
In an embodiment, the receiving the scan response returned by the first device after receiving the scan request includes a second preset identifier, and the method further includes: verifying the second preset identification; and when the second preset identification passes the verification, continuously establishing the first Bluetooth connection with the first equipment according to the scanning response.
The second preset identifier is an identifier used for verifying the identity of the first device, and the second preset identifier may include a name of bluetooth of the first device, a name or an Identification number (Identification, abbreviated as ID) of the first device, and the like that can be used for identity verification. The first preset identifier and the second preset identifier may be the same or different. In a specific embodiment, the first preset identifier and the second preset identifier are the same, and both are names of the bluetooth of the first device.
Optionally, if the second device fails to verify the second preset identifier of the first device, the bluetooth pairing is stopped, and further, the first device and/or the second device may generate an error prompt to notify the user using the first device and/or the second device that the bluetooth pairing is failed this time.
In this embodiment, an identifier for verifying the identity of the first device may be added to the broadcast data and the scanning response, and only the bluetooth pairing may be performed with the device that passes the authentication, thereby preventing all devices that support the bluetooth protocol from being able to connect with and control the second device, and thus improving the security of the bluetooth connection.
Optionally, the second device may also carry an identifier of its own identity in data (such as a scan request) sent to the first device by the second device, and record the identifier as a third preset identifier. And when the first equipment passes the verification of the third preset identification, the subsequent process is continuously executed, and if the verification of the third preset identification fails, the two pieces of equipment cannot complete Bluetooth pairing.
In one embodiment, all or part of the data interacted with the first device is encrypted by a preset encryption algorithm.
The preset encryption algorithm may be a common symmetric or asymmetric encryption algorithm. The data interacted with the first device may include broadcast data, scan request, scan response, and data transmitted in normal communication, etc.
The device (referred to as one of the first device and the second device) that transmits the aforementioned data encrypts the data to be transmitted using a preset encryption algorithm, and the device (referred to as the other of the first device and the second device) that receives the aforementioned data decrypts the received data using a decryption algorithm corresponding to the preset encryption algorithm, so that the content in the data can be acquired. Thereby further improving the security of bluetooth communication.
In an embodiment, please refer to fig. 2, fig. 2 is a flowchart illustrating a connection method of a second bluetooth device according to an embodiment of the present invention, where the method is executed by the second device, and the connection method of the second bluetooth device specifically includes:
step S201, when receiving encrypted broadcast data sent by a first device, decrypting the broadcast data, obtaining a first preset identifier and first indication information from the decrypted data, modifying T _ IFS according to the first indication information, and determining a time window.
Step S202, verifying a first preset identifier; and if the first preset identifier passes the verification, jumping to the step S203, otherwise, failing to connect the Bluetooth.
Step S203, initiating a scanning request within a time window, receiving an encrypted scanning response returned by the first device, decrypting the scanning response to obtain the second indication information and the second preset identifier, and recovering the T _ IFS according to the second indication information.
Step S204, verifying a second preset identifier; and when the second preset identifier passes the verification, jumping to step S205, otherwise, failing to connect the bluetooth.
Step S205, a link request is initiated, the data channels are connected by using the modified T _ IFS, and the recovered T _ IFS is used after a maximum of 6 data packets are exchanged.
And step S206, completing pairing and exchanging IRKs.
Step S207, disconnecting, and performing a broadcast and connection pairing process using the private address of the first device.
Step S208, communicating with the first device normally.
Referring to fig. 3, an embodiment of the present invention further provides a third method for connecting a bluetooth device, where the method is executed by a first device, and the method specifically includes: step S301, sending broadcast data in a broadcast mode, wherein the broadcast data comprises first indication information for modifying interframe space; step S302, determining a time window for monitoring the scanning request according to the modified inter-frame interval; step S303, if a scanning request initiated by a second device is received in the time window, returning a scanning response to the second device, so as to establish a first bluetooth connection with the second device.
In one embodiment, the method may further comprise: after establishing a first bluetooth connection with the second device, the second device obtains an identity resolution key of the device, so that the second device determines a private address of the device according to the identity resolution key; disconnecting the first bluetooth connection with the second device; and establishing a second Bluetooth connection with the second equipment according to the private address of the equipment, and communicating with the second equipment through Bluetooth.
In one embodiment, the method may further comprise: and after the first Bluetooth connection or the second Bluetooth connection is established with the second equipment, recovering the modified inter-frame space, and carrying out signal transmission with the second equipment according to the recovered inter-frame space.
In one embodiment, the scanning response includes second indication information for restoring the modified inter-frame space, the modified inter-frame space is restored according to the second indication information, and the scanning response performs signal transmission with the second device according to the restored inter-frame space.
In one embodiment, the broadcast data includes a first preset identifier, and the scan request is continuously initiated within the time window after the second device verifies that the first preset identifier passes.
In one embodiment, the scan response includes a second preset identifier, and the second device continues to establish the first bluetooth connection with the device after verifying that the second preset identifier passes.
In one embodiment, all or part of the data interacted with the second device is encrypted by a preset encryption algorithm.
The connection method of the bluetooth device in fig. 3 corresponds to the respective steps in the method described in fig. 1. More contents of the working principle and the working mode of the method illustrated in fig. 3 may refer to the related description in fig. 1, and are not described herein again.
In an embodiment, please refer to fig. 4, where fig. 4 is a flowchart illustrating a connection method of a fourth bluetooth device according to an embodiment of the present invention, where the method is executed by a first device, and the method may specifically include:
step S401, the encrypted broadcast data is transmitted according to the set broadcast interval.
Step S402, receiving the encrypted scanning request of the second device, and decrypting the scanning request to obtain a third preset identifier.
Step S403, verifying a third preset identifier; and when the verification is passed, jumping to the step S404, otherwise, the Bluetooth connection fails.
Step S404, sending an encrypted scanning response to the second device, where the scanning response carries the second indication information and the second preset identifier.
Step S405, a link request is initiated, the data channels are connected by using the modified T _ IFS, and the recovery T _ IFS is used after interaction of at most 6 data packets.
Step S406, completing pairing and exchanging IRK.
Step S407, disconnecting, and using the private address of the user to perform the broadcast and connection pairing process.
Step S408, communicating with the second device normally.
The connection method of the bluetooth device in fig. 3 corresponds to each step in the method in fig. 2, and the others are not described again.
Referring to fig. 5, an embodiment of the present invention further provides a connecting apparatus 50 for a bluetooth device, including: a broadcast data receiving module 501, configured to receive broadcast data of a first device, where the broadcast data includes first indication information for modifying an inter-frame space; an inter-frame interval modification module 502, configured to modify the inter-frame interval according to the first indication information, and determine a time window according to the modified inter-frame interval; a scanning request initiating module 503, configured to initiate a scanning request within the time window, and receive a scanning response returned by the first device after receiving the scanning request; a first bluetooth connection establishing module 504, configured to establish a first bluetooth connection with the first device according to the scan response.
For more details on the operation principle and operation mode of the connection apparatus 50 of the bluetooth device, reference may be made to fig. 1 and fig. 2 for the related description of the connection method of the bluetooth device, and details are not repeated here.
In a specific implementation, the connection device 50 of the bluetooth apparatus may correspond to a Chip having a connection function of the bluetooth apparatus in the bluetooth apparatus, or correspond to a Chip having a data processing function, such as a System-On-a-Chip (SOC), a bluetooth Chip, or the like; or the Bluetooth device comprises a chip module with a connection function chip of the Bluetooth device; or to a chip module having a data processing function chip, or to a bluetooth device.
Referring to fig. 6, an embodiment of the present invention further provides a connecting apparatus 60 for a bluetooth device, including: a broadcast data sending module 601, configured to send broadcast data in a broadcast manner, where the broadcast data includes first indication information for modifying an inter-frame space; a time window determining module 602, configured to determine a time window of the listening scanning request according to the modified inter-frame interval; a scanning response returning module 603, configured to return a scanning response to the second device if a scanning request initiated by the second device is received within the time window, so as to establish a first bluetooth connection with the second device.
For more details on the operation principle and operation mode of the connection apparatus 60 of the bluetooth device, reference may be made to fig. 3 and 4 for the related description of the connection method of the bluetooth device, and details are not repeated here.
In a specific implementation, the connection device 60 of the bluetooth apparatus may correspond to a Chip having a connection function of the bluetooth apparatus in the bluetooth apparatus, or correspond to a Chip having a data processing function, such as a System-On-a-Chip (SOC), a bluetooth Chip, or the like; or the Bluetooth device comprises a chip module with a connection function chip of the Bluetooth device; or to a chip module having a data processing function chip, or to a bluetooth device.
An embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the connection method for the bluetooth device shown in fig. 1 to 4. The storage medium may be a computer-readable storage medium, and may include, for example, a non-volatile (non-volatile) or non-transitory (non-transitory) memory, and may further include an optical disc, a mechanical hard disk, a solid state hard disk, and the like.
The embodiment of the invention also provides the Bluetooth equipment. The bluetooth device may include a memory having stored thereon a computer program executable on the processor, and a processor executing the computer program to perform the steps of the connection method of the bluetooth device of fig. 1 to 4.
Specifically, in the embodiment of the present invention, the processor may be a Central Processing Unit (CPU), and the processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will also be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example and not limitation, many forms of Random Access Memory (RAM) are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (enhanced SDRAM), SDRAM (SLDRAM), synchlink DRAM (SLDRAM), and direct bus RAM (DR RAM).
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document indicates that the former and latter related objects are in an "or" relationship.
The "plurality" appearing in the embodiments of the present application means two or more.
The descriptions of the first, second, etc. appearing in the embodiments of the present application are only for illustrating and differentiating the objects, and do not represent the order or the particular limitation of the number of the devices in the embodiments of the present application, and do not constitute any limitation to the embodiments of the present application.
The term "connect" in the embodiments of the present application refers to various connection manners, such as direct connection or indirect connection, to implement communication between devices, which is not limited in this embodiment of the present application.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (18)

1. A method of connecting a bluetooth device, the method comprising:
receiving broadcast data of first equipment, wherein the broadcast data comprises first indication information for modifying interframe space;
modifying the inter-frame interval according to the first indication information, and determining a time window according to the modified inter-frame interval;
initiating a scanning request in the time window, and receiving a scanning response returned by the first device after receiving the scanning request;
and establishing a first Bluetooth connection with the first equipment according to the scanning response.
2. The method of claim 1, further comprising:
after establishing a first Bluetooth connection with the first equipment, acquiring an identity analysis secret key of the first equipment;
determining a private address of the first device according to the identity resolution key of the first device;
disconnecting a first Bluetooth connection with the first device;
and establishing a second Bluetooth connection with the first equipment according to the private address of the first equipment, and communicating with the first equipment through Bluetooth.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and after establishing the first Bluetooth connection or the second Bluetooth connection with the first equipment, restoring the modified inter-frame space, and carrying out signal transmission with the first equipment according to the restored inter-frame space.
4. The method of claim 3, wherein the scanning response includes second indication information for recovering the modified inter-frame space, wherein the modified inter-frame space is recovered based on the second indication information, and wherein the scanning response is signaled to the first device based on the recovered inter-frame space.
5. The method of claim 1, wherein the broadcast data includes a first preset identifier, and after receiving the broadcast data of the first device, the method further includes:
verifying the first preset identification;
and when the first preset identification passes the verification, continuing to initiate the scanning request in the time window.
6. The method according to claim 5, wherein the scan response includes a second preset identifier, and after receiving the scan response returned by the first device after receiving the scan request, the method further includes:
verifying the second preset identification;
and when the second preset identification passes the verification, continuously establishing the first Bluetooth connection with the first equipment according to the scanning response.
7. The method according to any one of claims 1, 2, 5 or 6, wherein all or part of the data interacted with the first device is encrypted by a preset encryption algorithm.
8. A method of connecting a bluetooth device, the method comprising:
sending broadcast data in a broadcast mode, wherein the broadcast data comprises first indication information for modifying an interframe space;
determining a time window for intercepting the scanning request according to the modified inter-frame interval;
and if a scanning request initiated by the second equipment is received in the time window, returning a scanning response to the second equipment so as to establish a first Bluetooth connection with the second equipment.
9. The method of claim 8, further comprising:
after establishing a first bluetooth connection with the second device, the second device obtains an identity resolution key of the device, so that the second device determines a private address of the device according to the identity resolution key;
disconnecting the first bluetooth connection with the second device;
and establishing a second Bluetooth connection with the second equipment according to the private address of the equipment, and communicating with the second equipment through Bluetooth.
10. The method according to claim 8 or 9, characterized in that the method further comprises:
and after the first Bluetooth connection or the second Bluetooth connection is established with the second equipment, recovering the modified inter-frame space, and carrying out signal transmission with the second equipment according to the recovered inter-frame space.
11. The method of claim 10, wherein the scanning response includes second indication information for recovering the modified inter-frame space, wherein the modified inter-frame space is recovered according to the second indication information, and wherein the scanning response is signaled with the second device according to the recovered inter-frame space.
12. The method of claim 8, wherein a first predetermined identifier is included in the broadcast data, and wherein initiating the scan request continues within the time window after the second device verifies that the first predetermined identifier passes.
13. The method according to claim 12, wherein the scan response includes a second predetermined identifier, and the second device continues to establish the first bluetooth connection with the second device after verifying that the second predetermined identifier passes.
14. The method according to any one of claims 8, 9, 12 or 13, wherein all or part of the data interacted with the second device is encrypted by a preset encryption algorithm.
15. An apparatus for connecting a bluetooth device, the apparatus comprising:
the device comprises a broadcast data receiving module, a frame interval modification module and a frame interval modification module, wherein the broadcast data receiving module is used for receiving broadcast data of first equipment, and the broadcast data comprises first indication information for modifying frame intervals;
the interframe space modification module is used for modifying the interframe space according to the first indication information and determining a time window according to the modified interframe space;
a scanning request initiating module, configured to initiate a scanning request within the time window, and receive a scanning response returned by the first device after receiving the scanning request;
and the first Bluetooth connection establishing module is used for establishing a first Bluetooth connection with the first equipment according to the scanning response.
16. An apparatus for connecting a bluetooth device, the apparatus comprising:
the system comprises a broadcast data sending module, a frame interval modification module and a frame interval modification module, wherein the broadcast data sending module is used for sending broadcast data in a broadcast mode, and the broadcast data comprises first indication information used for modifying the frame interval;
the time window determining module is used for determining a time window of the monitoring scanning request according to the modified inter-frame interval; and the scanning response returning module is used for returning a scanning response to the second equipment to establish a first Bluetooth connection with the second equipment if a scanning request initiated by the second equipment is received in the time window.
17. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, performing the steps of the method according to any one of claims 1 to 14.
18. A bluetooth device comprising an apparatus as claimed in claim 15 or 16, or comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, wherein the processor executes the computer program to perform the steps of the method of any one of claims 1 to 14.
CN202110713547.6A 2021-06-25 2021-06-25 Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment Active CN113301572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110713547.6A CN113301572B (en) 2021-06-25 2021-06-25 Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110713547.6A CN113301572B (en) 2021-06-25 2021-06-25 Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment

Publications (2)

Publication Number Publication Date
CN113301572A true CN113301572A (en) 2021-08-24
CN113301572B CN113301572B (en) 2022-09-30

Family

ID=77329661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110713547.6A Active CN113301572B (en) 2021-06-25 2021-06-25 Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment

Country Status (1)

Country Link
CN (1) CN113301572B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501343A (en) * 2022-03-28 2022-05-13 成都凯天电子股份有限公司 Multi-node scanning implementation method, system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1806416A (en) * 2003-07-16 2006-07-19 皇家飞利浦电子股份有限公司 Transmitting data frames with less interframe space (IPS) time
US20180288092A1 (en) * 2017-03-30 2018-10-04 Qualcomm Incorporated Protection from relay attacks in wireless communication systems
CN111565367A (en) * 2020-05-18 2020-08-21 深圳市觅拓物联信息技术有限公司 Bluetooth Internet of things terminal parameter adjusting method and system
CN111935693A (en) * 2020-08-26 2020-11-13 支付宝(杭州)信息技术有限公司 Bluetooth device connection method and Bluetooth device
CN112351390A (en) * 2019-08-09 2021-02-09 华为技术有限公司 Method for mutual identification or mutual communication of Bluetooth devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1806416A (en) * 2003-07-16 2006-07-19 皇家飞利浦电子股份有限公司 Transmitting data frames with less interframe space (IPS) time
US20180288092A1 (en) * 2017-03-30 2018-10-04 Qualcomm Incorporated Protection from relay attacks in wireless communication systems
CN112351390A (en) * 2019-08-09 2021-02-09 华为技术有限公司 Method for mutual identification or mutual communication of Bluetooth devices
CN111565367A (en) * 2020-05-18 2020-08-21 深圳市觅拓物联信息技术有限公司 Bluetooth Internet of things terminal parameter adjusting method and system
CN111935693A (en) * 2020-08-26 2020-11-13 支付宝(杭州)信息技术有限公司 Bluetooth device connection method and Bluetooth device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501343A (en) * 2022-03-28 2022-05-13 成都凯天电子股份有限公司 Multi-node scanning implementation method, system, electronic equipment and storage medium
CN114501343B (en) * 2022-03-28 2022-07-15 成都凯天电子股份有限公司 Multi-node scanning implementation method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113301572B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
US20210007176A1 (en) Wireless connection establishing methods and wireless connection establishing apparatuses
US20190357043A1 (en) Bluetooth mesh network provisioning authentication
US20200169548A1 (en) Network access authentication method, apparatus, and system
EP3032845B1 (en) Hearing device configured to authenticate a mode request and related method
US9967099B2 (en) Method and apparatus for providing information
CN108762791B (en) Firmware upgrading method and device
CN113301572B (en) Connection method and device of Bluetooth equipment, storage medium and Bluetooth equipment
CN104982053B (en) For obtaining the method and network node of the permanent identity of certification wireless device
US20130117820A1 (en) Enabling access to key lifetimes for wireless link setup
WO2017076269A1 (en) Smart device, and method and apparatus for establishing bluetooth connection between devices therefor
CN110621016B (en) User identity protection method, user terminal and base station
CN108134789B (en) Method for synchronizing data between devices through cloud and cloud server
CN110730447B (en) User identity protection method, user terminal and core network
US11297176B2 (en) Remotely controlling devices using short message service
CN104980919A (en) Method for acquiring network service information and equipment
US20200099539A1 (en) Mutual authentication system
CN109451504B (en) Internet of things module authentication method and system
CN114095277A (en) Power distribution network secure communication method, secure access device and readable storage medium
WO2022111016A1 (en) Mobile network access system and method, and storage medium, and electronic device
CN111836260A (en) Authentication information processing method, terminal and network equipment
CN113055867A (en) Method and device for auxiliary network distribution of terminal and electronic equipment
CN113840266A (en) Bluetooth pairing method, device, system, electronic equipment and storage medium
CN110234102B (en) Communication method and apparatus
CN110213252B (en) Communication method, terminal equipment and network equipment
US10390224B2 (en) Exception handling in cellular authentication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination