A bluetooth broadcast packet detection method, device and equipment
Patent Information
- Application Number
- CN202211276980.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-10-18
AI Technical Summary
[0006]本发明的目的在于提供一种蓝牙广播包检测方法、装置及设备,用于解决现有技术中Mesh节点在接收远端设备的广播包过程中有较大概率被近端设备的同频广播包干扰,导致当前扫描失败,影响整体的扫描成功率,进一步影响Mesh网络的吞吐及稳定性的问题
[0011]与现有技术相比,本发明提供方法应用于蓝牙系统,所述蓝牙系统包括主机以及控制器;所述控制器包括主机控制接口、链路层以及物理层;所述物理层中加入了蓝牙信号监测电路;方法包括:正在接收远端设备的广播包的扫描节点接收待检测蓝牙广播包传入信息;待检测蓝牙广播包是经过蓝牙信号监测电路监测到的满足周期性和能量跳变特性的广播包;判断待检测蓝牙广播包的能量是否大于或等于预先设定值;若待检测蓝牙广播包的能量大于或等于预先设定值,停止接收远端设备的广播包,复位链路层以及物理层的状态机,接收待检测蓝牙广播包。通过在蓝牙的物理层加入蓝牙信号监测电路,当发现更大能量的广播包时,放弃远端设备广播的接收,转而接收能量较大的近端设备广播,复位蓝牙连接层和物理层状态机转而接收大能量包,避免Mesh节点在接收远端设备的广播包过程中有较大概率被近端设备的同频广播包干扰,导致当前扫描失败的缺陷,从而提升扫描成功率,进一步提升Mesh网络的吞吐及稳定性。
Smart Images

