Adding Digi Modes to OpenWebRX

See Jakob's info here: https://github.com/jketterl/openwebrx/wiki/Manual-Package-installation-(including-digital-voice)

Prerequesites:

sudo apt install build-essential


Copied from Jacob's site:

Install optional packages for digital voice:

Distribution packages:

sudo apt-get install sox libprotobuf-dev protobuf-compiler libudev-dev libicu-dev


Install codecserver from source:

git clone -b master https://github.com/jketterl/codecserver.git

cd codecserver

mkdir build

cd build

cmake ..

make

sudo make install

cd ../..

sudo ldconfig


Create codecserver user and set permissions for serial devices, if necessary:

sudo adduser --system --group --no-create-home --home /nonexistent --quiet codecserver

sudo usermod -aG dialout codecserver


The username "codecserver" is used for the systemd service unit, so if you want to chose another user to run codecserver as, please adapt accordingly.

If necessary, configure and make sure it's running:

sudo nano /usr/local/etc/codecserver/codecserver.conf

sudo systemctl daemon-reload

sudo systemctl restart codecserver


Install digiham from source:

git clone -b master https://github.com/jketterl/digiham.git

cd digiham

mkdir build

cd build

cmake ..

make

sudo make install

cd ../..


Install pydigiham from source:

git clone -b master https://github.com/jketterl/pydigiham.git

cd pydigiham

sudo python3 setup.py install

cd ..


Install codec2 from source:

git clone https://github.com/drowe67/codec2.git

cd codec2

mkdir build

cd build

cmake ..

make

sudo make install

# manually install freedv_rx since it's not part of the default install package

sudo install -m 0755 src/freedv_rx /usr/local/bin

cd ../..

sudo ldconfig


Install m17-cxx-demod:

sudo apt-get install libboost-program-options-dev

git clone https://github.com/mobilinkd/m17-cxx-demod.git

cd m17-cxx-demod

mkdir build

cd build

cmake ..

make

sudo make install

cd ../..


 Install optional dependencies for DRM

This snippet uses the older version 2.1.1 of dream on purpose. The latest version 2.2 unfortunately has some issues, and reportedly does not work properly with OpenWebRX. It's recommended to stick with 2.1.1.

sudo apt-get install qt5-qmake libpulse0 libfaad2 libopus0 libpulse-dev libfaad-dev libopus-dev libfftw3-dev wget

wget https://downloads.sourceforge.net/project/drm/dream/2.1.1/dream-2.1.1-svn808.tar.gz

tar xvfz dream-2.1.1-svn808.tar.gz

cd dream

qmake -qt=qt5 CONFIG+=console

make

sudo make install

cd ..


 Install optional packages for Packet APRS:

Direwolf can be installed as a package on most systems:

sudo apt-get install direwolf


Or, if you wish to install from source:

sudo apt-get install libasound2-dev

git clone https://github.com/wb2osz/direwolf.git

cd direwolf

git checkout 1.6

mkdir build

cd build

cmake ..

make

sudo make install

cd ../..


Install the aprs-symbols to be able to display APRS positions on the map (you can change the destination, if you update the config accordingly):

Note: The default location has changed from /opt/aprs-symbols to /usr/share/aprs-symbols with version 1.0. If you want to continue using your existing copy, please either move it to the new location, or update your configuration accordingly.

sudo git clone https://github.com/hessu/aprs-symbols /usr/share/aprs-symbols


Install optional packages for WSJT-X modes (FT8, FT4, WSPR, JT65, JT9)

Please follow the installation instructions provided on the WSJT-X homepage, using a provided package for your distribution is preferred.

Source compilation notes (for when there's no package available)

This seems to be kind of a moving target, so the following is provided rather as a known-good procedure. If you notice it has been updated, please let me know.

sudo apt-get install asciidoc automake libtool texinfo gfortran libhamlib-dev qtbase5-dev qtmultimedia5-dev qttools5-dev asciidoctor libqt5serialport5-dev qttools5-dev-tools libudev-dev xsltproc libboost-dev libboost-log-dev libboost-regex-dev wget

wget http://physics.princeton.edu/pulsar/k1jt/wsjtx-2.5.4.tgz

tar xvfz wsjtx-2.5.4.tgz

cd wsjtx-2.5.4

mkdir build

cd build

cmake ..

make

sudo make install

cd ../..


Data storage

OpenWebRX needs a directory to store dynamic data from the web configuration interface. The default path for this directory is /var/lib/openwebrx but this can be changed in openwebrx.conf if necessary.

In this step, you will need to create the directory and set its permissions accordingly. Please replace [openwebrx-user] with the name of the user that OpenWebRX will run as. Make sure to include the period (.) after the username as that will also change the group ownership of the file:

sudo mkdir /var/lib/openwebrx

sudo chown [openwebrx-user]. /var/lib/openwebrx


The next step initializes an empty user storage. This step will overwrite an existing user database without any further warning, so if you want to keep your existing user database, skip this step:

sudo sh -c "echo [] > /var/lib/openwebrx/users.json"

sudo chown [openwebrx-user]. /var/lib/openwebrx/users.json

sudo chmod 0600 /var/lib/openwebrx/users.json


Running

After cloning this repository and connecting an SDR device to your computer, you can run the server:

git clone -b master https://github.com/jketterl/openwebrx.git

cd openwebrx

./openwebrx.py


You can now open the GUI at http://localhost:8073.

Creating an initial user for the web configuration interface

See the user management documentation for more details.

./openwebrx.py admin adduser [username]

Installing OpenWebRX as a systemd service

If you want the receiver to start with your system, you can set it up as a systemd service unit. You can find a template unit file in the systemd folder. You will need to configure the User, Group, ExecStart and Path according to your environment. After installing the file into /etc/systemd/system, run sudo systemctl daemon-reload.

The following commands are available:

Providing a path to bands.json

OpenWebRX searches for bands.json in the current working directory or from /etc/openwebrx/. If running OpenWebRX as a systemd service, the current working directory provided by systemd is different from the path from which openwebrx is executed. There are a few ways to ensure OpenWebRX finds bands.json:

OR

OR

... if bands.json is found in both the working directory and /etc/openwebrx/, the settings found in bands.json from the working directory override those from /etc/openwebrx/bands.json.