Skip to content

Getting Started With Bluetooth LE SensorTag on Linux

Günter Obiltschnig edited this page Oct 28, 2018 · 7 revisions

This page describes how to get started with Bluetooth LE and the TI SensorTag on a Linux device (including a Raspberry Pi).

Bluetooth support in requires the bluepy-helper executable that's part of the bluepy project.


$ sudo apt-get update
$ sudo apt-get install libssl-dev
$ sudo apt-get install bluetooth
$ sudo apt-get install build-essential libglib2.0-dev libdbus-1-dev


$ git clone
$ cd
$ make -s -j2 DEFAULT_TARGET=shared_release

Building bluepy (for bluepy-helper)

$ cd ..
$ git clone
$ cd bluepy/bluepy
$ make
$ sudo cp bluepy-helper /usr/local/bin/

Enabling Bluetooth

$ sudo hciconfig hci0 up

Search for a TI SensorTag

$  sudo hcitool lescan
LE Scan ...
C4:BE:84:72:C5:06 (unknown)
C4:BE:84:72:C5:06 CC2650 SensorTag

Enable TI SensorTag in Configuration

Edit and add the following lines:

# Bluetooth LE/SensorTag
btle.bluez.helper = /usr/local/bin/bluepy-helper
sensortag.sensors.1.address = C4:BE:84:72:C5:06

The SensorTag address must match the address discovered with sudo hcitool lescan.


$ export MACCHINA_BASE=/path/to/
$ export LD_LIBRARY_PATH=$MACCHINA_BASE/platform/lib/Linux/armv7l:$LD_LIBRARY_PATH
$ cd
$ bin/Linux/armv7l/macchina

Note: in the export LD_LIBRARY_PATH command, replace armv7l with the proper hardware architecture of your system (e.g., x86_64).

The sensors from the SensorTag should now be visible in the Sensors & Devices app in the web user interface.