蓝牙协议栈 pygatt
pygatt 是一个用于读写蓝牙设备的 GATT 描述符的 Python 模块,可用于任何符合标准 GATT 描述符行为的设备,例如健身追踪器、传感器等等。
pygatt 支持两种不同后端并提供了 Pythonic API:
- BlueZ (requires Linux), using the
gatttool
command-line utility. - Bluegiga's BGAPI, compatible with USB adapters like the BLED112.
我们在 Linux 上进行测试,因此选择使用 gatttool 后端即可。