In his last video YouTube user GusGorman402 showed us how to install OpenWRT and the RTL-SDR drivers on a cheap used $20 router. The idea is that the router with custom third party Linux firmware can be used as a remote device for streaming raw data from an RTL-SDR over a network connection. Normally something like a $35 Raspberry Pi is used for something like this, but an old router could be cheaper and should have even better network performance as it is designed for high data rates (assuming the CPU on your router is powerful enough to run the RTL-SDR).
In his new video Gus shows how to properly configure OpenWRT and RTL_TCP for WiFi streaming of radio data. This includes things like setting up port forwarding and determining network performance.
We’ve also seen this post by GoJimmyPi which was inspired by Gus’s original video. This is a text and screenshot based tutorial which goes through the same process.
Over on his YouTube channel GusGorman402 has uploaded a video tutorial showing how to take an old internet router and install OpenWRT and the RTL-SDR drivers on it. OpenWRT is a third party Linux based router firmware which can greatly expand the usefulness of a standard router. As it is Linux based it is possible to install the RTL-SDR Linux drivers on the router and use the router as a cheap RTL-SDR streaming or decoding platform.
Gus’s tutorial takes us from the beginning where he first shows how to install OpenWRT firmware over the stock firmware on the router and how to configure the settings. He then shows how to install the RTL-SDR drivers and run software like rtl_tcp and dump1090 with opkg and luci.
Installing OpenWrt and RTL-SDR libs on used router
About a month ago the Airspy and SDRSharp development team released their new ‘SpyServer’ software. SpyServer is a streaming server for Airspy devices, which allows them to be used over a network connection. It is somewhat similar to rtl_tcp which is familiar to RTL-SDR users, although unlike rtl_tcp, SpyServer uses a multiclient architecture which allows several clients to connect to the server at the same time with each being able to choose individual bandwidth settings.
Today SpyServer was updated (changelog), and it now also supports the RTL-SDR dongle. The software can be found in the latest version of SDR# from www.airspy.com. The Airspy download contains the SpyServer for Windows and Linux, and the Raspberry Pi and Odroid server is available here.
To use SpyServer with the RTL-SDR you’ll first need to edit the “spyserver.config” file which is in the SDR# folder. Open this file with a text editor like Notepad, and set the “device_type” to “RTL-SDR”. Now you can run spyserver.exe on your server and it will use your RTL-SDR. Multiple dongles can be used by editing the “device_serial” string in the config file. Next on the client PC run the latest version of SDR#, and choose the Source as “Spy Server”. Here you can enter your networked PC’s IP address to connect to it.
We tested the updated SpyServer with an RTL-SDR dongle and it worked perfectly. On an 802.11n WiFi connection we were able to stream up to 1 MSPS without problems. 2 MSPS was a bit jittery, but on an Ethernet or 802.11ac WiFi connection it should work with no problems. We also tested connecting two PC’s to a single SpyServer and both were able to run at the same time without trouble. The client which connects first gets to keep control of the center frequency and gain, whilst the second client has those options locked.
RTL-SDR experimenter Hayati Ayguen (hayguen on GitHub) has released a version of rtl_tcp and an ExtIO module that allows access to normally hidden tuner settings. The ExtIO allows you to manually set the tuner bandwidth of the R820T/2 chip. It can be set almost anywhere between 350 kHz and 8000 kHz. In the standard drivers the tuner bandwidth is normally set at a size appropriate for the sample rate, but in this driver using a smaller bandwidth allows you to filter out unwanted signals whilst taking advantage of the decimation a higher sample rate gives you.
In addition to the tuner bandwidth settings, the ExtIO module also implements decimation controls. This allows you to reduce the displayed bandwidth without sacrificing the sample rate. At the same time the R820T/2 tuner bandwidth is reduced to the visible sample rate, improving filtering.
Hayati writes in the Readme file:
Tuner bandwidth is supported with E4000 and R820T tuners. Changing bandwidth with R820T looks good and shows immediate differences in spectrum. E4000 is not so nice, i can’t see any difference, for the bandwidths below 3400 kHz. I also put in the wider bandwidths, even wider than the samplerate, which will produce aliasing! These might be interesting for wide amplitude modulated signals, e.g. ADS-B.
Decimation of Samplerate is an option for very old and slow computers: Before decimation, a very simple and fast low-quality filter (sum) is applied: y(k) = sum over x( k * (1..decimation) ) ; x() = input samples from rtl_tcp ; y() = output samples to SDR app (HDSDR) The sum produces values requiring more than 8 bit. In addition to this soft-filter, minimize the tuner-bandwidth! You will still receive aliases!!!, but a bit damped compared to directly sampling at the slower speed. The reception’s center frequency (LO) is the most alias-free region.
The ExtIO interface. Enables tuner bandwidth and decimation controls.
A precompiled release of the ExtIO dll can be downloaded at github.com/hayguen/extio_rtl_tcp/releases. As the ExtIO connects via an rtl_tcp server, you will also need to download Hayati’s modified rtl_tcp server from github.com/librtlsdr/librtlsdr/releases/tag/win32_with_biasTee. To use the driver, first run rtl_tcp locally simply by double clicking on it, then open HDSDR and select the new ExtIO_RTL_TCP.dll file.
We tested out the tuner bandwidth functions and it appears to work well. For instance in the following image there is a strong pager signal near 157.9 MHz. At first the RTL-SDR is overloaded by the strong signal causing multiple images to appear on the spectrum. But after reducing the tuner bandwidth to 350 kHz the left side of the spectrum is attenuated, and the interfering pager signal is no longer too strong.
The modified rtl_tcp software (and rtl_(adsb|fm|power|tcp)) also support access to the software activated bias tee on our V3 dongles via the -T flag.
Tuner Bandwidth Selection Example.
Hayati has also uploaded some slides which show some of the effects of using various different tuner bandwidths.
Cloud-SDR is a new tool currently in beta testing which enables remote streaming access of SDR receivers, such as the RTL-SDR and Airspy. In a way it is similar to rtl_tcp in that it allows IQ samples to be streamed over the network, however Cloud-SDR appears to be a much more developed solution that can support more SDR’s and has many more features, as well as better performance. Cloud-SDR is not free, and during these beta stages of release the pricing does not appear to be public. However they have licences for personal/hobbyist use, which we assume will be reasonably priced.
They describe their software in the following blurb:
Cloud-SDR can collect real-time IQ complex samples from an SDR hardware device connected on one machine, stream the samples to a second machine for demodulation or analysis, then send the resulting stream to third machine for storage.
In standalone mode, Cloud-SDR can execute signal processing tasks described with embedded JavaScript DSP engine.
Because network bandwidth is limited compared to SDR receiving bandwidth, the core concept of Cloud-SDR is to move the processing along the cloud to where it is required or possible : the DSP chain is divided in sub-tasks that are spread between computers interconnected through Internet.
For example a “signal scanner” application can be programmed with a script and stored on the SDR server for execution. Only found signals will threshold stream transmission through the TCP/IP network. Remote Client will only receive the IQ stream if a signal is detected by the DSP task. In “cloud mode”, the same script can be broadcasted to several SDR nodes located at different places, enabling parrallel signal search.
Server software SDRNode receives IQ streams from the different SDR hardwares, extracts the different bands, processes them and transmits the RF data using compression algorithms to limit TCP/IP network bandwidth.
With an RTL-SDR connected and the router running rtl_tcp, the router can be placed anywhere there is power (yo2ldk uses a portable battery pack) to create a remote radio receiver with absolutely no coax cable losses. It’s WiFi range could be extended over long distances by using a directional Yagi antenna.
Using routers instead of mini computers like the recently released Raspberry Pi 3 may be a good option because they are very small, usually much cheaper, maybe be more power efficient, and may work better at transmitting the large amounts of data rtl_tcp requires.
In the future yo2ldk hopes to install everything into a shielded metal case, add an upconverter and also a solar panel for remote power.
YO2LDK’s remote RTL-SDR set up.
We note that if you have an old Android phone, then this could also potentially be used as a remote RTL-SDR server. To create an android RTL-SDR server simply download the Martin Marinov Android RTL2832U Driver from the Google play store. Find the IP address of your Android phone by going to Settings -> About Device -> Status -> IP Address. Then open the RTL2832U driver app and click on “Enable advanced mode (for debug & stream to PC)”. Initially the rtl_tcp string will have the code “-a 0.0.0.0”, simply change this to the IP address of your Android phone, for example “-a 192.168.1.15” and then click Start stream. Now on a remote PC connected to the same network open SDR# go to RTL-SDR (TCP) and type in the IP address of the phone and use the port number 14423. Click the play button and you should now be streaming your RTL-SDR data over WiFi.
One of the advantages of using Linrad on Linux used to be the ability to use a modified rtlsdr.dll file with improved sensitivity gain settings for the E4000 tuner. This mod added the following settings.
AGC mode.
Compromise. This is the gain settings available in the rtl-sdr library as of October 2012.
Linearity mode. For use without filters in environments with strong signals. Low front end gain and high gain after filters.
Sensitivity mode. For use in rural locations or when filters and preamplifiers are placed between the antenna and the dongle. High front end gain and low gain after the filters.
Here is a Reddit thread discussing the improvements, and showing how to apply them to Linrad.
Now Reddit user rtlsdr_is_fun has ported this mod to Windows, and has written an SDRSharp plugin that enables the modified E4000 gain modes via rtl_tcp. This means you will need to run rtl_tcp first, and then connect to it using the RTLSDR / TCP option in SDRSharp. This mod also enables direct sampling for rtl_tcp.