Skip to content

Commit

Permalink
updated README.rtlfm_cmdfile: added keywords adcmax and adcrms
Browse files Browse the repository at this point in the history
also added option -W

Signed-off-by: hayati ayguen <[email protected]>
  • Loading branch information
hayguen committed Sep 15, 2016
1 parent aa79aa2 commit 99c3e08
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.rtlfm_cmdfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Parameters a seperated by comma.

Here's an example:
---
# freq in Hz, gain in dB, trig_crit (in/out/lt/gt), trig_level, trig_tolerance, #meas, #blocks, trigger_command
# windows: rtl_fm -f 105.2m -E rdc -w 350k -s 200k -m 2.2m -B 200000 -C cmdfile.csv -n -v
# freq in Hz or special keyword, gain in dB, trig_crit (in/out/lt/gt), trig_level, trig_tolerance, #meas, #blocks, trigger_command
# windows: rtl_fm -f 105.2m -E rdc -w 350k -s 200k -m 2.2m -B 200000 -C cmdfile.csv -n -v
# rtl_fm -f 105.2m -E rdc -w 350k -s 200k -m 2.2m -W 4 -B 10000 -C cmdfile.csv -n -v
# linux: ./rtl_fm -f 105.2m -E rdc -w 350k -s 200k -m 2.2m -B 200000 -C cmdfile.csv -n -v
#
# windows command examples:
Expand All @@ -25,15 +26,32 @@ Here's an example:
# sendxmpp
## for piping some message to ssmtp or sendxmpp you'll need to write small scripts

# 'adcmax' keyword in first column activates measurement of max adc value at capture rate to determine optimum gain and avoid oversteering
# 'adcrms' keyword activates rms calculation at capture rate. for usual it's similar to adcmax. there are differences in case of oversteering
# activate verbose output (option '-v') to get the output. The maximum possible sample value is 128.
# You should have approx. 6 dB headroom to allow measuring stronger signals, that means measured baseline values should be below 64.
# An the other side you'll want to measure weaker signals, so the measured baseline value should be above a minimum of approx 8 or 16.
adcmax,
adcrms,
100.7m, 30, in, 0, 1, 10, 100,
33.0m, 20,out,60, 3, 10, 400, /home/odroid/test/simple.sh, frq !freq! gain !gain! measured !mlevel! tenth dB !crit! { !reflevel! +/- !reftol! tenth dB }
# now check for optimal gain in some steps, which should be done per frequency!:
100.7m, 0, gt, 400, 1, 1, 100,
100.7m, 3, gt, 400, 1, 1, 100,
100.7m, 6, gt, 400, 1, 1, 100,
100.7m, 12, gt, 400, 1, 1, 100,
100.7m, 18, gt, 400, 1, 1, 100,

---

* first frequency is 100.7 MHz, tuned with ~ 30 dB tuner gain;
condition is 'in' { 0 +/- 1 } dB,
with 10 measurements, averaging the rms level in dB.
If condition is true, then a command could be triggered, which would be executed in background.
Each single measurement is processed after decimation of block/buffer-size many samples (see option -W).
The resulting number of decimated samples might get too small to allow a reliable measurement.
This number also depends on the capture rate: ensure minimum capture rate with option '-m'. This is also important for reducing aliases.
Check the output 'block length after decimation is ... samples'!
If condition for measured level is true, then a command can be triggered, which is executed in background.
Then, a next trigger for this frequency is blocked for 100 measurements.
There is nothing triggered for 100.7 MHz.

Expand Down

0 comments on commit 99c3e08

Please sign in to comment.