

Mesh is a new network topology option available for Bluetooth® Low
Energy (LE) adopted in the summer of 2017. It represents a major
advance which positions Bluetooth to be the dominant low power
wireless communications technology in a wide variety of new sectors
and use cases, including Smart Buildings and Industrial IoT.



Bluetooth Mesh Networking / An Introduction for Developers
3.0 Bluetooth Mesh — The Basics (cont.) 3.17 Relay Nodes 15 3.18 Low Power Nodes and Friend Nodes 15 3.19 Proxy Nodes 15 3.20 Node Configuration 16
4.0 Mesh System Architecture 17 4.1 Overview 18 4.2 Bearer Layer 18 4.3 Network Layer 18 4.4 Lower Transport Layer 19 4.5 Upper Transport Layer 19 4.6 Access Layer 19 4.7 Foundation Models 19 4.8 Models 19
5.0 Security 20 5.1 Mesh Security is Mandatory 21 5.2 Mesh Security Fundamentals 21 5.3 Separation of Concerns and Mesh Security Keys 21 5.4 Node Removal, Key Refresh and Trashcan Attacks 22 5.5 Privacy 22 5.6 Replay attacks 23
6.0 Bluetooth Mesh in Action 24 6.1 Message Publication and Delivery 25 6.2 Multipath Delivery 25 6.3 Managed Flooding 25 6.4 Traversing the Stack 25
7.0 Bluetooth Mesh — New Frontiers 27 7.1 References 28



Bluetooth has been actively developed since its initial
120 Bluetooth SIG member companies participated in
release in 2000, when it was originally intended to
the work required to bring mesh networking support to
act as a cable replacement technology. It soon came
Bluetooth. This is significantly more than is typically
to dominate wireless audio products and computer
the case, and is representative of the demand for
peripherals such as wireless mice and keyboards.
a global, industry standard for a Bluetooth mesh
networking capability.
In 2010, Bluetooth LE provided the next, major step
forward. Its impact has been substantial and widely felt,
The addition of mesh networking support represents a
most notably in smartphones and tablets, as
change of a type, and of such magnitude that it warrants
well as in Health and Fitness, Smart Home and
being described as a paradigm shift for
Wearables categories.
Bluetooth technology.
Wireless communications systems based around mesh
network topologies have proved themselves to offer an
effective approach to providing coverage of large areas,
extending range and providing resilience. However, until
now they have been based upon niche technologies,
incompatible with most computer, smartphone and
accessory devices owned by consumers or used in
the enterprise.


Smart Buildings Get Truly Smart
expensive and disruptive physical wiring. Data is allowing
Imagine arriving at the office in your car, early one dark,
the building management team to learn about the
winter morning. The security system lets you in and a
building, its services and how people act within it and
parking bay is automatically allocated to you. The bay
are using this data to make optimizations.
number over the parking space lights up so you can drive
easily to it. The parking bay allocation system is updated
to note that this space is now occupied.

Entering the building, occupancy sensors note your
arrival and identify you from the wearable technology
about your person. You take the elevator to the 2nd floor
and exit. You’re the first to arrive, as usual. As the lift
doors open, the lights from the elevator to your office
and the kitchen come on. Coffee is deemed of strategic
significance in your company! Other areas are left in
darkness to save power.
You walk to your office and enter, closing the door
behind you. The LED downlights and your desk lamp are
already on and at exactly the level you prefer. You notice
the temperature is a little warmer than the main office
space, reflecting your personal preference. Proximity
with your computer automatically logs you in.
Figure 1 - A Bluetooth mesh network could span the office and
Your day started well, with the building responding to
your needs, taking into account your preferences. It’s
The Bluetooth mesh network has made it easier
clear that systems are being used efficiently. What made
and cheaper to be in control of building services, to
wirelessly interact with them and to automate their
Your company installed a Bluetooth mesh network
behaviors. You wonder how you ever lived without such
some months ago, starting with a mesh lighting system.
advanced building technology in the past!
Later the mesh was added to with occupancy sensors,
environmental sensors, a wireless heating control
system, and a mesh-based car park management
system. The company is saving money on electricity
and heating, and work environments have become
personalized, boosting personal productivity.
Maintenance costs are going down since adding items
like additional light switches no longer requires
car park · this possible?


