diff --git a/docs/examples/docker/README.md b/docs/examples/docker/README.md new file mode 100644 index 0000000..5c187b4 --- /dev/null +++ b/docs/examples/docker/README.md @@ -0,0 +1,5 @@ +# Docker + +- The `official Docker container image` for [Rdio Scnaner](https://github.com/chuot/rdio-scanner) is available [here](https://hub.docker.com/repository/docker/chuot/rdio-scanner). + +- A convinient `docker-compose.yml` is available [here](https://github.com/chuot/rdio-scanner/blob/master/docs/docker/docker-compose.yml) you can use. \ No newline at end of file diff --git a/docs/examples/docker/docker-compose.yml b/docs/examples/docker/docker-compose.yml new file mode 100644 index 0000000..1d22936 --- /dev/null +++ b/docs/examples/docker/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" + +services: + server: + environment: + - TZ=America/Toronto + image: docker.io/chuot/rdio-scanner:latest + ports: + - "3000:3000" + volumes: + - /home/radio/rdio-scanner:/app/data:z + - /home/radio/SDRTrunk/recordings:/recordings:z \ No newline at end of file diff --git a/docs/examples/rtlsdr-airband/README.md b/docs/examples/rtlsdr-airband/README.md new file mode 100644 index 0000000..85b437c --- /dev/null +++ b/docs/examples/rtlsdr-airband/README.md @@ -0,0 +1,17 @@ +# RTLSDR-Airband + +Here's an example with RTLSDR-Airband: + +## RTLSDR-Airband's configuration + +See the `rtl_airband.conf` file for an example. + +## Rdio Scanner's configuration + +In you Rdio Scanner dirwatch configuration, use those parameters: + +- Directory: `/tmp/radio/CYMX` +- Extension: `mp3` +- Type: `Default` +- System: _choose the appropriate one_ +- Mask: `cymx_#TG_#DATE_#TIME_#HZ` diff --git a/docs/examples/rtlsdr-airband/rtl_airband.conf b/docs/examples/rtlsdr-airband/rtl_airband.conf new file mode 100644 index 0000000..1d876a7 --- /dev/null +++ b/docs/examples/rtlsdr-airband/rtl_airband.conf @@ -0,0 +1,51 @@ +fft_size = 512; +localtime = true; +multiple_demod_threads = true; +devices: ( + { + type = "rtlsdr"; + serial = "00000081"; + gain = 38.6; + centerfreq = 119.4; + correction = 0; + channels: + ( + { + freq = 118.9; + outputs: ( + { + type = "file"; + directory = "/tmp/radio/CYMX"; + filename_template = "cymx_118900"; + split_on_transmission = true; + include_freq = true; + } + ); + }, + { + freq = 119.1; + outputs: ( + { + type = "file"; + directory = "/tmp/radio/CYMX"; + filename_template = "cymx_119100"; + split_on_transmission = true; + include_freq = true; + } + ); + }, + { + freq = 119.9; + outputs: ( + { + type = "file"; + directory = "/tmp/radio/CYMX"; + filename_template = "cymx_119900"; + split_on_transmission = true; + include_freq = true; + } + ); + } + ); + } +); diff --git a/docs/examples/trunk-recorder/upload-call.sh b/docs/examples/trunk-recorder/upload-call.sh new file mode 100755 index 0000000..65bae5f --- /dev/null +++ b/docs/examples/trunk-recorder/upload-call.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# If your Trunk Recorder instance is running on the same host +# as Rdio Scanner, you can use a dirwatch to ingest audio files +# instead of relying on this script. +# +# If on the contrary you Trunk Recorder instance runs on another +# host, then this script is the way to go. +# +# Use this script with Trunk Recorder uploadScript system property +# in its config.json file. +# +# { +# ... +# "uploadScript": "upload-call.sh 7537" +# ... +# } +# +# Note that you have to pass the Rdio Scanner system Id as the +# first argument. Trunk Recorder will then add the full path +# of the audio file as the second argument. + +# Change this API key to the one configured in your Rdio Scanner +# instance. +apikey=b29eb8b9-9bcd-4e6e-bb4f-d244ada12736 + +basename="${2%.*}" + +# Change the URL to match your Rdio Scanner host. +curl -sS http://127.0.0.1:3000/api/trunk-recorder-call-upload \ + -F "key=${apikey}" \ + -F "audio=@${basename}.wav;type=audio/wav" \ + -F "meta=@${basename}.json;type=application/json" \ + -F "system=${1:-0}" + +# The audio file and its JSON file will then be deleted. +rm -f ${basename}.*