Figure CN115696228B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Bluetooth Low Energy technology in wireless communication, and in particular to a method, apparatus, and device for detecting Bluetooth broadcast packets. Background Technology
[0002] As people's lives become more modernized, the demand for communication technology is also increasing. Bluetooth Low Energy (BLE) technology, characterized by low cost and short range, is highly favored by the market and has become one of the most widely used wireless connection and communication technologies.
[0003] The Internet of Things (IoT) has wide applications in industry and commerce, and as a way to network sensors, it provides fundamental data for artificial intelligence. Compared to commercial applications, industrial control places higher demands on IoT. On July 19, 2017, the Bluetooth Low Energy (BLE) Technology Consortium officially announced that Bluetooth Low Energy (BLE) technology now fully supports Mesh networks. The new Mesh feature provides many-to-many communication between devices and significantly improves the ability to build wide-area network coverage, making it suitable for IoT solutions such as building automation and wireless sensor networks that require tens of thousands of devices to transmit data in a reliable and secure environment.
[0004] In Bluetooth Low Energy (BLE) Mesh networks, many-to-many relationships are allowed between devices. Messages are not transmitted along a specific path; instead, all devices within range receive the message, and relay nodes forward the message to all other devices within their range. However, nodes scanning within a network face a high probability of co-channel broadcast interference, affecting the scan success rate and consequently the throughput and stability of the Mesh network.
[0005] Therefore, there is an urgent need to provide a more reliable Bluetooth broadcast packet detection solution. Summary of the Invention
[0006] The purpose of this invention is to provide a Bluetooth broadcast packet detection method, apparatus, and device to solve the problem in the prior art where Mesh nodes are highly likely to be interfered with by co-frequency broadcast packets from nearby devices when receiving broadcast packets from remote devices, leading to current scan failure, affecting the overall scan success rate, and further impacting the throughput and stability of the Mesh network.
[0007] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a Bluetooth broadcast packet detection method, the method being applied to a Bluetooth system, the Bluetooth system including a host and a controller; the controller including a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; the method includes: The scanning node receives information from a Bluetooth broadcast packet to be detected; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving broadcast packets from a remote device; Determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet from the remote device. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, stop receiving broadcast packets from the remote device, reset the state machines of the link layer and the physical layer, and then receive the Bluetooth broadcast packet to be detected.
[0008] In a second aspect, the present invention provides a Bluetooth broadcast packet detection device, the device being applied to a Bluetooth system, the Bluetooth system including a host and a controller; the controller including a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; the device includes: The Bluetooth broadcast packet receiving module is used by the scanning node to receive the Bluetooth broadcast packet information to be detected; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving the broadcast packet from the remote device; The judgment module is used to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device. The Bluetooth broadcast packet receiving module is configured to stop receiving broadcast packets from the remote device, reset the state machines of the link layer and the physical layer, and receive the Bluetooth broadcast packet to be detected if the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value.
[0009] Thirdly, the present invention provides a Bluetooth broadcast packet detection device, the device being applied to a Bluetooth system, the Bluetooth system including a host and a controller; the controller including a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; the device includes: A communication unit / interface is used for the scanning node to receive information from Bluetooth broadcast packets to be detected; the Bluetooth broadcast packets to be detected are broadcast packets that meet the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving broadcast packets from a remote device; A processing unit / processor is used to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, stop receiving broadcast packets from the remote device, reset the state machines of the link layer and the physical layer, and then receive the Bluetooth broadcast packet to be detected.
[0010] Fourthly, the present invention provides a computer storage medium storing instructions that, when executed, implement the above-described Bluetooth broadcast packet detection method.
[0011] Compared with the prior art, the present invention provides a method applied to a Bluetooth system, the Bluetooth system including a host and a controller; the controller includes a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; the method includes: a scanning node receiving broadcast packets from a remote device receiving information of a Bluetooth broadcast packet to be detected; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; determining whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; if the energy of the Bluetooth broadcast packet to be detected is greater than or equal to the preset value, stopping the reception of broadcast packets from the remote device, resetting the state machines of the link layer and the physical layer, and receiving the Bluetooth broadcast packet to be detected. By adding a Bluetooth signal monitoring circuit to the Bluetooth physical layer, when a higher-energy broadcast packet is detected, the reception of the remote device's broadcast is abandoned, and the broadcast of the nearby device with higher energy is received instead. The Bluetooth connection layer and physical layer state machine are reset to receive the high-energy packet. This avoids the defect that Mesh nodes are likely to be interfered with by the same-frequency broadcast packets of the nearby device while receiving the broadcast packets of the remote device, which would lead to the failure of the current scan. This improves the scan success rate and further enhances the throughput and stability of the Mesh network. Attached Figure Description
[0012] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the Bluetooth Low Energy architecture; Figure 2 This is a schematic diagram of the Bluetooth broadcast packet detection method provided by the present invention; Figure 3 This is a schematic diagram illustrating the Bluetooth signal monitoring principle provided by the present invention. Figure 4 This is a schematic diagram of the PHY demodulation state machine in the Bluetooth broadcast packet detection method provided by the present invention; Figure 5 A schematic diagram of the LL state machine in the Bluetooth broadcast packet detection method provided by this invention; Figure 6 This is a schematic diagram of the Bluetooth broadcast packet detection device provided by the present invention; Figure 7 This is a schematic diagram of the Bluetooth broadcast packet detection device provided by the present invention.
[0013] Figure label: Low-pass filter-301, Bluetooth signal monitoring circuit-302, phase calculation module-303, angular frequency calculation module-304, synchronizer-305, demodulation decision module-306. Detailed Implementation
[0014] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0015] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0016] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0017] Explanation of technical terms: BLE: Bluetooth Low Energy (BLE) is a short-range, low-cost, interoperable wireless technology that utilizes many intelligent mechanisms to minimize power consumption. BLE's operating mode is ideal for transmitting data from tiny wireless sensors (exchanging data every half second) or other peripherals using fully asynchronous communication, such as remote controls. These devices transmit very small amounts of data (typically a few bytes) and very infrequently (e.g., a few times per second to once per minute, or even less).
[0018] Mesh networks consist of mesh routers and mesh clients. Mesh routers form the backbone network and are connected to the wired internet, providing multi-hop wireless internet access to mesh clients. Wireless mesh networks, also known as "multi-hop" networks, are a new type of wireless network technology completely different from traditional wireless networks.
[0019] In existing technologies, the transmission distance of wireless network communication is typically limited. Mesh (wireless mesh) network technology can extend this transmission distance. Bluetooth Low Energy (BLE) Mesh networks are a novel wireless communication network architecture. In a BLE Mesh network, any wireless node device can simultaneously act as a router. Each node in the network can send and receive signals, and each node can communicate directly with one or more peer nodes, enabling longer transmission distances. Therefore, BLE Mesh technology has broad application prospects in building automation, commercial lighting, and sensor networks.
[0020] Bluetooth Low Energy (BLE) Mesh can support up to tens of thousands of nodes in a single network. It uses a controlled network flooding method for information forwarding, relaying information from one node to a target node without requiring the creation and management of complex routing tables. Due to its broadcast nature, if any single point in the network fails, messages can still be delivered to the destination node via alternative paths, ensuring network robustness. However, network flooding also has its disadvantages. For example, data transmission relies on BLE broadcasting and scanning, and there are only three broadcast channels. Therefore, with a large number of nodes, channel contention can easily occur. In a Bluetooth Mesh flooding environment, the air interface contains numerous broadcast packets from BLE devices. Mesh nodes receiving broadcast packets from remote devices are highly likely to be interfered with by co-frequency broadcast packets from nearby devices, leading to current scan failures, affecting the overall scan success rate, and further impacting the throughput and stability of the Mesh network.
[0021] Furthermore, most existing Bluetooth baseband technologies cannot demodulate Bluetooth signals under co-channel interference of equivalent energy, requiring extensive optimization and improvement of the baseband algorithm, resulting in long design and verification cycles and impacting chip time-to-market.
[0022] In response, the present invention provides a method, apparatus, and device for detecting Bluetooth broadcast packets.
[0023] Next, the solutions provided in the embodiments of this specification will be described in conjunction with the accompanying drawings: First, let's analyze the structure of the Bluetooth system. Figure 1 A brief explanation: Figure 1 This is a schematic diagram of the Bluetooth Low Energy architecture. Figure 1 As shown, a Bluetooth Low Energy system may include: a host and a controller; the host may include a Generic Access Profile (GAP), a Generic Attribute Profile (GATT), a Security Management (SM), an Attribute Protocol (ATT), and a Logical Link Control and Adaptive Protocol (L2CAP); the controller includes a Host Control Interface (HCI), a Link Layer (LL), and a Physical Layer (PHY).
[0024] The PHY layer features a 1Mbps / 2Mbps adaptive frequency-hopping GFSK radio frequency operating in the unlicensed 2.4GHz ISM (Industrial, Scientific, and Medical) band.
[0025] LL layer: Link layer, RF control layer, used to control the radio frequency status of the device. The control chip operates in any one of the following five states: standby, advertising, scanning, initiating, and connected.
[0026] HCI Layer: Host Control Interface Layer, communication layer, provides a standardized interface to the host and controller. This layer can be implemented using software APIs or controlled using hardware interfaces such as UART, SPI, and USB.
[0027] L2CAP layer: Logical link control and adaptive protocol layer, which packages data and provides data encapsulation services for upper layers, enabling point-to-point communication.
[0028] SM layer: Security management layer, providing pairing and key distribution to enable secure connections and data exchange.
[0029] ATT Layer: Attribute Protocol Layer. In an ATT environment, it allows a device to display a specific piece of data, called an "attribute," to another device. The device displaying the "attribute" is called a server, and the paired device is called a client. The link layer state (host and slave) is independent of the device's ATT role; that is, a host device can be both an ATT server and an ATT client, and the same applies to slave devices.
[0030] GATT Layer: The General Profile Configuration Layer is a layer above ATT that defines the service framework that uses ATT. GATT specifies the structure of the configuration file (the famous profile). In BLE, all data blocks used by the profile or service are called "features". All data communication between two connected devices is handled through GATT subroutines. Applications and profiles directly use the GATT layer, and data interaction also takes place in the GATT layer.
[0031] In this solution, a Bluetooth signal monitoring circuit is added to the physical layer, and the link layer and physical layer are combined, abandoning the reception of broadcasts from remote devices and instead receiving broadcasts from nearby devices with higher energy levels. The details will be explained below.
[0032] Figure 2 This is a schematic flowchart of the Bluetooth broadcast packet detection method provided by the present invention. The method is applied to a Bluetooth system, which includes a host and a controller. The controller includes a host control interface, a link layer, and a physical layer. A Bluetooth signal monitoring circuit is added to the physical layer. Figure 2 As shown, the process may include the following steps: Step 210: The scanning node receives the Bluetooth broadcast packet to be detected; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving the broadcast packet from the remote device.
[0033] The scanning node can be a Mesh node in a Mesh flooding network. When a Mesh node is in scanning mode and receiving BLE broadcasts from remote devices, it may be in one of four states: preamble synchronization, access code synchronization, header demodulation, or PDU demodulation. At this time, a nearby device may be sending a high-energy broadcast on the same channel as the broadcast being received from the remote device. Most BLE PHYs in the industry cannot correctly receive the remote broadcast. In this solution, a Bluetooth signal monitoring circuit is added to the physical layer. While the scanning node is receiving broadcasts from remote devices, the Bluetooth signal monitoring circuit is activated, maintaining the detection of newly arriving Bluetooth broadcast packets while demodulating the remote broadcast.
[0034] In practical applications, the Bluetooth signal monitoring circuit is responsible for determining whether a new broadcast packet is periodic and whether its energy is sufficiently high, further deciding whether to switch to receiving the new broadcast packet. In step 210, the incoming Bluetooth broadcast packet information indicates that a new Bluetooth broadcast packet has been received, the scanning node is receiving broadcasts from remote devices, and can also receive the incoming Bluetooth broadcast packet information. At this time, the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit.
[0035] Step 220: Determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device.
[0036] Step 220 actually includes two main steps. The first step is to detect whether the energy of the Bluetooth broadcast packet to be detected is greater than the energy of the broadcast packet that the target scanning node is receiving from the remote device. If it is greater, the second step is to detect whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. However, this step is limited to the preset value being greater than or equal to the energy of the broadcast packet of the remote device. Therefore, it is only necessary to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to the preset value. The "great enough" in "the Bluetooth signal monitoring circuit is responsible for determining whether the new broadcast packet is periodic and whether the energy of the new broadcast packet is great enough" explained in step 210 specifically means that when the energy of the Bluetooth broadcast packet to be detected is greater than or equal to the preset value in step 220, it can be considered that "the energy of the new broadcast packet is great enough".
[0037] Step 230: If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, stop receiving broadcast packets from the remote device, reset the state machines of the link layer and the physical layer, and receive the Bluetooth broadcast packet to be detected.
[0038] When the energy of a newly arrived Bluetooth broadcast packet to be detected is large enough, the reception of the broadcast from the remote device is abandoned and the broadcast from the nearby device with larger energy is received instead. Compared with the traditional approach, one more broadcast packet is received in this time period. Since this type of conflict has a very high probability of occurring in a Mesh flooding network, the overall scanning success rate will be greatly improved in the long run.
[0039] Figure 2The proposed method involves adding a Bluetooth signal monitoring circuit to the Bluetooth physical layer. When a higher-energy broadcast packet is detected, the receiving of the broadcast from the remote device is abandoned, and the receiving of the broadcast from the nearby device with higher energy is switched. The Bluetooth connection layer and physical layer state machines are reset to receive the high-energy packet. This avoids the defect that Mesh nodes are likely to be interfered with by the same-frequency broadcast packets from the nearby device while receiving the broadcast packets from the remote device, which would lead to the failure of the current scan. This improves the scan success rate and further enhances the throughput and stability of the Mesh network.
[0040] based on Figure 2 In addition to the method described herein, this specification also provides some specific implementation methods of the method, which will be described below.
[0041] Optionally, determining whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value may specifically include: Determine whether the energy of the Bluetooth broadcast packet to be detected meets the following requirement: P new ≥P current +C / I co-channel , where P new For the energy of the newly received broadcast signal, P current C / I represents the energy of the broadcast signal being received. co-channel This represents the Bluetooth physical layer's ability to resist interference from signals on the same channel. Essentially, a threshold needs to be set; only when an incoming signal exceeds a certain threshold compared to the original signal should the system decide whether to switch to receiving the new broadcast packet.
[0042] Optionally, the frame structure of Bluetooth Low Energy broadcast may include four main parts: preamble, access code, header, and payload. When the Bluetooth broadcast packet to be detected is received, the scanning node is at any stage of receiving the broadcast packet from the remote device. The any stage includes the preamble stage, the access code stage, the header reception stage, or the payload reception stage. The preamble stage is used to detect the newly received Bluetooth broadcast packet to be detected.
[0043] According to the Bluetooth protocol, the preamble of a BLE broadcast packet is either 01010101 or 10101010, characterized by its periodicity. Furthermore, BLE modulation is Gaussian Frequency Shift Keying (GFSK), exhibiting a constant envelope in the time domain, and its power is a essentially constant value.
[0044] In the detection of Bluetooth broadcast packets, a Bluetooth signal monitoring circuit can be used. The principle of the signal monitoring process can be combined with... Figure 3 To explain, Figure 3 This is a schematic diagram illustrating the Bluetooth signal monitoring principle provided by the present invention. Figure 3As shown, the Bluetooth signal monitoring circuit 302 can be used in conjunction with the low-pass filter 301, the phase calculation module 303, the angular frequency calculation module 304, the synchronizer 305, and the demodulation decision module 306.
[0045] Upon receiving a broadcast packet, the circuit remains normally open. The Bluetooth signal monitoring circuit 302 continuously checks for incoming Bluetooth signals with higher energy. Since a higher energy signal might not be a Bluetooth signal, periodic detection is incorporated. After filtering by the low-pass filter 301, interference signals are removed, allowing for better detection of periodicity and energy. Bluetooth is a frequency-modulated signal, requiring phase calculation module 303 to calculate the phase and angular frequency calculation module 304 to differentiate the phase and obtain the frequency. A higher angular frequency results in a 1, while a lower frequency results in a 0, consistent with normal Bluetooth demodulation algorithms. The demodulation decision module 306 makes a demodulation decision based on a criterion. If the signal energy is sufficiently high, and a packet with higher energy arrives while the current packet is being received, the circuit outputs an indication (whether to receive the higher energy packet). The decision condition is whether the energy of the incoming packet is greater than a preset threshold than the energy of the currently received packet.
[0046] This solution mainly focuses on three aspects and parameter technical solutions: firstly, the aforementioned Bluetooth signal monitoring process; secondly, the PHY state machine reset; and thirdly, the LL state machine reset. These will be explained in detail below: Regarding PHY state machine reset, in existing technologies, the frame structure of BLE broadcasting is divided into four main parts: preamble, access code, header, and payload. The preamble is an 8-bit alternating sequence of 0s and 1s. This field is designed primarily for frequency synchronization, symbol estimation, and AGC adjustment at the receiver. A typical PHY detects the preamble sequence using correlation algorithms. Successful detection indicates a high probability that the signal is a Bluetooth signal, thus sending an enable signal to the access code correlator for related access code calculations. The access code for BLE broadcasting is fixed at 0x8E89BED6. Successful preamble detection triggers the access code correlator, and a match with the preset access code sequence signifies the actual capture of a Bluetooth signal. Demodulation of the header is about to begin. The BLE broadcast header is fixed at 16 bits in length, containing information about the length of the payload to be received. Reception of this broadcast packet ends when the length of the demodulated payload to be received is exhausted.
[0047] In this solution, after adding the Bluetooth signal monitoring circuit to the physical layer, the PHY needs to be reset. Therefore, after adding the Bluetooth signal monitoring circuit to the physical layer, the PHY demodulation state machine can be combined with... Figure 4 Explanation: Figure 4 This is a schematic diagram of the PHY demodulation state machine in the Bluetooth broadcast packet detection method provided by the present invention. Figure 4As shown: Since the arrival time of the same-frequency broadcast signal is completely independent of the time of the currently received broadcast packet, the moment when the new Bluetooth signal is successfully detected may appear in any field of the currently received broadcast packet, including the preamble, access code, packet header, and payload.
[0048] The preamble itself is used to detect new Bluetooth signals, so the signal detection circuit itself will not be reset after a valid detection. If a new Bluetooth signal arrives during the access code phase, satisfying periodicity and an upward energy jump, and with a signal strength greater than a threshold, then receiving the current broadcast packet is considered meaningless, as demodulation is almost impossible under interference from a high-energy, same-frequency signal. Therefore, the low-pass filter, phase calculation, angular frequency calculation, access code correlator, demodulation decision circuit, and other PHY-related circuits are reset, discarding the small-signal demodulation context, allowing the PHY to enter a new demodulation state to demodulate the broadcast signal emitted by the nearby device.
[0049] If the signal strength is less than the threshold, it means that although the newly received broadcast packet signal is stronger than the current one, it is not greater than the same channel interference demodulation threshold of the PHY. Receiving the new broadcast signal may not be successful, so the current signal is still demodulated.
[0050] Similarly, during the packet reception and payload reception demodulation stages, if a new Bluetooth signal arrives, satisfying periodicity and an upward energy jump, and with a signal strength greater than a threshold, the low-pass filter, phase calculation, angular frequency calculation, access code correlator, demodulation decision circuits, etc., are reset. The demodulation context of small signals is discarded, allowing the PHY to enter a new demodulation state to demodulate broadcast signals emitted by the nearby device. If the signal strength is less than the threshold, the reception of high-energy broadcast signals is abandoned.
[0051] For LL state machines, in existing technologies, the demodulation process is similar to that of BLE PHY. The frame structure of BLE broadcast is divided into four parts: preamble, access code, header, and payload. The design of a general LL receiver state machine is strongly related to the frame format. However, compared with PHY demodulation, the LL layer pays attention to fields such as header and checksum. For example, if the header field does not conform to the specification, demodulation will end prematurely.
[0052] In this solution, after adding a Bluetooth signal monitoring circuit to the physical layer, the LL state machine can be combined with... Figure 4 Explanation: Figure 5 A schematic diagram of the LL state machine in the Bluetooth broadcast packet detection method provided by this invention. (See diagram below.) Figure 5 As shown, since the arrival time of the same-frequency broadcast signal is completely independent of the time of the broadcast packet currently being received, the LL state machine may detect a new broadcast packet during the access code synchronization, header reception, and payload reception stages. At this time, the LL state machine must be reset to return to the access code synchronization state.
[0053] Specifically, if a new broadcast packet appears before the access code is synchronized, there is no need to reset the LL state, because the initial state of packet reception is already the access code synchronized state. If a new broadcast packet appears during the header and payload reception stages, since the header and payload are directly written to the receive memory after dewhitening following PHY demodulation, the receive memory must be cleared upon the appearance of a new packet; otherwise, the residual content will be read by the software, affecting the upper-layer application process.
[0054] More specifically, the corresponding actions when a new Bluetooth broadcast packet is received at different stages are as follows: Access code stage: When the scanning node is in the access code stage of receiving the broadcast packet of the remote device, and receives the information of the Bluetooth broadcast packet to be detected, it determines whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the state machine of the physical layer is reset, the demodulation context of the broadcast packet of the remote device is stopped, the physical layer enters a new demodulation state, and the Bluetooth broadcast packet to be detected sent by the near device is demodulated. If the energy of the Bluetooth broadcast packet to be detected is less than a preset value, demodulation of the broadcast packet from the remote device continues.
[0055] During the packet header reception or payload demodulation stage, when the scanning node is in the packet header reception or payload reception and demodulation stage of receiving broadcast packets from the remote device, when receiving the incoming information of the Bluetooth broadcast packet to be detected, it determines whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the state machine of the physical layer is reset, the demodulation context of the broadcast packet of the remote device is stopped, the physical layer enters a new demodulation state, and the Bluetooth broadcast packet to be detected sent by the near device is demodulated. If the energy of the Bluetooth broadcast packet to be detected is less than a preset value, the reception of the Bluetooth broadcast packet to be detected will be abandoned.
[0056] Optionally, when the link layer state machine detects incoming Bluetooth broadcast packet information during the access code synchronization phase, packet header reception phase, or payload reception phase, the link layer state machine is reset. When the link layer state machine detects incoming information of the Bluetooth broadcast packet to be detected during the header reception phase or payload reception phase, it clears the memory and receives the Bluetooth broadcast packet to be detected.
[0057] In this solution, a signal monitoring circuit is added to the Bluetooth physical layer. When a larger energy broadcast packet is detected, the reception of small energy broadcast packets is stopped, and the Bluetooth LL and PHY layer state machines are reset to receive the large energy packet. Compared with the traditional approach, one more broadcast packet is received in this time period. Since this type of conflict has a very high probability of occurring in a Mesh flooding network, the overall scanning success rate will be greatly improved. More specifically, through actual experiments, the scanning success rate can be improved by about 50%, thereby improving the throughput and stability of the Bluetooth Mesh network.
[0058] Based on the same idea, the present invention also provides a Bluetooth broadcast packet detection device. Figure 6 This is a schematic diagram of the Bluetooth broadcast packet detection device provided by the present invention. The device is applied to a Bluetooth system, which includes a host and a controller; the controller includes a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; as shown... Figure 6 As shown, the device may include: The Bluetooth broadcast packet receiving module 610 is used for the scanning node to receive the Bluetooth broadcast packet information to be detected; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving the broadcast packet from the remote device; The judgment module 620 is used to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device. The Bluetooth broadcast packet receiving module 630 is used to stop receiving broadcast packets from the remote device, reset the state machines of the link layer and the physical layer, and receive the Bluetooth broadcast packet under test if the energy of the Bluetooth broadcast packet under test is greater than or equal to a preset value.
[0059] based on Figure 6 The device may also include specific implementation units: Optionally, the determination module 620 can be specifically used for: Determine whether the energy of the Bluetooth broadcast packet to be detected meets the following requirement: P new ≥P current +C / I co-channel , where P new For the energy of the newly received broadcast signal, P current C / I represents the energy of the broadcast signal being received. co-channel This represents the Bluetooth physical layer's ability to resist interference from signals on the same channel.
[0060] Optional, Figure 6In the device, the frame structure of Bluetooth Low Energy broadcast can include four main parts: preamble, access code, header, and payload. When the Bluetooth broadcast packet to be detected is received, the scanning node is at any stage of receiving the broadcast packet from the remote device. The any stage includes the preamble stage, the access code stage, the header reception stage, or the payload reception stage. The preamble stage is used to detect the newly received Bluetooth broadcast packet to be detected.
[0061] Optional, Figure 6 In the device, when the scanning node is in the access code stage of receiving the broadcast packet of the remote device and receives the information of the Bluetooth broadcast packet to be detected, it determines whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the state machine of the physical layer is reset, the demodulation context of the broadcast packet of the remote device is stopped, the physical layer enters a new demodulation state, and the Bluetooth broadcast packet to be detected sent by the near device is demodulated. If the energy of the Bluetooth broadcast packet to be detected is less than a preset value, demodulation of the broadcast packet from the remote device continues.
[0062] Optional, Figure 6 In the device, when the scanning node is in the header reception or payload reception and demodulation stage of receiving the broadcast packet of the remote device, and receives the information of the Bluetooth broadcast packet to be detected, it determines whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the state machine of the physical layer is reset, the demodulation context of the broadcast packet of the remote device is stopped, the physical layer enters a new demodulation state, and the Bluetooth broadcast packet to be detected sent by the near device is demodulated. If the energy of the Bluetooth broadcast packet to be detected is less than a preset value, the reception of the Bluetooth broadcast packet to be detected will be abandoned.
[0063] Optional, Figure 6 In the device, when the state machine of the link layer detects the incoming information of the Bluetooth broadcast packet to be detected during the access code synchronization stage, the packet header reception stage, and the payload reception stage, the state machine of the link layer is reset. When the link layer state machine detects incoming information of the Bluetooth broadcast packet to be detected during the header reception phase or payload reception phase, it clears the memory and receives the Bluetooth broadcast packet to be detected.
[0064] Figure 6 The device may further include: The filtering module is used to filter the newly received Bluetooth broadcast packets to be detected using a low-pass filter to remove interference signals; The detection module is used to continue periodically detecting and measuring the energy jump characteristics of the Bluetooth broadcast packet to be detected after removing interference signals.
[0065] Based on the same idea, this specification also provides a Bluetooth broadcast packet detection device. Figure 7 This is a schematic diagram of the Bluetooth broadcast packet detection device provided by the present invention. The device is applied to a Bluetooth system, which includes a host and a controller; the controller includes a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; it may include: A communication unit / interface is used for the scanning node to receive information from Bluetooth broadcast packets to be detected; the Bluetooth broadcast packets to be detected are broadcast packets that meet the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving broadcast packets from a remote device; A processing unit / processor is used to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, stop receiving broadcast packets from the remote device, reset the state machines of the link layer and the physical layer, and then receive the Bluetooth broadcast packet to be detected.
[0066] like Figure 7 As shown, the terminal device described above may also include a communication line. The communication line may include a path for transmitting information between the components described above.
[0067] Optional, such as Figure 7 As shown, the terminal device may further include a memory. The memory stores computer execution instructions for implementing the present invention, and the execution is controlled by a processor. The processor executes the computer execution instructions stored in the memory, thereby implementing the method provided in the embodiments of the present invention.
[0068] like Figure 7As shown, the memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these. The memory can exist independently and be connected to the processor via communication lines. The memory can also be integrated with the processor.
[0069] Optionally, the computer execution instructions in the embodiments of the present invention may also be referred to as application code, and the embodiments of the present invention do not specifically limit this.
[0070] In a specific implementation, as one example, such as Figure 7 As shown, a processor may include one or more CPUs, such as Figure 7 CPU0 and CPU1 in the CPU.
[0071] In a specific implementation, as one example, such as Figure 7 As shown, the terminal device may include multiple processors, such as Figure 7 The processors in the system. Each of these processors can be a single-core processor or a multi-core processor.
[0072] The foregoing mainly describes the solutions provided by the embodiments of the present invention from the perspective of the interaction between various modules. It is understood that each module, in order to achieve the above functions, includes corresponding hardware structures and / or software units for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0073] The embodiments of the present invention can divide functional modules according to the above method examples. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in the embodiments of the present invention is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0074] The processor described in this specification may also function as a memory. The memory stores computer execution instructions for carrying out the present invention, and its execution is controlled by the processor. The processor executes the computer execution instructions stored in the memory, thereby implementing the method provided in the embodiments of the present invention.
[0075] The memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these. The memory can exist independently and be connected to the processor via communication lines. The memory can also be integrated with the processor.
[0076] Optionally, the computer execution instructions in the embodiments of the present invention may also be referred to as application code, and the embodiments of the present invention do not specifically limit this.
[0077] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0078] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed invention. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0079] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely exemplary descriptions of the invention as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A method for detecting Bluetooth broadcast packets, characterized in that, The method is applied to a Bluetooth system, which includes a host and a controller; the controller includes a host control interface, a link layer, and a physical layer. A Bluetooth signal monitoring circuit has been added to the physical layer; the method includes: The scanning node receives information from the Bluetooth broadcast packet to be detected. The Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving broadcast packets from the remote device; the preamble of the BLE broadcast packet is one of the two sequences 01010101 or 10101010. Determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet from the remote device. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, reset the state machine of the link layer and the physical layer, stop the demodulation context of the broadcast packet of the remote device, and receive the Bluetooth broadcast packet to be detected.
2. The method according to claim 1, characterized in that, The step of determining whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value specifically includes: Determine whether the energy of the Bluetooth broadcast packet to be detected meets the following requirement: P new ≥P current +C / I co-channel , where P new For the energy of the newly received broadcast signal, P current C / I represents the energy of the broadcast signal being received. co-channel This represents the Bluetooth physical layer's ability to resist interference from other channels.
3. The method according to claim 1, characterized in that, The frame structure of Bluetooth Low Energy broadcast includes four main parts: preamble, access code, header, and payload. When the Bluetooth broadcast packet to be detected is received, the scanning node is at any stage of receiving the broadcast packet from the remote device. The any stage includes the preamble stage, the access code stage, the header reception stage, or the payload reception stage. The preamble stage is used to detect the newly received Bluetooth broadcast packet to be detected.
4. The method according to claim 3, characterized in that, When the scanning node is in the access code stage of receiving the broadcast packet of the remote device, and receives the information of the Bluetooth broadcast packet to be detected, it determines whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the state machine of the physical layer is reset, the demodulation context of the broadcast packet of the remote device is stopped, the physical layer enters a new demodulation state, and the Bluetooth broadcast packet to be detected sent by the near device is demodulated. If the energy of the Bluetooth broadcast packet to be detected is less than a preset value, demodulation of the broadcast packet from the remote device continues.
5. The method according to claim 3, characterized in that, When the scanning node is in the header reception or payload reception and demodulation stage of receiving the broadcast packet of the remote device, and receives the information of the Bluetooth broadcast packet to be detected, it determines whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the state machine of the physical layer is reset, the demodulation context of the broadcast packet of the remote device is stopped, the physical layer enters a new demodulation state, and the Bluetooth broadcast packet to be detected sent by the near device is demodulated. If the energy of the Bluetooth broadcast packet to be detected is less than a preset value, the reception of the Bluetooth broadcast packet to be detected will be abandoned.
6. The method according to claim 3, characterized in that, When the link layer state machine detects incoming Bluetooth broadcast packet information during the access code synchronization phase, header reception phase, or payload reception phase, the link layer state machine is reset. When the link layer state machine detects incoming information of the Bluetooth broadcast packet to be detected during the header reception phase or payload reception phase, it clears the memory and receives the Bluetooth broadcast packet to be detected.
7. The method according to claim 1, characterized in that, Before determining whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, the method further includes: A low-pass filter is used to filter the newly received Bluetooth broadcast packets to be detected, removing interference signals; The Bluetooth broadcast packet to be detected, after removing interference signals, will continue to be tested for periodicity and energy jump characteristics.
8. A Bluetooth broadcast packet detection device, characterized in that, The device is applied to a Bluetooth system, which includes a host and a controller; the controller includes a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; the device includes: The Bluetooth broadcast packet receiving module is used by the scanning node to receive the Bluetooth broadcast packet receiving information; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving the broadcast packet from the remote device; the preamble of the BLE broadcast packet is one of the two sequences 01010101 or 10101010. The judgment module is used to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device. The Bluetooth broadcast packet receiving module is configured to, if the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, reset the state machine of the link layer and the physical layer, stop the demodulation context of the broadcast packet of the remote device, and receive the Bluetooth broadcast packet to be detected.
9. A Bluetooth broadcast packet detection device, characterized in that, The device is used in a Bluetooth system, which includes a host and a controller; the controller includes a host control interface, a link layer, and a physical layer; a Bluetooth signal monitoring circuit is added to the physical layer; the device includes: A communication unit / interface is used for the scanning node to receive information from a Bluetooth broadcast packet to be detected; the Bluetooth broadcast packet to be detected is a broadcast packet that meets the periodicity and energy jump characteristics detected by the Bluetooth signal monitoring circuit; the scanning node is receiving a broadcast packet from a remote device; the preamble of the BLE broadcast packet is one of the two sequences 01010101 or 10101010. A processing unit / processor is used to determine whether the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value; the preset value is greater than or equal to the energy of the broadcast packet of the remote device. If the energy of the Bluetooth broadcast packet to be detected is greater than or equal to a preset value, reset the state machine of the link layer and the physical layer, stop the demodulation context of the broadcast packet of the remote device, and receive the Bluetooth broadcast packet to be detected.
10. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed, implement the Bluetooth broadcast packet detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data communication method, Bluetooth beacon repeater and Bluetooth positioning system
CN108289294A
Method and device for realizing wireless network connection based on low-power-consumption Bluetooth broadcast
CN114650522A