My Bluemix‘ s colleagues have developed a Node.js app (iot-sensor-tag) that allow to use a MacBook as IoT gateway, retrieve data from its sensors, and publish that data to the IoT platform. In theory you can run the application an anything that supports the Node.js runtime and Bluetooth LE, so you can install node.js and iot-sensor-tag application on Raspberry PI.
You have download the Bluetooth stack Bluez on the Raspberry Pi from:
and before installing Bluez, the Raspberry Pi environment needs to be updated to have the following set of libraries installed on it:
sudo apt-get install libglib2.0-0 libglib2.0-dev sudo apt-get install libdbus-1-dev sudo apt-get install libudev-dev sudo apt-get install libical-dev sudo apt-get install libreadline-dev sudo apt-get install libusb-1.0-0-dev
You have extract the tar file downloaded earlier. Under the extracted directory the is the bluez-5.32 directory. You should find the configuration file ‘configure’ under the directory mentioned above Execute the following command to configure the Bluez
sudo ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --with-systemdsystemunitdir --with-systemduserunitdir --enable-library
Post successful configuration, now perform ‘make’ to install the Bluez
During the make command I enjoined to monitor the Raspberry CPU utilization on my web dashboard. As you know the Raspberry can send performance data to Watson IoT platform. Here is my old post about it.
and finally run the app on node.js
As usual you have to register the device on Watson IoT platform and create a NodeRed flow. You can read my previous post at this link
Enjoy with Sensor Tag and Raspberry PI !