3.0 Bluetooth Mesh — The Basics

Understanding Bluetooth mesh networking topology
requires the reader to learn about a series of new
technical terms and concepts, not found in the world
of Bluetooth LE. In this section, we’ll explore the most
fundamental of these terms and concepts.
Mesh vs. Point-to-Point
Most Bluetooth LE devices communicate with each other
using a simple point-to-point network topology enabling
one-to-one device communications. In the Bluetooth
core specification, this is called a ‘piconet.’
Imagine a smartphone that has established a point-to-
point connection to a heart rate monitor over which
it can transfer data. One nice aspect of Bluetooth is
Figure 2 - A many to many topology with message relaying
that it enables devices to set up multiple connections.
That same smartphone can also establish a point-to-
The process which transforms an unprovisioned device
point connection with an activity tracker. In this case,
into a node is called “provisioning”. Consider purchasing
the smartphone can communicate directly with each
a new Bluetooth light with mesh support, bringing it
of the other devices, but the other devices cannot
home and setting it up. To make it part of your mesh
communicate directly with each other.
network, so that it can be controlled by your existing
In contrast, a mesh network has a many-to-many
Bluetooth light switches and dimmers, you would need to
topology, with each device able to communicate with
provision it.
every other device in the mesh (we’ll examine that
Provisioning is a secure procedure which results in an
statement more closely later on in the section entitled
unprovisioned device possessing a series of encryption
“Bluetooth mesh in action”). Communication is achieved
using messages, and devices are able to relay messages
keys and being known to the Provisioner device, typically
a tablet or smartphone. One of these keys is called the
to other devices so that the end-to-end communication
network key or NetKey for short. You can read more
range is extended far beyond the radio range of each
individual node.
about mesh security in the Security section, below.
All nodes in a mesh network possess at least one NetKey
and it is possession of this key which makes a device
Devices which are part of a mesh network are
a member of the corresponding network and as such,
called nodes and those which are not are called
a node. There are other requirements that must be
“unprovisioned devices”.
satisfied before a node can become useful, but securely
acquiring a NetKey through the provisioning process is
Concepts and Terminology · Devices and Nodes

a fundamental first step. We’ll review the provisioning
Acknowledged messages require a response from nodes
that receive them. The response serves two purposes: it
process in more detail in a later section of this paper.
confirms that the message it relates to was received, and
it returns data relating to the message recipient to the
Some nodes have multiple, constituent parts, each of
message sender.
which can be independently controlled. In Bluetooth
The sender of an acknowledged message may resend
mesh terminology, these parts are called elements.
Figure 3 shows an LED lighting product which if added
the message if it does not receive the expected
response(s) and therefore, acknowledged messages
to a Bluetooth mesh network, would form a single node
must be idempotent. This means that the effect of
with three elements, one for each of the individual
LED lights.
a given acknowledged message, arriving at a node
multiple times, will be the same as it had only been
received once.

Unacknowledged messages do not require a response.
Messages must be sent from and to an address.
Bluetooth mesh defines three types of address.
A unicast address uniquely identifies a single element.
Unicast addresses are assigned to devices during the
provisioning process.
A group address is a multicast address which represents
one or more elements. Group addresses are either
defined by the Bluetooth Special Interest Group (SIG)
and are known as SIG Fixed Group Addresses or are
assigned dynamically. 4 SIG Fixed Group Addresses have
been defined. These are named All-proxies, All-friends,
Figure 3 - Lighting node consisting of three elements
All-relays and All-nodes. The terms Proxy, Friend, and
Relay will be explained later in this paper.
It is expected that dynamic group addresses will be
When a node needs to query the status of other
established by the user via a configuration application
nodes or needs to control other nodes in some way, it
sends a message of a suitable type. If a node needs to
and that they will reflect the physical configuration
of a building, such as defining group addresses which
report its status to other nodes, it sends a message.
correspond to each room in the building.
All communication in the mesh network is “message-
oriented” and many message types are defined, each
A virtual address is an address which may be assigned
with its own, unique opcode.
to one or more elements, spanning one or more nodes.
It takes the form of a 128-bit UUID value with which
Messages fall within one of two broad categories;
acknowledged or unacknowledged.
any element can be associated and is much like a label.


