xref: /nrf52832-nimble/packages/NimBLE-latest/docs/mesh/index.rst (revision 042d53a763ad75cb1465103098bb88c245d95138)
1Bluetooth Mesh
2--------------
3
4.. toctree::
5   :hidden:
6   :titlesonly:
7
8   sample
9
10.. contents::
11   :local:
12   :depth: 2
13
14Introduction to Mesh
15~~~~~~~~~~~~~~~~~~~~
16
17Bluetooth Mesh is a new standard from Bluetooth SIG that was released in 2017. It enables many-to-many device
18communication (as opposed to point-to-point approach in BLE) and is optimised for large-scale networks like building
19automation or sensors network. It utilizes managed flood based approach where only mains-powered nodes relay messages
20making it very power efficient (battery powered low-power nodes that don't relay messages can operate in mesh network for years).
21
22Bluetooth Mesh is complementary to Bluetooth specification and requires features from 4.0 release only. This allows
23deployment of networks using hardware already available on the market.
24
25Topology
26~~~~~~~~
27
28.. figure:: mesh_topology.jpg
29   :alt: Bluetooth Mesh Topology (source: Mesh Profile Specification 1.0)
30
31Bluetooth Mesh defines few features (roles) for devices in network. Those are:
32
33-  Relay - receive and retransmit mesh messages over the advertising bearer to enable larger networks
34-  Proxy - receive and retransmit mesh messages between GATT and advertising bearers.
35-  Low Power - operate within a mesh network at significantly reduced receiver duty cycles only in conjunction with a
36   node supporting the Friend feature
37-  Friend - the ability to help a node supporting the Low Power feature to operate by storing messages destined for those nodes
38
39Bearers
40~~~~~~~
41
42Mesh Profile specification allows two kinds of bearers for transmitting data:
43
44-  Advertising Bearer
45
46   -  Uses LE advertising to broadcast messages to all nodes that are listening at this time
47   -  Uses non-connectable advertising only
48   -  29 octets of network message
49
50-  GATT Bearer
51
52   -  Uses LE Connections to send messages
53   -  Uses standard GATT service (one for Provisioning and one for Proxy)
54
55Provisioning
56~~~~~~~~~~~~
57
58Provisioning is a process of adding an unprovisioned device to a mesh network managed by a Provisioner. A Provisioner
59provides the unprovisioned device with provisioning data that allows it to become a mesh node (network key, current IV
60index and unicast address). A Provisioner is typically a smart phone or other mobile computing device.
61
62Models
63~~~~~~
64
65Models define basic functionality of nodes on a mesh network. Mesh Profile Specification defines foundation models used
66to configure and manage network. Mesh Model Specification includes models defininig functionality that is standard
67across device types. Those consists of:
68
69-  Generics - root models
70
71   -  On/Off
72   -  Level
73   -  Battery Server
74   -  Location
75   -  Client Property
76   -  and others
77
78-  Sensors - defines a standard way of interfacing with sensors
79-  Time and Scenes - defines a set of functionalities related to time and saved states on devices
80-  Lighting - defines a set functionalities related to lighting control
81
82Complex models e.g. Lighting may contain other models eg Generic On/Off. The following image shows an example of Light
83Lightness Server Model.
84
85.. figure:: mesh_lightning_model.jpg
86   :alt: Light Lightness Server model (source: Mesh Model Specification 1.0)
87
88Mesh Node features supported by Apache Mynewt
89~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90
91-  Advertising and GATT bearers
92-  PB-GATT and PB-ADV provisioning
93-  Foundation Models (server role)
94-  Relay support
95-  GATT Proxy
96