Fitbit

From Finninday
Revision as of 03:00, 4 January 2014 by Rday (Talk | contribs)

Jump to: navigation, search

Just got a fitbit force. My first instinct was to install the windows-only sync software in wine, but wine rates the software as garbage.

So I'll have to find another way.

I'm not alone trying to solve this problem: https://lwn.net/Articles/532410/

That makes it look like there isn't a very good solution.

Here is what the fitbit USB dongle looks like when inserted:

[   23.908099] usb 4-1: new full-speed USB device number 2 using ohci-pci
[   24.088179] usb 4-1: New USB device found, idVendor=2687, idProduct=fb01
[   24.088183] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   24.088185] usb 4-1: Product: Fitbit Base Station
[   24.088187] usb 4-1: Manufacturer: Fitbit Inc.
[   24.088189] usb 4-1: SerialNumber: \xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf\xffffffef\xffffffbf\xffffffbf\xffffffbf\xffffffbf
[   24.098279] hid-generic 0003:2687:FB01.0005: hiddev0,hidraw4: USB HID v1.11 Device [Fitbit Inc. Fitbit Base Station] on usb-0000:00:12.1-1/input0
[   24.106274] hid-generic 0003:2687:FB01.0006: hiddev0,hidraw5: USB HID v1.11 Device [Fitbit Inc. Fitbit Base Station] on usb-0000:00:12.1-1/input1

The comments in the article referenced above indicates that the current generation of fitbits are using bluetooth LE to transmit data.

treat the fitbit as a bluetooth device

A naive attempt to enable bluetooth in Ubuntu 13.10 does not work: No bluetooth adapters found.


Silly to hope that the base station is a generic bluetooth device. But if it were, I'd be able to do something like this to snoop on the fitbit:

hcitool scan
bluez-simple-agent hci0 00:11:12:09:XX:XX
rfcomm bind rfcomm0 00:11:12:09:XX:XX
screen /dev/rfcomm0

Here's what I see:

root@ferret:~# hcidump
HCI sniffer - Bluetooth packet analyzer ver 2.5
Can't open device: No such device

snoop fitbit usb traffic

Reference for usb snooping: http://biot.com/blog/usb-sniffing-on-linux https://www.kernel.org/doc/Documentation/usb/usbmon.txt

lsusb shows it here:

Bus 004 Device 002: ID 2687:fb01

cat /sys/kernel/debug/usb/devices has this in it:

T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1
P:  Vendor=2687 ProdID=fb01 Rev= 1.00
S:  Manufacturer=Fitbit Inc.
S:  Product=Fitbit Base Station
S:  SerialNumber=����������������
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 50mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=  32 Ivl=2ms
E:  Ad=01(O) Atr=03(Int.) MxPS=  32 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=82(I) Atr=03(Int.) MxPS=  32 Ivl=2ms
E:  Ad=02(O) Atr=03(Int.) MxPS=  32 Ivl=2ms

I want to snoop on bus 4.