Figure 4 - Publish/Subscribe
Virtual addresses will likely be preconfigured at the
also illustrates the fact that nodes may subscribe to
point of manufacture and be used for scenarios such
messages addressed to more than one distinct address.
as allowing the easy addressing of all meeting room
This is both powerful and flexible.
projectors made by this manufacturer.
Similarly, notice how both nodes Switch 5 and Switch 6
publish to the same Garden address.
The act of sending a message is known as publishing.
The use of group and virtual addresses with the publish/
Nodes are configured to select messages sent to
subscribe communication model has an additional,
specific addresses for processing, and this is known
substantial benefit in that removing, replacing or
as subscribing.
adding new nodes to the network does not require
reconfiguration of other nodes. Consider what would
Typically, messages are addressed to group or virtual
be involved in installing an additional light in the dining
addresses. Group and virtual address names will have
readily understood meaning to the end user, making
room. The new device would be added to the network
using the provisioning process and configured to
them easy and intuitive to use.
subscribe to the Dining Room address. No other nodes
In Figure 4, above, we can see that the node “Switch
would be affected by this change to the network. Switch
1” is publishing to group address Kitchen. Nodes Light
2 would continue to publish messages to Dining Room
1, Light 2, and Light 3 each subscribe to the Kitchen
as before but now, both Light 3 and the new light
address and therefore receive and process messages
would respond.
published to this address. In other words, Light 1, Light
2, and Light 3 can be switched on or off using Switch 1.
Elements can be in various conditions and this is
Switch 2 publishes to the group address Dining Room.
represented in Bluetooth mesh by the concept of
Light 3 alone subscribed to this address and so is the
state values.
only light controlled by Switch 2. Note that this example

A state is a value of a certain type, contained within an
element (within a server model - see below). As well as
Messages are the mechanism by which operations on
values, States also have associated behaviors and may
the mesh are invoked. Formally, a given message type
not be reused in other contexts.
represents an operation on a state or collection of
As an example, consider a simple light which may either
multiple state values. All messages are of three broad
types, reflecting the types of operation which Bluetooth
be on or off. Bluetooth mesh defines a state called
mesh supports. The shorthand for the three types is
Generic OnOff. The light would possess this state item
and a value of On would correspond to and cause the
GET, SET and STATUS.
light to be illuminated whereas a Generic OnOff state
GET messages request the value of a given state from
value of Off would reflect and cause the light to be
one or more nodes. A STATUS message is sent in
switched off.
response to a GET and contains the relevant state value.
The significance of the term Generic will be
SET messages change the value of a given state. An
discussed later.
acknowledged SET message will result in a STATUS
message being returned in response to the SET message
Properties are similar to states in that they contain
whereas an unacknowledged SET message requires
values relating to an element. But they are significantly
different to states in other ways.
no response.
STATUS messages are sent in response to GET
Readers who are familiar with Bluetooth LE will be
messages, acknowledged SET messages or
aware of characteristics and recall that they are data
types with no defined behaviors associated with them,
independently of other messages, perhaps driven by a
timer running on the element sending the message,
making them reusable across different contexts.
for example.
A property provides the context for interpreting
a characteristic.
Specific states referenced by messages are inferred
from the message opcode. Properties on the other hand,
To appreciate the significance and use of contexts as
they relate to properties, consider for example, the
are referenced explicitly in generic property related
messages using a 16-bit property ID.
characteristic Temperature 8, an 8-bit temperature
state type which has a number of associated properties,
including Present Indoor Ambient Temperature and
Changes from one state to another are called state
Present Outdoor Ambient Temperature. These two
transitions. Transitions may be instantaneous or execute
properties allow a sensor to publish sensor readings in
over a period of time called the transition time. A state
a way that allows a receiving client to determine the
transition is likely to have an effect on the application
context the temperature value has, making better sense
layer behavior of a node.
of its true meaning.
Properties are organized into two categories:
Relationships may exist between states whereby a
Manufacturer, which is a read-only category and Admin
change in one triggers a change in the other. Such a
which allows read-write access.
relationship is called a state binding. One state may be
bound to multiple other states.

