Need to duplicate gqrx settings in rtl_fm command line switches. Review of rtl_fm docs has yielded no joy.

gqrx configuration:

  • Freq 156.425 Mhz
  • Filter: Wide
  • Mode: Narrow FM
  • AGC: Fast
  • Squelch: -58.5 dBFS
  • LNB LO: 0Mhz
  • Gain: 10
  • Freq Correction: 0ppm
  • Stream as UDP

Stream as UDP nice but not required... TIA for your assistance. Project background and details on request...


Details of project follow as requested.

The Project: The Boot Key Harbor Cruisers Net is a marine vhf net that meets every morning at 0900 in support of the local community of cruising boats here in Marathon. In the winter "season" we can have as many as 300+ boats in the harbor and surrounding area. After discussions with some of the other net-controllers, we decided it would be good to push the broadcast onto the internet so folks not able to participate on the live VHF net due to moving outside the local area or time constraints like a job, can still listen

Goals and Requirements: Eventually, we would like to be able to record and push the mp3 encoded files to the internet server unattended. Currently the recordings are started and stopped manualy using the hardware/software listed below. If we can get the physical footprint small enough and operate "headless" we may be able to convince the Marathon City Marina (one of our sponsors) to allow us to hang the system off their tower with an ethernet connection to the public wifi router. To this end, my logic dictates a RasPi2 or 3 running linux and arm compatible software. The low power requirements of the Pi would allow it to run 24/7 with recording and SFTP functions controlled by simple bash scripts. Therefor, we are looking at linux only software that also can be run from the command line only (No gui).

Hardware: (Current)

  • Standard 1/4 wave loaded VHF whip antenna. Elevation aprox 15'.
  • Rtl-Sdr usb dongle (RTL2832U with 1ppm TCXO). Coupled direct to antenna with PL-259/SMA male adaptor.
  • 15' usb cable (no balun)
  • IBM t42 laptop running linux OS

Software: (Installed)

  • Navigatrix OS (Debian/Ubuntu 14.04)
  • RTL-SDR (current latest)
  • GnuRadio (current latest)
  • Gqrx (current latest)

History, Issues, Current Status: Initial setup using rtl_fm tested on VHF WX2 (162.4M)with good results. 1Kw station with tall tower located about 25 miles distant. rtl_fm test on Cruisers Net VHF 68 (156.425M) very poor quality do to interfering signal at about 156.125M (See gqrx waterfall screen shot below). Testing using gqrx usuable to good quality despite strong nearby signal. Encoded udp stream as mp3 using | sox and pushed to server via sftp (manual). Usuable gqrx settings as follow:

  • Filter: Wide
  • Mode: Narrow FM
  • AGC: Fast
  • Squelch: -58.5 dBFS
  • LNB LO: 0Mhz
  • Gain: 10
  • Freq Correction: 0ppm
  • Stream as UDP
  • Freq 156.425M

Have been unable to duplicate gqrx settings in rtl_fm after numerous tries despite going over the rtl_fm documentation numerous times. While gqrx works as long as I am here to interact with the gui, it is not command line happy as far as scheduled control via bash. Rtl_fm also has another issue with how it handles squelch. When squelch kicks in, it stops output and busts the sox recording pipe. Found a modified version that is supposed to address this issue, plus another that includes outputing a udp stream rather than a raw file, but until I can get the command line switches set up to match the working gqrx config, its kinda a moot point... One thing at a time.

[b]Specific Questions:[/b] Can anyone help us configure the gqrx command line to the same config as gqrx listed above? Any suggestions as to software we have not tried yet that will meet the requirements of command line operation? Have not tried RTLSharp yet... know it will run on linux under mono, but not sure on raspian.

If you have read this far, thanks for your patience. You can listen to test recordings on our partial website at bootkeycruisers.net Screen shot of typical gqrx waterfall below (no traffic on target freq).

gqrx screenshot

  • $\begingroup$ Welcome to Ham.SE! This appears to be about a non-amateur application of radio. You'll have to supply a lot more context in order to bring it on-topic for this site. $\endgroup$ Jun 6, 2016 at 16:03
  • 1
    $\begingroup$ @DaveTweed GQRX is a very ham-oriented Application to observe radio spectrum, demodulate common voice modes (FM, SSB..) and save recordings. I think it's ok to infer that OP wants to use this in a ham context, especially with an RTL dongle. Anyway: project background and details on request? obviously: Request! $\endgroup$ Jun 6, 2016 at 17:35
  • $\begingroup$ @David especially since you're using a non-amateur band (in the US and EU, afaik) $\endgroup$ Jun 6, 2016 at 17:46
  • 1
    $\begingroup$ @MarcusMüller: We're both making the same point: The question could be about amateur radio, but on the face of it, it isn't. It's up to the OP to bring it on-topic. $\endgroup$ Jun 6, 2016 at 18:57
  • $\begingroup$ @DaveTweed true. Callin upon David to add details! David, it's really no shame if this is off-topic here, we will most definitely help you by referring you to the right places if it is. And if it's only slightly off, I'm sure we'll find a way of improving your question together, so that it can be answered here :) $\endgroup$ Jun 6, 2016 at 18:59

1 Answer 1


This will be an incomplete answer to begin with, hoping that collectively we can come up with a workable solution:

Freq 156.425 Mhz

-f 156.425e6

Filter: Wide

I did not find "Filter" in any online-reference of rtl_fm, unless this is "sample rate", which can be set by: -s 12k for narrow FM

Mode: Narrow FM

-M fm

AGC: Fast

I did not find AGC in any online-reference of rtl_fm

Squelch: -58.5 dBFS

-l 58.5

(not very clear what values the -l switch takes, and what this would result in, so this value will need experimentation)

LNB LO: 0Mhz

LNB is for devices with external block downconverters; it doesn't apply here, so we don't have to account for this

Gain: 10

-g 10

Freq Correction: 0ppm

-p 0

Stream as UDP

Streaming over UDP is not one of the functionalities of the rtl_fm tool versions that are available.

You can emulate this behaviour, however, by using the output of rtl_fm e.g. as input to an audio compressor and a network sending program such as n[et]cat:

Network Streaming

Maybe you have a poor quality wifi link and don't want to send a 
full 1MS/s data stream around. Here is how to make a quick and 
dirty mp3 stream that will average 4KB-8KB/sec for voice channels. 
Other codecs may be swapped in as desired.

On the dongle side:
rtl_fm ..... | sox -traw -r24k -es -b16 -c1 -V1 - -tmp3 - | socat -u - TCP-LISTEN:8080

On the loudspeaker side:  
netcat don.gle.ip.adr 8080 | play -t mp3 -

Generally, you can get a list of rtl_fm options by calling it with the -h flag:

$> rtl_fm -h
rtl_fm, a simple narrow band FM demodulator for RTL2832 based DVB-T receivers

Use:    rtl_fm -f freq [-options] [filename]
    -f frequency_to_tune_to [Hz]
        use multiple -f for scanning (requires squelch)
        ranges supported, -f 118M:137M:25k
    [-M modulation (default: fm)]
        fm, wbfm, raw, am, usb, lsb
        wbfm == -M fm -s 170k -o 4 -A fast -r 32k -l 0 -E deemp
        raw mode outputs 2x16 bit IQ pairs
    [-s sample_rate (default: 24k)]
    [-d device_index (default: 0)]
    [-g tuner_gain (default: automatic)]
    [-l squelch_level (default: 0/off)]
    [-p ppm_error (default: 0)]
    [-E enable_option (default: none)]
        use multiple -E to enable multiple options
        edge:   enable lower edge tuning
        dc:     enable dc blocking filter
        deemp:  enable de-emphasis filter
        direct: enable direct sampling
        offset: enable offset tuning
    filename ('-' means stdout)
        omitting the filename also uses stdout

Experimental options:
    [-r resample_rate (default: none / same as -s)]
    [-t squelch_delay (default: 10)]
        +values will mute/scan, -values will exit
    [-F fir_size (default: off)]
        enables low-leakage downsample filter
        size can be 0 or 9.  0 has bad roll off
    [-A std/fast/lut choose atan math (default: std)]

Produces signed 16 bit ints, use Sox or aplay to hear them.
    rtl_fm ... | play -t raw -r 24k -es -b 16 -c 1 -V1 -
               | aplay -r 24k -f S16_LE -t raw -c 1
      -M wbfm  | play -r 32k ... 
      -s 22050 | multimon -t raw /dev/stdin

Others: please comment or directly edit this post to see if we can complete the command-line switches

[EDIT 29-Aug-2016] our answer to the question is:

Answer 1, gain to be automatic, -l value need to be determined experimentally:

rtl_fm -f 156.425e6 -s 12k -M fm -l 58.5 

Answer 2, gain to be set at 10, -l value need to be determined experimentally:

rtl_fm -f 156.425e6 -s 12k -M fm -l 58.5 -g 10
  • $\begingroup$ with the edit from Marcus, and without having an AGC setting, this answer is now complete... right ? Or omitting the -g for setting the gain, will defautl to "automatic" which could be interpreted as "AGC" without knowing if this is "slow" or "fast" $\endgroup$ Aug 26, 2016 at 14:08
  • $\begingroup$ updated the answer with the correct command line switches, I guess that concludes this. $\endgroup$ Aug 29, 2016 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .