Our step-by-step guide to make a Raspberry Pi into an open RTLS, RFID and M2M platform.
Learn how we at reelyActive deploy our open source software suite on a Raspberry Pi.
Although this tutorial is still valid, we recommend instead following the updated version:
A Raspberry Pi (or equivalent) with Node.js, npm and git installed.
Clone our pi-suite repository on GitHub and install all dependencies using npm.
Both the Pi and the computer used for its configuration must be on the same network, with which they can access the Internet.
With the prepared micro SD card inserted into the Pi, complete the following:
ssh pi@xxx.xxx.xxx.xxx
replacing the x values with the Pi's IP address If you're still using the default password, this is as good a time as any to change it. Simply run sudo raspi-config
First create a reelyActive folder under the home folder.
cd
mkdir reelyActive
cd reelyActive
Next, install the pi-suite software under this folder.
git clone https://github.com/reelyactive/pi-suite.git
cd pi-suite
npm install
3 mins It is possible that some dependencies produce warnings or errors. Do not despair: in most cases these have no impact on functionality.
Confirm that everything works.
From the same terminal connected to the Pi via SSH, and from the pi-suite folder:
Start the software and browse to the Pi to confirm that it is running as follows:
npm start
Observe the hlc-server landing page. It is normal not to observe any real-time data as a source has yet to be connected.
The software can be stopped by entering Ctrl+C from the command line.
Should a source of data be available (see the tabs below), it is possible to validate its integration with the software suite.
No additional steps are required!
The software listens for raddecs on UDP port 50001. Data should appear in the web interface.
No additional steps are required!
The software listens for reel packets on UDP port 50000. Data should appear in the web interface.
Instead run the command: sudo npm run start-hci
The software will additionally listen for data from the onboard Bluetooth radio*—first introduced on the Pi 3. Data should appear in the web interface.
* Kindly let us know should you be aware of an elegant way to run as pi user rather than as root!
Instead run the command: npm run start-reel
The software will additionally listen for serial data on /dev/serial0 (GPIO header pins). Data should appear in the web interface.
Configure the software to run as a service each time the Pi boots.
From the same terminal connected to the Pi via SSH, and from the pi-suite folder:
Configure systemd to run the pi-suite service by completing the following:
sudo cp units/pi-suite.service /lib/systemd/system
sudo systemctl enable pi-suite.service
sudo systemctl start pi-suite.service
Observe the hlc-server landing page.
Alternatively use the pi-suite-reel.service
or the pi-suite-hci.service
.
This optional step applies only if custom environment variable configuration is required.
Should your configuration require any environment variables to be set differently than the defaults, for example to run on port 80 and to connect to a remote Elasticsearch database, these variables can be added to .conf files associated with the pi-suite.service as follows:
sudo systemctl edit pi-suite.service
[Service]
Environment="PORT=80"
Environment="ELASTICSEARCH_NODE=https://user:pass@server.com:9243"
The environment variables from this .conf file will be observed each time the service runs.
Reboot and again observe the hlc-server landing page as follows:
sudo reboot now
1 min Once again observe the hlc-server landing page. The software suite will indeed run each time the Pi boots.
If necessary, it is possible to disable the service with the command sudo systemctl disable pi-suite.service
.
All software packages are now installed and will run on each boot. The Pi can now optionally be configured as a kiosk display, which is the subject of the next tutorial:
Continue exploring our open architecture and all its applications.