Here are my notes on getting started with a newly purchased SDR stick, a software-defined radio.
I'm using the NooElec unit, which has the R820T2 receiver. It has what seems to me to be the best frequency range.
It's very easy to use with Linux, on a Raspberry Pi, laptop, or desktop.
This one came with a telescoping antenna, which could make some initial experiments more successful.
Eventually, though, I'll use it with a 6-inch RG316 cable with male MCX and female F connectors. Then, a converter from F to BNC.
The great thing about these small SDR units is the radio capability you get for the price.
They're available at a low price because they're intended for a rather large market: DVB-T or Digital Video Broadcasting — Terrestrial. That standard is used across Europe, Asia outside China, Oceania, and Africa, plus Columbia in South America and some of the Caribbean.
Otherwise, terrestrial television broadcast is mostly ATSC in North America, and ISDB in Japan and most of South America. Here's a map of digital terrestrial TV standards from Wikipedia.
How is it Detected?
Linux has good support for these devices. The problem is that they will be detected as DVB-T devices. That makes sense, given the vast number of people wanting to watch television across much of the world, compared to the much smaller number of us wanting to do radio experiments.
Here is the result of plugging the device into a Linux system.
First, the new additions to the kernel ring buffer.
I have highlighted what the
kernel module has done:
$ dmesg [ ... earlier entries deleted ... ] [23499.940052] usb 1-3: new high-speed USB device number 2 using ehci-pci [23500.107969] usb 1-3: New USB device found, idVendor=0bda, idProduct=2838 [23500.107972] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [23500.107974] usb 1-3: Product: RTL2838UHIDIR [23500.107976] usb 1-3: Manufacturer: Realtek [23500.107978] usb 1-3: SerialNumber: 00000001 [23501.432616] usb 1-3: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state [23501.492359] usb 1-3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer [23501.492376] dvbdev: DVB: registering new adapter (Realtek RTL2832U reference design) [23501.899098] i2c i2c-8: Added multiplexed i2c bus 9 [23501.899101] rtl2832 8-0010: Realtek RTL2832 successfully attached [23501.899215] usb 1-3: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))... [23502.023731] r820t 9-001a: creating new instance [23502.030729] r820t 9-001a: Rafael Micro r820t successfully identified [23502.064338] media: Linux media interface: v0.10 [23502.082239] Linux video capture interface: v2.00 [23502.237918] rtl2832_sdr rtl2832_sdr.2.auto: Registered as swradio0 [23502.237921] rtl2832_sdr rtl2832_sdr.2.auto: Realtek RTL2832 SDR attached [23502.237923] rtl2832_sdr rtl2832_sdr.2.auto: SDR API is still slightly experimental and functionality changes may follow [23502.403973] lirc_dev: IR Remote Control driver registered, major 242 [23502.421987] IR LIRC bridge handler initialized [23502.422271] Registered IR keymap rc-empty [23502.422332] rc rc0: Realtek RTL2832U reference design as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/rc/rc0 [23502.422374] input: Realtek RTL2832U reference design as /devices/pci0000:00/0000:00:1a.7/usb1/1-3/rc/rc0/input11 [23502.423062] lirc lirc0: lirc_dev: driver ir-lirc-codec (dvb_usb_rtl28xxu) registered at minor = 0 [23502.423066] usb 1-3: dvb_usb_v2: schedule remote query interval to 200 msecs [23502.431739] usb 1-3: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected [23502.431821] usbcore: registered new interface driver dvb_usb_rtl28xxu
Now, how it shows up in the listing of USB devices:
$ lsusb [ ... other devices deleted ... ] Bus 001 Device 002: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T [ ... other devices deleted ... ]
So, the kernel has detected it. But, from our viewpoint, incorrectly, as a DVB-T television receiver. Let's see what DVB-T-related kernel modules are loaded:
$ lsmod | egrep 'sdr|dvb' rtl2832_sdr 36864 0 videobuf2_vmalloc 16384 1 rtl2832_sdr videobuf2_v4l2 24576 1 rtl2832_sdr videobuf2_core 40960 2 rtl2832_sdr,videobuf2_v4l2 videodev 184320 3 rtl2832_sdr,videobuf2_core,videobuf2_v4l2 dvb_usb_rtl28xxu 40960 1 dvb_usb_v2 40960 1 dvb_usb_rtl28xxu dvb_core 126976 2 dvb_usb_v2,rtl2832 rc_core 36864 5 lirc_dev,ir_lirc_codec,dvb_usb_v2,dvb_usb_rtl28xxu
Forcing Detection as SDR, Not DVB-T
We need to
root, create a new file, such as
It can be named anything, as long as it ends
and it can contain comments.
$ cat /etc/modprobe.d/blacklist-dvb.conf # 2019-08-21: Bob added this so RTL-SDR devices are detected as SDR, not DVB blacklist dvb_usb_rtl28xxu
You could reboot, or you could unplug the device and remove the DVB-T modules:
$ sudo rmmod rtl2832_sdr dvb_usb_rtl28xxu dvb_usb_v2 rtl2832 dvb_core $ lsmod | egrep 'sdr|dvb' [ ... no output, that's good ... ]
Now plug it back in and check the kernel ring buffer,
and see how it is recognized.
The first there lines below show the results of
rmmod command (light blue),
then one event unplugging the device (light yellow),
and then several lines after plugging it back in
under the new configuration
$ dmesg [ ... earlier entries deleted ... ] [23780.744989] usbcore: deregistering interface driver dvb_usb_rtl28xxu [23780.746936] r820t 9-001a: destroying instance [23780.747131] dvb_usb_v2: 'Realtek RTL2832U reference design:1-3' successfully deinitialized and disconnected [23867.981942] usb 1-3: USB disconnect, device number 2 [23874.456050] usb 1-3: new high-speed USB device number 3 using ehci-pci [23874.624042] usb 1-3: New USB device found, idVendor=0bda, idProduct=2838 [23874.624045] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [23874.624047] usb 1-3: Product: RTL2838UHIDIR [23874.624049] usb 1-3: Manufacturer: Realtek [23874.624051] usb 1-3: SerialNumber: 00000001
Now let's test the device.
rtl-sdr package if needed.
<Ctrl-C> once you see the
message about everything being fine if there's no
$ rtl_test Found 1 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001 Using device 0: Generic RTL2832U OEM 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 [R82XX] PLL not locked! Sampling at 2048000 S/s. Info: This tool will continuously read from the device, and report if samples get lost. If you observe no further output, everything is fine. Reading samples in async mode... ^CSignal caught, exiting! User cancel, exiting... Samples per million lost (minimum): 0
Using the SDR with GQRX
package if you haven't yet.
with an easy interface.
It is easy to accidentally turn the gain off. If your receiver goes deaf, as shown below, click the Input controls tab.
If you toggle Hardware AGC off and on it may also set the LNA gain to zero.
Turn Hardware AGC off so you can adjust the gain, slide the gain to the maximum, and then turn AGC back on again.
You should see multiple signals on the FM broadcast band. Select Wide FM (stereo) under Receiver Options to also hear them.
Above is the 101.3 MHz signal of WBAA, the NPR station at Purdue University. WBAA broadcasts in HD Radio, an in-band on-channel system with digital streams immedately above and below the analog signal. FCC records tell us that the signals visible here are:
|100.9 MHz||WHPO||66.9 km||3,000 W||Hoopeston IL|
|W265CP||37.5 km||27 W||Buffalo IL|
|101.3 MHz||WBAA||14.3 km||14,000 W||West Lafayette IN|
|101.7 MHz||W272CZ||57.4 km||30 W||Sheridan IN|
|W269DJ||5.4 km||250 W||Lafayette IN|
|WIVR||75.3 km||3,200 W||Kentland IN|
|102.1 MHz||WDNL||68.4 km||50,000 W||Danville IL|
|W271BX||35.9 km||129 W||Frankfort IN|
Religious broadcast companies like Calvary Radio Network and the Elohim Group operate a lot of low-power translator systems.
As for the amateur bands, you could see activity. I'm just seeing spurious signals here.
The RTL-SDR sticks are based on the RTL2832U chipset. They come with different tuner chips, providing different frequency ranges.
|Tuner chip||Frequency range|
|Rafael Micro R820T/2|| 24 – 1766 MHz
An experimental driver may extend that to 24 — 1864 MHz.
|Elonics E4000|| 52 – 2200 MHz
With a varying gap around 1100 – 1250 MHz.
Note that Elonics has ceased production.
|Fitipower FC0013||22 – 1100 MHz|
|Fitipower FC0012||22 – 948.6 MHz|
|FCI FC2580||146 – 308, 438 – 924 MHz|
The RTL2382U chipset can sample at 2.4 megasamples per second without dropping samples. Your unit may be able to sample at 2.8 MS/s or even 3.2 MS/s.
You might also be interested in:
Reverse-engineered RTL2832U / R820T circuit diagram and performance notes R820T datasheet