Skip to content

Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync)

(it should work with any other Debian-based Raspberry Pi distribution and all newer Fitbit devices that use BLE)
sudo -i
apt-get update
apt-get install python-pip
pip install galileo
galileo

You can then use cron or a simple shell script to periodically run galileo.

  • Twitter
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync)
  • Mixx Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync)
  • Bloglines Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync)
  • Technorati Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync)
  • Fark this: Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync)
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at YahooMyWeb
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at Furl.net
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at reddit.com
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at blinklist.com
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at Spurl.net
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at NewsVine
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at Simpy.com
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) at blogmarks
  • Bookmark Using a Raspberry Pi running raspbmc to sync Fitbit One with galileo (fitbit linux sync) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux

This is how I got a Bluetooth low energy (BLE) adapter to work on a Linux laptop running Ubuntu 12.04.

First, as suggested by several websites, I created the file /etc/modprobe.d/trust-btusb.conf with the following contents:
install usb:v0A5Cp21E8d*dc*dsc*dp*ic*isc*ip* /sbin/modprobe btusb; echo 0a5c 21e8 > /sys/bus/usb/drivers/btusb/new_id

After having restarted the computer and inserted the adapter, dmesg told me the following:
Bluetooth: can't load firmware, may not work correctly

To get the proper firmware, I downloaded the Windows 8 driver (18187_02.exe) from http://www.trust.com/18187. The driver files can be extracted from the .exe with "unrar x 18187_02.exe".

Then I looked for the vendor id (0x0a5c) and product id (0x21e8) in the various .inf files, and found this in 18187_02/Win32/bcbtums-win7x86-brcm.inf:
%BRCM20702.DeviceDesc%=RAMUSB21E8,      USB\VID_0A5C&PID_21E8                                   ; 20702A1 dongles

Further down in the inf file there is a RAMUSB21E8 section which contains the following line:
HKR,,%RAMPatchFileName%,0x00000, "BCM20702A1_001.002.014.0187.0188.hex"

The .hex "RAM Patch" file can be found in 18187_02/Win32/. Before it can be used with btusb, it needs to be converted to hcd format. This can be done with hex2hcd. Finally, the hcd file needs to be moved/copied to /lib/firmware/fw-0a5c_21e8.hcd. Here are the steps to get and compile hex2hcd:
$ git clone https://github.com/jessesung/hex2hcd.git
$ cd hex2hcd/
$ make

The resulting executable can be used to convert the .hex firmware file to .hcd, which is then copied to the right destination:
$ ./hex2hcd BCM20702A1_001.002.014.0187.0188.hex BCM20702A1_001.002.014.0187.0188.hcd
$ sudo cp -p BCM20702A1_001.002.014.0187.0188.hcd /lib/firmware/fw-0a5c_21e8.hcd
$ sudo chown root:root /lib/firmware/fw-0a5c_21e8.hcd

The adapter can now be used:
$ sudo hcitool -i hci1 lescan


Update, 2014-09-08:
  • The first step is no longer necessary with Ubuntu 14.04, I directly receive the "may not work" message.
  • I was able to extract the firmware from 18187_05.exe (latest W8 driver) using this command: "7z x 18187_05.exe"
  • The correct .hex file is BCM20702A1_001.002.014.0449.0515.hex
  • Twitter
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux
  • Mixx Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux
  • Bloglines Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux
  • Technorati Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux
  • Fark this: Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at YahooMyWeb
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at Furl.net
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at reddit.com
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at blinklist.com
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at Spurl.net
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at NewsVine
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at Simpy.com
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux at blogmarks
  • Bookmark Getting the Trust 18187 Bluetooth 4.0 USB adapter (0a5c:21e8) to work with Linux with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca