Saturday, August 30, 2014

Installing TheThingSystem on Ubuntu 12.04

Installing TheThingSystem on Ubuntu 12.04


This is a guide to set up TheThingSystem and the steward on Ubuntu 12.04.1 LTS Desktop 64-bit.
More information about the TheThingSystem is available here and on GitHub.
This guide is based on the Bootstrapping guide on TheThingSystem's website, available here.
A very big thanks to TheThingSystem team for the time they’ve put into this project.

I started with a fresh install of Ubuntu 12.04.1 LTS Desktop 64-bit using “ubuntu-12.04.1-desktop-amd64.iso” available here.


Once booted into the desktop, open up Terminal:


  1. Update the current packages and install basic tools (I also installed vim as my editor of choice)

sudo apt-get update
sudo apt-get install git-core build-essential curl vim

  1. Configure git and install node

git config --global user.name "Kyle Schien"
git config --global user.email kyleps@gmail.com
git clone https://github.com/joyent/node.git
cd ~/node
git checkout v0.10.22 -b v0.10.22
./configure
make   
sudo make install

  1. Once node is installed, install nodewiki, nvm, and set the default node to v0.10.22

sudo npm install -g nodewiki
git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> ~/.bashrc
. ~/.nvm/nvm.sh
nvm alias default v0.10.22

  1. Install node-gyp

git clone https://github.com/TooTallNate/node-gyp.git ~/node-gyp
cd ~/node-gyp
sudo npm install -g node-gyp

  1. Install required packages for steward

sudo apt-get install libpcap-dev libavahi-client-dev libavahi-core7 libnss-mdns avahi-discover libavahi-compat-libdnssd-dev libusb-1.0-0-dev libusb-dev libglib2.0-dev automake libudev-dev libical-dev libreadline-dev libdbus-glib-1-dev libexpat1-dev g++ libssl-dev libbluetooth-dev

  1. Download and install bluez bluetooth packages

cd ~
wget https://www.kernel.org/pub/linux/bluetooth/bluez-4.101.tar.gz
tar -xvf bluez-4.101.tar.xz
cd ~/bluez-4.101
./configure
make
sudo make install

  1. Download steward files from git and install node packages

git clone https://github.com/TheThingSystem/steward.git ~/steward
cd ~/steward/steward
rm -rf ~/steward/steward/node_modules
sudo npm install -l

  • If you don't have a Bluetooth LE adapter, edit discovery/discovery-ble.js and comment out “noble = require('noble');”

vim ~/steward/steward/discovery/discovery-ble.js

Comment out line 31 to read
//noble = require('noble');

  1. Start steward and navigate to the steward interface to set up location and check out detected devices

cd ~/steward/steward
sudo ./run.sh

  • The interface is accessible via web browser at
https://127.0.0.1:8888 or
http://127.0.0.1:8887

References and useful links


If you find this guide useful and want to donate, feel free to send me some cryptocurrency =)


BTC
1GfrM2BdwpUQXERubhyqoTZQ39xJXkiYPG
LTC
LbQMtCg7tF77FenWkYXu9uxiSgVWNREiP1
CinnamonCoin
CcmYCmJ6fgMBnCBQi8ErUEaKp7xLdGMcou

No comments:

Post a Comment