This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
SPL Sense for Linux
SPL Sense on a Raspberry Pi: hardware, installation, update and operation as a permanent measuring station.
On Linux, SPL Sense runs without its own window as a web server in the background. You operate it in the browser, on
the device itself or from another computer, tablet or phone in the same network. This suits permanent measuring
stations, for example a Raspberry Pi in a club or in a rack.
You are basically free in your choice of hardware; an ARM architecture (32 or 64 bit) is required. This guide describes
the Raspberry Pi.
- Hardware and operating system: what you need and how to prepare the Raspberry Pi
- Installation: install SPL Sense and set it up as a service
- Update
- Operation: access, kiosk display and unattended operation
If you are familiar with Linux, SSH and the command line, you can go straight to the
installation.
Except for calibrating the sensor, SPL Sense on Linux can do everything it can do on Windows and macOS.
1 - Hardware and operating system
Get a Raspberry Pi, choose a memory card, install the operating system and assemble.
Hardware
You can buy the Raspberry Pi from electronics retailers. We have tested:
- Raspberry Pi 4 or 5, Model B (all memory variants)
- for power over the network cable: the official Power-over-Ethernet module (PoE HAT) for the Raspberry Pi 3B+ and 4B
Memory card
The memory card is the part most likely to fail after many operating hours. SPL Sense writes little, but a high-quality
micro SD card is still worth it. We have had good experiences with “SanDisk Extreme Pro”.
Size is hardly an issue: Raspberry Pi OS with desktop fits on 8 GB, and even a lot of measurement data needs barely a
gigabyte. We recommend at least 16 GB.
Installing the operating system
- Install the Raspberry Pi Imager on your computer (available on the Raspberry Pi website).
- Use it to write Raspberry Pi OS with Desktop to the memory card.
- Choose 32 or 64 bit. For a Raspberry Pi 5 we recommend 64 bit. Remember your choice: you need the matching package
when installing SPL Sense.
- In the Imager settings, set a user name and password, and switch on SSH if you want to set up the Raspberry Pi
from another computer.
If you are experienced with the command line and don’t need a screen on the Raspberry Pi, Raspberry Pi OS Lite
without desktop is enough. This guide assumes the desktop variant.
Assembling
- Install the Raspberry Pi with the desired add-on modules in the case and insert the memory card.
- Connect screen, keyboard and mouse.
- Connect power (or the network cable with PoE). The Raspberry Pi starts.
- On first start, set up a network connection, by cable or Wi-Fi. SPL Sense is downloaded from the internet in the
next step.
- If not already switched on in the Imager: enable SSH under Raspberry menu › Preferences ›
Raspberry Pi Configuration › Interfaces.
- Note the IP address of the Raspberry Pi: it appears when you hover the mouse over the network icon at the top right.
2 - Installation
Install SPL Sense on the Raspberry Pi and set it up as a service that starts at boot.
SPL Sense is installed via the command line, either directly on the Raspberry Pi (program Terminal) or via SSH from
another computer. With SSH you can copy and paste the commands and avoid typing errors.
Connecting via SSH
Your computer must be in the same network as the Raspberry Pi.
- macOS and Linux: in the terminal
ssh <user>@<ip-address>, for example ssh pi@192.168.10.144
- Windows: in the terminal (PowerShell) also
ssh <user>@<ip-address>, or with PuTTY: enter the IP address under
Host Name, set Connection type to SSH, then Open
User and password are the ones you set in the Raspberry Pi Imager.
General notes
- Linux is case-sensitive. Copy the commands exactly.
- A successful command usually shows no message. If an error message appears, read it and fix the error before you
continue.
- At the first
sudo, the Raspberry Pi asks for your user’s password.
1. Create a user for SPL Sense
sudo useradd splsense -m -d /opt/splsense-data
SPL Sense runs under this dedicated user and stores its data in /opt/splsense-data.
2. Download and unpack SPL Sense
For a 32-bit operating system:
wget https://r.spl.swiss/dl/splsense/linux-arm -O splsense-latest.tar.gz
tar xfvz splsense-latest.tar.gz
rm splsense-latest.tar.gz
For a 64-bit operating system:
wget https://r.spl.swiss/dl/splsense/linux-arm64 -O splsense-latest.tar.gz
tar xfvz splsense-latest.tar.gz
rm splsense-latest.tar.gz
3. Move the program to its place
sudo mv splsense /usr/local
sudo chown splsense /usr/local/splsense -R
sudo chgrp splsense /usr/local/splsense -R
4. Set up the service
So that SPL Sense starts automatically at boot, set it up as a system service. Open a new file in the nano editor:
sudo nano /etc/systemd/system/splsense.service
Copy this content into it:
[Unit]
Description=SPL Sense
After=network-online.target
User=splsense
Group=splsense
[Service]
Type=simple
ExecStart=/usr/local/splsense/SplSense.App.Browser
WorkingDirectory=/usr/local/splsense
Environment="ASPNETCORE_URLS=http://0.0.0.0:8080"
Environment="SPLSENSE_DATA=/opt/splsense-data"
[Install]
WantedBy=multi-user.target
Save and close: Ctrl+X, then confirm with Y.
The ASPNETCORE_URLS line defines the address and port at which SPL Sense can be reached: here 8080 on all network
interfaces. Enter a different port here if needed. Without this line, SPL Sense can only be reached on the Raspberry Pi
itself (http://localhost:5000).
5. Enable and start the service
sudo systemctl enable splsense
sudo service splsense start
6. Restart
Done
SPL Sense now starts automatically at every boot and runs in the background. In the browser of the Raspberry Pi or of
another device in the network, open the IP address with the port, for example http://192.168.10.144:8080.
From here it works as on any other platform, for example with the
quick start. For operation as a permanent measuring station,
see Operation.
3 - Update
Update SPL Sense on Linux: automatically or manually.
Automatically
On Linux, SPL Sense updates itself like on the other platforms: when a new version is available, Update available
appears on the overview. Stop the measurement and click Update and Update and restart. See
Installation and updates.
This works if SPL Sense is set up as described in the installation.
Manually
If the automatic update fails, update via the command line. Connect to the Raspberry Pi as in the
installation. The
general notes apply here too.
1. Stop SPL Sense
sudo service splsense stop
2. Download and unpack the new version
32 bit:
wget https://r.spl.swiss/dl/splsense/linux-arm -O splsense-latest.tar.gz
tar xfvz splsense-latest.tar.gz
rm splsense-latest.tar.gz
64 bit:
wget https://r.spl.swiss/dl/splsense/linux-arm64 -O splsense-latest.tar.gz
tar xfvz splsense-latest.tar.gz
rm splsense-latest.tar.gz
3. Replace the old version
sudo rm -rf /usr/local/splsense
sudo mv splsense /usr/local
sudo chown splsense /usr/local/splsense -R
sudo chgrp splsense /usr/local/splsense -R
The measurement data is in /opt/splsense-data and is kept.
4. Start and restart
sudo service splsense start
sudo reboot
4 - Operation
Network access, kiosk display and operation as an unattended permanent measuring station.
Addresses
With port 8080 from the installation:
|
Address |
| Web interface |
http://<ip-address>:8080 |
| Live screen |
http://<ip-address>:8080/measurement/live |
| Live screen in kiosk mode |
http://<ip-address>:8080/measurement/live?kiosk |
| SPL Sense API |
http://<ip-address>:8080/api |
On the Raspberry Pi itself, you can use localhost instead of the IP address.
Kiosk display
For a permanent display, for example a screen at the DJ booth, the browser opens the live screen directly in kiosk mode,
for example with Chromium:
chromium-browser --kiosk "http://localhost:8080/measurement/live?kiosk"
Kiosk mode only shows the widgets and a narrow status bar and adapts to the screen size. See
Live screen and kiosk.
Unattended permanent measuring station
- Switch on autonomous mode: the measurement starts by itself
after every restart, for example after a power failure.
- Set an operator PIN: without the PIN, only the live screen
is accessible, also in the browser of other devices.
- Connect to SPL Cloud and switch on the cloud uplink.
- Optionally with Pro: alarms on failure and
remote control.
Limitation
You cannot calibrate the sensor on Linux. For that you need SPL Sense for Windows or macOS.