The MetaHub is built on the Raspberry Pi 3 Model B platform.
The MetaHub runs Raspbian.
The MetaHub comes with a 5V 2.5Amps power supply (USA), a 8GB Class 10 MicroSD card (Sandisk or similar), and a plastic case with screws.
The MetaHub can connect to up to 5 MetaSensors simultaneously with high reliability using the internal Bluetooth.
There are 4 USB ports on the MetaHub.
You can add a Bluetooth to USB Dongle to each port to connect to more MetaSensors. Each Dongle connects up to 5 additional sensors yielding a total of 25 simultaneous MetaSensor connections on the MetaHub at once.
The MetaHub can also receive advertising packets from Beacons.
The Raspbian OS loaded on the MetaHub does not have a GUI; it is in terminal mode only. You should be comfortable with basic Linux commands and working with terminals.
21.1. Setup your Hub¶
Connect a LED/LCD screen via the HDMI port.
Connect a keyboard to one of the USB ports. Because there is no GUI loaded with the Raspbian version, you do not need to connect a mouse.
Connect the MetaHub to power using the power supply (AC to micro USB).
Once the MetaHub boots, login to the MetaHub.
Use the following credentials:
>>> Login: pi >>> Password: raspberry
Finally, connect the MetaHub to the internet.
The quickest way to get your MetaHub connected is to use an Ethernet cable and just plug it into the back of your router/switch. As soon as you plug your cable in, you should see the network LEDs start to flicker.
To scan for WiFi networks, use the command:
>>> sudo iwlist wlan0 scan
Once you know which network you want to connect to, run the command:
>>> sudo vim /etc/network/interfaces
You will see a place to put in the SSID
wpa-ssid "ssid"and the password
wpa-psk "password"to connect to the WiFi network.
Save, exit, and reboot! Your MetaHub will be connected the next time it boots.
>>> sudo reboot
Alternatively you could restart the network interface:
>>> sudo service networking restart >>> sudo ifdown wlan0 >>> sudo ifup wlan0 >>> ifconfig
With MetaHub, you have two options to move forward:
Choose your prefered language and get started below.
21.3. Python MetaBase¶
21.4. Build your own Hub¶
Install the Raspbian OS on an SD card:
Follow the instructions in the previous section link to boot and setup your MetaHub.
Change settings (such as the keyboard layout):
Use the GUI:
>>> sudo raspi-config
Follow these RaspberryPi Instructions.
>>> sudo apt-get update
>>> sudo apt-get install git
>>> sudo apt-get install python-pip
Install Bluetooth dependencies:
>>> sudo apt-get install pkg-config libboost-python-dev libboost-thread-dev libbluetooth-dev libglib2.0-dev python-dev build-essential python-dev
Install Bluetooth libraries:
>>> pip install pygatt >>> pip install pybluez[ble]
>>> sudo apt-get install -y build-essential >>> curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - >>> sudo apt-get install -y nodejs
Alternatively, for Node.js 8:
>>> curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - >>> sudo apt-get install -y nodejs
Choose the most fitting Meta SDK repositories on Github:
- Platform agnostic SDK to talk to MetaSensors using C++
- Linux SDK to talk to MetaSensors using Python
- Linux SDK to send MetaSensor data to the Cloud using Python
- Platform agnostic SDK to send MetaSensor data to the Cloud using Python
Clone the repositories of the Meta SDK you want to use:
Make sure you are comfortable with GIT:
>>> git clone REPO_NAME
Go to the API part of the tutorial or get started by looking at the example code in the repository you just downloaded.