Synchronization using 'raw bluetooth' successful

  • From: Ben <benoit.allard@xxxxxx>
  • To: galileo <galileo@xxxxxxxxxxxxx>
  • Date: Sat, 08 Apr 2017 14:21:14 +0000

Hi there,

I just succeeded in synchronizing my tracker without the help of the Fitbit
dongle. It was a difficult task to settle on a library / api to interface
with bluez. Indeed, there already exist some libraries out there, but after
browsing them all (surprise me !), none of them really offered what I was
looking for. I tried to document my progress on a wiki page [0]. At the
end, I used the pydbus [1] library to interface with the DBus interface of
bluez. I discovered only later that the GATT part of that interface is
still experimental. It worked a few times already though.

If you have the ability to test, please do, and report errors (or send
patches !).

So, what's necessary:
- A recent bluez in experimental mode: 5.23 is not enough, I used 5.44, and
added "--experimental" to the command-line in the systemd service file.
(and restarted the service)
- A recent checkout of galileo (my tests did worked with revision dcb6f0b,
the current tip as I write this)
- The pydbus library and its dependencies. While "pip install pydbus" will
work fine, you will need to install PyGI from your distribution package
manager (it's usually called python-gi, python-gobject or pygobject).
- Of course, you will need a working BLE hardware

Once that is setup, use a command similar to mine:

   sudo ../bin/galileo --bluetooth PyDBUS --debug --database
RemoteRESTDatabase

I still need to implement the detection of recently synchronized trackers
(at the moment all trackers are synchronized everytime). I believe Axelle's
document can help me there. There are without doubts still other issues
that need to be fixed as well.

An official release should follow as soon as I have the feeling that enough
major issues are under control. Your testing can help there !

Happy sync'ing!

Best Regards,
Ben.

[0] https://bitbucket.org/benallard/galileo/wiki/BluetoothLE
[1] https://github.com/LEW21/pydbus

Other related posts: