Trunk Recorder Installation - ScanOC/trunk-player GitHub Wiki

Prerequisites

Below are the prerequisites you will need to get Trunk-Recorder working.

  • Software Defined Radio (SDR) eg. Airspy, RTL-SDR V3, HackRF
  • RTL-SDR - RTL-SDR Program to interface with your SDR
  • Git Client - Github.com client for getting source code
  • Terminal Editor eg. Nano or Vi/Vim

Installing Prerequisites

  1. Make sure your distro is up to date with the latest software.
    sudo apt-get update 
    sudo apt-get upgrade
  1. Install Prerequisites for Trunk-Recorder to work
sudo apt-get install gnuradio gr-osmosdr librtlsdr-dev libuhd-dev swig gnuplot-x11 git cmake openssl libssl-dev libboost-all-dev rtl-sdr

(optional) To remove kernel built-in rtl stuff you will have to add rtl-sdr to the blacklist. See how to do this here - https://www.reddit.com/r/RTLSDR/wiki/blacklist_dvb_usb_rtl28xxu

  1. Reboot after updates/kernel changes(Specially if you did the blacklist)

You can test your RTL-SDR is functioning by running the following command

rtl_test 

This installation guide assumes you are using a user called radio (/home/radio) If you are not then please run the following command and follow the prompts

adduser radio
su - radio
cd /home/radio

Installing Trunk-Recorder

  1. Make Trunk-Build directory in your home directory for build files.
mkdir trunk-build
  1. Get Trunk-Recorder from git repository on github.com.
git clone https://github.com/robotastic/trunk-recorder.git
  1. Change to Trunk-Build directory so we can start building stuff in here.
cd trunk-build
  1. Now to build Trunk-Recorder into Trunk-Build directory
cmake ../trunk-recorder

then

make

Configuring Trunk-Recorder

This will take some trial and error to get right for the system you are decoding. See below for example config.json file

  1. Edit config.json to reflect the system you are decoding
{
    "sources": [{
        "center": 855000000,
        "rate": 2400000,
        "ppm": -1.0,
        "gain": 300,
        "digitalRecorders": 12,
        "modulation": "qpsk",
        "driver": "osmosdr",
        "device": "rtl=0"
    }, {
        "center": 857000000,
        "rate": 2400000,
        "ppm": -1.0,
        "gain": 300,
        "digitalRecorders": 12,
        "modulation": "qpsk",
        "driver": "osmosdr",
        "device": "rtl=1"
    }, {
        "center": 859000000,
        "rate": 2400000,
        "ppm": -1.0,
        "gain": 300,
        "digitalRecorders": 12,
        "modulation": "qpsk",
        "driver": "osmosdr",
        "device": "rtl=2"
    }, {
        "center": 861000000,
        "rate": 2400000,
        "ppm": -1.0,
        "gain": 300,
        "digitalRecorders": 12,
        "modulation": "qpsk",
        "driver": "osmosdr",
        "device": "rtl=3"
        }],
    "systems": [{
        "control_channels": [856212500],
        "type": "p25",
        "shortName": "county",
        "talkgroupsFile": "first.csv",
        "maxDuration": "240",
        "uploadScript": "encode-local-sys-0.sh"
    }],
        "captureDir": "/home/radio/trunk-player/audio_files"
}
  1. Test Trunk-Recorder is working
./recorder

Don't worry if you see an error about encode-locsal-sys-0.sh this will be fixed later

locale::facet::_S_create_c_locale name not valid error If you get this error then run the following commands

apt-get install locales
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
reboot

Trunk-Recorder is now installed... Proceed to Trunk-Player Installation Wiki