How can I connect to the FitBit Zip over Bluetooth 4.0 LE on Linux with bluez?

Thomas Dignan picture Thomas Dignan · May 21, 2013 · Viewed 15.8k times · Source

I purchased a FitBit zip. This device uses Bluetooth 4.0 LE. I would like to at least connect to it via bluez. If that is successful I want to see how much of the protocol I can figure out.

I am using a Lenovo P500 Ideapad which has integrated support for Bluetooth 4.0. It seems to work (kind of)

When I do:

hcitool lescan

I am able to find the device's bluetooth address, which (though potentially irrelevant) is: CF:D9:24:DB:F4:7B

Now, I read in another question: Bluetooth Low Energy: listening for notifications/indications in linux that I can listen for notifications and other protocol features. I've worked with old bluetooth, but I have no experience with bluetooth LE.

I am getting stuck trying to use hcitool lecc or gatttool to connect to the device. The connection times out and seems to leave bluetooth in a bad state on the Linux box. I am able to fix that by reloading bluetooth related kernel modules.

Any hints are appreciated. I'm trying with the latest bluez now.

Answer

Ben picture Ben · Feb 17, 2014

Have a look at the galileo project, we are able to connect to the tracker (and synchronise it) using the Fitbit dongle, which is also a BluetoothLE connector. The bytes used there should help you figure out the one you need ...

Full Disclosure: I am the maintainer of this project.