aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtl_fm.c
diff options
context:
space:
mode:
authorhayati ayguen <h_ayguen@web.de>2017-06-11 00:18:53 +0200
committerSteve Markgraf <steve@steve-m.de>2017-06-13 01:20:32 +0200
commit18bf26989c926a5db4fca29e7d859af42af1437c (patch)
tree54a1fa41103e733bc02cfbae2a03f5747418a73e /src/rtl_fm.c
parentfa3a113b77b6ed2738778a52ae4f9ce4e6f18ea3 (diff)
Add option '-T' for activating bias-T in rtl_(adsb|fm|power|tcp)
* added debug output when activating Signed-off-by: hayati ayguen <h_ayguen@web.de> * fixed options argument Signed-off-by: Fabian P. Schmidt <kerel-fs@gmx.de> Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/rtl_fm.c')
-rw-r--r--src/rtl_fm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rtl_fm.c b/src/rtl_fm.c
index e89e42d..d2d011a 100644
--- a/src/rtl_fm.c
+++ b/src/rtl_fm.c
@@ -193,6 +193,7 @@ void usage(void)
"\t raw mode outputs 2x16 bit IQ pairs\n"
"\t[-s sample_rate (default: 24k)]\n"
"\t[-d device_index (default: 0)]\n"
+ "\t[-T enable bias-T on GPIO PIN 0 (works for rtl-sdr.com v3 dongles)]\n"
"\t[-g tuner_gain (default: automatic)]\n"
"\t[-l squelch_level (default: 0/off)]\n"
//"\t for fm squelch is inverted\n"
@@ -1042,12 +1043,13 @@ int main(int argc, char **argv)
int r, opt;
int dev_given = 0;
int custom_ppm = 0;
+ int enable_biastee = 0;
dongle_init(&dongle);
demod_init(&demod);
output_init(&output);
controller_init(&controller);
- while ((opt = getopt(argc, argv, "d:f:g:s:b:l:o:t:r:p:E:F:A:M:h")) != -1) {
+ while ((opt = getopt(argc, argv, "d:f:g:s:b:l:o:t:r:p:E:F:A:M:hT")) != -1) {
switch (opt) {
case 'd':
dongle.dev_index = verbose_device_search(optarg);
@@ -1142,6 +1144,9 @@ int main(int argc, char **argv)
demod.deemph = 1;
demod.squelch_level = 0;}
break;
+ case 'T':
+ enable_biastee = 1;
+ break;
case 'h':
default:
usage();
@@ -1205,6 +1210,10 @@ int main(int argc, char **argv)
verbose_gain_set(dongle.dev, dongle.gain);
}
+ rtlsdr_set_bias_tee(dongle.dev, enable_biastee);
+ if (enable_biastee)
+ fprintf(stderr, "activated bias-T on GPIO PIN 0\n");
+
verbose_ppm_set(dongle.dev, dongle.ppm_error);
if (strcmp(output.filename, "-") == 0) { /* Write samples to stdout */