Read a text on Bluetooth mesh network, what is "friend neighbor" and low power consumption

Bluetooth Low Energy ( Bluetooth LE ) is one of the world's highest power short-range wireless communication technologies. Its low power consumption is widely praised by developers and consumers. With the release of the Bluetooth mesh network ( Mesh ), developers may want to know if the Bluetooth grid is also designed to be low power. Does it inherit the advantages of Bluetooth LE low power?

The answer is yes! Bluetooth mesh network includes a variety of measures to optimize the power consumption, especially feature called "neighbor node (Friendship)" is.

Bluetooth mesh network standard overview

The application of the Friendship feature in a Bluetooth mesh network can be very diverse. Some products, such as lights, will be connected to the main power supply, and the power consumption of the Bluetooth mesh module is negligible compared to the power consumption of the light itself. But other products, such as smart sensors or locks, will be power limited, which means they need to be powered by small batteries or energy harvesting technology. Products like this are most likely to take advantage of the Friendship concept of Bluetooth Grid .

If you have read an earlier article in our Bluetooth mesh network series, you already know that a node is a device that has been set up and is a member of a mesh network. A node has functions related to the product type, but can also have functions related to the operation of the network itself, and can assume a special role.

This is determined by the grid characteristics they support. All nodes can send and receive mesh messages on the network . In addition, nodes can optionally support one or more additional network features, as listed below:

·        Relay function: The ability to receive and retransmit mesh messages over a broadcast bearer to achieve a larger network.

·        Proxy function: The ability to receive and retransmit mesh messages between GATT and broadcast bearers.

·        Low power consumption: Ability to operate within a mesh network with significantly reduced receiver duty cycles. Minimizing the time of the radio receiver results in reduced power consumption at the node, and the receiver can only be enabled when strictly necessary. Low Power Nodes ( LPNs ) do this by establishing Friendship with the Friend node .

·        Neighbor function: The ability to help LPNs run by storing messages addressed to the LPN , and only forward them when the LPN explicitly requests messages from the "Friend" node.

To understand how Friendship can reduce LPN power consumption, consider sensors. A good example of a sensor that can leverage Friendship and act as an LPN . They usually spend the most time transferring data and rarely need to receive data. Maybe the sensor can only send temperature readings if it is outside the limits of a set of configurations, perhaps this will only happen twice a day. This infrequent data transmission keeps the energy consumption of this type of device low.

But what if these temperature limits need to be modified to use different values ​​depending on the season, and by sending configuration messages to the sensors to achieve these restrictions? For the sensor to directly receive such a message, it is necessary to switch wireless and listen. Most of the time it is listening, not receiving anything, but the energy is consumed.

Therefore, working with Friend allows the LPN to schedule the use of wireless reception of messages to any frequency that is meaningful to the device, and at a much lower frequency than other required frequencies if it must always receive messages. LPNs poll their Friend for new news, and Friend only stores them occasionally. This is how to save electricity.

Friend and low power nodes

LPN must establish a relationship with another node supports Friendship Friend function to reduce its receiver duty cycle and save energy. Figure 1 is taken from the Bluetooth mesh network specification. In addition , it illustrates the relationship between LPN and Friend nodes. In particular it shows :

·        Light blue: LPNs

·        Dark grey: Friend nodes associated with and service specific LPNs

·        Light grey: Friend nodes which do not have a relationship with anLPN

·        Light blue: LPN

·        Dark gray: Friend node associated with a specific LPN

·        Light gray: Friend node that has no relationship with LPN

Figure 1 - Topology example of a mesh network

Friend node P has a Friendship relationship with LPNI , J and K. Friend node O has a Friendship relationship with LPN L and M. Therefore, messages addressed to node I , J or K will be stored and forwarded by Friend P. Node L or M will be stored and forwarded by Friend O. Forwarding by the Friend node occurs only when the LPN polls Friend for a message waiting to be transmitted.

Friend node parameter

LPN needs to find the "Friend" node and establish a Friendship relationship with them . The program involved is called Friend Establishment. We will check this process later, but before we introduce some key parameters about LPN behavior, because these parameters are set during the Friend build process.

1.      ReceiveDelay LPN is elapsed between the time the node sends a request to Friend, and start listening to the response. This allows the "Friend" node time to prepare its response and send it back.

2.      ReceiveWindow is the time that the LPN takes time to listen to the response. Figure 2 illustrates the timing involved in ReceiveDelay and ReceiveWindow .

Figure 2 - ReceiveDelay and ReceiveWindow timing

