Bluetooth Mesh Rust
Bluetooth Mesh stack implemented in Rust. In progress port/rewrite of Ero Bluetooth Mesh. Following the Bluetooth Mesh Spec Core v1.0. Designed to work with any BLE radio but currently targeting linux for testing. The complete stack still needs more glue between the layers but all the parts should be fully functional. If any mistake are found, please contact me!
#![no_std] excepts for dependence on std::Instant for time but a different source can be provided. While not provided, on ARM; a crystal oscilator can be the time source.
Partially serde support but still needs much more work.
The only heap allocations made durning processing a message is allocating memory for the message at the access layer. Most Mesh PDUs are <31 bytes (to fit in a single BLE Advertisement) so the Network and Lower Transport Layer stores its data staticly on the stack.
8 Layer system
Big Endian
- Network
- Lower
- Upper
- Beacons
- Provisioning
Little Endian
- Access
- Foundation
TODO:
-
Model
- Isolated SDK layer
-
Stack
- Access
- Elements
- Models
- States
- Messages
- Acknowledgements
- Transport
- Upper
- Control
- Heartbeat
- Friend
- Poll
- Update
- Request
- Offer
- Clear
- Clear Confirm
- Subscription List
- Add
- Remove
- Confirm
- Control
- Lower
- Segment
- Reassembly
- Friend Queue
- Upper
- Net
- Encrypting
- Payload
- Header
- Bearers
- PB-ADV
- Links for Provisioning
- PB-GATT
- PB-Proxy
- Custom Proxy?
- PB-ADV
- Crypto Functions
- k1
- k2
- k3
- k4
- s1
- Tests for k1-k4, s1
- id128
- ECDH
- AES-CMAC
- AES-ECB
- Provisioning
- PB-GATT
- PB_ADV
- Links
- Generic
- Key Exchange
- Segmentation
- Reassembly
- Access
-
Serialization
- Wire Serialization
- Tests written
- Text Serialization
- Wire Serialization
-
Models
- Config
- Composition Data
- Model Publication
- Subscription List
- NetKey List
- AppKey List
- Model to AppKey List
- Default TTL
- Relay
- Attention Timer
- Secure Network Beacon
- GATT Proxy
- Node Identity
- Friend
- Key Refresh Phase
- Health Fault
- Health Fast Period Divisor
- Heartbeat Publication
- Heartbeat Subscription
- Network Transmit
- Relay Retransmit
- PollTimeout List
- Health
- Config