[][src]Crate bluetooth_mesh

Pure Rust Bluetooth Mesh Stack.

The layers are designed so they can be put together in different ways to make different stacks (single-threaded, multi-threaded, multi-radio, etc). General stack glue is available in stack while a prebuilt full-stack requires std, async, etc.

How a Bluetooth Mesh Stack works

Modules

access

Access Layer between Models and the rest of the stack (Transport, Network, etc). The most surface layer of the stack.

address

Bluetooth Mesh Addresses. All address are 16-bit except for Virtual Addresses. Virtual Address are 128-bit UUIDs but only a 16-bit hash of the UUID is sent with message.

advertisement
beacon

Bluetooth Mesh Beacon Layer. Currently only supports SecureNetworkBeacons and UnprovisionedDeviceBeacons.

bearer

Bluetooth Mesh Bearers.

bytes
control

Bluetooth Mesh Control Layer.

crypto

Crypto functions (AES, ECDH) that the Mesh uses. AES is primarily used in the crypto::k_funcs and in network/application layer encryption. ECDH is used for the provisioning key exchange.

device_state

Device State Manager used to storing device state and having an config client control it.

foundation

Foundation Layer. Handles Publication, Config, etc.

friend

Optional Bluetooth Mesh Friends feature.

interface

Network Input/Output Interface and Filter.

lower

Lower Transport Layer. Primarily handles 4 types of PDUs.

mesh

Common Bluetooth Mesh Objects/Structures.

models
net

Bluetooth Mesh Network Layer is BIG Endian

properties

Bluetooth Properties (From GATT).

provisioning

Provisioning Layer for Bluetooth Mesh Provisioning is Big Endian.

random

Random Number generation for the Mesh. Generalized over the rand Library so there's no hard dependencies.

reassembler

Transport Layer Reassembler.

relay

Optional Relay Feature

replay

Replay Cache based on a BTreeMap that keeps track of each ivi and seq per src address. Updating the IVIndex causes a 'Garbage Collection' like effect that will delete any cache entries for any 'too' old IVIndices.

segmenter
stack

Bluetooth Mesh Stack that connects all the layers together. See ['StackInternals'] for more.

timestamp

Timestamp module for keeping track of time. Different systems have different clock sources so this module generalizes over it. By default, it uses the std::time::Instant but it could use a crystal oscillator clock (for ARM) or some other source.

upper

Upper Transport Layer. Primarily focusing on segmentation and reassembly.

uuid

Universally Unique Identifiers or UUIDs.