Raspberry Pi OS - Debian 11 (bullseye)

This document is not up to date and requires revision.

Note: Tested with Raspberry OS based on Debian 11 (bullseye). You may use the Source - Linux guide when using Ubuntu for Raspberry.

Please keep in mind that your Raspberry may not have enough CPU power to run FreeDATA effectively. Running the FreeDATA-Server headless and connect with GUI from anoher computer should work fine even on older Raspberries. Using a Raspberry Pi 4 (4GB) will have enough performance for running both server and GUI.

1. Permissions

Add user to dialout group to access serial devices without root

sudo adduser $USER dialout
logout / login

2. Dependencies

sudo apt install git build-essential cmake npm
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
sudo apt install nodejs
sudo npm install -g n
sudo n stable
sudo npm install -g npm
sudo apt install python3 portaudio19-dev python3-pyaudio python3-pip python3-colorama

3. Install FreeDATA

git clone https://github.com/DJ2LS/FreeDATA.git
cd FreeDATA
pip3 install -r requirements.txt
cd gui
npm i
cd ..

4. Install codec2

To make sure you are using the latest version of codec2, just download and compile it.

cd modem/lib (FreeDATA/modem/lib)
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make -j4

If you want to install codec2 system-wide, please run

sudo make install

Optional: Update Hamlib

Older versions of Ubuntu, like Ubuntu 20.04 LTS or Suse sometimes deliver outdated versions of Hamlib with their repositories. If you need a newer version, because of your radio for example, you can install the latest version from source. You may check the installed hamlib version by typing:

apt list python3-libhamlib2

Please uninstall older hamlib version before installing from source with sudo apt remove python3-libhamlib2!

sudo apt install libusb-1.0-0 swig
cd ~/Downloads
wget https://github.com/Hamlib/Hamlib/releases/download/4.4/hamlib-4.4.tar.gz
tar xvf hamlib-4.4.tar.gz
cd hamlib-4.4
./configure --with-python-binding PYTHON=$(which python3)
make
sudo make install
sudo ldconfig

Optional: Upgrade python packages

if you are running into unexpected errors, please try upgrading the python packages via pip, first. Please keep in mind that this can take some time due to limited CPU power of your raspberry pi!

pip3 install --ignore-installed pip
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U 

Wrong permissions

Error Message: The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/pi/FreeDATA/gui/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.

/home/pi/FreeDATA/gui/node_modules/electron/dist/electron exited with signal SIGTRAP

Please run the following commands:

sudo chown root node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox

Nodejs fast installation not working

The raspberry pi image contains an outdated version of nodejs. Sometimes the installation via nodesource package does not work. As an alternative, building nodejs from source helps. Please following the tutorial on nodejs Github page https://github.com/nodejs/node/blob/master/BUILDING.md#building-nodejs-on-supported-platforms

or follow these steps:

  1. Download source from https://nodejs.org/en/download/
  2. unpack compressed file
  3. Open uncompressed folder within a terminal session
  4. run the following commands
    ./configure
    make -j4
    sudo make install
  5. Open a new terminal and check nodejs version with nodejs -v