bluez
0.9.0, released 5 weeks ago by canonical.com
A Dart client for interacting with the Linux BlueZ Bluetooth stack via D-Bus.
What it does
It connects to the system BlueZ service, enumerates adapters and devices, and allows operations like discovery, pairing, and GATT communication. All interactions are performed over D-Bus on Linux platforms.
AI-written summary of version 0.9.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need direct Bluetooth control on Linux desktops or embedded devices
- You want to manage Bluetooth adapters, devices, and GATT services from Dart
Skip it when
- Running on non‑Linux platforms (iOS, Android, Windows, macOS)
- You require a cross‑platform Bluetooth solution
Strengths
- Thin wrapper around the official BlueZ D‑Bus API
- Supports most BlueZ features including advertising, GATT, and agent registration
- Pure Dart, no native plugins required
Weaknesses
- Linux‑only; will throw at runtime on other OSes
- Relies on the dbus package, so D‑Bus must be available and correctly configured
- Limited documentation beyond the README
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:bluez/bluez.dart';
final client = BlueZClient();
await client.connect();
for (final device in client.devices) {
print('Device ${device.address} ${device.alias}');
}
await client.close();Alternatives
Packages that do the same job and could replace bluez.
- flutter_classic_bluetooth
Bluetooth Classic RFCOMM/SPP serial communication plugin for Flutter.
83Compare - health_connector_hc_android
Android implementation of the health_connector plugin using Health Connect SDK.
75Compare - bluetooth_classic
A Flutter plugin to connect to Bluetooth Classic devices, mainly designed for serial communication.
48Compare - flutter_bluetooth_serial
Classical Bluetooth serial communication for Flutter on Android.
50Compare
Works with
Packages commonly used together with bluez: ones it builds on, ones built on it, and its own family.
- dbusbluez depends on itNative Dart D-Bus client for Linux and Windows.
- nmSame familyClient for interacting with Linux NetworkManager via D-Bus
- gsettingsSame familyClient to access GSettings database for storing user preferences on Linux.
- geoclueSame familyDart client for the GeoClue D-Bus geolocation service on Linux.
- upowerSame familyProvides a client to connect to UPower for Linux power management.
- desktop_notificationsSame familySend Linux desktop notifications via DBus.
- xdg_desktop_portalSame familyA native Dart implementation of portals for Linux desktop applications.
- packagekitSame familyClient for connecting to PackageKit to manage Linux software packages.