For example, consider a light controlled by a dimmer
defines a series of reusable, generic states such as, for
example, Generic OnOff and Generic Level.
switch. The light would possess the two states, Generic
OnOff and Generic Level with each bound to the other.
Similarly, a series of generic messages that operate
Reducing the brightness of the light until Generic Level
on the generic states are defined. Examples include
has a value of zero (fully dimmed) results in Generic
Generic OnOff Get and Generic Level Set.
OnOff transitioning from On to Off.
Generic states and generic messages are used in
generalized models, both generic server models such
Models pull the preceding concepts together and
as the Generic OnOff Server and Generic Client Models
define some or all of the functionality of an element as it
such as the Generic Level Client.
relates to the mesh network. Three categories of model
Generics allow a wide range of device type to support
are recognized.
Bluetooth mesh without the need to create new models.
A server model defines a collection of states, state
Remember that models may be created by extending
transitions, state bindings and messages which the
other models too. As such, generic models may form
element containing the model may send or receive. It
the basis for quickly creating models for new types
also defines behaviors relating to messages, states and
of devices.
state transitions.
A client model does not define any states. Instead, it
defines the messages which it may send or receive
in order to GET, SET or acquire the STATUS of states
defined in the corresponding server model.
Control models contain both a server model, allowing
communication with other client models and a client
model which allows communication with server models.
Models may be created by extending other models. A
model which is not extended is called a root model.
Models are immutable, meaning that they may not be
Figure 5 - Generic Models
changed by adding or removing behaviors. The correct
and only permissible approach to implementing new
model requirements is to extend the existing model.
A scene is a stored collection of states which may be
recalled and made current by the receipt of a special
type of message or at a specified time. Scenes are
It is recognized that many different types of device,
identified by a 16-bit Scene Number, which is unique
often have semantically equivalent states, as
within the mesh network.
exemplified by the simple idea of ON vs OFF. Consider
Scenes allow a series of nodes to be set to a given
lights, fans and power sockets, all of which can be
set of previously stored, complimentary states in one
switched on or turned off.
coordinated action.
Consequently, the Bluetooth mesh model specification,
Server Generic OnOff · Client

Imagine that in the evening, you like the temperature in
information about itself in a Provisioning
Capabilities PDU.
your main family room to be 20 degrees Celsius, the six
LED downlights to be at a certain brightness level and
the lamp in the corner of the room on the table, set to a
The Provisioner and the device to be provisioned,
nice warm yellow hue. Having manually set the various
exchange their public keys, which may be static or
nodes in this example scenario to these states, you can
ephemeral, either directly or using an out-of-band
store them as a scene using a configuration application,
(OOB) method.
and recall the scene later on, either on demand by
sending an appropriate, scene-related mesh message or
During the authentication step, the device to be
automatically at a scheduled time.
provisioned outputs a random, single or multi-digit
number to the user in some form, using an action
Provisioning is the process by which a device joins the
appropriate to its capabilities. For example, it might
mesh network and becomes a node. It involves several
flash an LED several times. The user enters the digit(s)
stages, results in various security keys being generated
output by the new device into the Provisioner and a
and is itself a secure process.
cryptographic exchange takes place between the two
devices, involving the random number, to complete
Provisioning is accomplished using an application on a
the authentication of each of the two devices to
device such as a tablet. In this capacity, the device
the other.
used to drive the provisioning process is referred to as
the Provisioner.
After authentication has successfully completed, a
The provisioning process progresses through five steps
and these are described next.
session key is derived by each of the two devices from
their private keys and the exchanged, peer public
keys. The session key is then used to secure the
In support of various different Bluetooth mesh
subsequent distribution of the data required to
features, including but not limited to provisioning,
complete the provisioning process, including a
security key known as the network key (NetKey).
Supplement) have been introduced, including the
After provisioning has completed, the provisioned
AD type.
device possesses the network’s NetKey, a mesh
An unprovisioned device indicates its availability to
security parameter known as the IV Index and a
be provisioned by using the AD
Unicast Address, allocated by the Provisioner. It is
type in advertising packets. The user might need
now known as a node.
to start a new device advertising in this way by, for
example, pressing a combination of buttons or holding
down a button for a certain length of time.
All nodes can transmit and receive mesh messages but
there are a number of optional features which a node
may possess, giving it additional, special capabilities.
In this step, the Provisioner sends an invitation to the
There are four such optional features: the Relay, Proxy,
device to be provisioned, in the form of a Provisioning
Friend, and the Low Power features. A node may
Invite PDU. The Beaconing device responds with

