AndrewGi/BluetoothMeshRust

Created Dec 29, 2020 · View the AndrewGi/BluetoothMeshRust repository page

Cross-platform, full Bluetooth Mesh stack implemented in Rust

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

4

Lines of Code

2,112

From

Aug 19, 2019

To

Nov 7, 2020

About AndrewGi/BluetoothMeshRust

This is a comprehensive Bluetooth Mesh protocol stack written in Rust that implements the Bluetooth Mesh Specification Core v1.0 published by the Bluetooth Special Interest Group. It is designed to be cross-platform and works with various BLE radios by leveraging the btle library for platform-specific Bluetooth drivers. The project provides both a complete stack implementation and lower-level primitives, allowing users to either use the provided stack or build custom implementations with specific requirements.

The library emphasizes minimal resource usage and is architected with embedded systems in mind, targeting no_std environments where possible. Memory efficiency is a key design principle, with most Bluetooth Mesh Protocol Data Units kept under 31 bytes to fit in single BLE advertisements. Stack allocation is used for Network and Lower Transport Layer data, while Upper Transport PDUs (up to 380 bytes) can use heap allocation with support for custom allocators and storage backends. A full_stack module is available for more complex scenarios, using async Tokio for message handling, though this requires standard library support.

The project is currently in active development with an unstable API prior to version 1.0. It includes a Mesh CLI application example demonstrating practical usage, making it suitable for developers building Bluetooth Mesh applications on embedded devices, IoT systems, and Raspberry Pi platforms. The implementation is notable for balancing comprehensive protocol compliance with the resource constraints of embedded Rust environments.

Share this video