Expand description
§bluetooth-mesh-stack
Bluetooth Mesh on the bluetooth-host stack (work in progress).
cargo add bluetooth-mesh-stackWhat is here so far: the security toolbox (s1, k1 to k4), network PDU encryption and obfuscation, lower and upper transport with segmentation and reassembly, provisioning on both sides over PB-ADV, the access layer with Composition Data, the Configuration models a provisioner needs, Generic OnOff and Level, and a runtime that provisions, configures and controls nodes, or runs as a node, over the advertising bearer or the GATT proxy. The API will change before it is released.
Part of bluetooth-bridge, maintained by Pulzar. See the user guide, the library guide and the API documentation.
License: MIT.
Modules§
- access
- The access layer (Mesh Protocol 3.7): opcodes and the messages of the
foundation models (Configuration, sent with the device key) and of the
Generic OnOff and Level models. Opcode names come from the SIG’s
assigned numbers (
bluetooth_numbers::mesh_opcode). - bearer
- What Mesh puts on the advertising and GATT bearers: beacons (AD type Mesh Beacon), PB-ADV (AD type PB-ADV: links and provisioning transactions), and Proxy PDUs on the Mesh Proxy and Provisioning GATT services.
- crypto
- The Mesh security toolbox (Mesh Protocol 3.9.2): the salt generation function s1, the key derivation functions k1 to k4, and AES-CCM with the 32 and 64-bit MICs Mesh uses. Keys and values are byte arrays most significant octet first, as the specification and its sample data write them (Mesh, unlike SMP, sends them in that order too).
- network
- The network layer (Mesh Protocol 3.4): Network PDUs encrypted and obfuscated with a network key’s material, decoded by trying the keys whose NID matches, and a bounded message cache so a relayed copy is handled once.
- provisioning
- Provisioning (Mesh Protocol 5.4), sans-IO: the provisioner and the device as state machines that take and give Provisioning PDUs, carried by any bearer (PB-ADV or PB-GATT). Algorithm BTM_ECDH_P256_CMAC_AES128_AES_CCM, with No OOB, Static OOB, Output OOB (numeric) and Input OOB (numeric) authentication.
- proxy
- The GATT bearer: a mesh reached through a node’s Mesh Proxy service
rather than on the advertising channels.
ProxyBeareris the client (a gateway whose radio is busy scanning, or a mesh out of advertising range but within one connection’s);ProxyServeris a node’s side. - runtime
- A Mesh node or provisioner on a bearer: PB-ADV provisioning on both sides, the network and transport layers with segmentation and acknowledgments, and the foundation models a provisioner configures (Configuration Server) plus a Generic OnOff Server on the node side.
- transport
- The upper and lower transport layers (Mesh Protocol 3.5, 3.6).