问题
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