Installation and configuration of a TETRA base station with a Z32IT SDR transceiver (sxceiver compatible)

FlowStation enables a TETRA base station to be set up using a Raspberry Pi and suitable SDR hardware. The base station can be connected to the BrandMeister network via a BREW connection.

This guide describes the installation of FlowStation on Raspberry Pi OS Trixie (64-bit), including the required software, hardware configuration, network settings and automatic startup as a system service.

Basic knowledge of Linux, Raspberry Pi and TETRA is assumed.


1. Install and update Raspberry Pi OS

Install Raspberry Pi OS Trixie (64-bit Lite), without a graphical desktop environment, onto a microSD card. Raspberry Pi Imager can be used for this purpose.

Start the Raspberry Pi and log in via SSH or a local terminal.

Update the operating system:

sudo apt-get update && sudo apt-get -y upgrade

2. Install the required dependencies

Several packages and development libraries are required to compile and run FlowStation and the associated SDR software.

Install these using:

sudo apt-get -y install \
git make g++ cmake \
libsoapysdr-dev soapysdr-tools \
libasound2-dev clang llvm-dev \
libclang-dev build-essential \
pkg-config soapysdr-module-lms7 \
libssl-dev

3. Install Rust

FlowStation is developed in Rust. Install the Rust toolchain using:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Follow the on-screen installation instructions.

Next, activate the Rust environment:

source "$HOME/.cargo/env"

Check the installed version:

rust --version

The minimum required version is Rust 1.75.0.

4. Enable SPI and I2C

The SPI and I2C interfaces must be enabled to allow communication with the hardware.

Open the configuration utility:

sudo raspi-config

Select Interface Options and enable both SPI and I2C.

Exit the configuration utility afterwards.

5. Enable the additional I2C interface

Open the Raspberry Pi configuration file:

sudo nano /boot/firmware/config.txt

Add the following line:

dtparam=i2c_vc=on

Save the file and restart the Raspberry Pi:

sudo reboot

6. Install SoapySX

The SoapySX module from the sxxcvr repository is required for communication with the SDR hardware.

Download the source code:

git clone https://github.com/tejeez/sxxcvr.git

Create the build directory:

cd sxxcvr/SoapySX
mkdir build
cd build

Compile and install the software:

cmake ..
make
sudo make install
sudo ldconfig

Once completed, the SoapySX module will be available to SoapySDR.

7. Install FlowStation

The source code and additional documentation are available from flowstation.dev and the associated GitHub repository.

Navigate to the home directory and download FlowStation:

cd ~
git clone https://github.com/razvanzeces/flowstation.git
cd flowstation

Compile FlowStation in release mode:

cargo build --release

Depending on the Raspberry Pi model, compilation may take some time.

After successful compilation, the executable will be located in the target/release directory.

8. Configure FlowStation

Copy the supplied example configuration file:

cp example_config/config.toml config.toml

Open the file:

nano config.toml

8.1 Frequencies and network parameters

Adjust the following settings:

ParameterDescription
tx_freqBase station transmit frequency
rx_freqBase station receive frequency
mccMobile Country Code
mncMobile Network Code
main_carrierCarrier number
duplex_spacingIndex number from the TETRA terminal’s duplex table
custom_duplex_spacingCustom duplex spacing, if applicable

The main_carrier value is calculated according to the configuration method used:

main_carrier = (tx_freq − 400) / 0.025

In this formula, tx_freq is expressed in MHz.

For a non-standard duplex spacing, such as 7.6 MHz, enable the custom_duplex_spacing setting by removing the comment character and entering the appropriate value.

Verify that the frequencies, carrier settings and duplex spacing match the configuration of the TETRA terminal.

8.2 Home Mode Display

Locate the Home Mode Display section in the configuration file.

Uncomment the relevant lines, starting with [cell_info...] and continuing through to the associated text = ...setting.

Modify the displayed station information as required.

Use the station’s own amateur radio callsign as its identifier to ensure that the base station is recognisable and that identification can comply with the applicable regulations.

8.3 Web dashboard

FlowStation includes a web dashboard for monitoring the base station’s status and network connectivity.

Enable the following configuration:

[dashboard]
port = 8080
bind = "0.0.0.0"
username = "admin"
password = "changeme"

Change the default username and password.

While running FlowStation the dashboard will then be accessible at:

http://RASPBERRY-PI-IP-ADDRESS:8080

Security: Setting bind = "0.0.0.0" makes the dashboard listen on all network interfaces. Access should be restricted to the trusted local network.

8.4 Configure the BrandMeister connection

The BREW configuration must be adjusted to establish a connection to the BrandMeister network.

Enable the [brew] section and configure the following parameters:

[brew]
host = "core.tetrapack.online"
port = 443
tls = true

username = 123456700
password = "012345"

The settings are as follows:

ParameterValue
Hostcore.tetrapack.online
Port443
TLStrue
UsernameYour own DMR ID with a two-digit suffix
PasswordBrandMeister password configured in SelfCare

Replace the example username and password with the appropriate credentials.

Save the configuration file after making all changes.

9. Test FlowStation

Start FlowStation from the project directory:

./target/release/bluestation-bs config.toml

Check the operation of the base station.

Transmit signal

Use a suitable receiver to verify that a continuous digital TETRA signal is present on the configured transmit frequency.

Terminal output

Check the output displayed in the terminal window. Status information and any error messages will appear here.

Web dashboard

Open the dashboard at:

http://RASPBERRY-PI-IP-ADDRESS:8080

Log in using the configured credentials and check the network status.

When the BrandMeister connection has been established successfully, the BREW status should show ONLINE.

Once all checks have been completed successfully, FlowStation can be stopped using Ctrl+C.

10. Install FlowStation as a system service

To start FlowStation automatically when the Raspberry Pi boots, a systemd service must be configured.

10.1 Create the installation directory

Create the installation directory:

sudo mkdir -p /opt/tetra-bluestation

Copy the executable and configuration file:

sudo cp target/release/bluestation-bs \
config.toml /opt/tetra-bluestation/

10.2 Configure the service file

Copy the supplied service file:

sudo cp contrib/systemd/bluestation-bs.service \
/etc/systemd/system/flowstation.service

Open the file:

sudo nano /etc/systemd/system/flowstation.service

Comment out the User and Group lines:

#User=user
#Group=user

This causes the service to run with root privileges by default. For a permanent installation, a dedicated service user with the necessary hardware access permissions is recommended.

Set the working directory:

WorkingDirectory=/opt/tetra-bluestation

Modify the start command:

ExecStart=/opt/tetra-bluestation/bluestation-bs /opt/tetra-bluestation/config.toml

Save the service file.

10.3 Enable and start the service

Reload the systemd configuration:

sudo systemctl daemon-reload

Enable and start FlowStation:

sudo systemctl enable --now flowstation

FlowStation will now start immediately and will be launched automatically whenever the Raspberry Pi boots.

10.4 Check the service status

Check the service status:

sudo systemctl status flowstation

If the service is operating correctly, its status should be:

active (running)

To monitor the log messages in real time, use:

sudo journalctl -u flowstation -f

This completes the installation of the TETRA base station.