support zero or more of these optional features and any
sensor must support it. The need to receive messages
has implications for duty cycle and as such power
supported feature may, at a point in time, be enabled
or disabled.
consumption. A 100% duty cycle would ensure that
the sensor did not miss any temperature threshold
configuration messages but use a prohibitive amount of
Nodes which support the Relay feature, known as
power. A low duty cycle would conserve energy but risk
Relay nodes, are able to retransmit received messages.
the sensor missing configuration messages.
Relaying is the mechanism by which a message can
The answer to this apparent conundrum is the Friend
traverse the entire mesh network, making multiple
node and the concept of friendship.
“hops” between devices by being relayed.
Nodes like the temperature sensor in the example may
Mesh network PDUs include a field called TTL (Time
be designated Low Power nodes (LPNs) and a feature
To Live). It takes an integer value and is used to limit
flag in the sensor’s configuration data will designate the
the number of hops a message will make across the
node as such.
network. Setting TTL to 3, for example, will result in
the message being relayed, a maximum number of
LPNs work in tandem with another node, one which
three hops away from the originating node. Setting
is not power-constrained (e.g. it has a permanent AC
it to 0 will result in it not being relayed at all and
power source). This device is termed a Friend node.
only traveling a single hop. Armed with some basic
The Friend stores messages addressed to the LPN and
knowledge of the topology and membership of the
delivers them to the LPN whenever the LPN polls the
mesh, nodes can use the TTL field to make more
Friend node for “waiting messages”. The LPN may poll
efficient use of the mesh network.
the Friend relatively infrequently so that it can balance
its need to conserve power with the timeliness with
which it needs to receive and process configuration
Some types of node have a limited power source
messages. When it does poll, all messages stored by
and need to conserve energy as much as possible.
the Friend are forwarded to the LPN, one after another,
Furthermore, devices of this type may be predominantly
with a flag known as MD (More Data) indicating to the
concerned with sending messages but still have a need
LPN whether there are further messages to be sent from
to occasionally receive messages.
the Friend node.
Consider a temperature sensor which is powered by a
The relationship between the LPN and the Friend node
small coin cell battery. It sends a temperature reading
is known as friendship. Friendship is key to allowing
once per minute whenever the temperate is above or
very power constrained nodes which need to receive
below configured upper and lower thresholds. If the
messages, to function in a Bluetooth mesh network
temperature stays within those thresholds it sends no
whilst continuing to operate in a power-efficient way.
messages. These behaviors are easily implemented
with no particular issues relating to power
consumption arising.
There are an enormous number of devices in the
world that support Bluetooth LE, most smartphones
However, the user is also able to send messages to
and tablets being amongst them. In-market Bluetooth
the sensor which change the temperature threshold
state values. This is a relatively rare event but the
devices, at the time Bluetooth mesh was adopted, do

not possess a Bluetooth mesh networking stack. They
do possess a Bluetooth LE stack however and therefore
Each node supports a standard set of configuration
have the ability to connect to other devices and interact
states which are implemented within the standard
with them using GATT, the Generic Attribute Profile.
Configuration Server Model and accessed using the
Proxy nodes expose a GATT interface which Bluetooth
Configuration Client Model. Configuration State
data is concerned with the node’s capabilities and
LE devices may use to interact with a mesh network.
behavior within the mesh, independently of any specific
A protocol called the Proxy Protocol, intended to be
used with a connection-oriented bearer, such as GATT
application or device type behaviors.
is defined. GATT devices read and write Proxy Protocol
For example, the features supported by a node, whether
PDUs from within GATT characteristics implemented by
it is a Proxy node, a Relay node and so on, are indicated
the Proxy node. The Proxy node transforms these PDUs
by Configuration Server states. The addresses to which a
to/from mesh PDUs.
node has subscribed are stored in the Subscription List.
The network and subnet keys indicating the networks
In summary, Proxy nodes allow Bluetooth LE devices
that do not possess a Bluetooth mesh stack to interact
the node is a member of are listed in the configuration
block, as are the application keys held by the mode.
with nodes in a mesh network.
A series of configuration messages allow the
Configuration Client Model and Configuration Server
Model to support GET, SET and STATUS operations on
the Configuration Server Model states.
Figure 6 - Smartphone communicating via a mesh proxy node. P = proxy function on


Overview
Bearer Layer
In this section, we’ll take a closer look at the Bluetooth
Mesh messages require an underlying communications
mesh architecture, its layers and their respective
system for their transmission and receipt. The bearer
responsibilities. We’ll also position the mesh
layer defines how mesh PDUs will be handled by a given
architecture relative to the Bluetooth LE
communications system. At this time, two bearers are
core architecture.
defined and these are called the Advertising Bearer and
the GATT Bearer.
The Advertising Bearer leverages Bluetooth LE’s GAP
advertising and scanning features to convey and receive
mesh PDUs.
The GATT Bearer allows a device which does not
support the Advertising Bearer to communicate
indirectly with nodes of a mesh network which do,
using a protocol known as the Proxy Protocol. The
Proxy Protocol is encapsulated within GATT operations
involving specially defined GATT characteristics. A mesh
Proxy node implements these GATT characteristics and
supports the GATT bearer as well as the Advertising
Bearer so that it can convert and relay messages
between the two types of bearer.
The network layer defines the various message
Figure 7 - The Bluetooth mesh architecture
address types and a network message format which
allows transport layer PDUs to be transported by the
At the bottom of the mesh architecture stack, we have
bearer layer.
a layer entitled Bluetooth LE. In fact, this is more than
It can support multiple bearers, each of which may have
just a single layer of the mesh architecture, it’s the
full Bluetooth LE stack, which is required to provide
multiple network interfaces, including the local interface
fundamental wireless communications capabilities
which is used for communication between elements that
are part of the same node.
which are leveraged by the mesh architecture which sits
on top of it. It should be clear that the mesh system is
The network layer determines which network
dependent upon the availability of a Bluetooth LE stack.
interface(s) to output messages over. An input filter
is applied to messages arriving from the bearer layer,
We’ll now review each layer of the mesh architecture,
working our way up from the bottom layer.
to determine whether or not they should be delivered
to the network layer for further processing. Output
messages are subject to an output filter to control

whether or not they are dropped or delivered to the
bearer layer.
The foundation model layer is responsible for the
The Relay and Proxy features may be implemented by
implementation of those models concerned with the
configuration and management of a mesh network.
the network layer.
Lower Transport Layer
The model layer is concerned with the implementation
The lower transport layer takes PDUs from the upper
transport layer and sends them to the lower transport
of Models and as such, the implementation of behaviors,
messages, states, state bindings and so on, as defined in
layer on a peer device. Where required, it performs
one or more model specifications.
segmentation and reassembly of PDUs. For longer
packets, which will not fit into a single Transport PDU,
the lower transport layer will perform segmentation,
splitting the PDU into multiple Transport PDUs. The
receiving lower transport layer on the other device, will
reassemble the segments into a single upper transport
layer PDU and pass this up the stack.
The upper transport layer is responsible for the
encryption, decryption and authentication of application
data passing to and from the access layer. It also has
responsibility for transport control messages, which
are internally generated and sent between the upper
transport layers on different peer nodes. These include
messages related to friendship and heartbeats.
The access layer is responsible for defining how
applications can make use of the upper transport layer.
This includes:


Mesh Security is Mandatory
Mesh Security Fundamentals
Bluetooth LE allows the profile designer to exploit a
The following fundamental security statements apply to
range of different security mechanisms, from the various
all Bluetooth mesh networks:
approaches to pairing that are possible, to individual
security requirements associated with individual
characteristics. Security is in fact, totally optional, and
its permissible to have a device which is completely
open, with no security protections or constraints
in place. The device designer or manufacturer is
responsible for analyzing threats and determining the
security requirements and solutions for their product.
In contrast, in Bluetooth mesh, security is mandatory.
The network, individual applications and devices are all
secure and this cannot be switched off or reduced in
any way.

