Soooo...after messing around for a while with the squelch, I've come up with something others might want to try. I've forked keenerd's code to make my own changes.
Assuming you have already gotten keenerd's code working...try downloading & compiling my version with the modified squelch.
I'd recommend starting by creating a new folder to store this build of code (folder name of radef used in the sample here).
Code:
cd ~
mkdir radef
cd radef
Now pull the source code & compile
Code:
git clone https://github.com/radef/rtl-sdr/
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
The command line options are all the same. I've just modified how the squelch level is handled and how RMS power in the passband is calculated. It's a kludge right now - you'll need to use this lookup below to help you set the squelch level. It's a logrithmic scale.
The range for squelch (the -l parameter) is 0 to about 3500 on my dongle. 0 means there's no squelch. Lower numbers indicates a weaker squelch. The value of squelch changes with gain settings. The following assumes you are using a 12k sample rate. The numbers below are what my RTL dongle measured on the bench - yours may vary. I suspect these will be good starting point numbers for you.
If your gain is 10...
For a squelch level of -70 dBm, set the level parameter to a value of 41
For a squelch level of -60 dBm, set the level parameter to a value of 125
For a squelch level of -50 dBm, set the level parameter to a value of 323
If your gain is 20...
For a squelch level of -80 dBm, set the level parameter to a value of 32
For a squelch level of -70 dBm, set the level parameter to a value of 93
For a squelch level of -60 dBm, set the level parameter to a value of 292
For a squelch level of -50 dBm, set the level parameter to a value of 930
If your gain is 30...
For a squelch level of -90 dBm, set the level parameter to a value of 33
For a squelch level of -80 dBm, set the level parameter to a value of 97
For a squelch level of -70 dBm, set the level parameter to a value of 305
For a squelch level of -60 dBm, set the level parameter to a value of 965
For a squelch level of -50 dBm, set the level parameter to a value of 3045
If your gain is 40...
For a squelch level of -100 dBm, set the level parameter to a value of 33
For a squelch level of -90 dBm, set the level parameter to a value of 96
For a squelch level of -80 dBm, set the level parameter to a value of 305
For a squelch level of -70 dBm, set the level parameter to a value of 963
For a squelch level of -60 dBm, set the level parameter to a value of 3025
If your gain is 50...
For a squelch level of -100 dBm, set the level parameter to a value of 66
For a squelch level of -90 dBm, set the level parameter to a value of 201
For a squelch level of -80 dBm, set the level parameter to a value of 635
For a squelch level of -70 dBm, set the level parameter to a value of 1996
Yeah, I'll work out the algorithm later to make it easier to use.
If I had a larger sample set of RTL dongles, I might be able to figure out a dBm scale that works across the board.
For now, just know that increasing squelch level values requires a stronger signal to open the squelch.
More to follow...