Repository navigation
bluetooth-bridge 0.1.0
The first release of bluetooth-bridge: a Bluetooth LE host stack that runs directly on HCI, with no BlueZ, and a Bluetooth LE to MQTT bridge, in Rust, as one static binary with no runtime.
Status: early. Every role, pairing method and GATT operation is tested in CI against Bumble's virtual controllers, but this release has not been tested on real hardware yet. Please report how it goes with your controller.
What you can do with it
- Drive a Bluetooth controller directly: a USB dongle or built-in chip through the Linux HCI user channel, a UART controller over H4, or H4 over TCP. Features adapt to what the controller supports.
- See BLE sensors on MQTT and in Home Assistant, with no pairing: BTHome v2 (including encrypted devices), Ruuvi, KKM, iBeacon, AltBeacon and Eddystone are decoded, and every other advertisement is published parsed.
- Keep devices with rotating private addresses as one device, from bonds or known IRKs.
- Connect to devices and use GATT over MQTT: discover, read, write, subscribe to notifications.
- Pair and bond with LE Secure Connections or legacy pairing, every method.
- Serve your own GATT services, advertise (legacy, extended and periodic), and follow periodic advertising.
- Ask a controller what it can do:
bluetooth-bridge probe hci0.
Install
Static binaries for x86_64, aarch64 (Raspberry Pi 3 and newer, 64-bit OS) and mipsel (MT7621/MT7628 routers) are attached below, with SHA256SUMS. The quick start goes from download to a sensor in Home Assistant; the documentation covers installation as a service, sensors, connections and GATT, configuration and every MQTT topic.
Known limitations
- The bridge takes the controller from BlueZ: other programs on the machine cannot use it at the same time.
- Bluetooth LE only: no Classic (audio, keyboards, serial ports) yet. Bluetooth Mesh is in progress on
main. - Home Assistant discovery assumes one bridge per broker.
- No TLS to the MQTT broker yet.
For developers
The stack is a set of library crates: bluetooth-host (the host stack), bluetooth-adv (advertising data, beacons and sensors, no I/O), and bluetooth-numbers (the Bluetooth SIG's assigned numbers, generated from the SIG's data). Depend on them by this tag; see the library guide.
Full list of changes: CHANGELOG.md.