1.      PollTimeout establishes the maximum time that can elapse between two consecutive requests sent by the LPN to its "Friend" node. If the Friend node does not receive a request from the LPN before the PollTimeout timer expires , Friendship will be terminated.

Figure 3 - PollTimeout Timing

Friend neighboring node establishment

If two people want to build friendship, just one glance is enough! In order to establish the friendship of the Bluetooth mesh network , several steps are required.

1.      The LPN issues a Friend request message. This message is not relayed, so only the "Friend" node in the direct wireless range can handle it. Nodes without the Friend feature discard it. The Friend request message includes the LPN 's ReceiveDelay , ReceiveWindow, and PollTimeout parameters.

1.      Each "Friend" node in the vicinity of the request specified in the "Friend Request " message can be prepared to prepare a "Friend offer" message and send it back to the LPN . The message includes various parameters including the supported ReceiveWindow size, the available message queue size, the available list size, and the RSSI value measured by the Friend node .

2.      Upon receiving the "Friendoffer" message, the LPN implements a specific algorithm by the application to select the appropriate Friend node. The algorithm may consider a variety of points. Some devices may prioritize the receive window size to minimize power consumption, while others may be more concerned with RSSI values ​​to ensure they maintain good link quality with the "Friend" node. The exact algorithm used is determined by the product developer.

3.      After selecting the Friend node, the LPN will send a Friend Poll message to the Friend node .

4.      After receiving the Friend Poll message from the LPN , the Friend node replies with a Friend Update message that ends the Friend establishment process and provides security parameters. At this point, Friendship was established .

Friend node information

After Friendship is established, the "Friend" node stores all messages of the LPN in the Friend Queue . These are called stored messages. Figure 4 below illustrates the exchange of messages between the Friend node and the associated LPN .

·        When the "Friend" addressed to the node receives a "Friend" LPN node message, "Friend" node buffers the message, which is stored in an area called a "Friend Queue" of. In Figure 4 , we can see that messages 1 and 2 represent LPNs stored in the Friend node.

·        Periodically, the LPN causes its transceiver to send a Friend Poll to the Friend node, requesting that it store any buffered messages for it.

·        The "Friend" node first sends a stored message back to the LPN as a reply to "Friend Poll ."

·        After each message is received from a node "Friend", LPN will continue to send "Friend Poll" message until it receives an "MD (MD = more data) 'field is set up" FriendUpdate "message 0. This means that no more messages are buffered by the LPN . At this point, the LPN stops polling the "Friend" node.

Figure 4 - Friendship messaging

safety

Security in Bluetooth networks is everywhere. The same is true for Friendship , which uses two special security credentials:

·        Master security material : Derived from NetKey or used by other nodes in the same network. Messages encrypted using the master security material can be decrypted by any node in the same network.

·        Friend security material : Derived from NetKey , and some additional counter numbers are generated by the LPN and Friend nodes. Messages encrypted with Friend security material can only be decrypted by Friend and LPN that own it .

What are the two security materials used by LPN and Friend nodes ? Summarized as follows:

The corresponding Friendship message encrypted with Friend 's securitymaterials is:

·         Friend poll

·         Friend Update

·         Friend Subscription ListAdd/Remove/Confirm

·         Store the message that the Friend node passes to the LPN

The corresponding Friendship message encrypted using the master security material is:

·         Friend clear

·         Friend clear confirmation

Depending on the application settings, messages sent from the LPN to the Friend node will be encrypted using the master or Friend security profile.

Termination of neighbor nodes

In some cases, you can terminate Friendship:

·        If there is no Friend poll , the Friend Subscription List Add or Friend Subscription List Remove message is received by the Friend node before the PollTimeout timer expires , and Friendship terminates.

·        The LPN can initiate the Friendship termination process by sending a Friend Clear message to the Friend node , causing the Friendship node to be terminated by Friend .

Platform selection advice

Developers should consider the following guidelines when choosing a platform to implement Friend and LPN :

·        RAM capacity: The amount of RAM available directly affects how many LPNs the Friend node can support and how many messages it can buffer for the associated LPN .

·        LPN : The general power performance of selected MCUs and modules is key to LPN . In addition, the wake-up / warm-up time from sleep mode to run mode affects the response speed and delay of the LPN .

As a developer, I believe we can share your expectations for the Bluetooth Mesh SDK . Then we can share the Bluetooth mesh network " Friendly neighbors " together !


Passive Stylus Pen

Passive Stylus Pen,Custom Stylus Pen,Stylus Pen For Surface,Smart Stylus Pen

Shenzhen Ruidian Technology CO., Ltd , https://www.szwisonen.com