Which tool has replaced gatttool in bluez5?

为君一笑 提交于 2019-12-10 12:47:18

问题


It seems like since commit b1eb2c4cd057624312e0412f6c4be000f7fc3617 gatttool has been deprecated but I'm unable to find any information on what has replaced gattool.

Every Python Bluetooth LE packages I looked into relays on gatttool and is now broken on my ArchLinux system since the bluez package isn't build with --enabled-deprecated flag (which would build gatttool binary).

pygatt is just broken on my system and bluepy doesn't build as they ship there own (on my system broken) bluez code to build gatttool.

Whatsoever I looking to write a new wrapper around whatever replaced gatttool but I'm unable to find any information on this topic.

So which tool from the bluez stack can I use to write a new Python Bluetooth LE wrapper?


回答1:


update

ArchWiki listed gatttool as deprecated and lists btgatt-client the D-Bus Gatt API as replacement.

gattlib from labapart supports bluez 5 and provides gatttool.

I guess gatttool got deprecated due to a missing maintainer rather than being replaced by some new tool.

edit unfortunately the code for gatttool in the linked repository supports only bluez 4.




回答2:


This may not be the answer you're looking for, but this package:

https://bitbucket.org/OscarAcena/pygattlib

describes itself thusly:

This is a Python library to use the GATT Protocol for Bluetooth LE devices. It is a wrapper around the implementation used by gatttool in bluez package. It does not call other binaries to do its job :)

Since I want to access GATT functions from Python, I'm about to give it a whirl.



来源:https://stackoverflow.com/questions/43200868/which-tool-has-replaced-gatttool-in-bluez5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!