If you need more permanent solution than HARDWARIO Playground you can install all the services yourself in your system. This guide will help you to install and configure these services:
- HARDWARIO Gateway
bcg - HARDWARIO Firmware Tool
bcf - HARDWARIO Host Tool
bch - Mosquitto MQTT broker
- Node-RED
- The process manager
pm2
This is a brief list of differences:
- Hostname is
hubinstead ofraspberrypi. - The time zone is set to
Europe/Prague. - The following records were added to the repository APT list:
- By default, these packages are also installed:
- mosquitto
- mosquitto-clients
- nodejs
- python3-pip
- python3-venv
- dfu-util
- git
- htop
- mc
- tmux
- npm pm2
- npm node-red
- pip3 bcf
- pip3 bcg
{% hint style="warning" %}
Apply the following procedure only if you are using Raspberry Pi, on which the original Raspbian distribution is running. This is an alternative way of installing bc-raspbian in [](/doc/tutorials/raspberry-pi-installation/).
{% endhint %}
Step 1: Log in to the Raspberry Pi using SSH. Detailed procedure is provided in the document Raspberry Pi Login
sudo apt update && sudo apt upgrade
sudo apt install mosquitto mosquitto-clients
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g --unsafe-perm node-red
sudo npm install -g pm2
Make sure you copy next command exactly with the back-tick symbol `.
pm2 start `which node-red` -- --verbose
pm2 save
sudo -H PM2_HOME=/home/$(whoami)/.pm2 pm2 startup systemd -u $(whoami)
sudo -H chmod 644 /etc/systemd/system/pm2-$(whoami).service
sudo apt install python3 python3-pip python3-setuptools
sudo pip3 install --upgrade pip
BigClown Firmware Tool bcf, HARDWARIO Gateway bcg and HARDWARIO Host Tool bch.
sudo pip3 install --upgrade bcf bcg bch
echo 'SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="bc-usb-dongle*", SYMLINK+="bcUD%n", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/bcUD%n"' | sudo tee --append /etc/udev/rules.d/58-bigclown-usb-dongle.rules
{% hint style="warning" %} Unplug and plug gateway. {% endhint %}
pm2 start /usr/bin/python3 --name "bcg-ud" -- /usr/local/bin/bcg --device /dev/bcUD0
pm2 save