Skip to content

A Rust Host BLE stack with a future goal of qualification.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

embassy-rs/trouble

 
 

Repository files navigation

trouble

CI

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.

Done:

  • 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)

Missing:

  • Security manager (i.e. secure pairing)
  • Gatt client
  • Expose more configuration options
  • Legacy Bluetooth (probably won't happen unless it's needed for qualification).*
  • Testing preparing for qualification (see https://github.com/auto-pts/auto-pts which is an automated framework we might be able to use)
  • Check serialization/deserialization code size and improve

Example

See examples for example applications. Currently there are two examples:

  • nrf-sdc for the nRF52 based using the nrf-sdc crate.
  • serial-hci which 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

at your option.

About

A Rust Host BLE stack with a future goal of qualification.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages