Raspberry Pi
Connect your your Raspberry Pi to the internet before beginning.
Version Requirements
Requires gateblu-forever v3.3.2 or higher!
Raspbian
These instructions are for Raspbian running on Raspberry Pi A/B/B+/2
Install Node and Dependencies
wget https://nodejs.org/dist/latest-v5.x/node-v5.11.1-linux-armv6l.tar.gz && \
tar -xvf node-v5.11.1-linux-armv6l.tar.gz && \
cd node-v5.11.1-linux-armv6l && \
sudo cp -R * /usr/local/ && \
sudo apt-get install -y --force-yes libusb-1.0-0-dev && \
libusb-1.0-0.dev
libusb-1.0-0.dev package is optional, but you will probably need it for most devices connected to the Raspberry Pi
Install Gateblu Service
sudo npm install -g gateblu-forever && \
sudo curl -o /etc/init.d/gateblu-service https://raw.githubusercontent.com/octoblu/gateblu-forever/master/.installer/raspbian/init.d/gateblu-service && \
sudo chmod +x /etc/init.d/gateblu-service && \
sudo update-rc.d gateblu-service defaults
meshblu.json and /boot
If you place a
meshblu.jsonfile in your/bootpartition and it is newer than what is found in~/gateblu-service/meshblu.json, it will be copied to~/gateblu-service/meshblu.jsonwhen the service starts.
Start / Stop Gateblu
sudo service gateblu-service start
sudo service gateblu-service stop
Blink1
udev permission
Due to udev permissions issues, you need to follow this step to allow the pi user to have write access to the blink1.
sudo curl -o /etc/udev/rules.d/51-blink1.rules https://raw.githubusercontent.com/todbot/blink1/master/linux/51-blink1.rules && \
sudo udevadm control --reload-rules
Bluetooth Permissions
Running without root/sudo
Run the following command:
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
This grants the node binary cap_net_raw privileges, so it can start/stop BLE advertising.
Note: The above command requires setcap to be installed, it can be installed using the following:
- apt:
sudo apt-get install libcap2-bin - yum:
su -c \'yum install libcap2-bin\'
Source: Noble NPM Module
File Locations
You can find a debug log at /home/pi/gateblu-service/gateblu.log
meshblu.json file is located at /home/pi/gateblu-service/meshblu.json
Updated less than a minute ago