=======================
Satlab GNU Radio Blocks
=======================

This package contains `GNU Radio <http://www.gnuradio.org/>`_ blocks for Satlab `SRS-3 <https://satlab.com/products/srs-3/>`_ and `SRS-4 <https://satlab.com/products/srs-4/>`_ radios.

The blocks have been tested with GNU Radio 3.9.4.0 and UHD 4.1.0.1 on Arch Linux. OpenSSL is required for the encryption blocks.

Building
========

To build and install, run::

   mkdir build
   cd build
   cmake .. -DCMAKE_INSTALL_PREFIX=/usr
   make
   sudo make install

A different install prefix and other CMake arguments may be necessary. Please consult the documentation for your distribution's GNU Radio package.

Setup
=====

The demo application and flowgraphs enable realtime scheduling to improve performance. To allow regular users to enable this, add these lines to ``/etc/security/limits.d/99-gnuradiort.conf``::

    # Allow user to set gnuradio rtprio
    @<GROUPNAME>           -       rtprio          50

``<GROUPNAME>`` should be replaced with a group that your user is a member of. On Arch Linux, this can just be the user name. Log out and back in (or reboot) for the changes to take effect.

Application
===========

The standalone command line application ``sl-radio`` is installed under ``<PREFIX>/bin``. It can be used to run the software modem without GRC. Configuration of the application is done using command line parameters or a configuration file. Available options can be listed with ``sl-radio --help``.

The application depends on ``python-psutil`` and ``python-configargparse`` which can be installed from your distribution's package manager or the Python Package Index.

Examples
========

Example flowgraphs for SRS-3 and SRS-4 are located in the ``examples`` directory and installed in ``<PREFIX>/share/gr-satlab/examples/satlab/``. They can be started using GNU Radio Companion::

    gnuradio-companion /usr/share/gr-satlab/examples/satlab/srs3_radio.grc
    gnuradio-companion /usr/share/gr-satlab/examples/satlab/srs4_radio.grc
