Bluetooth connection blocking method, device, equipment and storage medium
Patent Information
- Application Number
- CN202110323414.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-25
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2041-03-25
AI Technical Summary
[0005]本发明的主要目的在于提出一种蓝牙连接阻断方法、装置、设备及存储介质,旨在解决如何针对特定蓝牙设备进行阻断的技术问题
[0078] The Bluetooth connection blocking method proposed in this invention involves parsing a connection request packet sent by a Bluetooth device to be blocked upon receipt to obtain Bluetooth communication parameters; generating a target data packet based on the Bluetooth communication parameters; and continuously broadcasting the target data packet to the Bluetooth device to be blocked on a broadcast communication channel to block the Bluetooth device. In this invention, the target data packet is generated based on the Bluetooth communication parameters obtained from parsing the connection request packet, and the target data packet is continuously broadcast to the Bluetooth device to be blocked, causing the Bluetooth device to be blocked to be blocked due to the communication channel being congested, thereby achieving the effect of blocking a specific Bluetooth device.
Smart Images

Figure CN115134786B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a Bluetooth connection blocking method, apparatus, device, and storage medium. Background Technology
[0002] Bluetooth Low Energy (BLE) has become one of the most widely used connectivity methods in Internet of Things (IoT) products. In BLE security research, it is often necessary to block a specific BLE connection to repeatedly trigger connections and capture connection and pairing information. Traditional methods use Software Defined Radio (SDR) to block BLE connections at the physical layer; however, because it blocks devices throughout the entire environment in terms of physical electromagnetic waves, it cannot target a single specific device.
[0003] The above content is only used to assist in understanding the technical solution of the present invention and does not represent an admission that the above content is...
[0004] Existing technology. Summary of the Invention
[0005] The main objective of this invention is to provide a Bluetooth connection blocking method, apparatus, device, and storage medium, aiming to solve the technical problem of how to block specific Bluetooth devices.
[0006] To achieve the above objectives, the present invention provides a Bluetooth connection blocking method, the Bluetooth connection blocking method comprising the following steps:
[0007] Upon receiving a connection request packet from a Bluetooth device to be blocked, the connection request packet is parsed to obtain Bluetooth communication parameters.
[0008] Generate the target data packet based on the Bluetooth communication parameters;
[0009] The target data packet is continuously broadcast to the Bluetooth device to be blocked on the broadcast communication channel in order to block the Bluetooth device to be blocked.
[0010] Optionally, before parsing the connection request packet to obtain Bluetooth communication parameters upon receiving the connection request packet sent by the Bluetooth device to be blocked, the method further includes:
[0011] When a connection request message sent by a Bluetooth device on a broadcast communication channel is detected in broadcast mode, the device information of the Bluetooth device is obtained.
[0012] The MAC address and Universal Unique Identifier (UUID) of the Bluetooth device are determined based on the device information.
[0013] Determine whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID;
[0014] When the Bluetooth device is a Bluetooth device to be blocked, the connection request packet corresponding to the Bluetooth device to be blocked is obtained according to the connection request message.
[0015] Optionally, before determining whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID, the method further includes:
[0016] Obtain the candidate MAC address and candidate UUID of the Bluetooth device to be blocked;
[0017] A preset whitelist is created based on the MAC address and the candidate UUID;
[0018] Accordingly, determining whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID includes:
[0019] The MAC address and UUID are matched with candidate MAC addresses and candidate UUIDs in a preset whitelist to determine whether the Bluetooth device is a Bluetooth device to be blocked.
[0020] Optionally, the Bluetooth communication parameters include at least one of the following: access address, cyclic redundancy check initialization value (CRCInit), hop interval, channel map, and hop increment.
[0021] Optionally, parsing the connection request packet to obtain Bluetooth communication parameters includes:
[0022] Configure the BALEN field in the connection request packet to 1, so that the length of the ADDRESS field in the connection request packet is configured to 2, and the target ADDRESS field is obtained.
[0023] Configure the connection request packet according to the target ADDRESS field to obtain the data packet to be processed;
[0024] Read PAYLOAD from the data packet to be processed, and extract the target bytes from the PAYLOAD;
[0025] The access address is determined based on the target bytes.
[0026] Optionally, parsing the connection request packet to obtain Bluetooth communication parameters includes:
[0027] Extract the Cyclic Redundancy Check (CRC) code from the connection request packet and generate the Linear Feedback Shift Register (LFSR) corresponding to the CRC;
[0028] Locate the data channel PDU corresponding to the CRC and reverse the LFSR to obtain the target LFSR;
[0029] The data driving the target LFSR is the most significant bit (MSB) of the data channel PDU;
[0030] When the data input of the data channel PDU is completed, CRCInit is determined based on the value in the target LFSR.
[0031] Optionally, parsing the connection request packet to obtain Bluetooth communication parameters includes:
[0032] The connection event of the Bluetooth device to be blocked is determined based on the connection request packet.
[0033] The connection interval is determined based on the connection event, and the connection interval is the time interval between entering one available data channel and entering the next available data channel;
[0034] The hop interval is determined based on the connection interval.
[0035] Optionally, parsing the connection request packet to obtain Bluetooth communication parameters includes:
[0036] The data channels are traversed, and the traversed data channels are used as candidate data channels;
[0037] The access address and CRCInit are determined based on the connection request packet;
[0038] An available data channel is selected from the candidate data channels based on the access address and the CRCInit;
[0039] Determine the channel map based on the available data channels.
[0040] Optionally, selecting an available data channel from the candidate data channels based on the access address and the CRCInit includes:
[0041] Based on the access address and CRCInit, communication tests are performed on each of the candidate data channels to determine whether a link layer data packet matching the access address and passing the CRC can be received on the candidate data channel within one frequency hopping cycle.
[0042] If so, the candidate data channel will be selected as the candidate available data channel;
[0043] The candidate available data channels are traversed to determine the available data channels.
[0044] Optionally, selecting an available data channel from the candidate data channels based on the access address and the CRCInit includes:
[0045] The number of channels in the candidate data channels is detected, and the target chip is determined based on the number of channels, wherein the number of target chips is the same as the number of channels in the candidate data channels;
[0046] The target chip is configured according to the access address and the CRCInit, and the target chip is controlled to work on different candidate data channels, with each target chip corresponding to a candidate data channel.
[0047] The candidate data channels are tested using the target chip, and the available data channels are determined based on the test results.
[0048] Optionally, parsing the connection request packet to obtain Bluetooth communication parameters includes:
[0049] The available data channels and channel map are determined based on the connection request packet;
[0050] Based on the channel map, multiple candidate frequency hopping channel sequences are determined, and for each candidate frequency hopping channel sequence, a corresponding candidate hop increment is determined.
[0051] The unique channel and the exploitable channel are determined based on the candidate frequency hopping channel sequence;
[0052] Detect the distance between the unique channel and the exploitable channel;
[0053] The hop increment is selected from the candidate hop increments based on the distance between the unique channel and the exploitable channel.
[0054] Optionally, the step of continuously broadcasting the target data packet to the Bluetooth device to be blocked on the broadcast communication channel to block the Bluetooth device to be blocked includes:
[0055] According to the Bluetooth communication parameters, the target data packet is continuously broadcast to the Bluetooth device to be blocked on the broadcast communication channel to block the Bluetooth device to be blocked.
[0056] Optionally, the step of continuously broadcasting the target data packet to the Bluetooth device to be blocked on the broadcast communication channel according to the Bluetooth communication parameters to block the Bluetooth device to be blocked includes:
[0057] The BLE connection frequency hopping channel sequence is determined based on the channel map and hop increment.
[0058] The target unique channel is determined based on the BLE connection frequency hopping channel sequence, and frequency hopping synchronization is completed with the Bluetooth device to be blocked based on the target unique channel;
[0059] When communication data belonging to the Bluetooth device to be blocked is detected on the target unique channel, a timer is configured according to the hop interval;
[0060] When the timer expires, the next communication channel is selected from the BLE connection frequency hopping channel sequence, and the communication data of the Bluetooth device to be blocked is waited for in the next communication channel.
[0061] When communication data arrives and the timer has not expired, the receiving mode is switched to the sending mode, and the target data packet is broadcast to the Bluetooth device to be blocked on the broadcast communication channel;
[0062] When the timer expires, the step of selecting the next communication channel from the BLE connection frequency hopping channel sequence and waiting for the communication data of the Bluetooth device to be blocked in the next communication channel is executed to block the Bluetooth device to be blocked.
[0063] Optionally, when communication data belonging to the Bluetooth device to be blocked is detected on the target unique channel, configuring a timer according to the hop interval includes:
[0064] When communication data is detected on the target unique channel, the access address is used to determine whether the communication data belongs to the Bluetooth device to be blocked.
[0065] When the communication data belongs to the Bluetooth device to be blocked, configure the timer according to the hop interval.
[0066] Optionally, configuring the timer according to the hop interval includes:
[0067] Calculate the connection interval based on the hop interval;
[0068] Calculate the timeout period based on the connection interval, and configure the timer based on the timeout period.
[0069] Furthermore, to achieve the above objectives, the present invention also proposes a Bluetooth connection blocking device, the Bluetooth connection blocking device comprising:
[0070] The parameter parsing module is used to parse the connection request packet sent by the Bluetooth device to be blocked when it receives the connection request packet to obtain Bluetooth communication parameters.
[0071] The data packet module is used to generate a target data packet based on the Bluetooth communication parameters;
[0072] The Bluetooth blocking module is used to continuously broadcast the target data packet to the Bluetooth device to be blocked on the broadcast communication channel in order to block the Bluetooth device to be blocked.
[0073] Optionally, the Bluetooth connection blocking device further includes:
[0074] The device verification module is used to obtain the device information of the Bluetooth device when it detects a connection request message sent by a Bluetooth device on a broadcast communication channel in broadcast mode; determine the MAC address and Universal Unique Identifier (UUID) corresponding to the Bluetooth device based on the device information; determine whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID; and if the Bluetooth device is a Bluetooth device to be blocked, obtain the connection request packet corresponding to the Bluetooth device to be blocked based on the connection request message.
[0075] Optionally, the device verification module is further configured to obtain the candidate MAC address and candidate UUID of the Bluetooth device to be blocked; establish a preset whitelist based on the MAC address and the candidate UUID; and match the MAC address and the UUID with the candidate MAC address and candidate UUID in the preset whitelist respectively to determine whether the Bluetooth device is the Bluetooth device to be blocked.
[0076] In addition, to achieve the above objectives, the present invention also proposes a Bluetooth connection blocking device, which includes: a memory, a processor, and a Bluetooth connection blocking program stored in the memory and executable on the processor. When the Bluetooth connection blocking program is executed by the processor, it implements the steps of the Bluetooth connection blocking method as described above.
[0077] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a Bluetooth connection blocking program, which, when executed by a processor, implements the steps of the Bluetooth connection blocking method as described above.
[0078] The Bluetooth connection blocking method proposed in this invention involves parsing a connection request packet sent by a Bluetooth device to be blocked upon receipt to obtain Bluetooth communication parameters; generating a target data packet based on the Bluetooth communication parameters; and continuously broadcasting the target data packet to the Bluetooth device to be blocked on a broadcast communication channel to block the Bluetooth device. In this invention, the target data packet is generated based on the Bluetooth communication parameters obtained from parsing the connection request packet, and the target data packet is continuously broadcast to the Bluetooth device to be blocked, causing the Bluetooth device to be blocked to be blocked due to the communication channel being congested, thereby achieving the effect of blocking a specific Bluetooth device. Attached Figure Description
[0079] Figure 1 This is a schematic diagram of the Bluetooth connection blocking device structure in the hardware operating environment involved in the embodiments of the present invention;
[0080] Figure 2 This is a flowchart illustrating the first embodiment of the Bluetooth connection blocking method of the present invention;
[0081] Figure 3 This is a schematic diagram illustrating the cracking of five Bluetooth communication parameters in an embodiment of the Bluetooth connection blocking method of the present invention;
[0082] Figure 4 This is a schematic diagram of the overall process of Bluetooth connection blocking according to an embodiment of the Bluetooth connection blocking method of the present invention;
[0083] Figure 5 This is a flowchart illustrating the second embodiment of the Bluetooth connection blocking method of the present invention;
[0084] Figure 6 This is a schematic diagram illustrating the establishment of a whitelist according to an embodiment of the Bluetooth connection blocking method of the present invention;
[0085] Figure 7 This is a flowchart illustrating the third embodiment of the Bluetooth connection blocking method of the present invention;
[0086] Figure 8 This is a schematic diagram illustrating access address cracking in an embodiment of the Bluetooth connection blocking method of the present invention;
[0087] Figure 9 This is a schematic diagram illustrating the CRCInit cracking method of an embodiment of the Bluetooth connection blocking method of the present invention.
[0088] Figure 10This is a schematic diagram illustrating the hop interval bypass method of one embodiment of the Bluetooth connection blocking method of the present invention.
[0089] Figure 11 This is a schematic diagram illustrating channel map cracking in an embodiment of the Bluetooth connection blocking method of the present invention;
[0090] Figure 12 This is a schematic diagram illustrating the hop increment bypass method of one embodiment of the Bluetooth connection blocking method of the present invention.
[0091] Figure 13 This is a functional module diagram of the first embodiment of the Bluetooth connection blocking device of the present invention.
[0092] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0093] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0094] Reference Figure 1 , Figure 1 This is a schematic diagram of the Bluetooth connection blocking device structure in the hardware operating environment involved in the embodiments of the present invention.
[0095] like Figure 1 As shown, the Bluetooth connection blocking device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and input units such as buttons; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable memory (non-volatile memory), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0096] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on Bluetooth connectivity blocking devices and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0097] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a Bluetooth connection blocking program.
[0098] exist Figure 1 In the Bluetooth connection blocking device shown, the network interface 1004 is mainly used to connect to the external network and communicate with other network devices; the user interface 1003 is mainly used to connect to the user equipment and communicate with the user equipment; the device of the present invention calls the Bluetooth connection blocking program stored in the memory 1005 through the processor 1001 and executes the Bluetooth connection blocking method provided in the embodiment of the present invention.
[0099] Based on the above hardware structure, an embodiment of the Bluetooth connection blocking method of the present invention is proposed.
[0100] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the Bluetooth connection blocking method of the present invention.
[0101] In the first embodiment, the Bluetooth connection blocking method includes the following steps:
[0102] Step S10: Upon receiving a connection request packet sent by the Bluetooth device to be blocked, the connection request packet is parsed to obtain Bluetooth communication parameters.
[0103] It should be noted that the executing entity in this embodiment can be a Bluetooth connection blocking device, such as a Bluetooth device with Bluetooth functionality, or other devices capable of performing the same or similar functions. This embodiment does not limit this; in this embodiment, a Bluetooth connection blocking device is used as an example for explanation. This Bluetooth device can be a dedicated Bluetooth device for Bluetooth connection blocking, performing blocking operations when enabled; or it can be a regular Bluetooth device with normal Bluetooth functionality, configured with a blocking mode to perform blocking operations in blocking mode and normal Bluetooth communication operations in non-blocking mode. This embodiment does not limit this.
[0104] It should be noted that the Bluetooth device in this embodiment can be a BLE Bluetooth device or other types of Bluetooth devices, and this embodiment does not impose any restrictions on this. The Bluetooth version on the Bluetooth device can be Bluetooth 4.0, Bluetooth 5.0, or other Bluetooth versions, and this embodiment does not impose any restrictions on this.
[0105] It should be understood that, for ease of explanation, in this embodiment, the Bluetooth device that performs the action is referred to as the target Bluetooth device, and the Bluetooth device that needs to be blocked is referred to as the Bluetooth device to be blocked. When the target Bluetooth device is in broadcast mode (not yet connected to other devices), the Bluetooth communication parameters are obtained by parsing the detected connection request packet CONNECT_REQ. Then, data packets are continuously broadcast to the Bluetooth devices specified in the whitelist on the broadcast communication channel, so that the Bluetooth devices are blocked due to the communication channel being blocked, thus achieving the purpose of blocking the specific device.
[0106] Understandably, since there may be multiple Bluetooth devices in the current environment, and the target Bluetooth device does not need to block all of them, but only specific ones, when the target Bluetooth device is in broadcast mode, it may receive multiple connection request packets. It needs to verify these packets to determine if they were sent by the Bluetooth device to be blocked. Only if the received packet is indeed from the device to be blocked will subsequent blocking steps be performed.
[0107] It should be understood that the connection request packet sent by the Bluetooth device to be blocked can be parsed to obtain Bluetooth communication parameters. These Bluetooth communication parameters include at least one of the following: access address, cyclic redundancy check initialization value (CRCInit), hop interval, channel map, and hop increment. This embodiment does not impose any limitations on this. In this embodiment, the example of parsing the connection request packet to obtain five Bluetooth communication parameters, where the Bluetooth communication parameters include the above five parameters, will be used for illustration.
[0108] In specific implementations, such as Figure 3 As shown, Figure 3 To crack the diagram of the five Bluetooth communication parameters, LLData can be extracted from the PDU and then cracked to obtain the five Bluetooth communication parameters mentioned above.
[0109] Step S20: Generate a target data packet based on the Bluetooth communication parameters.
[0110] It should be noted that since the target Bluetooth device only needs to be blocked on this specific device, without affecting other Bluetooth devices, targeted blocking is necessary. In this embodiment, Bluetooth communication parameters are obtained through the above parsing steps. A target data packet is generated based on these Bluetooth communication parameters corresponding to the Bluetooth device to be blocked, and the blocking operation on the Bluetooth device to be blocked is performed using this target data packet.
[0111] Step S30: Continuously broadcast the target data packet to the Bluetooth device to be blocked on the broadcast communication channel to block the Bluetooth device to be blocked.
[0112] It should be noted that in this embodiment, the target Bluetooth device continuously broadcasts target data packets to the Bluetooth device to be blocked simultaneously on various broadcast communication channels. The number and type of broadcast communication channels may differ between different Bluetooth versions; this embodiment does not impose any limitations on this.
[0113] In the specific implementation, Bluetooth 4.0 is used as an example. For instance, Bluetooth 4.0 has three broadcast communication channels, namely channels 37, 38, and 39. Target data packets can be continuously sent to the Bluetooth device to be blocked simultaneously on broadcast communication channels 37, 38, and 39 to block the Bluetooth device.
[0114] In specific implementations, such as Figure 4 As shown, Figure 4 A schematic diagram of the overall process of blocking Bluetooth connections. Figure 3 In this context, Master represents the target Bluetooth device, and Slave represents the Bluetooth device to be blocked. By continuously sending CONNECT_REQ messages from Master to Slave, the Slave can be blocked, and the sniffers of other Bluetooth devices will no longer be able to communicate with the Slave.
[0115] In this embodiment, upon receiving a connection request packet from a Bluetooth device to be blocked, the connection request packet is parsed to obtain Bluetooth communication parameters; a target data packet is generated based on the Bluetooth communication parameters; and the target data packet is continuously broadcast to the Bluetooth device to be blocked on a broadcast communication channel to block the Bluetooth device. In this embodiment, by generating a target data packet based on the Bluetooth communication parameters obtained from parsing the connection request packet and continuously broadcasting the target data packet to the Bluetooth device to be blocked, the Bluetooth device to be blocked is blocked due to the communication channel being obstructed, thereby achieving the effect of blocking a specific Bluetooth device.
[0116] In one embodiment, such as Figure 5 As shown, based on the first embodiment, a second embodiment of the Bluetooth connection blocking method of the present invention is proposed. Before step S10, the method includes:
[0117] Step S001: When a connection request message sent by a Bluetooth device on a broadcast communication channel is detected in broadcast mode, the device information of the Bluetooth device is obtained.
[0118] It should be understood that, in order to accurately distinguish whether a connection request packet is sent by the Bluetooth device to be blocked, and thus to target and block specific Bluetooth devices, when the target Bluetooth device listens for a connection request message sent by a Bluetooth device on a broadcast communication channel in broadcast mode, it can first determine whether the Bluetooth device is the Bluetooth device to be blocked. Therefore, it can obtain the device information of the Bluetooth device, which may include information such as MAC address and UUID, and may also include other device information. This embodiment does not limit this.
[0119] Step S002: Determine the MAC address and Universal Unique Identifier (UUID) corresponding to the Bluetooth device based on the device information.
[0120] Understandably, since the device information includes information such as MAC address and UUID, the MAC address and UUID of the Bluetooth device can be determined based on the device information for verification.
[0121] Step S003: Determine whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID.
[0122] It should be understood that with the upgrade of the Bluetooth 5.0 protocol, Bluetooth device addresses can also be set to random, so identifying Bluetooth devices solely based on MAC addresses is no longer sufficient. Furthermore, many Bluetooth devices do not include MAC address information in their broadcast packets during the broadcast communication phase, further limiting the effectiveness of this method. To address this issue, this embodiment uses a combination of the Bluetooth MAC address and the service UUID (unique identifier) to distinguish Bluetooth devices that need to be blocked, for devices with known service types.
[0123] Step S004: When the Bluetooth device is a Bluetooth device to be blocked, obtain the connection request packet corresponding to the Bluetooth device to be blocked according to the connection request message.
[0124] It is understandable that when a Bluetooth device is a Bluetooth device to be blocked, it means that the Bluetooth device is the target Bluetooth device to be blocked. Therefore, the connection request packet corresponding to the Bluetooth device to be blocked can be obtained from the connection request message.
[0125] Furthermore, to more accurately determine whether a Bluetooth device is a Bluetooth device to be blocked based on its MAC address and UUID, the process before determining whether the Bluetooth device is a Bluetooth device to be blocked based on its MAC address and UUID includes:
[0126] Obtain the candidate MAC address and candidate UUID of the Bluetooth device to be blocked; establish a preset whitelist based on the MAC address and candidate UUID;
[0127] Accordingly, determining whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID includes:
[0128] The MAC address and UUID are matched with candidate MAC addresses and candidate UUIDs in a preset whitelist to determine whether the Bluetooth device is a Bluetooth device to be blocked.
[0129] It should be understood that, such as Figure 6 As shown, Figure 6 To illustrate the whitelist creation process, for a specific BLE device (the Bluetooth device to be blocked), the candidate MAC address and candidate UUID of the Bluetooth device to be blocked can be obtained in advance. Then, a preset whitelist is created based on the candidate MAC address and candidate UUID. After determining the MAC address and UUID of the current Bluetooth device, the MAC address and UUID can be matched with the candidate MAC addresses and candidate UUIDs in the preset whitelist to determine whether the Bluetooth device is the specific Bluetooth device to be blocked.
[0130] It is understandable that different matching strategies can be set for different scenarios. In one embodiment, the matching strategy may be: match the MAC address with the candidate MAC address, match the UUID with the candidate UUID, and determine the Bluetooth device as the Bluetooth device to be blocked if both match. In another embodiment, the matching strategy may be: determine the Bluetooth device as the Bluetooth device to be blocked as long as the UUID matches the candidate UUID. The specific matching strategy can be set according to the specific situation, and this embodiment does not limit it. For example, different matching strategies can be set according to different Bluetooth versions.
[0131] In this embodiment, when a connection request message sent by a Bluetooth device on a broadcast communication channel is detected in broadcast mode, the device information of the Bluetooth device is obtained; the MAC address and Universal Unique Identifier (UUID) corresponding to the Bluetooth device are determined based on the device information; the Bluetooth device is determined to be a Bluetooth device to be blocked based on the MAC address and the UUID; if the Bluetooth device is a Bluetooth device to be blocked, the connection request packet corresponding to the Bluetooth device to be blocked is obtained based on the connection request message, thereby accurately determining whether the Bluetooth device is a Bluetooth device to be blocked. Only when the Bluetooth device is a Bluetooth device to be blocked will subsequent blocking operations be performed, improving the targeting of the blocking operation.
[0132] In one embodiment, such as Figure 7 As shown, a third embodiment of the Bluetooth connection blocking method of the present invention is proposed based on the first embodiment or the second embodiment. In this embodiment, the description is based on the first embodiment. Step S30 includes:
[0133] Step S301: According to the Bluetooth communication parameters, continuously broadcast the target data packet to the Bluetooth device to be blocked on the broadcast communication channel to block the Bluetooth device to be blocked.
[0134] It should be understood that after determining the Bluetooth communication parameters and generating the target data packet, the target data packet can be continuously sent to the Bluetooth device to be blocked while broadcasting the communication channel according to the Bluetooth communication parameters, so that the Bluetooth device to be blocked can achieve the purpose of blocking the specific device due to the blocking of the communication channel.
[0135] Furthermore, in order to block the Bluetooth device to be blocked, the connection request packet needs to be parsed first to obtain five Bluetooth communication parameters. The first step is to crack the access address. The specific steps are as follows:
[0136] Configure the BALEN field in the connection request packet to 1, thereby configuring the length of the ADDRESS field in the connection request packet to 2, to obtain the target ADDRESS field; configure the connection request packet according to the target ADDRESS field to obtain the data packet to be processed; read PAYLOAD from the data packet to be processed, and extract the target byte from the PAYLOAD; determine the access address according to the target byte.
[0137] It should be understood that, such as Figure 8 As shown, Figure 8 This is a diagram illustrating the cracking of the access address. Since the length of the ADDRESS field is determined by the BALEN field of the PCNF1 register, and the value range of the BALEN field is limited to integers between 2 and 4, this embodiment breaks this limitation by forcibly configuring the BALEN field to 1, thereby configuring the ADDRESS field length to 2, resulting in the configured target ADDRESS field.
[0138] Understandably, after obtaining the target ADDRESS field, the connection request packet can be configured based on the target ADDRESS field to obtain the data packet to be processed. After configuring the format of the data packet to be processed, the location of the access address in memory is as follows: Figure 8 As shown. In this case, the access address can be determined by reading only the first four bytes of the PAYLOAD in the data packet to be processed. First, read the PAYLOAD from the data packet to be processed, then remove the LSB of the PAYLOAD, and then read the first four bytes of the PAYLOAD. Use these four bytes as the target bytes, and the access address can be determined based on the target bytes.
[0139] It should be understood that, due to the possibility of wireless signal interference, in order to avoid parsing errors and improve the accuracy of the access address, the two lowest shifts in PAYLOAD can be removed first, and then the first four bytes of PAYLOAD can be read and used as the target bytes.
[0140] Furthermore, the specific steps to crack CRCInit are as follows:
[0141] Extract the Cyclic Redundancy Check (CRC) code from the connection request packet and generate the Linear Feedback Shift Register (LFSR) corresponding to the CRC; find the data channel PDU corresponding to the CRC and invert the LFSR to obtain the target LFSR; the data driving the target LFSR is the most significant bit (MSB) of the data channel PDU; when the data input of the data channel PDU is completed, determine CRCInit based on the value in the target LFSR.
[0142] It should be understood that, such as Figure 9 As shown, Figure 9 This diagram illustrates the CRCInit cracking process. CRC is a field in a data packet, and CRCInit is essential data for generating the CRC. In this embodiment, the CRC is extracted from the connection request packet to generate an LFSR describing the CRC. CRCInit is the initial value of this LFSR, and the data to be verified input to this LFSR is the entire PDU in the connection request packet. In this embodiment, parsing the connection request packet to obtain CRCInit aims to ensure that the target Bluetooth device and the Bluetooth device to be blocked have the same CRC, thereby reducing the impact of signal interference.
[0143] It should be understood that since the CRC field of the connection request packet needs to be obtained from CRCInit, and the data being checked by CRC is the data channel PDU, reversing the LFSR corresponding to the CRC will yield the following result: Figure 9 The target LFSR is shown. In this case, the CRC of the connection request packet will be used as the initial value of the target LFSR, and the data driving the target LFSR is the MSB of the data channel PDU. Furthermore, when all the data of the data channel PDU has been input, the value in the target LFSR can be used as CRCInit for subsequent steps.
[0144] Furthermore, the specific steps to crack the hop interval are as follows:
[0145] The connection event of the Bluetooth device to be blocked is determined based on the connection request packet; the connection interval is determined based on the connection event, the connection interval being the time interval between entering one available data channel and entering the next available data channel; the hop interval is determined based on the connection interval.
[0146] It should be understood that, such as Figure 10 As shown, Figure 10 This diagram illustrates how to bypass hop interval restrictions. To ensure normal communication, both the target Bluetooth device and the device to be blocked need to use the same channel map and the same hop interval. The hop interval represents the frequency hopping rhythm shared by the two devices, which is the time interval between switching from one available data channel to the next. The connection events of the Bluetooth device to be blocked can be determined from the connection request packet. Then, the connection interval can be determined from the connection events, and finally, the hop interval can be determined from the connection interval. The relationship between the hop interval and the connection interval is: Connection interval = hop interval * 1.25ms.
[0147] Furthermore, the specific steps to crack the channel map are as follows:
[0148] The data channels are traversed, and the traversed data channels are used as candidate data channels; the access address and CRCInit are determined according to the connection request packet; an available data channel is selected from the candidate data channels according to the access address and the CRCInit; and a channel map is determined according to the available data channels.
[0149] It should be understood that data channels used for data transmission can be divided into available data channels and unavailable data channels. Available data channels will be used as frequency hopping channels, while unavailable channels cannot be used as frequency hopping channels. Therefore, available data channels will appear in the frequency hopping channel sequence, while unavailable data channels will not. Since the target Bluetooth device and the Bluetooth device to be blocked can only communicate normally by using the same available and unavailable data channels, the purpose of cracking the channel map is to determine all the frequency hopping channels currently being used by the Bluetooth device to be blocked.
[0150] It is understandable that the available data channel is the channel used to transmit data, which is specified by the channel map field. This field is 5 bytes in size, with the lower 37 bits corresponding to 37 available channels. If a channel is selected as an available data channel, the corresponding bit in the channel map will be set to 1.
[0151] It is understandable that, such as Figure 11 As shown, Figure 11 This is a schematic diagram of channel map cracking. In this embodiment, it is necessary to determine the available data channels used by all Bluetooth devices to be blocked out of the 37 data channels. Therefore, the data channels can be traversed and the traversed data channels can be used as candidate data channels. These candidate data channels are detected in turn according to the access address and CRCInit to determine the available data channels. Then, the channel map used by the Bluetooth devices to be blocked can be determined based on the available data channels.
[0152] In one embodiment, selecting an available data channel from the candidate data channels based on the access address and the CRCInit includes:
[0153] Based on the access address and CRCInit, communication tests are performed on each of the candidate data channels to determine whether a link layer data packet matching the access address and passing the CRC can be received on the candidate data channel within one frequency hopping cycle; if so, the candidate data channel is designated as a candidate available data channel; the candidate available data channels are traversed to determine the available data channels.
[0154] It should be understood that the BLE protocol stipulates that the two Bluetooth connections must switch channels periodically, i.e., perform a frequency hopping. Therefore, communication tests can be performed on each candidate data channel. If, after waiting for one frequency hopping cycle on a candidate data channel, no link layer data packet matching the access address and passing the CRC check is received, the candidate data channel is considered unavailable. If, within one frequency hopping cycle, a link layer data packet matching the access address and passing the CRC check is received on a candidate data channel, the candidate data channel is determined to be a usable candidate data channel.
[0155] Understandably, after the above-mentioned individual checks, the available data channels to be selected can be traversed to determine the available data channels corresponding to all Bluetooth devices to be blocked.
[0156] In another embodiment, selecting an available data channel from the candidate data channels based on the access address and the CRCInit includes:
[0157] The number of candidate data channels is detected, and a target chip is determined based on the number of channels, wherein the number of target chips is the same as the number of candidate data channels; the target chip is configured according to the access address and the CRCInit, and the target chip is controlled to work on different candidate data channels, wherein the target chip corresponds one-to-one with the candidate data channels; communication tests are performed on the candidate data channels based on the target chip, and the available data channels are determined based on the test results.
[0158] It should be understood that in certain situations, such as when interference on an available data channel is too high, that channel may be abandoned and rendered unusable. The channel map then needs to be redefined. In such cases, the available data channels are constantly changing, making it impossible to determine them through the method of individual detection described above. Therefore, to address this, a number of target chips can be determined based on the number of candidate data channels. For example, if there are 37 candidate data channels, then 37 target chips can be identified. These 37 target chips are configured with the same access address and CRCInit, and each chip is controlled to operate on one of the 37 different candidate data channels for communication testing. This allows for simultaneous monitoring of all data channels, acquisition of the channel map, and significantly improved efficiency.
[0159] Furthermore, the specific steps to crack the hop increment are as follows:
[0160] The available data channels and channel map are determined based on the connection request packet; multiple candidate frequency hopping channel sequences are determined based on the channel map, and corresponding candidate hop increments are determined for each candidate frequency hopping channel sequence; unique channels and exploitable channels are determined based on the candidate frequency hopping channel sequences; the distance between the unique channel and the exploitable channel is detected; and a hop increment is selected from the candidate hop increments based on the distance between the unique channel and the exploitable channel.
[0161] It should be understood that, such as Figure 12 As shown, Figure 12This diagram illustrates the hop increment algorithm. For a given channel map, there exists a usable data channel that appears only once in each of its various possible frequency hopping channel sequences. This usable data channel can be designated as a unique channel. When a unique channel exists, a special channel can be selected from the frequency hopping sequences; this is designated as an exploitable channel. The exploitable channel satisfies the condition that its distance from the unique channel is different in each of the various possible frequency hopping channel sequences. Therefore, we can first determine multiple candidate frequency hopping channel sequences based on the channel map, and then determine the corresponding candidate hop increments for each candidate frequency hopping channel sequence. Finally, we determine the unique channel and the exploitable channel based on the candidate frequency hopping channel sequences.
[0162] Then, the distance between the unique channel and the exploitable channel can be detected. Here, distance refers to the time interval (or the number of connection intervals) required for the BLE connection to switch from the unique channel to the exploitable channel. Based on the distance between the exploitable channels, a hop increment is selected from the candidate hop increments. The specific detection method is as follows: First, listen for data on the unique channel. When data is detected, record the first time. Then, switch to the exploitable channel to listen for data. When data is detected, record the second time. Calculate the time difference between the first and second times, and determine the distance between the unique channel and the exploitable channel based on this time difference. It should be understood that after determining the distance, the hop increment corresponding to that distance can be found from the candidate hop increments.
[0163] In specific implementations, such as Figure 12 As shown, in order to improve the cracking speed, the host computer can process 12 possible frequency hopping channel sequences in sequence to find the unique channel and the exploitable channel and pass them to the slave computer. The slave computer performs distance measurement and then feeds it back to the host computer. The host computer uses the distance fed back by the slave computer to find the corresponding hop increment.
[0164] In this embodiment, the connection request packet is parsed using the above method to obtain five Bluetooth communication parameters used for blocking operations, thereby improving the success rate of Bluetooth connection blocking.
[0165] In one embodiment, after parsing five Bluetooth communication parameters and generating a target data packet, a blocking operation can be performed on the Bluetooth device to be blocked based on the target data packet and the Bluetooth communication parameters. The step of continuously broadcasting the target data packet to the Bluetooth device to be blocked on a broadcast communication channel according to the Bluetooth communication parameters to block the Bluetooth device includes:
[0166] The BLE connection frequency hopping channel sequence is determined based on the channel map and hop increment; a target unique channel is determined based on the BLE connection frequency hopping channel sequence, and frequency hopping synchronization is completed with the Bluetooth device to be blocked based on the target unique channel; when communication data belonging to the Bluetooth device to be blocked is detected on the target unique channel, a timer is configured based on the hop interval; when the timer expires, the next communication channel is selected from the BLE connection frequency hopping channel sequence, and the communication data from the Bluetooth device to be blocked is waited for in the next communication channel; when the communication data arrives and the timer has not expired, the receive mode is switched to the transmit mode, and the target data packet is broadcast to the Bluetooth device to be blocked on the broadcast communication channel; when the timer expires, the steps of selecting the next communication channel from the BLE connection frequency hopping channel sequence and waiting for the communication data from the Bluetooth device to be blocked in the next communication channel are executed to block the Bluetooth device to be blocked.
[0167] It should be understood that the BLE connection frequency hopping channel sequence can be determined based on the channel map and hop increment, and then a target unique channel can be found from the BLE connection frequency hopping channel sequence. This target unique channel is used to complete frequency hopping synchronization with the Bluetooth device to be blocked. Therefore, after determining the target unique channel, frequency hopping synchronization can be completed with the Bluetooth device to be blocked based on the target unique channel.
[0168] Understandably, after frequency hopping synchronization is completed, when communication data belonging to the Bluetooth device to be blocked is detected on the target unique channel, the access address can be used to determine whether the communication data belongs to the Bluetooth device to be blocked. If the communication data belongs to the Bluetooth device to be blocked, the data interval (connectioninterval) is calculated based on the hop interval, the timeout is calculated based on the connection interval, and a timer is configured based on the timeout. When the timer expires, the next communication channel is selected from the BLE connection frequency hopping channel sequence, and the system waits for the communication data from the Bluetooth device to be blocked on the next communication channel. When the communication data arrives and the timer has not expired, the receiving mode is switched to the transmitting mode, and the target data packet is broadcast to the Bluetooth device to be blocked on the broadcast communication channel, thereby blocking the Bluetooth device to be blocked.
[0169] In this embodiment, the above-described scheme continuously sends target data packets to the Bluetooth device to be blocked while broadcasting the communication channel, thereby blocking the Bluetooth device by blocking the communication channel.
[0170] Furthermore, this embodiment of the invention also proposes a storage medium storing a Bluetooth connection blocking program, which, when executed by a processor, implements the steps of the Bluetooth connection blocking method described above.
[0171] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0172] In addition, refer to Figure 13 This invention also proposes a Bluetooth connection blocking device, which includes:
[0173] The parameter parsing module 10 is used to parse the connection request packet sent by the Bluetooth device to be blocked when it receives the connection request packet to obtain Bluetooth communication parameters.
[0174] The data packet module 20 is used to generate a target data packet based on the Bluetooth communication parameters.
[0175] The Bluetooth blocking module 30 is used to continuously broadcast the target data packet to the Bluetooth device to be blocked on the broadcast communication channel in order to block the Bluetooth device to be blocked.
[0176] In this embodiment, upon receiving a connection request packet from a Bluetooth device to be blocked, the connection request packet is parsed to obtain Bluetooth communication parameters; a target data packet is generated based on the Bluetooth communication parameters; and the target data packet is continuously broadcast to the Bluetooth device to be blocked on a broadcast communication channel to block the Bluetooth device. In this invention, a target data packet is generated based on the Bluetooth communication parameters obtained from parsing the connection request packet, and the target data packet is continuously broadcast to the Bluetooth device to be blocked, causing the Bluetooth device to be blocked to be blocked due to the communication channel being blocked, thereby achieving the effect of blocking a specific Bluetooth device.
[0177] Other embodiments or specific implementation methods of the Bluetooth connection blocking device described in this invention can refer to the above-described method embodiments, and will not be repeated here.
[0178] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0179] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0180] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This estimation machine software product is stored in an estimation machine readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a smart device (which may be a mobile phone, an estimation machine, a Bluetooth connection blocking device, or a network Bluetooth connection blocking device, etc.) to execute the methods described in the various embodiments of the present invention.
[0181] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for blocking Bluetooth connections, characterized in that, The Bluetooth connection blocking method includes the following steps: Upon receiving a connection request packet from a Bluetooth device to be blocked, the connection request packet is parsed to obtain Bluetooth communication parameters. Generate the target data packet based on the Bluetooth communication parameters; The target data packet is continuously broadcast to the Bluetooth device to be blocked on the broadcast communication channel in order to block the Bluetooth device to be blocked; The Bluetooth communication parameters include at least one of the following: access address, cyclic redundancy check initialization value CRCInit, hop interval, channel map, and hop increment. The step of parsing the connection request packet to obtain Bluetooth communication parameters includes: Configure the BALEN field in the connection request packet to 1, so that the length of the ADDRESS field in the connection request packet is configured to 2, and the target ADDRESS field is obtained. Configure the connection request packet according to the target ADDRESS field to obtain the data packet to be processed; Read PAYLOAD from the data packet to be processed, and extract the target bytes from the PAYLOAD; The access address is determined based on the target bytes.
2. The Bluetooth connection blocking method as described in claim 1, characterized in that, Before parsing the connection request packet to obtain Bluetooth communication parameters upon receiving it from the Bluetooth device to be blocked, the process further includes: When a connection request message sent by a Bluetooth device on a broadcast communication channel is detected in broadcast mode, the device information of the Bluetooth device is obtained. The MAC address and Universal Unique Identifier (UUID) of the Bluetooth device are determined based on the device information. Determine whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID; When the Bluetooth device is a Bluetooth device to be blocked, the connection request packet corresponding to the Bluetooth device to be blocked is obtained according to the connection request message.
3. The Bluetooth connection blocking method as described in claim 2, characterized in that, Before determining whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID, the method further includes: Obtain the candidate MAC address and candidate UUID of the Bluetooth device to be blocked; A preset whitelist is created based on the MAC address and the candidate UUID; Accordingly, determining whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID includes: The MAC address and UUID are matched with candidate MAC addresses and candidate UUIDs in a preset whitelist to determine whether the Bluetooth device is a Bluetooth device to be blocked.
4. The Bluetooth connection blocking method as described in claim 1, characterized in that, The step of parsing the connection request packet to obtain Bluetooth communication parameters includes: Extract the Cyclic Redundancy Check (CRC) code from the connection request packet and generate the Linear Feedback Shift Register (LFSR) corresponding to the CRC; Locate the data channel PDU corresponding to the CRC and reverse the LFSR to obtain the target LFSR; The data driving the target LFSR is the most significant bit (MSB) of the data channel PDU; When the data input of the data channel PDU is completed, CRCInit is determined based on the value in the target LFSR.
5. The Bluetooth connection blocking method as described in claim 1, characterized in that, The step of parsing the connection request packet to obtain Bluetooth communication parameters includes: The connection event of the Bluetooth device to be blocked is determined based on the connection request packet. The connection interval is determined based on the connection event, and the connection interval is the time interval between entering one available data channel and entering the next available data channel; The hop interval is determined based on the connection interval.
6. The Bluetooth connection blocking method as described in claim 1, characterized in that, The step of parsing the connection request packet to obtain Bluetooth communication parameters includes: The data channels are traversed, and the traversed data channels are used as candidate data channels; The access address and CRCInit are determined based on the connection request packet; An available data channel is selected from the candidate data channels based on the access address and the CRCInit; Determine the channel map based on the available data channels.
7. The Bluetooth connection blocking method as described in claim 6, characterized in that, The step of selecting an available data channel from the candidate data channels based on the access address and the CRCInit includes: Based on the access address and CRCInit, communication tests are performed on each of the candidate data channels to determine whether a link layer data packet matching the access address and passing the CRC can be received on the candidate data channel within one frequency hopping cycle. If so, the candidate data channel will be selected as the candidate available data channel; The candidate available data channels are traversed to determine the available data channels.
8. The Bluetooth connection blocking method as described in claim 6, characterized in that, The step of selecting an available data channel from the candidate data channels based on the access address and the CRCInit includes: The number of channels in the candidate data channels is detected, and the target chip is determined based on the number of channels, wherein the number of target chips is the same as the number of channels in the candidate data channels; The target chip is configured according to the access address and the CRCInit, and the target chip is controlled to work on different candidate data channels, with each target chip corresponding to a candidate data channel. The candidate data channels are tested using the target chip, and the available data channels are determined based on the test results.
9. The Bluetooth connection blocking method as described in claim 1, characterized in that, The step of parsing the connection request packet to obtain Bluetooth communication parameters includes: The available data channels and channel map are determined based on the connection request packet; Based on the channel map, multiple candidate frequency hopping channel sequences are determined, and for each candidate frequency hopping channel sequence, a corresponding candidate hop increment is determined. The unique channel and the exploitable channel are determined based on the candidate frequency hopping channel sequence; Detect the distance between the unique channel and the exploitable channel; The hop increment is selected from the candidate hop increments based on the distance between the unique channel and the exploitable channel.
10. The Bluetooth connection blocking method as described in claim 1, characterized in that, The step of continuously broadcasting the target data packet to the Bluetooth device to be blocked on the broadcast communication channel to block the Bluetooth device to be blocked includes: According to the Bluetooth communication parameters, the target data packet is continuously broadcast to the Bluetooth device to be blocked on the broadcast communication channel to block the Bluetooth device to be blocked.
11. The Bluetooth connection blocking method as described in claim 10, characterized in that, The step of continuously broadcasting the target data packet to the Bluetooth device to be blocked on the broadcast communication channel according to the Bluetooth communication parameters to block the Bluetooth device to be blocked includes: The BLE connection frequency hopping channel sequence is determined based on the channel map and hop increment. The target unique channel is determined based on the BLE connection frequency hopping channel sequence, and frequency hopping synchronization is completed with the Bluetooth device to be blocked based on the target unique channel; When communication data belonging to the Bluetooth device to be blocked is detected on the target unique channel, a timer is configured according to hopinterval; When the timer expires, the next communication channel is selected from the BLE connection frequency hopping channel sequence, and the communication data of the Bluetooth device to be blocked is waited for in the next communication channel. When communication data arrives and the timer has not expired, the receiving mode is switched to the sending mode, and the target data packet is broadcast to the Bluetooth device to be blocked on the broadcast communication channel; When the timer expires, the step of selecting the next communication channel from the BLE connection frequency hopping channel sequence and waiting for the communication data of the Bluetooth device to be blocked in the next communication channel is executed to block the Bluetooth device to be blocked.
12. The Bluetooth connection blocking method as described in claim 11, characterized in that, When communication data belonging to the Bluetooth device to be blocked is detected on the target unique channel, a timer is configured according to the hop interval, including: When communication data is detected on the target unique channel, the access address is used to determine whether the communication data belongs to the Bluetooth device to be blocked. When the communication data belongs to the Bluetooth device to be blocked, configure the timer according to the hop interval.
13. The Bluetooth connection blocking method as described in claim 11, characterized in that, The configuration of the timer based on the hop interval includes: Calculate the connection interval based on the hop interval; Calculate the timeout period based on the connection interval, and configure the timer based on the timeout period.
14. A Bluetooth connection blocking device, characterized in that, The Bluetooth connection blocking device includes: The parameter parsing module is used to parse the connection request packet sent by the Bluetooth device to be blocked when it receives the connection request packet to obtain Bluetooth communication parameters. The data packet module is used to generate a target data packet based on the Bluetooth communication parameters; A Bluetooth blocking module is used to continuously broadcast the target data packet to the Bluetooth device to be blocked on a broadcast communication channel in order to block the Bluetooth device to be blocked; The Bluetooth communication parameters include at least one of the following: access address, cyclic redundancy check initialization value CRCInit, hop interval, channel map, and hop increment. The parameter parsing module is further configured to set the BALEN field in the connection request packet to 1, thereby setting the length of the ADDRESS field in the connection request packet to 2, to obtain the target ADDRESS field; configure the connection request packet according to the target ADDRESS field to obtain the data packet to be processed; read the PAYLOAD from the data packet to be processed, and extract the target byte from the PAYLOAD; and determine the access address according to the target byte.
15. The Bluetooth connection blocking device as described in claim 14, characterized in that, The Bluetooth connection blocking device also includes: The device verification module is used to obtain the device information of the Bluetooth device when it detects a connection request message sent by a Bluetooth device on a broadcast communication channel in broadcast mode; determine the MAC address and Universal Unique Identifier (UUID) corresponding to the Bluetooth device based on the device information; determine whether the Bluetooth device is a Bluetooth device to be blocked based on the MAC address and the UUID; and if the Bluetooth device is a Bluetooth device to be blocked, obtain the connection request packet corresponding to the Bluetooth device to be blocked based on the connection request message.
16. The Bluetooth connection blocking device as described in claim 15, characterized in that, The device verification module is further configured to obtain the candidate MAC address and candidate UUID of the Bluetooth device to be blocked; establish a preset whitelist based on the MAC address and the candidate UUID; and match the MAC address and the UUID with the candidate MAC address and candidate UUID in the preset whitelist to determine whether the Bluetooth device is the Bluetooth device to be blocked.
17. A Bluetooth connection blocking device, characterized in that, The Bluetooth connection blocking device includes: a memory, a processor, and a Bluetooth connection blocking program stored in the memory and executable on the processor, the Bluetooth connection blocking program being configured to implement the Bluetooth connection blocking method as described in any one of claims 1 to 13.
18. A storage medium, characterized in that, The storage medium stores a Bluetooth connection blocking program, which, when executed by a processor, implements the steps of the Bluetooth connection blocking method as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Bluetooth device control method and device
CN104318741A
Low-power-consumption Bluetooth connection blocking method and device, computer equipment and storage medium
CN111757308A