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

Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error)

This has been bugging me for quite some time...

The solution:
$ sudo ln -s /usr/share/virtualbox /opt/VirtualBox

Found here.

  • Twitter
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error)
  • Mixx Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error)
  • Bloglines Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error)
  • Technorati Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error)
  • Fark this: Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error)
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at YahooMyWeb
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at Furl.net
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at reddit.com
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at blinklist.com
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at Spurl.net
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at NewsVine
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at Simpy.com
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) at blogmarks
  • Bookmark Keyboard does not work properly in Virtualbox remote desktop session (fixing rdesktop-vrdp "Failed to open keymap" error) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0

  • instead of including wiring.h, WProgram.h, WConstants.h and pins_arduino.h, you only need Arduino.h

  • Wire.send() is now Wire.write(), Wire.receive() is now Wire.read()

    • If you get error messages like "call of overloaded ‘write(int)’ is ambiguous", you probably need to add "(byte)" before a constant argument, eg: Wire.write((byte)0x00);

  • It is possible to use conditional statements to write code that is compatible with older and newer versions, eg:
    #if ARDUINO >= 100
    #include "Arduino.h"
    #else
    #include "WProgram.h"
    #endif

  • More complete list and additional information:


  • Twitter
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0
  • Mixx Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0
  • Bloglines Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0
  • Technorati Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0
  • Fark this: Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at YahooMyWeb
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at Furl.net
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at reddit.com
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at blinklist.com
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at Spurl.net
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at NewsVine
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at Simpy.com
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 at blogmarks
  • Bookmark Converting a sketch or a library from Arduino IDE 0023 to Arduino 1.0 with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca
Defined tags for this entry:

vim instead of nano (Ubuntu / Debian)

apt-get install vim
update-alternatives --config editor

  • Twitter
  • Bookmark vim instead of nano (Ubuntu / Debian) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg vim instead of nano (Ubuntu / Debian)
  • Mixx vim instead of nano (Ubuntu / Debian)
  • Bloglines vim instead of nano (Ubuntu / Debian)
  • Technorati vim instead of nano (Ubuntu / Debian)
  • Fark this: vim instead of nano (Ubuntu / Debian)
  • Bookmark vim instead of nano (Ubuntu / Debian) at YahooMyWeb
  • Bookmark vim instead of nano (Ubuntu / Debian) at Furl.net
  • Bookmark vim instead of nano (Ubuntu / Debian) at reddit.com
  • Bookmark vim instead of nano (Ubuntu / Debian) at blinklist.com
  • Bookmark vim instead of nano (Ubuntu / Debian) at Spurl.net
  • Bookmark vim instead of nano (Ubuntu / Debian) at NewsVine
  • Bookmark vim instead of nano (Ubuntu / Debian) at Simpy.com
  • Bookmark vim instead of nano (Ubuntu / Debian) at blogmarks
  • Bookmark vim instead of nano (Ubuntu / Debian) 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