Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which tool has replaced gatttool in bluez5?

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?

like image 623
Henrik Pingel Avatar asked Apr 04 '17 07:04

Henrik Pingel


2 Answers

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.

like image 73
Henrik Pingel Avatar answered Sep 28 '22 07:09

Henrik Pingel


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.

like image 24
fearless_fool Avatar answered Sep 28 '22 06:09

fearless_fool