#bluetooth #stm32 #ble #read-write

no-std stm32wb-hci

Implementation of the Bluetooth HCI for the STM32WB family

6 releases

0.17.2 Jan 17, 2024
0.17.1 Jan 15, 2024
0.16.0 Dec 28, 2023
0.1.4 Jul 27, 2023
0.1.2 Jun 22, 2023

#11 in #stm32

Download history 5/week @ 2024-02-21 45/week @ 2024-02-28 5/week @ 2024-03-06 15/week @ 2024-03-13 3/week @ 2024-03-20 58/week @ 2024-03-27 5/week @ 2024-04-03

82 downloads per month

MIT/Apache

765KB
10K SLoC

STM32WB-HCI

forked from bluetooth_hci

Build Status

This crate defines a pure Rust implementation of the Bluetooth Host-Controller Interface for the STM32WB family of microcontrollers. It defines commands and events from the specification, and vendor-specific commands and events.

Version

This crate aims to match the latest firmware binaries released by ST. The minor version number of this crate should indicate the appropriate firmware version to use, refer to this table in unclear:

crate version firmware version
0.17.2 1.17.1
0.17.0 1.17.0
0.16.0 1.16.0
older 1.15.0

Usage

This crate defines a trait (Controller) that should be implemented for a specific BLE chip. Any implementor can then be used as a host::uart::UartHci to read and write to the chip.

impl stm32wb_hci::Controller for MyController {
    async fn controller_write(&mut self, header: &[u8], payload: &[u8]) -> Result<(), Self::Error> {
        // implementation...
    }
    async fn controller_read_into(&mut self, buffer: &mut [u8]) -> Result<(), Self::Error> {
        // implementation...
    }
}

The entire Bluetooth HCI is implemented in terms of these functions that handle the low-level I/O.

Dependencies

~170–380KB