apart is its ability to provide Over-the-Air (OTA)
rmware updates.
OTA is common for Bluetooth LE applications based on
GATT. There may be one customized service and several
customized characteristics that are dedicated for OTA.
In which case, the rmware image can be transferred
packet by packet through Bluetooth LE connectivity
from smartphones, tablets, or handheld devices to the
device that needs to be upgraded. For a Bluetooth mesh
network, it becomes even more important because
there could be thousands of nodes in the network.
If a vendor or manufacturer needs to release a new
rmware version for a bug x, adding new features,
or performance improvements, OTA is the best way to
perform the rmware upgrade.
For OTA, there are two common methods to achieve:
Method 1: As shown in step 1 in gure 3, the MCU
needs to get into its bootloader. The bootloader
includes the functionality to interact with a peer device
like smartphones, tablets, or handheld devices. The
rmware image is fragmented into packets to t the
length restriction of the packet and send them through
Bluetooth LE connectivity to the target device. In steps
2, 3, and 4, the bootloader receives the fragmented
New FW
Step 3:
Receives new
FW packet by
packet and
writes into
program memory
Unused
New FW
Step 4:
Ongoing
Unused
New FW
Ready
Step 5:
New FW is
ready, after
integrity check
run new FW
image packet by packet and writes them into the
application area of the ash. When image downloading
is completed, and after the integrity check is successful,
the MCU can run the program on the application area of
the ash memory. At step 5, the OTA process is nished.
Method 2: In gure 4, you can see there is no need
to trigger the MCU into the bootloader (Step 1). The
program can stay in the application. The MCU can
continue to work as a node in the Bluetooth mesh
network. At the same time, the MCU can build a
connection with smartphones, tablets, or other handheld
devices by GATT through Bluetooth LE connectivity to
download a new rmware image and store the image
in a New FW storage area (Step 2, 3, and 4). When the
downloading process is complete, you need to make the
MCU get into the bootloader to check image integrity. If
the integrity checking is successful, the bootloader can
copy the new rmware to the application area and erase
the New FW storage area. In the nal step (Step 6), you
must make the MCU run the new rmware.
When you pursue the selection of components for an
embedded hardware platform using Bluetooth mesh, a
decision must be made for an OTA method. Then you
need to estimate how much ash you need on the MCU.
Bluetooth SIG Proprietary12
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platformback to contents
New FW
FW Storage
Application
Program
at
Figure 4 – Memory map by OTA through application.
Storage
Area
Unused
Old FW
Bootloader
Step 1:
Program runs at
application by
old FW
New FW
Unused
Old FW
Bootloader
Step 2:
Application
receives new
FW and writes it
into new FW
storage area
Bootloader
Comparing methods 1 and 2, and you can see that:
⋅
If method 1 is used, the program needs to stay in
the bootloader for a while. During that time, this node
is oine in the Bluetooth mesh network, but program
memory consumption is more forgiving than with
method 2.
⋅ With method 2, the program always stays in the
application until the integrity check and new
rmware is copied. The progress of those two
operations is quick, and you can assume that the
node is always online when this kind of OTA is
running. The problem is that more ash is needed
for the new rmware storage area, which means that
for every single byte in the rmware image, two bytes
of ash are needed: one byte for program memory
and one byte for OTA new rmware storage.
Non-Volatile Memory
Non-volatile memory (NVM), or non-volatile
storage, is a type of MCU memory that can retrieve
stored information even after having power cycled or
performed dierent types of resets on the MCU, such as
brown-out, watchdog, and external GPIO pin reset. In a
Bluetooth mesh application, you are likely to use NVM
because persistent data needs to be stored permanently.
UnusedUnusedUnusedUnusedUnused
New FW
Ready
Unused
New FW
Bootloader
Step 5:
Program gets into
bootloader, after
integrity check,
copy new FW to
application area
Unused
New FW
Bootloader
Step 6:
Erase new FW
storage area
and run
new FW
New FW
Unused
Old FW
Step 3:
Ongoing
New FW
Unused
Old FW
Bootloader
Step 4:
New FW
is ready
Last year, we created an article on provisioning that
looked at the security keys used in a Bluetooth mesh
network. Those keys are distributed by a provisioner
and can be refreshed if the security keys have been
compromised or could be compromised. All those keys
should be stored in the on-chip NVM persistently and
can be loaded into the application when the node is
power cycled or reset, even if the rmware is updated,
because the node MUST have those keys for network
communication and encryption. Meanwhile, when
performing a key refresh, two sets of keys need to save
into the NVM for the key refresh process, in case there is
an unpredictable power failure.
With Friendship, regardless of resetting or power cycling
the Friend Node or Low Power Node, each node should
know who is who; the Friend Node should know whose
message it should buer and the Low Power Node
should know which Friend Node will poll the message
back. So, all the corresponding information about
friendship should be stored persistently. Additionally,
important information like unicast address and model
conguration data should be stored into NVM.
Bluetooth SIG Proprietary13
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platformback to contents
There are two common types of NVM on the MCU:
ash and EEPROM (electrically erasable programmable
read-only memory). The dierence between ash and
EEPROM is:
⋅
On-chip ash is written/erased by page, whereas
EEPROM is written/erased by byte
⋅
On-chip ash is read by page, whereas EEPROM is
read by byte
⋅
Usually, on-chip ash volume is bigger than EEPROM
If you want to design a hand-held provisioner, on-chip
ash is preferred because the provisioner needs to store
lot of data for every node in the network. If you want to
design a Low Power Node, EEPROM is enough.
Bluetooth SIG Proprietary14
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platform
4.0
Lowering Power
Consumption
back to contents
Bluetooth SIG Proprietary15
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platformback to contents
4.0 Lowering Power Consumption
Lowering Power Consumption in an
Embedded Design
Lowering the power consumption of an embedded
system is always an important topic among engineers
and developers and is motivated by the need to run
applications as long as possible while consuming
minimum power, especially in power-constrained
systems. Optimal platforms for developing ecient,
single-cell-powered architectures can enable designers
to build compact battery-operated devices at the lowest
cost and highest power eciency. The following tips
are useful for lowering power consumption for common
embedded systems.
⋅
Disable the clock source of unused peripherals like
UART, I2C, or SPI
⋅
All unused pins must be connected to a certain
logic level
⋅
Keep the system clock as low as possible, but only if
it can meet the requirements
Model Layer
Foundation Model Layer
Access Layer
Upper Transport Layer
Lower Transport Layer
Network Layer
Bearer Layer
Bluetooth Low Energy Core Specication
Tuning connection parameters
signicantly reduce
synchronizations...it’s an ideal
method for lowering the power
consumption of the GATT Bearer.
Bearer Layer Power Consumption
As you can see in gure 5, the bearer layer is near the
bottom of Bluetooth mesh architecture. A bearer is a
communications system or protocol stack that is used to
transport data between end points on behalf of another
system or protocol stack. Bluetooth mesh has two
types of bearers: the GATT Bearer and the Advertising
Bearer. For each of these bearers, the method to lower
consumption is dierent.
Figure 5 – Bluetooth mesh system architecture
The GATT Bearer allows a device that does not support
an Advertising Bearer to communicate indirectly with
nodes of a mesh network, using a protocol known
as the Proxy Protocol (Bluetooth Specication Mesh
Prole V1.0, Section 6). A node that relays mesh
messages between nodes which use the Advertising
Bearer and nodes which use the GATT Bearer is known
as a Proxy Node. The Proxy Node supports the GATT
Bearer and can establish a connection with the node
that just supports the GATT Bearer. After connection
is established between the Proxy Node and the device
that only has a GATT Bearer, the Proxy Node exposes
its mesh proxy service and may add a mesh provisioning
service (all of them are GATT services).
Bluetooth SIG Proprietary16
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platformback to contents
Master Device
Slave Device
Connection
Slave Latency = OFF
No slave latency — slave responds with Link Layer empty packets every connection interval.
Slave Latency = ON
Slave latency on. Slave can skip certain connection events, the number is dened by connSlaveLatency.
Figure 6 – Connection Interval and Slave Latency
Interval
Owing to its connection based, two connection
parameters are vital for lowering power consumption of
the GATT Bearer. Figure 6 shows these two parameters:
connection interval and slave latency.
Connection Interval is an important parameter for
Bluetooth LE connection-based applications and is
dened as the specied duration in which two peer
devices each send and receive data from only the other
side. The window where two peer devices send and
receive data is known as a connection event. If there
is no application data to be sent or received, the two
peer devices exchange empty link layer data packets to
maintain the connection.
Slave Latency is a parameter that gives the slave device
(link layer) the right to skip a number of connection
events, which is dened by connSlaveLatency, when the
connection is established. This ability gives the slave
device some exibility to send or receive only if it needs
to, otherwise connSlaveLatency timed out.
Tuning connection parameters signicantly reduce
transceiver activity and is an ideal method for lowering
power consumption. Increasing the connection interval
lowers the power consumption for both devices and
reduces the throughput in both directions.
Increasing the slave latency reduces power consumption
for the peripheral during periods when the peripheral is
idle to send.
The other bearer layer on the Bluetooth mesh network
is the Advertising Bearer. In certain Bluetooth mesh
networks, this bearer makes use of Bluetooth GAP
advertising and scanning to receive and broadcast
messages from other nodes. Because it’s based on GAP
advertising and scanning, the aforementioned method
for lowering power consumption over the GATT Bearer
is not suitable for this bearer.
Low Power Feature
Another option for lowering power consumption is
to use the low power feature. This allows a device’s
receiver to operate within a Bluetooth mesh network at
signicantly reduced duty cycles. A node that supports
the low power feature, and has the low power feature
enabled, is a Low Power Node.
Low Power Node Transition
From gure 7, you can see there are several steps
required to reduce a receiver’s activity and put the core
processor of the MCU into sleep mode. In runtime, if a
Low Power Node’s task scheduler is idle, it is time for it
Bluetooth SIG Proprietary17
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platformback to contents
Current
Figure 7 – The procedure of the Low Power Node.
to go into sleep mode to save power. The Low Power
Node then puts the receiver in standby mode to save
power. In standby mode, the receiver consumes little
power, but can still wake up rapidly. Then, the Low
Power Node:
⋅
Disables all unused peripherals like UART, PWM, SPI,
or I2C during sleep mode
⋅
Switches the clock source from high frequency, like
external crystal oscillator with PPL, to low frequency,
such as the internal RC oscillator/32KHz crystal
oscillator, which can make the MCU operate at a low
speed for greater power savings
Task scheduler idle,
enable transceiver
standby
Core, peripherals,
and clock into
sleep mode
System in runtime
for task process
Clock source
stabilizing, wake
transceiver up
Interrupt event,
clock, core, and
peripherals wakeup
Time
⋅
During any interrupt events, the core processor
is awakened and the system clock is switched from
low frequency to high frequency to make sure there is
enough computing resource for task processing
⋅
When the system clock is stabilizing, the Low Power
Node enables corresponding peripherals
⋅
Then, it makes the receiver switch from standby
mode to running mode
⋅
Enables corresponding interrupt sources in order to
wake up the Low Power Node by interrupting events
⋅
Makes the core processor go into sleep mode, at
which time the Low Power Node goes into a power saving state
The Low Power Node can also be awakened by an
external interrupt event like a button click, sensor
reading alert, vibration detection, or interval timer red
because it needs to send something to a Friend Node in
case friendship is terminated. From gure 7, you can also
see there are several steps required after waking up the
Low Power Node.
Bluetooth SIG Proprietary18
3 Things to Know Before Choosing Your Bluetooth Mesh Solutionback to contents
Low Power Considerations
When you select a Bluetooth mesh solution for an
Advertising Bearer, and it needs to use the low power
feature, you should be aware of:
⋅ Which sleep mode is the most suitable for your
application, since modern MCUs have multiple
sleep modes, each with dierent power
consumptions, computing capabilities, and
force-quit triggers
⋅
Types of interrupt sources that can wake the core
processor from the sleep mode you selected
⋅
How long it takes to wake the core processor and
receiver if the application is time sensitive
⋅
The duration it will wait for clock source stabilizing
from sleep mode
⋅
Selecting a suitable clock source when the
application is in low power mode (e.g. interval
RC oscillator or external 32KHz crystal oscillator)
Bluetooth SIG Proprietary19
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platform
5.0
Building a
Solid
Knowledge
back to contents
Base
Bluetooth SIG Proprietary20
3 Things to Know Before Choosing Your Bluetooth Mesh Hardware Platformback to contents
5.0 Building a Solid Knowledge Base
It is important to have a good understanding of the
available technology before initiating a project that
takes advantage of all that a Bluetooth mesh network
oers. Now that you know what to look for in a suitable
hardware platform, you should have the foundation you
need to start working with a Bluetooth mesh network.
By selecting the right chip/module; understanding key
coding, data retention, and OTA factors; and knowing
how to lower power consumption across your network,
you will be better positioned to select the most
appropriate Bluetooth mesh hardware platform that best
meets your specied needs.
Once you have selected a chip/module, you can
work with that silicon vendor to get the datasheet,
recommended development environment, sample source
code, reference design, and application note you need to
proceed. You can also contact the Bluetooth SIG for Help
& Support should you need any assistance.
To learn more about Bluetooth mesh, check out the
Bluetooth Mesh Networking Specications
Bluetooth SIG Proprietary21
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.