commit 89f5b21028818846501af9d9c26e0ffc7b44ba30 Author: zyphlar Date: Mon Oct 3 12:21:42 2022 -0700 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..4cff26e --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ + +Based on these guides: + +https://wiki.radioreference.com/index.php/Broadcastify/RTLSDR-Airband + +https://github.com/szpajder/RTLSDR-Airband/wiki/Configuring-Icecast-outputs + +https://icecast.org/docs/icecast-2.4.1/basic-setup.html + +Files go in: + +- `/usr/local/etc/rtl_airband.conf` +- `/etc/systemd/system/rtl_airband.service` + +Installed on Nanopi with FriendlyElec's Ubuntu + +Filesystem backup here: `afp://wb-backups@WillsCloud.local/home/rtl-airband-ksle-nanopi-2022-10-1.img` diff --git a/rtl_airband.conf b/rtl_airband.conf new file mode 100644 index 0000000..e3d3a93 --- /dev/null +++ b/rtl_airband.conf @@ -0,0 +1,117 @@ +# Sample file of "rtl-airband.conf" output to BroadCastify.com icecast streaming server +# RTLSDR-Airband - User's Manual: https://github.com/szpajder/RTLSDR-Airband/wiki +# Refer to here for PPM Offset correction guide - https://viatorci.com/posts/rtlsdr-police-scanner/#rtl-sdr-dongle-offset-tuning + + +# index = 0 => First dongle +# index = 1 => Second dongle + +devices: ({ + type = "rtlsdr"; + index = 0; + gain = 50; + correction = 0; + mode = "scan"; + #mode = "multichannel"; + #centerfreq = 119.5; + sample_rate = 2.4; + buffers = 2 + channels: + ( + { + freqs = (119.000, 121.000); + labels = ("Tower", "Ground"); + outputs: ( + { + disable = false; # IF_NO_LOCAL_ICECAST_SERVER_IS_AVAILABLE_SET_IT_TO_TRUE + type = "icecast"; + server = "127.0.0.1"; + port = 8000; + mountpoint = "local"; + name = "YOUR_NAME_HERE"; + genre = "ATC"; + username = "source"; + password = "YOUR_PASSWORD_HERE"; + send_scan_freq_tags = true; + description = "Local IceCast Server"; + }, + { + disable = false; # THIS_PROFILE_TEMPLATE_ACTIVE_IN_USED + type = "icecast"; + server = "audio9.broadcastify.com"; # FROM_YOUR_RR_FEED_PROVIDER_PAGE + port = 80; # PORT_OF_RR_FEED_PROVIDER_ICECAST_SERVER_USUALLY_8000 + mountpoint = "YOUR_MOUNTPOINT_HERE"; # MOUNT_POINT_FROM_YOUR_RR_FEED_PROVIDER_PAGE + name = "YOUR_NAME_HERE"; # FEED_NAME_THAT_RR_GAVE_YOU_WHEN_YOU_APPLIED + genre = "ATC"; + username = "source"; + password = "YOUR_PASSWORD_HERE"; # PASSWD_FROM_YOUR_RR_FEED_PROVIDER_PAGE + send_scan_freq_tags = true; + description = "YOUR_DESC_HERE"; + } + ); + } +# { +# freq = 119.000; +# label = "Tower"; +# outputs: ({ +# name = "mixer1"; +# type = "mixer"; +# #balance = 0; +# }); +# } #, +# { +# freq = 121.000; +# label = "Ground"; +# outputs: ({ +# name = "mixer1"; +# type = "mixer"; +# #balance = 1.0; +# }); +# } + ); + } +); + +#mixers: { +# mixer1: { +# outputs: ( +# # For local IceCast server +# { +# disable = false; # IF_NO_LOCAL_ICECAST_SERVER_IS_AVAILABLE_SET_IT_TO_TRUE +# type = "icecast"; +# server = "127.0.0.1"; +# port = 8000; +# mountpoint = "local"; +# name = "YOUR_NAME_HERE"; +# genre = "ATC"; +# username = "source"; +# password = "YOUR_PASSWORD_HERE"; +# send_scan_freq_tags = true; +# description = "Local IceCast Server"; +# }, +# +# # For remote BroadCastify server +# { +# disable = false; # THIS_PROFILE_TEMPLATE_ACTIVE_IN_USED +# type = "icecast"; +# server = "audio9.broadcastify.com"; # FROM_YOUR_RR_FEED_PROVIDER_PAGE +# port = 80; # PORT_OF_RR_FEED_PROVIDER_ICECAST_SERVER_USUALLY_8000 +# mountpoint = "YOUR_MOUNTPOINT_HERE"; # MOUNT_POINT_FROM_YOUR_RR_FEED_PROVIDER_PAGE +# name = "38828"; # FEED_NAME_THAT_RR_GAVE_YOU_WHEN_YOU_APPLIED +# genre = "ATC"; +# username = "source"; +# password = "YOUR_PASSWORD_HERE"; # PASSWD_FROM_YOUR_RR_FEED_PROVIDER_PAGE +# send_scan_freq_tags = true; +# description = "YOUR_DESC_HERE"; # DESCRIPTION_ASSIGNED_FROM_YOUR_RR_FEED_APPLICATION +# } +# +# # If you need more outputs, put under here ... +# +# +# # NOTICE: Make sure you remove the comma at the end of the profile segment template. +# # e.g. From "}," to "}" else you get an error. For the last profile template segment only. +# +# ); +# } +#}; + diff --git a/rtl_airband.service b/rtl_airband.service new file mode 100644 index 0000000..a4d1627 --- /dev/null +++ b/rtl_airband.service @@ -0,0 +1,17 @@ +[Unit] +Description=SDR AM/NFM demodulator +Documentation=https://github.com/szpajder/RTLSDR-Airband/wiki +Wants=network.target +After=network.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/rtl_airband -Fe +# The program may exit only due to startup failure (eg. misconfiguration) +# or due to failure of all SDR devices (eg. disconnection). In either case, +# there is no point to restart it, because it would fail once again. +Restart=no + +[Install] +WantedBy=multi-user.target +