finds.dev

labapart/gattlib

Library to access GATT information from BLE (Bluetooth Low Energy) devices

View on GitHubHomepage ↗

★ 514Cupdated Jul 2024

// the take

GattLib is a C library that wraps BlueZ's GATT implementation to give you a consistent API for reading, writing, and subscribing to BLE characteristics on Linux. It targets embedded Linux and Raspberry Pi-style projects where you need to talk to a BLE sensor or peripheral without writing D-Bus boilerplate. Python bindings are available via PyPI.

Abstracts the BlueZ v4/v5 API split cleanly — same calling code works across a wide range of kernel/BlueZ versions. The D-Bus backend (v5.40+) is the right architectural call; it avoids the deprecated direct HCI socket approach that breaks on modern kernels. Python bindings are a real value-add for IoT scripting use cases. Examples cover the practical 80%: scan, connect, discover, read/write, notify.

Last commit July 2024 and the TODO still lists removing GLib as a dependency — that's been sitting there for years, meaning you're pulling in GLib whether you want it or not. No async/callback API worth mentioning; notification handling is callback-only with no event loop integration beyond GLib's mainloop, which is awkward if your app already runs a different loop. The test suite is a single continuous-connection stress test with no unit coverage — the CI is essentially 'does it compile'. macOS/Windows are non-starters; this is Linux-only and the docs don't say so prominently enough.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
514
Forks
168
Language
C
Last commit
17 Jul 2024

// nearby

If gattlib isn't quite it.

All repos →