rtl-sdr
back to home automation page.
This is just a page where I document my experiments with the rtl-sdr project.
Links: rtl-sdr project, rtl_fm guide, superkuh's rtl-sdr guide,
Work log
2021-08-12: I re-created this page on my self-hosted web server.
2013-01-20: testing with rtl-sdr:
I have the device connected, like this: root@kg-v2# usbconfig -u 1 -a 3 ugen1.3: <RTL2838UHIDIR Realtek> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
rtl_test options:
root@kg-v2# rtl_test -? rtl_test: illegal option -- ? rtl_test, a benchmark tool for RTL2832 based DVB-T receivers Usage: [-s samplerate (default: 2048000 Hz)] [-d device_index (default: 0)] [-t enable Elonics E4000 tuner benchmark] [-p enable PPM error measurement] [-b output_block_size (default: 16 * 16384)] [-S force sync output (default: async)]
and run rtl_test like this::
root@kg-v2# rtl_test -t Found 1 device(s): 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 No E4000 tuner found, aborting.
which is ok, because this device doesn't have a Elonics tuner. Sample rate, it seems this is the highest I can go on this machine:
root@kg-v2# rtl_test -s 1.3e6 Found 1 device(s): 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 Exact sample rate is: 1300000.021524 Hz Reading samples in async mode...
Hmm, or not, I still get these:
lost at least 92 bytes lost at least 108 bytes lost at least 88 bytes lost at least 780 bytes lost at least 120 bytes lost at least 136 bytes
and so on. Way lower on the sample rate things look better, but samples still get lost now and then:
root@kg-v2# rtl_test -s 46000 Found 1 device(s): 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 Exact sample rate is: 46000.000037 Hz Reading samples in async mode... lost at least 84 bytes ^CSignal caught, exiting!
Strange.
2013-01-19: I installed the rtl-sdr port on my FreeBSD workstation, which currently runs:
tingo@kg-v2$ uname -a FreeBSD kg-v2.kg4.no 8.3-STABLE FreeBSD 8.3-STABLE #6: Fri Apr 27 23:50:55 CEST 2012 root@kg-v2.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 rtl-sdr info: root@kg-v2# portversion -v | grep sdr rtl-sdr-20121104 = up-to-date with port
All for now.