Difference between revisions of "User:Mjb/RTLSDR"

From Offset
Jump to navigationJump to search
Line 12: Line 12:
 
==RTLSDR on Windows==
 
==RTLSDR on Windows==
  
===Setup===
+
===Generic USB driver installation===
As per info and instructions at [http://rtlsdr.org/softwarewindows rtlsdr.org], plugging in the dongle will result in Windows installing a device driver for it. This driver is useless; you have to replace it by downloading the proper driver and then running [https://github.com/pbatard/libwdi/wiki/Zadig Zadig], which is the official GUI front-end for libdwi, a generic installer for USB device drivers.
 
  
I didn't notice until too late, but there's an automated installer script at rtlsdr.org which will do most of the initial setup for you:
+
As per info and instructions at [http://rtlsdr.org/softwarewindows rtlsdr.org], plugging in the dongle will result in Windows installing a device driver for it. This driver may be used by DVB-T TV tuner software, but not by SDR software; you have to replace it with a generic driver. You can most easily do this by running [http://zadig.akeo.ie/ Zadig], which is the official GUI front-end for libdwi, an installer of generic USB device drivers.
* Download a replacement RTLSDR driver from [http://sdr.osmocom.org/ Osmocom]. You need the 32-bit driver, even on 64-bit Windows (probably because SDR# is a 32-bit app).
 
* Download Zadig.
 
* Download SDR# (the nice GUI radio app) ''and'' its RTLSDR plugin from [http://sdrsharp.com/ sdrsharp.com].
 
* Unzip SDR# into a new <code>sdrsharp</code> subfolder, relative to wherever the script is run from.
 
* Copy the SDR# RTLSDR plugin DLLs and modified config file to the <code>sdrsharp</code> folder.
 
* Unzip the 32-bit RTLSDR driver DLL (even on 64-bit Windows, this is what you need, I assume because SDR# is 32-bit) into the <code>sdrsharp</code> folder.
 
* Unzip Zadig into the <code>sdrsharp</code> folder.
 
* Dispose of temporary files & folders.
 
  
However, even if you use the automated installer script, you still have to run Zadig yourself in order to install the RTLSDR driver! Just plug in the dongle and follow the instructions at rtlsdr.org to choose all the right options, then click Replace Driver. (I am guessing Zadig notices the driver DLL sitting in the same directory as zadig.exe).(?)
+
Make sure the dongle is plugged into a USB port. In Zadig, choose Options > List All Devices. The dongle should be listed with two lines, probably "Bulk-In, Interface (Interface 0)" and "Bulk-In, Interface (Interface 1)", or perhaps something referring to "RTL28328U". Select interface 0, and leave the replacement driver selection as WinUSB (I tried libusb-win32, but it does not work). Click on Replace Driver. You will be prompted by Windows Security because it is unsigned; choose to install the driver anyway. Do the same for interface 1, although I don't think it matters.
  
Now you should be able to run <code>SDRSharp.exe</code>.
+
===SDR# (SDRSharp) installation===
 +
 
 +
Download the Windows SDR Software Package from https://airspy.com/download/ and unzip it somewhere.
 +
 
 +
Don't run it yet. First you have to install the RTLSDR library (which might be referred to as a "plugin" or "driver" for SDR# in some docs).
 +
 
 +
===RTLSDR library installation===
 +
 
 +
Get the rtlsdr.dll library from the [https://osmocom.org/projects/sdr/wiki/Rtl-sdr#Software rtl-sdr command-line tools]. (The link to the Win32 build is kinda hard to spot on that page, but it's at [https://osmocom.org/attachments/download/2242/RelWithDebInfo.zip]RelWithDebInfo.zip[/url]), and the DLL you need is in that zip file, in the x32 directory (because SDR# is a 32-bit app).
 +
 
 +
Copy rtlsdr.dll to the SDR# folder.
  
 
===Using SDR# (SDRSharp)===
 
===Using SDR# (SDRSharp)===
  
Near the top left corner of the window, you choose the input source. It is set to "Other (sound card)" by default, but if all is working, you should be able to set it to "RTL-SDR / USB". This option won't appear in the list if the SDR# RTLSDR plugin didn't get installed, and choosing it will produce an error if the driver didn't install or if the dongle isn't plugged in.
+
Run <code>SDRSharp.exe</code>.
 +
 
 +
Near the top left corner of the window, make sure the input Source is set to "RTL-SDR (USB)".
 +
 
 +
Press the play button (right-pointing triangle at the top of the window). You should hear some kind of audio.
 +
 
 +
You may also need to go into the configuration (gear icon next to the play/stop button) and adjust the RF Gain slider to its maximum; otherwise, you will probably only hear static.
 +
 
 +
Experiment and have fun.
 +
 
 +
====Troubleshooting====
  
Then press Play... and have fun.
+
If you did not copy the rtlsdr.dll to the SDR# folder, or the dongle is not plugged in, you will get a "No device selected" message when you press the play button.

Revision as of 23:32, 26 May 2018

I have a USB dongle with a terrestrial digital TV (DVB-T) receiver in it.

DVB-T is the digital TV broadcast standard used in a large part of the world, but not in North America, where I live, so I cannot use the dongle to pick up any TV signals here. North America uses the ATSC standard, not DVB-T. Technically ATSC can be decoded in software from the signal provided by a DVB-T device, but only if the device has 6 MHz bandwidth, whereas the typical cheap dongles have only 2.8 MHz. More info: https://www.rtl-sdr.com/watching-atsc-tv-with-an-sdrplay-sdr-and-gnu-radio/

My dongle is based on the Realtek RTL2832U chip. Tinkerers have figured out that these devices make for nice, cheap radio receivers that can be used with software defined radio (SDR) apps. Thus, this type of dongle, or the use of this type of dongle in this way, is called "RTLSDR".

My dongle uses what many consider to be the best tuner chip, the Elonics E4000. This chip has a defined range of 64–1100 MHz and 1250–1700 MHz, and is said to be capable of 50–2200 MHz, which looks about right; I can get it down to 51 MHz in SDR#.

(Compare to my portable radio receiver, the Grundig S350DL, which covers 3–28 MHz, the FM radio band of 87–108 MHz, plus the MW (AM radio) band of 0.525–1.71 MHz.)

RTLSDR on Windows

Generic USB driver installation

As per info and instructions at rtlsdr.org, plugging in the dongle will result in Windows installing a device driver for it. This driver may be used by DVB-T TV tuner software, but not by SDR software; you have to replace it with a generic driver. You can most easily do this by running Zadig, which is the official GUI front-end for libdwi, an installer of generic USB device drivers.

Make sure the dongle is plugged into a USB port. In Zadig, choose Options > List All Devices. The dongle should be listed with two lines, probably "Bulk-In, Interface (Interface 0)" and "Bulk-In, Interface (Interface 1)", or perhaps something referring to "RTL28328U". Select interface 0, and leave the replacement driver selection as WinUSB (I tried libusb-win32, but it does not work). Click on Replace Driver. You will be prompted by Windows Security because it is unsigned; choose to install the driver anyway. Do the same for interface 1, although I don't think it matters.

SDR# (SDRSharp) installation

Download the Windows SDR Software Package from https://airspy.com/download/ and unzip it somewhere.

Don't run it yet. First you have to install the RTLSDR library (which might be referred to as a "plugin" or "driver" for SDR# in some docs).

RTLSDR library installation

Get the rtlsdr.dll library from the rtl-sdr command-line tools. (The link to the Win32 build is kinda hard to spot on that page, but it's at [1]RelWithDebInfo.zip[/url]), and the DLL you need is in that zip file, in the x32 directory (because SDR# is a 32-bit app).

Copy rtlsdr.dll to the SDR# folder.

Using SDR# (SDRSharp)

Run SDRSharp.exe.

Near the top left corner of the window, make sure the input Source is set to "RTL-SDR (USB)".

Press the play button (right-pointing triangle at the top of the window). You should hear some kind of audio.

You may also need to go into the configuration (gear icon next to the play/stop button) and adjust the RF Gain slider to its maximum; otherwise, you will probably only hear static.

Experiment and have fun.

Troubleshooting

If you did not copy the rtlsdr.dll to the SDR# folder, or the dongle is not plugged in, you will get a "No device selected" message when you press the play button.