解决方法
Unfortunately,as of now there is no official API reference to refer to,so more curIoUs readers are advised to download and examine the BlueZ source code.
Gilbert Brault还从bluez [6]中提取了GATT接口,并链接到GATT接口的基本doxygen文档[7],其中包含以下免责声明:
This is a work in progress with the intent of documenting all important functions and data structures
此外,Szymon Janc在2016年嵌入式Linux大会上的演讲“蓝牙现代Linux”中给出了很好的概述[8].在42:00关闭时,他谈到了未曝光的C接口.但总的来说,他似乎推荐使用DBUS API(请参阅45:30的“提示”幻灯片).一些DBUS文档可以在doc / gatt-api.txt [9]中找到,使用DBUS接口的Python示例可以在test /中找到.
希望这可以帮助.
[1] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/attrib/gatttool.c
[2] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/client/
[3] https://github.com/anki/drive-sdk/
[4] https://github.com/anki/drive-sdk/tree/master/deps/bzle/
[5] https://people.csail.mit.edu/albert/bluez-intro/c404.html
[6] https://github.com/gbrault/gattclient
[7] http://gbrault.github.io/gattclient/index.html
[8] https://www.youtube.com/watch?v=tclS9arLFzk
[9] http://git.kernel.org/cgit/bluetooth/bluez.git/tree/doc/gatt-api.txt