At the heart of Bluetooth mesh security are three types
of security keys. Between them, these keys provide
security to different aspects of the mesh and achieve a
critical capability in mesh security, that of “separation
of concerns”.
To understand this and appreciate its significance,
consider a mesh light which can act as a relay. In its
capacity as a relay, it may find itself handling messages
relating to the building’s Bluetooth mesh door and
window security system. A light has no business being
Figure 8 - security is central to Bluetooth mesh networking
able to access and process the details of such messages
but does need to relay them to other nodes.

To deal with this potential conflict of interest, the mesh
The final key type is the device key (DevKey). This is a
uses different security keys for securing messages at the
special type of application key. Each node has a unique
network layer from those used to secure data relating to
DevKey known to the Provisioner device and no other.
specific applications such as lighting, physical security,
The DevKey is used in the provisioning process to secure
heating and so on.
communication between the Provisioner and the node.
All nodes in a mesh network possess the network
key (NetKey). Indeed, it is possession of this shared
key which makes a node a member of the network. A
As described above, nodes contain various mesh
network encryption key and a Privacy Key are derived
security keys. Should a node become faulty and need to
directly from the NetKey.
be disposed of, or if the owner decides to sell the node
Being in possession of the NetKey allows a node to
to another owner, it’s important that the device and the
decrypt and authenticate up to the Network Layer so
keys it contains cannot be used to mount an attack on
the network the node was taken from.
that network functions such as relaying, can be carried
out. It does not allow application data to be decrypted.
A procedure for removing a node from a network is
The network may be sub-divided into subnets and each
defined. The Provisioner application is used to add the
subnet has its own NetKey, which is possessed only by
node to a black list and then a process called the Key
those nodes which are members of that subnet. This
Refresh Procedure is initiated.
might be used, for example, to isolate specific, physical
The Key Refresh Procedure results in all nodes in the
areas, such as each room in a hotel.
network, except for those which are members of the
Application data for a specific application can only be
black list from being issued with new network keys,
decrypted by nodes which possess the right application
application keys and all related, derived data. In other
key (AppKey). Across the nodes in a mesh network,
words, the entire set of security keys which form the
there may be many distinct AppKeys but typically, each
basis for network and application security are replaced.
AppKey will only be possessed by a small subset of the
As such, the node which was removed from the network
nodes, namely those of a type which can participate in a
and which contains an old NetKey and an old set of
given application. For example, lights and light switches
AppKeys, is no longer a member of the network and
would possess the lighting application’s AppKey but not
poses no threat.
the AppKey for the heating system, which would only be
possessed by thermostats, valves on radiators and so on.
A privacy key, derived from the NetKey is used to
AppKeys are used by the upper transport layer to
obfuscate network PDU header values, such as the
decrypt and authenticate messages before passing them
source address. Obfuscation ensures that casual, passive
up to the access layer.
eavesdropping cannot be used to track devices and the
AppKeys are associated with only one NetKey. This
people that use them. It also makes attacks based upon
association is termed “key binding” and means that
traffic analysis difficult.
specific applications, as defined by possession of a
The degree of security offered in this technique is fit
given AppKey, can only work on one specific network,
for purpose.
whereas a network can host multiple, independently
secure applications.

In network security, a replay attack is a technique
whereby an eavesdropper intercepts and captures one
or more messages and simply retransmits them later,
with the goal of tricking the recipient, into carrying out
something which the attacking device is not authorized
to do. An example, commonly cited, is that of a car’s
keyless entry system being compromised by an attacker,
intercepting the authentication sequence between
the car’s owner and the car, and later replaying those
messages to gain entry to the car and steal it.
Bluetooth mesh has protection against replay attacks.
The basis for this protection is the use of two network
PDU fields called the Sequence Number (SEQ) and IV
Index, respectively. Elements increment the SEQ value
every time they publish a message. A node, receiving a
message from an element which contains a SEQ value
less than or equal to that which was in the last valid
message, will discard it, since it is likely that it relates to
a replay attack. IV Index is a separate field, considered
alongside SEQ. IV Index values within messages from a
given element must always be equal to or greater than
the last valid message from that element.


