trouble
trouble copied to clipboard
An Rust host BLE stack with a future goal of qualification. Currently the focus is on implementing the host on top of a HCI interface.
trouble
WIP Basic functionality works, but API is likely to change a bit. Use nrf-softdevice for the time being if you want a production ready BLE Rust stack for nRF.
TrouBLE is a Bluetooth Low Energy (BLE) Host implementation written in Rust, with a future goal of qualification.
The initial implementation was based on bleps but has been adopted to work with bt-hci, which implements Rust types for the HCI specification as well as an interface
for a BLE Controller.
HCI what?
The BLE specification defines the software of a BLE implementation in terms of a controller (lower layer) and a host (upper layer). These communicate via a standardized protocol called the Host-Controller Interface (HCI), which can operate over different transports such as UART, USB or a custom IPC implementation.
Current status
The implementation has some basic functionality working:
- Peripheral role - advertise as a peripheral and accept connections.
- Central role - scan for devices and establish connections.
- Basic GATT server supporting write, read, notifications
- L2CAP CoC (Connection oriented Channels) with credit management (for both central and peripheral)
- Runs on any transport supporting the
bt-hcitraits.
Example
See examples for example applications. Currently there are two examples:
nrf-sdcfor the nRF52 based using thenrf-sdccrate.serial-hciwhich runs on a PC using a HCI controller attached via a serial port (Such as this Zephyr sample).
License
Trouble is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.