Bluetooth communication method of Bluetooth mesh network and Bluetooth node
By electing a supplementary broadcast channel and transmitting data synchronously in a Bluetooth mesh network, the problem of Bluetooth mesh networks being susceptible to interference is solved, and communication reliability and anti-interference capabilities are improved.
Patent Information
- Application Number
- CN202511561931.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-09
AI Technical Summary
Bluetooth mesh networks are susceptible to interference from the usage environment and other Bluetooth devices, leading to reduced communication reliability.
In a Bluetooth mesh network, a supplementary broadcast channel is elected, broadcast data is transmitted synchronously through the standard Bluetooth broadcast channel and the supplementary broadcast channel, and multiple channels are listened to in a loop on the receiving node to ensure data reception, and the channel is dynamically adjusted to deal with interference.
It significantly reduces packet loss rate, improves communication reliability, and enhances the network's anti-interference ability in complex environments.
Smart Images

Figure CN121310106A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a Bluetooth communication method and Bluetooth node for a Bluetooth mesh network. Background Technology
[0002] In related technologies, Bluetooth mesh networks can be used in control, monitoring, and automation systems where hundreds or thousands of nodes need to communicate with each other. Bluetooth mesh networks can meet the demands for rapid deployment in commercial and industrial environments, as well as the extreme requirements for network performance and security. As the cost of Bluetooth modules gradually decreases, the application of Bluetooth mesh networks in the control field is growing rapidly.
[0003] Bluetooth mesh networks communicate entirely through broadcasting. Data is transmitted simultaneously on the three broadcast channels specified in the Bluetooth protocol, and the receiving end also needs to listen to these three channels at the same time.
[0004] With the increasing number of Bluetooth devices, the three Bluetooth broadcast channels are becoming increasingly congested. If a Bluetooth mesh network is used for connectivity between outdoor devices, connection reliability becomes extremely important due to the long distances between Bluetooth nodes. If Bluetooth communication is interfered with by other Bluetooth devices or other devices on the 2.4 GHz band, the reliability of the Bluetooth mesh network will decrease.
[0005] There is still no effective solution to the problem that Bluetooth mesh networks are susceptible to interference from the usage environment and other Bluetooth devices, which leads to reduced communication reliability. Summary of the Invention
[0006] To address this issue, this application provides a Bluetooth communication method and Bluetooth node for a Bluetooth mesh network, thereby overcoming the problem in the prior art where Bluetooth mesh networks are susceptible to interference from the usage environment and other Bluetooth devices, leading to reduced communication reliability.
[0007] To achieve the above objectives, according to a first aspect of the embodiments of this application, a Bluetooth communication method for a Bluetooth mesh network is provided, comprising: when the Bluetooth mesh network is successfully established, electing a supplementary broadcast channel from a plurality of non-standard Bluetooth broadcast channels in the Bluetooth mesh network, wherein the Bluetooth mesh network includes a plurality of Bluetooth broadcast channels, the plurality of Bluetooth broadcast channels including a plurality of standard Bluetooth broadcast channels and the plurality of non-standard Bluetooth broadcast channels, and a plurality of Bluetooth nodes included in the Bluetooth mesh network performing Bluetooth communication at least through the plurality of standard Bluetooth broadcast channels; sending first channel information of the supplementary broadcast channel to the plurality of Bluetooth nodes; and when a sending node has broadcast data to be broadcast, synchronously sending the broadcast data through the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel, wherein the plurality of Bluetooth nodes includes the sending node.
[0008] In an optional embodiment, after the broadcast data is transmitted synchronously through the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel, the method further includes: when the receiving node is waiting to receive the broadcast data, cyclically listening to the data on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel until the broadcast data is received, wherein the plurality of Bluetooth nodes includes the receiving node.
[0009] In an optional embodiment, selecting a supplementary broadcast channel from multiple Bluetooth broadcast channels in the Bluetooth mesh network includes: when the Bluetooth mesh network is an independent network, initiating a channel detection request through a preset proxy node among the multiple Bluetooth nodes, wherein the channel detection request is used to request the channel energy of the multiple non-standard Bluetooth broadcast channels, and determine the idlest channel from the multiple non-standard Bluetooth broadcast channels based on the multiple channel energy; the proxy node counts the idlest channels reported by the multiple Bluetooth nodes, and determines the target idlest channel with the highest frequency of occurrence as the supplementary broadcast channel.
[0010] In one optional embodiment, selecting a supplementary broadcast channel from multiple Bluetooth broadcast channels in the Bluetooth mesh network includes: if the Bluetooth mesh network is a non-standalone network, determining a gateway node in the Bluetooth mesh network; detecting the channel energy of the multiple non-standard Bluetooth broadcast channels through the gateway node, and determining the supplementary broadcast channel from the multiple non-standard Bluetooth broadcast channels based on the multiple channel energies, wherein the channel energy of the supplementary broadcast channel is the lowest among the multiple channel energies.
[0011] In one optional embodiment, probing the channel energy of the plurality of non-standard Bluetooth broadcast channels through the gateway node includes: obtaining a plurality of second channel information from a channel blacklist; and prohibiting channel energy probing of the non-standard Bluetooth broadcast channels corresponding to the plurality of second channel information during the process of probing the channel energy of the plurality of non-standard Bluetooth broadcast channels.
[0012] In an optional embodiment, the method further includes: periodically re-electing the supplementary broadcast channel among the plurality of non-standard Bluetooth broadcast channels according to a preset period; and, in the case of re-electing the supplementary broadcast channel, sending the third channel information of the updated supplementary broadcast channel to the plurality of Bluetooth nodes.
[0013] In one optional embodiment, the supplementary broadcast channel is periodically re-elected among the plurality of non-standard Bluetooth broadcast channels according to a preset period, including: if the target Bluetooth broadcast channel among the plurality of non-standard Bluetooth broadcast channels is elected as the supplementary broadcast channel in the first period, the target Bluetooth broadcast channel is prohibited from re-electing the supplementary broadcast channel until the second period is reached, wherein the time interval between the second period and the first period is greater than a preset time threshold.
[0014] According to a second aspect of the embodiments of this application, a Bluetooth node in a Bluetooth mesh network is also provided, comprising: a channel measurement module, configured to measure the channel energy of a plurality of non-standard Bluetooth broadcast channels in real time, wherein the plurality of non-standard Bluetooth broadcast channels are Bluetooth broadcast channels other than the plurality of standard Bluetooth broadcast channels among the plurality of Bluetooth broadcast channels in the Bluetooth mesh network, and the plurality of Bluetooth nodes included in the Bluetooth mesh network communicate via at least the plurality of standard Bluetooth broadcast channels; a channel decision module, connected to the channel measurement module, configured to determine a supplementary broadcast channel among the plurality of non-standard Bluetooth broadcast channels based on the plurality of channel energy; a broadcast transmission module, configured to synchronously transmit broadcast data on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel; a broadcast reception module, configured to perform cyclic listening on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel and receive the broadcast data; and a channel update module, configured to periodically trigger the re-election of the supplementary broadcast channel.
[0015] According to a third aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute a Bluetooth communication method for a Bluetooth mesh network as described in the first aspect through the computer program.
[0016] According to a fourth aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the Bluetooth communication method of the Bluetooth mesh network as described in the first aspect.
[0017] Compared with existing technologies, this application, after the network is established, selects the cleanest and least interfered channel from the non-standard broadcast channels as a supplementary broadcast channel. This newly arrived supplementary broadcast channel information is then broadcast to all Bluetooth nodes. No additional connection needs to be established, and the original broadcast logic is not disrupted. When data needs to be broadcast subsequently, the sending node synchronously sends the exact same message on both the original standard Bluetooth broadcast channel and the newly selected supplementary Bluetooth broadcast channel. The receiving node polls and listens on these channels until it receives the message. Using this scheme, if any channel is interfered with, there are other channels to fall back on, significantly reducing packet loss and improving communication reliability. This solves the problem in related technologies where Bluetooth mesh networks are easily affected by interference from the usage environment and other Bluetooth devices, leading to reduced communication reliability.
[0018] It should be understood that the description in the Summary Section is not intended to limit the key or essential features of the embodiments of this application, nor is it intended to restrict the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0019] The above and other features, advantages, and aspects of the embodiments of this application will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of the application. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0020] Figure 1 This is a flowchart illustrating an optional Bluetooth communication method for a Bluetooth mesh network according to an embodiment of this application.
[0021] Figure 2 This is a schematic diagram of an optional standalone Bluetooth mesh network according to an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of an optional Bluetooth mesh network with a Cellular module according to an embodiment of this application.
[0023] Figure 4 This is a schematic diagram illustrating the scanning and transmission principle of an optional Bluetooth broadcast communication according to an embodiment of this application.
[0024] Figure 5 This is a flowchart of an optional method for determining a supplementary broadcast channel in a standalone Bluetooth mesh network, according to an embodiment of this application.
[0025] Figure 6 This is a flowchart of an optional supplementary broadcast channel determination method for a Bluetooth mesh network with a gateway node, according to an embodiment of this application.
[0026] Figure 7This is a schematic diagram illustrating an optional supplementary Bluetooth broadcast channel operation mode according to an embodiment of this application;
[0027] Figure 8 This is a structural block diagram of a Bluetooth node in an optional Bluetooth mesh network according to an embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0030] To address the technical problems existing in related technologies, this embodiment provides a Bluetooth communication method for Bluetooth mesh networks. Figure 1 This is a flowchart of a Bluetooth communication method for a Bluetooth mesh network according to an embodiment of this application. The process includes the following steps:
[0031] Step S102: If the Bluetooth mesh network is successfully established, a supplementary broadcast channel is elected from the multiple non-standard Bluetooth broadcast channels of the Bluetooth mesh network. The Bluetooth mesh network includes multiple Bluetooth broadcast channels, including multiple standard Bluetooth broadcast channels and the multiple non-standard Bluetooth broadcast channels. The multiple Bluetooth nodes included in the Bluetooth mesh network communicate via Bluetooth at least through the multiple standard Bluetooth broadcast channels.
[0032] Step S104: Send the first channel information of the supplementary broadcast channel to the plurality of Bluetooth nodes;
[0033] Step S106: When there is broadcast data to be broadcast at the transmitting node, the broadcast data is transmitted synchronously through the multiple standard Bluetooth broadcast channels and the supplementary broadcast channel, wherein the multiple Bluetooth nodes include the transmitting node.
[0034] Through the above steps, after the network is built, this application selects the cleanest and least interfered channel from the non-standard broadcast channels as a supplementary broadcast channel. This newly arrived supplementary broadcast channel information is then broadcast to all Bluetooth nodes without establishing additional connections or disrupting the original broadcast logic. When data needs to be broadcast subsequently, the sending node synchronously sends the exact same message on both the original standard Bluetooth broadcast channel and the newly selected supplementary Bluetooth broadcast channel. The receiving node polls and listens on these channels until it receives the message. Using this scheme, if any channel is interfered with, there are other channels to fall back on, significantly reducing packet loss and improving communication reliability. This solves the problem in related technologies where Bluetooth mesh networks are easily affected by interference from the usage environment and other Bluetooth devices, leading to reduced communication reliability.
[0035] Optionally, after synchronously transmitting the broadcast data through the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel, the method further includes: when the receiving node is waiting to receive the broadcast data, cyclically listening to the data on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel until the broadcast data is received, wherein the plurality of Bluetooth nodes includes the receiving node.
[0036] The sending node simultaneously transmits the same data on three fixed channels (37 / 38 / 39, equivalent to the aforementioned standard Bluetooth broadcast channels) plus a newly selected supplementary channel (i.e., the aforementioned supplementary broadcast channel). The receiving node arranges these four channels into a polling list and listens to them sequentially starting from channel 37. As soon as a complete message is captured on any of these channels, the scanning stops and the receiving node processes it immediately.
[0037] Example 1: In a shopping mall lighting network, Wi-Fi occupies channel 38. Lighting nodes receive switch commands on channels 37 / 39 / supplementary channels. Interference on channel 38 is automatically bypassed, resulting in zero-delay lighting control. Example 2: In a factory warehouse, forklift Bluetooth tags broadcast their location every minute. Channel 37 is weakened by reflections from metal shelves. The receiving gateway captures data during the fourth scan of the supplementary channel, maintaining real-time inventory records.
[0038] Four-channel parallel monitoring expands the original three congested channels into four dynamic channels, allowing interference channels to be skipped in real time, improving data arrival rate and enhancing network reliability.
[0039] Optionally, selecting a supplementary broadcast channel from multiple Bluetooth broadcast channels in the Bluetooth mesh network includes: when the Bluetooth mesh network is an independent network, initiating a channel detection request through a preset proxy node among the multiple Bluetooth nodes, wherein the channel detection request is used to request the channel energy of the multiple non-standard Bluetooth broadcast channels, and determine the idlest channel from the multiple non-standard Bluetooth broadcast channels based on the multiple channel energies; the proxy node counts the idlest channels reported by the multiple Bluetooth nodes, and determines the target idlest channel with the highest frequency of occurrence as the supplementary broadcast channel.
[0040] When the Bluetooth mesh network operates in standalone mode, the selection process for its supplementary broadcast channel is as follows: First, a pre-defined proxy node in the network initiates a channel detection request. Upon receiving this request, each Bluetooth node in the network begins to detect the channel energy of several non-standard Bluetooth broadcast channels in addition to the standard Bluetooth broadcast channels (37, 38, 39). Based on the detection results, each node autonomously selects the channel it considers to be the least busy from these non-standard channels and feeds this selection back to the proxy node. The proxy node is responsible for collecting the least busy channel information from all nodes and performing statistical analysis. Finally, the target channel that appears most frequently in the statistical results is determined as the supplementary broadcast channel used by the entire network.
[0041] The technical solution of this embodiment will be further explained below with reference to two specific examples:
[0042] 1. In a standalone Bluetooth Mesh network for park lighting control, a pre-defined proxy node (such as a main light located in the center of the park) initiates a channel election. Each street light node detects the surrounding channel conditions, and most nodes report that channel 20 has the least interference. After statistical analysis, the proxy nodes determine channel 20 as a supplementary broadcast channel. Subsequently, all nodes use channel 20 for broadcasting in addition to the original three standard channels, significantly reducing random interference caused by Bluetooth connections from tourists' mobile phones.
[0043] 2. In a sensor network within an agricultural greenhouse, proxy nodes periodically initiate channel elections. During a specific period, the activation of the wireless controller for the automatic irrigation system within the greenhouse interferes with the previously used supplementary channel. In the next election, each sensor node detects that channel 25 is less busy. Based on this, the proxy nodes update their network configuration, switching the supplementary broadcast channel to channel 25, thereby ensuring the continuity of environmental data acquisition.
[0044] This embodiment uses a mechanism that combines distributed detection with centralized decision-making, enabling an independent Bluetooth mesh network to autonomously and dynamically elect the channel with the least interference as a supplementary broadcast channel, effectively improving the network's anti-interference capability and communication reliability in complex outdoor environments.
[0045] Optionally, selecting a supplementary broadcast channel from multiple Bluetooth broadcast channels in the Bluetooth mesh network includes: if the Bluetooth mesh network is a non-standalone network, determining a gateway node in the Bluetooth mesh network; detecting the channel energy of the multiple non-standard Bluetooth broadcast channels through the gateway node, and determining the supplementary broadcast channel from the multiple non-standard Bluetooth broadcast channels based on the multiple channel energies, wherein the channel energy of the supplementary broadcast channel is the lowest among the multiple channel energies.
[0046] In a Bluetooth mesh network that is a non-standalone network with a gateway, the first step is to identify the gateway node responsible for communicating with external networks (such as the cloud). This gateway node actively probes the channel energy of several non-standard Bluetooth broadcast channels, in addition to the standard Bluetooth broadcast channels (37, 38, and 39). The gateway node compares all the probed channel energy data and selects the non-standard channel with the lowest energy, designating it directly as a supplementary broadcast channel for the entire network.
[0047] Example explanation:
[0048] 1. In an outdoor billboard control system connected via a CAT.1 gateway, the gateway node periodically scans all Bluetooth channels and finds that the background noise energy of channel 18 is significantly lower than that of other non-standard channels. It then notifies all billboard control nodes in the network to use channel 18 as the supplementary broadcast channel for this broadcast.
[0049] 2. For a smart street light network managed by a gateway, when the gateway detects that the original supplementary broadcast channel is affected by interference from a newly deployed Wi-Fi router in the vicinity, causing an increase in energy, it immediately re-probes and selects the channel 26 with lower energy as the new supplementary broadcast channel, and sends this change to all street light nodes.
[0050] This embodiment enables centralized channel detection and decision-making by gateway nodes, which can efficiently and quickly select the optimal channel with the least interference for the Bluetooth node group under its management as a supplementary broadcast channel. It is especially suitable for network scenarios with a centralized management architecture, effectively improving the efficiency of network management and the reliability of communication.
[0051] It should be noted that outdoor Bluetooth mesh network applications can be standalone networks or networks with cellular modules that can connect to the cloud (i.e., the aforementioned non-standalone networks).
[0052] An independent Bluetooth mesh network (i.e., the Bluetooth mesh network mentioned above) can operate autonomously after being networked. There are many ways to set up the network, such as completing the network setup at the factory or using a mobile app at the installation site. When the network is running, network control behaviors can be set based on the output of the pre-defined scene control port, or through data sent by sensors. Figure 2 As shown.
[0053] In a Bluetooth mesh network with a Cellular module, some nodes will have both a Cellular module and a Bluetooth module. This enables the entire network to communicate with the cloud, report network status, and receive commands from the cloud. Figure 3 As shown.
[0054] Optionally, detecting the channel energy of the plurality of non-standard Bluetooth broadcast channels through the gateway node includes: obtaining multiple second channel information from the channel blacklist; and prohibiting channel energy detection of the non-standard Bluetooth broadcast channels corresponding to the multiple second channel information during the process of detecting the channel energy of the plurality of non-standard Bluetooth broadcast channels.
[0055] In this embodiment, the gateway node pre-acquires a channel blacklist before probing the channel energy of non-standard Bluetooth broadcast channels. This blacklist contains information on several prohibited secondary channels. Subsequently, during the channel energy probing process, the gateway node automatically skips these blacklisted channels, avoiding energy probing and evaluation of them.
[0056] Example explanation:
[0057] 1. In a Bluetooth Mesh network at a factory, channels 20 and 22 are known to be long-term occupied by large, fixed wireless devices within the factory. The network administrator has pre-added these channels to a blacklist. When the gateway node selects supplementary broadcast channels for the network, it will directly ignore channels 20 and 22, and only probe from other available channels and select the one with the lowest energy, effectively avoiding conflicts with fixed interference sources.
[0058] 2. In a smart agriculture application, to avoid interference with ZigBee systems that also operate in the 2.4GHz band, the gateway node's blacklist pre-configures several commonly used ZigBee channels. During detection, the gateway automatically avoids these channels, ensuring that the selected supplementary broadcast channels do not affect the existing ZigBee network, while also guaranteeing its own communication quality.
[0059] This embodiment introduces a channel blacklist mechanism, enabling the gateway to proactively avoid known interfered or disabled channels when electing supplementary broadcast channels. This improves the efficiency and accuracy of channel election and fundamentally guarantees the availability and communication reliability of the selected supplementary channels.
[0060] In one exemplary embodiment, the method further includes: periodically re-electing the supplementary broadcast channel among the plurality of non-standard Bluetooth broadcast channels according to a preset period; and, in the case of re-electing the supplementary broadcast channel, sending the third channel information of the updated supplementary broadcast channel to the plurality of Bluetooth nodes.
[0061] During the operation of the Bluetooth mesh network, the system periodically initiates a re-election process for supplementary broadcast channels according to a preset time interval. This process re-executes the aforementioned channel energy detection and election mechanism to determine the optimal channel under the current environment. After successfully electing a new supplementary broadcast channel, the system promptly sends the updated third channel information to all Bluetooth nodes in the network to guide their subsequent broadcast communication behavior.
[0062] This embodiment enables the Bluetooth mesh network to dynamically adapt to the constantly changing wireless environment through a periodic channel reselection and update mechanism, effectively tracking fluctuations in interference conditions, thereby maintaining the best performance of the communication link and the overall robustness of the network in the long term.
[0063] Optionally, the supplementary broadcast channel is periodically re-elected among the plurality of non-standard Bluetooth broadcast channels according to a preset period, including: if the target Bluetooth broadcast channel among the plurality of non-standard Bluetooth broadcast channels is elected as the supplementary broadcast channel in the first period, the target Bluetooth broadcast channel is prohibited from re-electing the supplementary broadcast channel until the second period is reached, wherein the time interval between the second period and the first period is greater than a preset time threshold.
[0064] During the periodic re-election of supplementary broadcast channels in a Bluetooth mesh network, if a target Bluetooth broadcast channel is selected as a supplementary broadcast channel in the first election cycle, that channel will be temporarily prohibited from being re-elected for several subsequent election cycles. This prohibition will continue until the second election cycle, and the time interval between the first and second cycles must be greater than a system-preset time threshold.
[0065] This embodiment effectively avoids the risk of interference that may accumulate due to the network being locked to a single channel for a long time by introducing a "cooling-off period" mechanism after the channel is selected. It promotes the rotation of channel resources and thus improves the network's robustness against long-term and gradual interference.
[0066] In an alternative embodiment, it is assumed that whether it is a standalone Bluetooth mesh network or a Bluetooth mesh network with a gateway, the network has been formed, all nodes have joined the network and are able to communicate with each other.
[0067] Bluetooth mesh networks communicate using designated channels 37, 38, and 39 via broadcast. The sender needs to transmit data sequentially on these three channels, and the receiver needs to listen for data on these three channels repeatedly. The specific broadcast communication principle is as follows: Figure 4 As shown.
[0068] Bluetooth nodes are in a listening state when they are not sending data, and each scanning serial port can listen to data on one channel. Figure 4 The scanning window is the time window for node listening. During the broadcast interval, the Bluetooth node sending data will send it sequentially on three broadcast channels: 37, 38, and 39. Each message will be sent for three consecutive broadcast intervals so that the receiver can listen for it.
[0069] However, even with anti-interference measures in place for broadcast communication, Bluetooth broadcast messages are still susceptible to interference because they are transmitted on these three channels. Due to the long communication distances and relatively sparse network node deployment in outdoor Bluetooth mesh networks, the reliability of Bluetooth communication becomes a critical factor in network performance. When these three Bluetooth broadcast channels are subjected to external interference, network communication data loss is highly likely.
[0070] To address the aforementioned issues, this application also proposes an optional method utilizing supplementary broadcast channels to reduce interference during outdoor Bluetooth communication and improve the communication reliability of Bluetooth mesh networks. The specific method is as follows:
[0071] It is necessary to determine which channel to select as the supplementary broadcast channel. For a standalone Bluetooth mesh network, a group negotiation method can be used to select a relatively idle channel, the process of which is as follows: Figure 5 As shown.
[0072] Because Bluetooth nodes in an independent Bluetooth mesh network are completely equal, a node can be designated to supplement broadcast channel requests and announcements. This node can be set at the factory or selected by a mobile app. We call this node a proxy node.
[0073] 1. The proxy node initiates a request to select a supplementary broadcast channel;
[0074] 2. When a Bluetooth node receives a request, it detects the Bluetooth channel energy around the node, finds the least active channel other than the three broadcast channels, and returns the information of this channel to the agent node.
[0075] 3. The proxy node collects all returned information and selects an idle channel. After all Bluetooth nodes have returned information, the proxy node uses the channel with the highest frequency as a supplementary broadcast channel.
[0076] 4. Notify all Bluetooth nodes of this final decision (i.e., the elected supplementary broadcast channel).
[0077] 5. Periodically perform this group negotiation to find supplementary broadcast channels in order to adapt to changes in the environment.
[0078] For Bluetooth mesh networks with gateway nodes (i.e., the aforementioned non-standalone networks), the supplementary broadcast channel can be determined by the gateway node and communicated to all Bluetooth nodes. The specific process is as follows: Figure 6 As shown:
[0079] A gateway node is typically responsible for managing a certain number of Bluetooth nodes, which can be referred to as a group.
[0080] 1. The gateway node periodically checks the energy values of all Bluetooth channels;
[0081] 2. Select the least busy channel other than the three broadcast channels and designate it as the supplementary broadcast channel;
[0082] 3. Notify all Bluetooth nodes in the group of this channel. Upon receiving the notification from the gateway node, the Bluetooth nodes in the group will update their own supplementary broadcast channel information.
[0083] 4. Once the supplementary broadcast channel for the Bluetooth network is determined, subsequent supplementary broadcast channels for the Bluetooth mesh network can be appended to the three designated Bluetooth broadcast channels to transmit information. See details below. Figure 7 Each Bluetooth node broadcasts simultaneously on four broadcast channels, and Bluetooth node detection can be performed on all four channels. Although... Figure 7 It is appended to the original broadcast channel, but in practical applications, the supplementary broadcast channel can also be placed in front of the original broadcast channel.
[0084] Before broadcasting, the Bluetooth network sends a network synchronization message to ensure that Bluetooth transmission and reception are roughly aligned within the same time window. Bluetooth nodes can send information by selecting a supplementary Bluetooth broadcast channel plus two other predefined Bluetooth messages. The number of channels a Bluetooth node uses to receive information depends on the number of channels the transmitting node is using. When a transmitting node uses four channels, the receiving node also needs to scan all four channels sequentially. If the transmitting node uses two predefined broadcast channels and one supplementary broadcast channel, the receiving node only needs to listen on these three channels.
[0085] This method can significantly improve the anti-interference performance of outdoor Bluetooth mesh networks, enabling Bluetooth communication to resist random wireless interference and maintain network communication stability.
[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to 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 this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0087] Embodiments of this application also provide a Bluetooth node for a Bluetooth mesh network, such as... Figure 8 As shown, the Bluetooth node includes:
[0088] The channel measurement module 81 is used to measure the channel energy of multiple non-standard Bluetooth broadcast channels in real time. The multiple non-standard Bluetooth broadcast channels are Bluetooth broadcast channels other than the multiple standard Bluetooth broadcast channels among the multiple Bluetooth broadcast channels of the Bluetooth mesh network. The multiple Bluetooth nodes included in the Bluetooth mesh network communicate via Bluetooth at least through the multiple standard Bluetooth broadcast channels.
[0089] The channel decision module 82, connected to the channel measurement module, is used to determine a supplementary broadcast channel among the multiple non-standard Bluetooth broadcast channels based on the multiple channel energies.
[0090] Broadcast transmission module 83 is used to synchronously transmit broadcast data on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel;
[0091] The broadcast receiving module 84 is used to cyclically listen on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel, and to receive the broadcast data;
[0092] The channel update module 85 is used to periodically trigger the re-election of the supplementary broadcast channel.
[0093] By using the aforementioned Bluetooth nodes, after the network is established, this application selects the cleanest and least interfered channel from the non-standard broadcast channels as a supplementary broadcast channel. This newly arrived supplementary broadcast channel information is then broadcast to all Bluetooth nodes without establishing additional connections or disrupting the original broadcast logic. When data needs to be broadcast subsequently, the sending node synchronously sends the exact same message on both the original standard Bluetooth broadcast channel and the newly selected supplementary Bluetooth broadcast channel. The receiving node polls and listens on these channels until it receives the message. Using this scheme, if any channel is interfered with, there are other channels to fall back on, significantly reducing packet loss and improving communication reliability. This solves the problem in related technologies where Bluetooth mesh networks are easily affected by interference from the usage environment and other Bluetooth devices, leading to reduced communication reliability.
[0094] Optionally, the broadcast receiving module 84 described above is further configured to, when the receiving node is waiting to receive the broadcast data, cyclically listen to the data on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel until the broadcast data is received, wherein the plurality of Bluetooth nodes includes the receiving node.
[0095] Optionally, the channel decision module 82 is further configured to, when the Bluetooth mesh network is an independent network, initiate a channel detection request through a preset proxy node among the plurality of Bluetooth nodes, wherein the channel detection request is used to request the acquisition of the channel energy of the plurality of non-standard Bluetooth broadcast channels, and determine the idlest channel from the plurality of non-standard Bluetooth broadcast channels based on the plurality of channel energy; the proxy node counts the idlest channels reported by the plurality of Bluetooth nodes, and determines the target idlest channel with the highest frequency of occurrence as the supplementary broadcast channel.
[0096] Optionally, the channel decision module 82 is further configured to, when the Bluetooth mesh network is a non-standalone network, determine the gateway node in the Bluetooth mesh network; detect the channel energy of the plurality of non-standard Bluetooth broadcast channels through the gateway node, and determine the supplementary broadcast channel among the plurality of non-standard Bluetooth broadcast channels based on the plurality of channel energies, wherein the channel energy of the supplementary broadcast channel is the lowest among the plurality of channel energies.
[0097] Optionally, the channel measurement module 81 described above is also used to acquire multiple second channel information in the channel blacklist; during the process of detecting the channel energy of the multiple non-standard Bluetooth broadcast channels, channel energy detection is prohibited for the non-standard Bluetooth broadcast channels corresponding to the multiple second channel information.
[0098] Optionally, the channel update module 85 is further configured to periodically re-elect the supplementary broadcast channel from the plurality of non-standard Bluetooth broadcast channels according to a preset period; and in the case of re-electing the supplementary broadcast channel, send the third channel information of the updated supplementary broadcast channel to the plurality of Bluetooth nodes.
[0099] Optionally, the channel update module 85 is further configured to prevent the target Bluetooth broadcast channel from re-electing the supplementary broadcast channel in the first period when the target Bluetooth broadcast channel is elected as the supplementary broadcast channel in the plurality of non-standard Bluetooth broadcast channels, until the second period is reached, wherein the time interval between the second period and the first period is greater than a preset time threshold.
[0100] Embodiments of this application also provide a storage medium including a stored program, wherein the program, when executed, performs any of the methods described above. Optionally, in this embodiment, the storage medium may be configured to store program code for performing the steps of the methods described above.
[0101] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0102] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0103] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0104] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium storing the computer program product, wherein the computer program, when executed by a processor, implements the steps of the methods described in various embodiments of this application.
[0105] Optionally, in this embodiment, the computer program described above can be configured to implement the steps in any of the above method embodiments when executed by a processor.
[0106] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0107] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device in software or hardware. Terms such as "first," "second," etc., are used only for distinguishing descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.
[0108] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.
Claims
1. A Bluetooth communication method for a Bluetooth mesh network, characterized in that, include: When a Bluetooth mesh network is successfully established, a supplementary broadcast channel is elected from among the multiple non-standard Bluetooth broadcast channels of the Bluetooth mesh network. The Bluetooth mesh network includes multiple Bluetooth broadcast channels, including multiple standard Bluetooth broadcast channels and the multiple non-standard Bluetooth broadcast channels. The multiple Bluetooth nodes included in the Bluetooth mesh network communicate via Bluetooth at least through the multiple standard Bluetooth broadcast channels. Send the first channel information of the supplementary broadcast channel to the plurality of Bluetooth nodes; When there is broadcast data to be broadcast at the transmitting node, the broadcast data is transmitted synchronously through the multiple standard Bluetooth broadcast channels and the supplementary broadcast channel, wherein the multiple Bluetooth nodes include the transmitting node.
2. The method according to claim 1, characterized in that, After synchronously transmitting the broadcast data through the multiple standard Bluetooth broadcast channels and the supplementary broadcast channel, the method further includes: When a receiving node is waiting to receive the broadcast data, it continuously listens for data on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel until the broadcast data is received, wherein the plurality of Bluetooth nodes includes the receiving node.
3. The method according to claim 1 or 2, characterized in that, A supplementary broadcast channel is elected from among the multiple Bluetooth broadcast channels in the Bluetooth mesh network, including: When the Bluetooth mesh network is an independent network, a channel detection request is initiated through a preset proxy node among the plurality of Bluetooth nodes. The channel detection request is used to request the channel energy of the plurality of non-standard Bluetooth broadcast channels and determine the least idle channel from the plurality of non-standard Bluetooth broadcast channels based on the channel energy. The agent node counts the idlest channels reported by the multiple Bluetooth nodes and determines the target idlest channel with the highest frequency of occurrence as the supplementary broadcast channel.
4. The method according to claim 1 or 2, characterized in that, A supplementary broadcast channel is elected from among the multiple Bluetooth broadcast channels in the Bluetooth mesh network, including: In the case that the Bluetooth mesh network is a non-standalone network, the gateway node in the Bluetooth mesh network is determined; The gateway node detects the channel energy of the plurality of non-standard Bluetooth broadcast channels and determines the supplementary broadcast channel among the plurality of non-standard Bluetooth broadcast channels based on the channel energy, wherein the channel energy of the supplementary broadcast channel is the lowest among the plurality of channel energies.
5. The method according to claim 4, characterized in that, The gateway node detects the channel energy of the multiple non-standard Bluetooth broadcast channels, including: Retrieve information on multiple secondary channels from the channel blacklist; During the process of probing the channel energy of the plurality of non-standard Bluetooth broadcast channels, channel energy probing of the non-standard Bluetooth broadcast channels corresponding to the plurality of second channel information is prohibited.
6. The method according to claim 1, characterized in that, The method further includes: The supplementary broadcast channel is periodically re-elected from among the multiple non-standard Bluetooth broadcast channels according to a preset cycle; In the event of a re-election of the supplementary broadcast channel, the updated third channel information of the supplementary broadcast channel is sent to the plurality of Bluetooth nodes.
7. The method according to claim 6, characterized in that, The supplementary broadcast channel is periodically re-elected from the plurality of non-standard Bluetooth broadcast channels according to a preset period, including: If the target Bluetooth broadcast channel among the multiple non-standard Bluetooth broadcast channels is elected as the supplementary broadcast channel in the first cycle, the target Bluetooth broadcast channel is prohibited from re-electing the supplementary broadcast channel until the second cycle is reached, wherein the time interval between the second cycle and the first cycle is greater than a preset time threshold.
8. A Bluetooth node for a Bluetooth mesh network, characterized in that, include: The channel measurement module is used to measure the channel energy of multiple non-standard Bluetooth broadcast channels in real time. The multiple non-standard Bluetooth broadcast channels are Bluetooth broadcast channels other than the multiple standard Bluetooth broadcast channels among the multiple Bluetooth broadcast channels of the Bluetooth mesh network. The multiple Bluetooth nodes included in the Bluetooth mesh network communicate via Bluetooth at least through the multiple standard Bluetooth broadcast channels. A channel decision module, connected to the channel measurement module, is used to determine a supplementary broadcast channel among the multiple non-standard Bluetooth broadcast channels based on the channel energy. A broadcast transmission module is used to synchronously transmit broadcast data on the multiple standard Bluetooth broadcast channels and the supplementary broadcast channel; A broadcast receiving module is configured to continuously listen on the plurality of standard Bluetooth broadcast channels and the supplementary broadcast channel, and receive the broadcast data; The channel update module is used to periodically trigger the re-election of the supplementary broadcast channel.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 through the computer program.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.