multi_rx with multiple SDRs and streams

Status
Not open for further replies.

bryankosch

Newbie
Premium Subscriber
Joined
Nov 21, 2021
Messages
3
I've been running boatbod's multi_rx for a couple months. Working great, just using for local law enforcement and then using icecast to listen remotely.

What I would like to do is this:

1) Have one SDR dedicated to law enforcement, this would stream to it's own icecast mountpoint
2) Have another SDR dedicated to fire/medical, this would also stream to it's own icecast mountpoint
3) Have another SDR that I can have setup for multiple sites and be able to choose which to listen to (it seems the multiple channels function works this way?) This would also be on it's own icecast mountpoint
4) Have other SDR connected and NOT used by op25
5) Ensure each individual SDR is always assigned the same (i.e. serial 00000003 is always device 0, etc).

Generally I just want to always have police streaming on one channel, fire/med on another, a third that I can select between, and then my other SDRs available for their own software (i.e. my GOES-17 processing).

I'd appreciate any help!
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,113
Location
NE Wisconsin
I have no idea of what the systems and can only respond in generalities. But for the most part, everything you want to do is possible so long as you keep in mind loading the CPU and of the USB bus bandwidth when choosing sampling rates for the SDR's assigned to the receivers. It's usually far more efficient to user narrowband (RTL SDR's) devices at a lower sample rate per receiver than to use a wideband device at much higher sample rates to reduce overall loading on hardware resources. It really depends upon the hardware platform you have in mind.

A single instance of Liquidsoap can be configured with multiple inputs (audio.py) running on separate UDP port assignments to match
the destinations set in your JSON file that in turn stream to different Icecast destinations. The receivers can be conventional single channel P25
or trunked P25 with one or more Voice Channels (VC's) whereby you can employ white/black lists to filter specific talkgroups that will stream on what channel VC's.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,539
Location
Talbot Co, MD
To make sure your SDRs are consistently assigned to the same channels, you'll need to configure each with a unique serial#, they you can use this in the devices section to reference the hardware. From there you assign the channel to the desired device and also the appropriate trunking_sysname along with a channel-specific whitelist. You'll need one channel definition per voice stream, and as many trunking definitions as systems you want to monitor. Make sense?
 

bryankosch

Newbie
Premium Subscriber
Joined
Nov 21, 2021
Messages
3
I have no idea of what the systems and can only respond in generalities. But for the most part, everything you want to do is possible so long as you keep in mind loading the CPU and of the USB bus bandwidth when choosing sampling rates for the SDR's assigned to the receivers. It's usually far more efficient to user narrowband (RTL SDR's) devices at a lower sample rate per receiver than to use a wideband device at much higher sample rates to reduce overall loading on hardware resources. It really depends upon the hardware platform you have in mind.

A single instance of Liquidsoap can be configured with multiple inputs (audio.py) running on separate UDP port assignments to match
the destinations set in your JSON file that in turn stream to different Icecast destinations. The receivers can be conventional single channel P25
or trunked P25 with one or more Voice Channels (VC's) whereby you can employ white/black lists to filter specific talkgroups that will stream on what channel VC's.

Hey thank you for the reply. That is my intent, I have all NooElec Smart+ (and one SmartTee for GOES). Running 4 total at 2Mbs I dont think I'd hit a USB bus speed issue?

The Liquidsoap config is where I'm running into that first issue, as the .liq examples I have don't show anything about ports. I'm guessing I have to adjust the input line that calls audio.py and and use different ports there? Multiple input lines?

To make sure your SDRs are consistently assigned to the same channels, you'll need to configure each with a unique serial#, they you can use this in the devices section to reference the hardware. From there you assign the channel to the desired device and also the appropriate trunking_sysname along with a channel-specific whitelist. You'll need one channel definition per voice stream, and as many trunking definitions as systems you want to monitor. Make sense?

Hey thank you! That does make sense for the most part. I have all my SDRs setup with unique serials, but in the multi_rx config they are called like this:

"devices": [
{
"args": "rtl=0",

Which just seems to use what order they are in, how do I address them by serial #? I've looked through the examples but feel like I'm missing documentation somewhere with all the config options and such.

By the way, I have to thank you for this software and all your support! Cheers!

Bryan

I have no idea of what the systems and can only respond in generalities. But for the most part, everything you want to do is possible so long as you keep in mind loading the CPU and of the USB bus bandwidth when choosing sampling rates for the SDR's assigned to the receivers. It's usually far more efficient to user narrowband (RTL SDR's) devices at a lower sample rate per receiver than to use a wideband device at much higher sample rates to reduce overall loading on hardware resources. It really depends upon the hardware platform you have in mind.

A single instance of Liquidsoap can be configured with multiple inputs (audio.py) running on separate UDP port assignments to match
the destinations set in your JSON file that in turn stream to different Icecast destinations. The receivers can be conventional single channel P25
or trunked P25 with one or more Voice Channels (VC's) whereby you can employ white/black lists to filter specific talkgroups that will stream on what channel VC's.

Replying again because I actually found the .liq example that shows how to address the ports and different channels etc. My apologies, I apparently didn't copy it when I was moving everything to a new setup. I'll work from that! Thanks again!
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,113
Location
NE Wisconsin
The Liquidsoap config is where I'm running into that first issue, as the .liq examples I have don't show anything about ports. I'm guessing I have to adjust the input line that calls audio.py and and use different ports there? Multiple input lines?

Let me begin by first providing an example of how to configure Liquidsoap for multiple channels. The following depicts three inputs that are being streamed to separate mount points on the same (Icecast) server but can be different servers as well.

Example three-channel liquidsoap script

#!/usr/bin/liquidsoap # Example liquidsoap streaming from op25 to icecast # (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.com # set("log.stdout", true) set("log.file", false) set("log.level", 1) # Make the native sample rate compatible with op25 set("frame.audio.samplerate", 8000) input_1 = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23450 -x 1.25 -s")) input_2 = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23460 -x 1.25 -s")) input_3 = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23470 -x 1.25 -s")) # Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25 # Longer buffer results in less choppy audio but at the expense of increased latency. # OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS # Uncomment to enable # # High pass filter #input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input) # Low pass filter #input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input) # Compression #input_1 = compress(input_1, attack = 15.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 300.0, threshold = -18.0) # Normalization input_1 = normalize(input_1, gain_max = 9.0, gain_min = -9.0, target = -16.0, threshold = -55.0) input_2 = normalize(input_2, gain_max = 9.0, gain_min = -9.0, target = -16.0, threshold = -55.0) input_3 = normalize(input_3, gain_max = 9.0, gain_min = -9.0, target = -16.0, threshold = -55.0) # LOCAL AUDIO # Uncomment the appropriate line below to enable local sound # # Default audio subsystem #out (input) # # PulseAudio #output.pulseaudio(input) # # ALSA #output.alsa(input) # ICECAST STREAMING # Uncomment to enable output to an icecast server # Change the "host", "password", and "mount" strings appropriately first! # For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file # output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="Channel-1", password="hackme", mean(input_1)) output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="Channel-2, password="hackme", mean(input_2)) output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="Channel-3", password="hackme", mean(input_3))

Note: The three input lines shown above have been set with the -u xxxxx parameter that's used to specify the inbound UDP port for that audio channel. These same port numbers would also correspond the identical destination ports in your multi_rx.py destinations. Conversely, they could also be specific port assignments assigned for multiple instances of rx.py or a combination thereof.
 
Last edited:

bryankosch

Newbie
Premium Subscriber
Joined
Nov 21, 2021
Messages
3
Let me begin by first providing an example of how to configure Liquidsoap for multiple channels. The following depicts three inputs that are being streamed to separate mount points on the same (Icecast) server but can be different servers as well.

THANK YOU! that example was exactly what I needed! I haven't setup the third channel yet, but right now I have my police on first sdr and it's own stream, and fire/med on second sdr and it's own stream. I still have to tweak some things but so far this is excellent.

Also to boatbod, I didn't realize you could just use the serial as the device number and have it recognize it, decided to try it and apparently it worked, so thats perfect!

Now if only I could get goestools to use the serial number instead of the device number but of course that's a different topic.

Thanks so much!
 
Status
Not open for further replies.
Top