rtl_fm -> left and right sox output?

Main forum to discuss RTL-SDR related topics.
Post Reply
phil
Posts: 18
Joined: Mon Aug 21, 2017 11:02 pm

rtl_fm -> left and right sox output?

Post by phil » Sun Mar 04, 2018 3:01 am

Hi all,
Briefly -
I'm running rtl_fm to PDW, using : rtl_fm -M -d 1 -g 4 -r 12.5k -f 148.68750M | play -r 12.5k -t raw -e s -b 16 -c 1 -V1 -
which is working nicely.
At the same time i am running a second dongle (same commands, different frequency) for a second pager frequency.

Is there a command that will allow me to split the output of one dongle to the left channel and one dongle to the right channel so i can run run 2 versions of PDW like i can do in windows with SDR# and its AUX VFO functions?

This is on linux mint 18.3 and pulse audio. I have read the options for sox, but all the L/R or piping options tend to relate to stereo not an analog nfm signal.

Any help appreciated

Thanks.

rtlsdrblog
Site Admin
Posts: 1521
Joined: Mon Nov 19, 2012 11:54 pm

Re: rtl_fm -> left and right sox output?

Post by rtlsdrblog » Sun Mar 04, 2018 3:22 am

How are you running PDW on Linux?

Maybe it would be better to use a command line app like MultiMon-ng and this display app, if you're looking for a full Linux solution. https://www.rtl-sdr.com/pagermon-a-brow ... ltimon-ng/

phil
Posts: 18
Joined: Mon Aug 21, 2017 11:02 pm

Re: rtl_fm -> left and right sox output?

Post by phil » Sun Mar 04, 2018 4:35 am

PDW is being run through wine. I would still run into the same issue monitoring 2 pager sites regardless of which decoder i use wouldn't i?

rtlsdrblog
Site Admin
Posts: 1521
Joined: Mon Nov 19, 2012 11:54 pm

Re: rtl_fm -> left and right sox output?

Post by rtlsdrblog » Sun Mar 04, 2018 9:45 pm

Multimon-NG would get the data through Linux Pipes, rather than through audio so it woudn't be an issue there.

If you want to continue with PDW, I think it should definitely be possible to split the output using sox. Using the stereo split options should work, it doesn't matter that the modulation was NFM. Once demodulated it's standard L+R audio with both LR channels having the same audio.

Another better option might be to use PulseAudio to create multiple virtual audio outputs. I've never tried that, but I found a somewhat related guide here https://www.reddit.com/r/linux/comments ... h=c5f5643c

phil
Posts: 18
Joined: Mon Aug 21, 2017 11:02 pm

Re: rtl_fm -> left and right sox output?

Post by phil » Mon Mar 05, 2018 8:39 am

Thanks, awesome info as usual. I'm going to hop right into it this week and we'll see what comes of it, will post the outcome. My RPi 3 turned up last friday so i have multimonNG running on that as well, not much chance of wine running on the pi unless i use a paid program to host it.
Incidentley, about halfway down this page: https://www.raspberrypi.org/forums/view ... 2&start=25
there is a short script for "PDW" type look for multimonNG. I've been playing with it, but its throwing up some errors that im trying to work through, but i'm no programmer.

Cheers!

phil
Posts: 18
Joined: Mon Aug 21, 2017 11:02 pm

Re: rtl_fm -> left and right sox output?

Post by phil » Thu Mar 08, 2018 2:17 am

Been faffing about with the pi for a couple of days and now have 2 dongles (using rtl_fm) feeding 2 instances of PDW via the pulse audio commands mentioned in the link you posted. Working well using between 24 and 30% cpu. The RPI 3 is an awesome little unit!

rtlsdrblog
Site Admin
Posts: 1521
Joined: Mon Nov 19, 2012 11:54 pm

Re: rtl_fm -> left and right sox output?

Post by rtlsdrblog » Fri Mar 09, 2018 4:09 am

Nice! Are you able to post the commands that you used here? Might help others in the future who find this post in a search.

phil
Posts: 18
Joined: Mon Aug 21, 2017 11:02 pm

Re: rtl_fm -> left and right sox output?

Post by phil » Sat Mar 10, 2018 1:47 am

no probs:

- rtl_fm -d 0 -p 57 -g 20 -r 12.5k -f ***.****M | aplay -r 12500 -f S16_LE for each dongle and frequency

$ pacmd load-module module-combine-sink sink_name="whatever" slaves="alsa_output.platform-soc_audio.analog-stereo" for each output to PDW. I have noticed that the terminal has to stay open otherwise these will disappear from the sound controls.

phil
Posts: 18
Joined: Mon Aug 21, 2017 11:02 pm

Re: rtl_fm -> left and right sox output?

Post by phil » Fri Mar 16, 2018 11:02 pm

Quick update: I am now running the 2 frequencies (1 per dongle, i tried using 1 dongle setup to scan 2 frequencies with the squelch command like the RTL-FM scanner setup but kept hitting problems) into 1 instance of PDW and i haven't seen any decoding issues. CPU is down to 15%. I'm very happy and surprised with the outcome.

Post Reply