From 602cd852a786be8cabc4a8a335ee7fe4b3728a85 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Sat, 11 Nov 2023 19:30:59 -0500 Subject: [PATCH] Fixed RDIO scanner - and rearranged the Docs Trying to make it so I can just copy the Docs folder over to the website --- README.md | 7 +- docs/CONFIGURE.md | 11 +- docs/DEBUG.md | 10 +- docs/FAQ.md | 5 + docs/{ => Install}/INSTALL-DOCKER.md | 5 + docs/{ => Install}/INSTALL-LINUX.md | 18 ++ docs/{ => Install}/INSTALL-MAC.md | 4 + docs/{ => Install}/INSTALL-PI.md | 5 + docs/Install/_category_.json | 6 + docs/Playback.md | 14 ++ docs/Plugins.md | 195 ++++++++++++++++++ docs/intro.md | 65 ++++++ .../rdioscanner_uploader.cc | 19 ++ 13 files changed, 355 insertions(+), 9 deletions(-) rename docs/{ => Install}/INSTALL-DOCKER.md (98%) rename docs/{ => Install}/INSTALL-LINUX.md (92%) rename docs/{ => Install}/INSTALL-MAC.md (98%) rename docs/{ => Install}/INSTALL-PI.md (99%) create mode 100644 docs/Install/_category_.json create mode 100644 docs/Playback.md create mode 100644 docs/Plugins.md create mode 100644 docs/intro.md diff --git a/README.md b/README.md index 68aea3b71..c53ed06af 100644 --- a/README.md +++ b/README.md @@ -49,14 +49,15 @@ RTL-SDR dongles; HackRF; Ettus USRP B200, B210, B205; BladeRF; Airspy; SDRplay | | Docker | Ubuntu | RaspberryOS | Arch Linux | Homebrew | MacPorts | | ------------ | :-------------------------: | :----------------------------------------: | :---------------------: | :-----------------------------------: | :-------------------------------------: | :-------------------------------------: | -| Linux | [📄](docs/INSTALL-DOCKER.md) | [📄](docs/INSTALL-LINUX.md#**ubuntu-2104**) | | [📄](docs/INSTALL-LINUX.md#arch-linux) | | | -| Raspberry Pi | [📄](docs/INSTALL-DOCKER.md) | [📄](docs/INSTALL-PI.md) | [📄](docs/INSTALL-PI.md) [🎬](https://youtu.be/DizBtDZ6kE8) | | | | -| MacOS | | | | | [📄](docs/INSTALL-MAC.md#using-homebrew) | [📄](docs/INSTALL-MAC.md#using-macports) | +| Linux | [📄](docs/Install/INSTALL-DOCKER.md) | [📄](docs/Install/INSTALL-LINUX.md#**ubuntu-2104**) | | [📄](docs/Install/INSTALL-LINUX.md#arch-linux) | | | +| Raspberry Pi | [📄](docs/Install/INSTALL-DOCKER.md) | [📄](docs/Install/INSTALL-PI.md) | [📄](docs/Install/INSTALL-PI.md) [🎬](https://youtu.be/DizBtDZ6kE8) | | | | +| MacOS | | | | | [📄](docs/Install/INSTALL-MAC.md#using-homebrew) | [📄](docs/Install/INSTALL-MAC.md#using-macports) | ### Setup * [Configuring a system](docs/CONFIGURE.md) +* [FAQ](docs/FAQ.md) ### Playback & Sharing By default, Trunk Recorder just dumps a lot of recorded files into a directory. Here are a couple of options to make it easier to browse through recordings and share them on the Internet. diff --git a/docs/CONFIGURE.md b/docs/CONFIGURE.md index 6bfe00dc9..e080958d0 100644 --- a/docs/CONFIGURE.md +++ b/docs/CONFIGURE.md @@ -1,3 +1,8 @@ +--- +sidebar_label: 'Configure' +sidebar_position: 3 +--- + # Configuring Trunk Recorder It takes a little bit of work to correctly configure Trunk Recorder, but once you get everything working you will not have to touch it again. @@ -8,9 +13,9 @@ Before you can start entering values, you will need to do a little research abou ### Frequency -![](media/gqrx.png) +![](./media/gqrx.png) -The next step is to try and receive the control channel for the trunked system, using [http://gqrx.dk/](GQRX). GQRX visualizes what your SDR is receiving and makes it easy to fine-tune the system and associated spectrum. While the system you are trying to tune in may have a lot of control channels, it is generally only transmitting on one. Type in the different frequencies to look for the active control channel. Control channels are always broadcasting, and show up as a persistent line on the waterfall graph. +The next step is to try and receive the control channel for the trunked system, using [GQRX](http://gqrx.dk/). GQRX visualizes what your SDR is receiving and makes it easy to fine-tune the system and associated spectrum. While the system you are trying to tune in may have a lot of control channels, it is generally only transmitting on one. Type in the different frequencies to look for the active control channel. Control channels are always broadcasting, and show up as a persistent line on the waterfall graph. There is a chance that when you tune to the active control channel, it will actually be a few thousand Hz above or below the frequency you tuned to. This is because the tuners on some SDRs are not super accurate and have frequency drifting. Click on the transmission to get the frequency that your SDR thinks it is at. @@ -99,7 +104,7 @@ Here is a map of the different sections of the *config.json* file: } ``` - +There is a list of available Plugins [here](./Plugins.md). ### Global Configs diff --git a/docs/DEBUG.md b/docs/DEBUG.md index 1401acb32..baecd10b1 100644 --- a/docs/DEBUG.md +++ b/docs/DEBUG.md @@ -1,3 +1,7 @@ +--- +sidebar_label: 'Debugging' +sidebar_position: 6 +--- # How to Debug a Seg Fault When Trunk Recorder crashes and give a Segmentation Fault error (a SegFault), there are some steps you can take to figure out what is causing it. Pulling this information makes it a lot easier to figure what is going wrong. @@ -63,13 +67,13 @@ Use the settings from the source you are interested in from your config.json fil you would use: `rtl_sdr -f 855700000 -s 2048000 -g 39 -d 41 debug.iq` -The file that rtl_sdr generates is in a compact format... which is great but it can't easily be opened by other program. There is a good write-up on it from here (from 2014!). Luckily, some wrote a small program to convert it into a more standard format (complex IQ). I have included it in the /utils folder: [rtlsdr-to-iq.c]("../utils/rtl-to-iq.c"). Compile the program and then copy it to the directory with your recordings and run it against them. Note - the conversion will cause the filesize to increase 4x, so make sure you have enough space. +The file that rtl_sdr generates is in a compact format... which is great but it can't easily be opened by other program. There is a good write-up on it from here (from 2014!). Luckily, some wrote a small program to convert it into a more standard format (complex IQ). I have included it in the /utils folder: [rtlsdr-to-iq.c](https://github.com/robotastic/trunk-recorder/blob/master/utils/rtlsdr-to-iq.c). Compile the program and then copy it to the directory with your recordings and run it against them. Note - the conversion will cause the filesize to increase 4x, so make sure you have enough space. ## Playback in GQRX GQRX can playback files that are in the IQ Complex format. In GQRX, select IQ File as the source: -![gqrx file]("media/gqrx-file.png") +![gqrx file](./media/gqrx-file.png) You are then going to need a device string with the correct options. Update this to match where your file is and its parameters: @@ -77,4 +81,4 @@ You are then going to need a device string with the correct options. Update this ## Playing an IQ File as a Source in Trunk Recorder -Check out the [config-iq-file.json]("../examples/config-iq-file.json") config as an example of how to playback an IQ file as a Source. You will probably need to have the `repeat` parameter turned on, unless you have a really long file. \ No newline at end of file +Check out the [config-iq-file.json](https://github.com/robotastic/trunk-recorder/blob/master/examples/config-iq-file.json) config as an example of how to playback an IQ file as a Source. You will probably need to have the `repeat` parameter turned on, unless you have a really long file. \ No newline at end of file diff --git a/docs/FAQ.md b/docs/FAQ.md index c1c584b4e..2be613149 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -1,3 +1,8 @@ +--- +sidebar_label: 'FAQ' +sidebar_position: 7 +--- + # Ugh! Why is it doing that thing ## Common Error Messages and What to Do diff --git a/docs/INSTALL-DOCKER.md b/docs/Install/INSTALL-DOCKER.md similarity index 98% rename from docs/INSTALL-DOCKER.md rename to docs/Install/INSTALL-DOCKER.md index 73c6b75af..7b41f9b81 100644 --- a/docs/INSTALL-DOCKER.md +++ b/docs/Install/INSTALL-DOCKER.md @@ -1,3 +1,8 @@ +--- +sidebar_label: 'Docker Install' +sidebar_position: 2 +--- + # Docker If you are not going to be modifying the source code, **a [Docker](https://www.docker.com/) based install is the easiest way to get started.** Images are published frequently to [Docker Hub](https://hub.docker.com/r/robotastic/trunk-recorder). The images have GNURadio 3.8 and all other required dependencies built into it, so it should be ready to go and be a much faster solution than compiling. Images have been built for amd64 (amd64 is used by all modern Intel and AMD CPUs) and most popular flavors of ARM. diff --git a/docs/INSTALL-LINUX.md b/docs/Install/INSTALL-LINUX.md similarity index 92% rename from docs/INSTALL-LINUX.md rename to docs/Install/INSTALL-LINUX.md index eed67ecbb..433b1bcd3 100644 --- a/docs/INSTALL-LINUX.md +++ b/docs/Install/INSTALL-LINUX.md @@ -1,3 +1,8 @@ +--- +sidebar_label: 'Linux Install' +sidebar_position: 1 +--- + # Linux Installs This page covers installing Trunk Recorder on a Linux box. I test everything on Ubuntu, but other flavors of Linux are supported. Instructions are also included for Arch Linux. @@ -6,6 +11,19 @@ This page covers installing Trunk Recorder on a Linux box. I test everything on To get started, install all of the required packages. Instructions for different versions are below: +### Ubuntu 23.04 + +```bash +sudo apt-get install -y apt-transport-https build-essential ca-certificates fdkaac git gnupg gnuradio gnuradio-dev gr-osmosdr libuhd-dev libboost-all-dev libcurl4-openssl-dev libgmp-dev libhackrf-dev liborc-0.4-dev libpthread-stubs0-dev libssl-dev libuhd-dev libusb-dev pkg-config software-properties-common cmake libsndfile1-dev sox +``` + +If you are using a HackRF: + +```bash +sudo apt install -y hackrf libhackrf-dev libhackrf0 +``` + + ### Ubuntu 22.04 ```bash diff --git a/docs/INSTALL-MAC.md b/docs/Install/INSTALL-MAC.md similarity index 98% rename from docs/INSTALL-MAC.md rename to docs/Install/INSTALL-MAC.md index e554efd30..875bf4c5a 100644 --- a/docs/INSTALL-MAC.md +++ b/docs/Install/INSTALL-MAC.md @@ -1,3 +1,7 @@ +--- +sidebar_label: 'Mac Install' +sidebar_position: 4 +--- # MacOS There are two main "package managers" used on MacOS: [Homebrew](#using-homebrew) and [MacPorts](#using-macports). Trunk-recorder can be installed with dependencies from one or the other diff --git a/docs/INSTALL-PI.md b/docs/Install/INSTALL-PI.md similarity index 99% rename from docs/INSTALL-PI.md rename to docs/Install/INSTALL-PI.md index d31c24021..12c036ff9 100644 --- a/docs/INSTALL-PI.md +++ b/docs/Install/INSTALL-PI.md @@ -1,3 +1,8 @@ +--- +sidebar_label: 'Raspberry Pi Install' +sidebar_position: 3 +--- + # Raspberry Pi / Debian Smaller radio systems can be covered using a Raspberry Pi. If you are interested in doing this, you should really get a Pi 4. It maybe possible to get things running on an older Pi, but you often get unexpect behavior and errors. A Pi 4 can handle 3-4 simulatanious recordings. Make sure you have a good power supply. Also pay attention to heat. If the Pi gets too hot, it will slow down. A good case or fan can help keep it going full tilt. You can also just run debian on a NUC or Miniform PC. These commands will work with a vaneilla debian install as well. diff --git a/docs/Install/_category_.json b/docs/Install/_category_.json new file mode 100644 index 000000000..b474c90c7 --- /dev/null +++ b/docs/Install/_category_.json @@ -0,0 +1,6 @@ +{ + "position": 2, + "label": "Install", + "collapsible": true, + "collapsed": true + } \ No newline at end of file diff --git a/docs/Playback.md b/docs/Playback.md new file mode 100644 index 000000000..fac04bdf8 --- /dev/null +++ b/docs/Playback.md @@ -0,0 +1,14 @@ +--- +sidebar_label: 'Playback' +sidebar_position: 5 +--- + +# Playback & Sharing +By default, Trunk Recorder just dumps a lot of recorded files into a directory. Here are a couple of options to make it easier to browse through recordings and share them on the Internet. +* [OpenMHz](https://github.com/robotastic/trunk-recorder/wiki/Uploading-to-OpenMHz): This is my free hosted platform for sharing recordings +* [Trunk Player](https://github.com/ScanOC/trunk-player): A great Python based server, if you want to you want to run your own +* [Rdio Scanner](https://github.com/chuot/rdio-scanner): Provide a good looking, scanner style interface for listening to Trunk Recorder +* Broadcastify Calls (API): see Radio Reference [forum thread](https://forums.radioreference.com/threads/405236/) and [wiki page](https://wiki.radioreference.com/index.php/Broadcastify-Calls-Trunk-Recorder) +* [Broadcastify via Liquidsoap](https://github.com/robotastic/trunk-recorder/wiki/Streaming-online-to-Broadcastify-with-Liquid-Soap) +* [audioplayer.php](https://github.com/robotastic/trunk-recorder/wiki/Using-audioplayer.php) +* [rosecitytransit's Live Web page](https://github.com/rosecitytransit/trunk-recorder-daily-log) \ No newline at end of file diff --git a/docs/Plugins.md b/docs/Plugins.md new file mode 100644 index 000000000..e2b8aaa07 --- /dev/null +++ b/docs/Plugins.md @@ -0,0 +1,195 @@ +--- +sidebar_label: 'Plugins' +sidebar_position: 4 +--- + +# Plugins +Plugins make it easy to customize Trunk Recorder and have it better fit you workflow. There are some built-in Plugins that are included in Trunk Recorder and also ones that the Community has developed. + +The [Built-in Plugins](#built-in-plugins) are compiled and installed when you setup Trunk Recorder. Follow the instructions for the [Community Plugins](#community-plugins) to install them. In order to load a plugin when you start Trunk Recorder, you need to add a **plugins** section to your **config.json** file. A [Plugin JSON Object](#plugin-object) is add for each of the Plugins you wish to load. The Plugin Object tells Trunk Recorder how to load it and its configuration. + +```json +{ + Global Configs + + "sources": [{ Source Object }, { Source Object }], + "systems": [{ System Object }, { System Object }], + "plugins": [{ Plugin Object }] +} +``` + + +#### Plugin Object + +| Key | Required | Default Value | Type | Description | +| ------- | :------: | ------------- | -------------------- | ------------------------------------------------------------ | +| library | ✓ | | string | the name of the library that contains the plugin. | +| name | ✓ | | string | the name of the plugin. This name is used to find the `_plugin_new` method that creates a new instance of the plugin. | +| enabled | | true | **true** / **false** | control whether a configured plugin is enabled or disabled | +| | | | | *Additional elements can be added, they will be passed into the `parse_config` method of the plugin.* | + + +## Built-in Plugins + +##### Rdio Scanner Plugin + +**Name:** rdioscanner_uploader +**Library:** librdioscanner_uploader.so + +This plugin makes it easy to connect Trunk Recorder with [Rdio Scanner](https://github.com/chuot/rdio-scanner). It uploads recordings and the information about them. The following additional settings are required: + +| Key | Required | Default Value | Type | Description | +| ------- | :------: | ------------- | ------ | ------------------------------------------------------------ | +| server | ✓ | | string | The URL for uploading to Rdio Scanner. The default is an empty string. It should be the same URL as the one you are using to access Rdio Scanner. | +| systems | ✓ | | array | This is an array of objects, where each is a system that should be passed to Rdio Scanner. More information about what should be in each object is in the following table. | + +*Rdio Scanner System Object:* + +| Key | Required | Default Value | Type | Description | +| --------- | :------: | ------------- | ------ | ------------------------------------------------------------ | +| systemId | ✓ | | number | System ID for Rdio Scanner. | +| apiKey | ✓ | | string | System-specific API key for uploading calls to Rdio Scanner. See the ApiKey section in the Rdio Scanner administrative dashboard for the value it should be. | +| shortName | ✓ | | string | This should match the shortName of a system that is defined in the main section of the config file. | + + + +##### Example Plugin Object: + +```yaml + { + "name": "rdioscanner_uploader", + "library": "librdioscanner_uploader.so", + "server": "http://127.0.0.1", + "systems": [{ + "shortName": "test", + "apiKey": "fakekey", + "systemId": 411 + } +``` + +##### simplestream Plugin + +**Name:** simplestream +**Library:** libsimplestream.so + +This plugin streams uncompressed audio (16 bit Int, 8 kHz, mono) to UDP or TCP ports in real time as it is being recorded by trunk-recorder. It can be configured to stream audio from all talkgroups and systems being recorded or only specified talkgroups and systems. TGID information can be prepended to the audio data to allow the receiving program to take action based on the TGID. Audio from different Systems should be streamed to different UDP/TCP ports to prevent crosstalk and interleaved audio from talkgroups with the same TGID on different systems. + +This plugin does not, by itself, stream audio to any online services. Because it sends uncompressed PCM audio, it is not bandwidth efficient and is intended mostly to send audio to other programs running on the same computer as trunk-recorder or to other computers on the LAN. The programs receiving PCM audio from this plugin may play it on speakers, compress it and stream it to an online service, etc. + +**NOTE 1: In order for this plugin to work, the audioStreaming option in the Global Configs section (see above) must be set to true.** + +**NOTE 2: trunk-recorder passes analog audio to this plugin at 16 kHz sample rate and digital audio at 8 kHz sample rate. Since the audio data being streamed doesn't contain the sample rate, analog and digital audio should be configured to be sent to different ports to receivers that are matched to the same sample rate.** + +| Key | Required | Default Value | Type | Description | +| ------- | :------: | ------------- | ------ | ------------------------------------------------------------ | +| streams | ✓ | | array | This is an array of objects, where each is an audio stream that will be sent to a specific IP address and UDP port. More information about what should be in each object is in the following table. | + +*Audio Stream Object:* + +| Key | Required | Default Value | Type | Description | +| --------- | :------: | ------------- | -------------------- | ------------------------------------------------------------ | +| address | ✓ | | string | IP address to send this audio stream to. Use "127.0.0.1" to send to the same computer that trunk-recorder is running on. | +| port | ✓ | | number | UDP or TCP port that this stream will send audio to. | +| TGID | ✓ | | number | Audio from this Talkgroup ID will be sent on this stream. Set to 0 to stream all recorded talkgroups. | +| sendTGID | | false | **true** / **false** | When set to true, the TGID will be prepended in long integer format (4 bytes, little endian) to the audio data each time a packet is sent. | +| shortName | | | string | shortName of the System that audio should be streamed for. This should match the shortName of a system that is defined in the main section of the config file. When omitted, all Systems will be streamed to the address and port configured. If TGIDs from Systems overlap, each system must be sent to a different port to prevent interleaved audio for talkgroups from different Systems with the same TGID. +| useTCP | | false | **true** / **false** | When set to true, TCP will be used instead of UDP. + +###### Plugin Object Example #1: +This example will stream audio from talkgroup 58914 on system "CountyTrunked" to the local machine on UDP port 9123. +```yaml + { + "name":"simplestream", + "library":"libsimplestream.so", + "streams":[{ + "TGID":58914, + "address":"127.0.0.1", + "port":9123, + "sendTGID":false, + "shortName":"CountyTrunked"} + } +``` + +###### Plugin Object Example #2: +This example will stream audio from talkgroup 58914 from System CountyTrunked to the local machine on UDP port 9123 and stream audio from talkgroup 58916 from System "StateTrunked" to the local machine on UDP port 9124. +```yaml + { + "name":"simplestream", + "library":"libsimplestream.so", + "streams":[{ + "TGID":58914, + "address":"127.0.0.1", + "port":9123, + "sendTGID":false, + "shortName":"CountyTrunked"}, + {"TGID":58916, + "address":"127.0.0.1", + "port":9124, + "sendTGID":false, + "shortName":"StateTrunked"} + ]} + } +``` + +###### Plugin Object Example #3: +This example will stream audio from talkgroups 58914 and 58916 from all Systems to the local machine on the same UDP port 9123. It will prepend the TGID to the audio data in each UDP packet so that the receiving program can differentiate the two audio streams (the receiver may decide to only play one depending on priority, mix the two streams, play one left and one right, etc.) +```yaml + { + "name":"simplestream", + "library":"libsimplestream.so", + "streams":[{ + "TGID":58914, + "address":"127.0.0.1", + "port":9123, + "sendTGID":true}, + {"TGID":58916, + "address":"127.0.0.1", + "port":9123, + "sendTGID":true} + ]} + } +``` +###### Plugin Object Example #4: +This example will stream audio from all talkgroups being recorded on System CountyTrunked to the local machine on UDP port 9123. It will prepend the TGID to the audio data in each UDP packet so that the receiving program can decide which ones to play or otherwise handle) +```yaml + { + "name":"simplestream", + "library":"libsimplestream.so", + "streams":[{ + "TGID":0, + "address":"127.0.0.1", + "port":9123, + "sendTGID":true, + "shortName":"CountyTrunked"} + } +``` +##### Example - Sending Audio to pulseaudio +pulseaudio is the default sound system on many Linux computers, including the Raspberry Pi. If configured to do so, pulseaudio can accept raw audio via TCP connection using the module-simple-protocol-tcp module. Each TCP connection will show up as a different "application" in the pavucontrol volume mixer. + +An example command to set up pulseaudio to receive 8 kHz digital audio from simplestream on TCP port 9125 (for 16 kHz analog audio, use `rate=16000`): +``` +pacmd load-module module-simple-protocol-tcp sink=1 playback=true port=9125 format=s16le rate=8000 channels=1 +``` +The matching simplestream config to send audio from talkgroup 58918 to TCP port 9125 would then be something like this: +```yaml + { + "name":"simplestream", + "library":"libsimplestream.so", + "streams":[{ + "TGID":58918, + "address":"127.0.0.1", + "port":9125, + "sendTGID":false, + "shortName":"CountyTrunked", + "useTCP":true} + } +``` + + + +## Community Plugins +* [MQTT Status](https://github.com/robotastic/trunk-recorder-mqtt-status): Publishes the current status of a Trunk Recorder instance over MQTT +* [MQTT Statistics](https://github.com/robotastic/trunk-recorder-mqtt-statistics): Publishes statistics about a Trunk Recorder instance over MQTT +* [Decode rates logger](https://github.com/rosecitytransit/trunk-recorder-decode-rate): Logs trunking control channel decode rates to a CSV file, and includes a PHP file that outputs an SVG graph +* [Daily call log and live Web page](https://github.com/rosecitytransit/trunk-recorder-daily-log): Creates a daily log of calls (instead of just individual JSON files) and includes an updating PHP Web page w/audio player +* [Prometheus exporter](https://github.com/USA-RedDragon/trunk-recorder-prometheus): Publishes statistics to a metrics endpoint via HTTP \ No newline at end of file diff --git a/docs/intro.md b/docs/intro.md new file mode 100644 index 000000000..1075256e9 --- /dev/null +++ b/docs/intro.md @@ -0,0 +1,65 @@ +--- +sidebar_label: 'Introduction' +sidebar_position: 1 +--- +# All About Trunk Recorder + +## Sponsors +**Do you find Trunk Recorder and OpenMHz useful?** +Become a [Sponsor](https://github.com/sponsors/robotastic) to help support continued development and operation! +Thank you to everyone who has contributed! + +## Overview +Need help? Got something working? Share it! + +[Discord Server](https://discord.gg/btJAhESnks) - and don't forget the [Wiki](https://github.com/robotastic/trunk-recorder/wiki) + +Trunk Recorder is able to record the calls on trunked and conventional radio systems. It uses 1 or more Software Defined Radios (SDRs) to do this. The SDRs capture large swathes of RF and then use software to process what was received. [GNU Radio](https://gnuradio.org/) is used to do this processing because it provides lots of convenient RF blocks that can be pieced together to allow for complex RF processing. The libraries from the amazing [OP25](http://op25.osmocom.org/trac/wiki) project are used for a lot of the P25 functionality. Multiple radio systems can be recorded at the same time. + + +Trunk Recorder currently supports the following: + + - Trunked P25 & SmartNet Systems + - Conventional P25 & analog systems, where each group has a dedicated RF channel + - P25 Phase 1, P25 Phase 2 & Analog voice channels + +Supported platforms: + +**Ubuntu** (18.04, 20.04, 21.04, 22.04); **Raspberry Pi** (Raspberry OS/Raspbian & Ubuntu 21.04, 22.04); **Arch Linux** (2021.09.20); **Debian** (9.x); **macOS** + +GNU Radio 3.7 - 3.10 + +...and SDRs: + +RTL-SDR dongles; HackRF; Ettus USRP B200, B210, B205; BladeRF; Airspy + + +--- + +## Install + +| | Docker | Ubuntu | RaspberryOS | Arch Linux | Homebrew | MacPorts | +| ------------ | :-------------------------: | :----------------------------------------: | :---------------------: | :-----------------------------------: | :-------------------------------------: | :-------------------------------------: | +| Linux | [📄](./Install/INSTALL-DOCKER.md) | [📄](./Install/INSTALL-LINUX.md#**ubuntu-2104**) | | [📄](./Install/INSTALL-LINUX.md#arch-linux) | | | +| Raspberry Pi | [📄](./Install/INSTALL-DOCKER.md) | [📄](./Install/INSTALL-PI.md) | [📄](./Install/INSTALL-PI.md) [🎬](https://youtu.be/DizBtDZ6kE8) | | | | +| MacOS | | | | | [📄](./Install/INSTALL-MAC.md#using-homebrew) | [📄](./Install/INSTALL-MAC.md#using-macports) | + + + +### Setup +* [Configuring a system](./CONFIGURE.md) + +### Troubleshooting + +If are having trouble, check out the [FAQ](./FAQ.md) and/or ask a question on the [Discord Server](https://discord.gg/btJAhESnks) + +___ + +### How Trunking Works +For those not familiar, trunking systems allow a large number of user groups to share a limited number of radio frequencies by temporarily, dynamically assigning radio frequencies to talkgroups (channels) on-demand. It is understood that most user groups actually use the radio very sporadically and don't need a dedicated frequency. + +Most trunking system types (such as SmartNet and P25) set aside one of the radio frequencies as a "control channel" that manages and broadcasts radio frequency assignments. When someone presses the Push to Talk button on their radio, the radio sends a message to the system which then assigns a voice frequency and broadcasts a Channel Grant message about it on the control channel. This lets the radio know what frequency to transmit on and tells other radios set to the same talkgroup to listen. + +In order to follow all of the transmissions, Trunk Recorder constantly listens to and decodes the control channel. When a frequency is granted to a talkgroup, Trunk Recorder creates a monitoring process which decodes the portion of the radio spectrum for that frequency from the SDR that is already pulling it in. + +No message is transmitted on the control channel when a conversation on a talkgroup is over. The monitoring process keeps track of transmissions and if there has been no activity for a specified period, it ends the recording. diff --git a/plugins/rdioscanner_uploader/rdioscanner_uploader.cc b/plugins/rdioscanner_uploader/rdioscanner_uploader.cc index 0075aecc9..fdf88bda2 100644 --- a/plugins/rdioscanner_uploader/rdioscanner_uploader.cc +++ b/plugins/rdioscanner_uploader/rdioscanner_uploader.cc @@ -401,6 +401,25 @@ class Rdio_Scanner_Uploader : public Plugin_Api { return 1; } + // Gets the API key for each system, if defined + for (json element : config_data["systems"]) { + bool rdioscanner_exists = element.contains("apiKey"); + if (rdioscanner_exists) { + Rdio_Scanner_System sys; + + sys.api_key = element.value("apiKey", ""); + sys.system_id = element.value("systemId", ""); + sys.short_name = element.value("shortName", ""); + BOOST_LOG_TRIVIAL(info) << "Uploading calls for: " << sys.short_name; + this->data.systems.push_back(sys); + } + } + + if (this->data.systems.size() == 0) { + BOOST_LOG_TRIVIAL(error) << "Rdio Scanner Server set, but no Systems are configured\n"; + return 1; + } + return 0; }