Message Publication and Delivery
messages contain data which allows receiving nodes
A network which uses Wi-Fi is based around a central
to determine how far away the sender is, in terms of
network node called a router, and all network traffic
the number of hops required to reach it. This
knowledge can be exploited with the TTL field.
passes through it. If the router is unavailable, the whole
network becomes unavailable.
TTL (Time To Live) is a field which all Bluetooth mesh
In contrast, Bluetooth mesh uses a technique known
as managed flooding to deliver messages. Messages,
PDUs include. It controls the maximum number of
when published by a node, are broadcast rather than
hops, over which a message is relayed. Setting
the TTL allows nodes to exercise control over relaying
being routed directly to one or more specific nodes.
All nodes receive all messages from nodes that are in
and conserve energy, by ensuring messages are not
direct radio range and, if configured to do so, will then
relayed further than is required.
relay received messages. Relaying involves broadcasting
Heartbeat messages allow nodes to determine what
the received message again, so that other nodes, more
the optimum TTL value should be for each
distant from the originating node, might receive the
message published.
message broadcast.
A message cache must be implemented
by all nodes. The cache contains all recently seen
An important consequence of Bluetooth technology’s
use of managed flooding is that messages arrive at their
messages and if a message is found to be in the cache,
destination via multiple paths through the network. This
indicating the node has seen and processed it before,
it is immediately discarded.
makes for a highly reliable network and it is the primary
reason for having opted to use a flooding approach
rather than routing in the design of Bluetooth
Probably the most significant optimization mechanism
mesh networking.
in a Bluetooth mesh network is provided by the
combination of Friend nodes and Low Power nodes.
Bluetooth mesh networking leverages the strengths of
As described, Friend nodes provide a message store
and forward service to associated Low Power nodes.
the flooding approach and optimizes its operation such
This allows Low Power nodes to operate in a highly
that it is both reliable and efficient. The measures which
optimize the way flooding works in Bluetooth mesh
energy-efficient manner.
networking are behind the use of the term “managed
flooding”. Those measures are as follows:
A node, receiving a message, passes it up the stack from
the underlying Bluetooth LE stack, via the bearer layer to
Heartbeat messages are transmitted by nodes
the network layer.
periodically. A heartbeat message indicates to
The network layer applies various checks to decide
other nodes in the network that the node sending the
whether or not to pass the message higher up the stack
heartbeat is still active. In addition, heartbeat
or to discard it.
Message Cache · Friendship · Heartbeats

In addition, PDUs have a Network ID field, which
provides a fast way to determine which NetKey the
message was encrypted with. If the NetKey is not
recognized by the network layer on the receiving node,
this indicates it does not possess the corresponding
NetKey, is not a member of that subnet and so the PDU
is discarded. There’s also a network message integrity
check (MIC) field. If the MIC check fails, using the
NetKey corresponding to the PDUs Network ID, then the
message is discarded.
Messages, are received by all nodes in range of the
node that sent the messages but many will be quickly
discarded when it becomes apparent they are not
relevant to this node due to the network or subnet(s) it
belongs to.
The same principle is applied higher up the stack in
the upper transport layer. Here though, the check is
against the AppKey associated with the message, and
identified by an application identifier (AID) field in the
PDU. If the AID is unrecognized by this node, the PDU is
discarded by the upper transport layer. If the transport
message integrity check (TransMIC) fails, the message
is discarded.


7.0 Bluetooth Mesh — New Frontiers

This paper should have provided the reader with an
introduction to Bluetooth mesh, its key capabilities,
[1] Bluetooth SIG, Bluetooth Mesh Specification See: www.bluetooth.com/specifications/adopted-specifications
concepts and terminology. It’s Bluetooth but not as we
[2] Bluetooth SIG, Bluetooth Mesh Model Specification See: www.bluetooth.com/specifications/adopted-specifications
know it. It’s a Bluetooth technology that supports a new
way for devices to communicate using a new topology.
[3] Bluetooth SIG, Bluetooth 5 Core Specification See: www.bluetooth.com/specifications/adopted-specifications
Most of all, it’s Bluetooth that makes this most pervasive
of low power wireless technologies, a perfect fit for
[4] Bluetooth SIG, Bluetooth Core Specification Supplement See: www.bluetooth.com/specifications/adopted-specifications
a whole new collection of use cases and
industry sectors.
Pages referenced in this manual — manufacturer, support and downloads.
Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.