Tagged: rtl_tcp

Raspberry Pi 3 B+ Released: Faster CPU, Faster Networking and Power over Ethernet

RTL-SDR dongles and other SDRs are often used on single board computers. These small credit sized computers are powerful enough to run multiple dongles, and run various decoding programs. Currently, the most popular of these small computers is the Raspberry Pi 3.

Just recently the Raspberry Pi 3 B+ was released at the usual US$35 price. It is an iterative upgrade over the now older Raspberry Pi 3 B. The 3B+ has an improved thermal design for the CPU, which allows the frequency to be boosted by 200 MHz. WiFi and Ethernet connectivity has also been improved, both sporting up to 3x faster upload and download speeds.

The Raspberry Pi 3 B+ Power over Ethernet Hat
The Raspberry Pi 3 B+ Power over Ethernet Hat

The 3B+ also implements new Ethernet headers which allows for a cleaner Power over Ethernet (PoE) implementation via a hat. Previous PoE hats required that you connect the Ethernet ports together, whereas the new design does not. PoE allows you to power the Raspberry Pi over an Ethernet cable. The official PoE hat is not released yet, but they expect it to be out soon.

The faster processing speed should allow more processing intensive graphical apps like GQRX to run smoother, whilst the improved WiFi connectivity speeds should improve performance with bandwidth hungry applications like running a remote rtl_tcp server. PoE is also a welcome improvement as it allows you to easily power a remote Raspberry Pi + RTL-SDR combination that is placed in a difficult to access area, such as in an attic close to an antenna. Placing the Pi and RTL-SDR near to the antenna eliminates the need for long runs of lossy coax cable. If the Pi runs rtl_tcp, SpyServer or a similar server, then the RTL-SDR can then be accessed by a networked connected PC anywhere in your house, or even remotely over the internet from anywhere in the world. 

The Raspberry Pi 3 B+
The Raspberry Pi 3 B+

Enumerating Multiple RTL-SDR Dongles Deterministically for rtl_tcp in Linux

Thanks to user 'luma' on our forums for submitting his technique for managing multiple RTL-SDR dongles on a Linux system. The problem is that rtl_tcp tends to enumerate devices depending on the order they are plugged in. This can create problems like not knowing which dongle is connected to which antenna without physically checking. He writes:

I was looking to utilize a couple RTL dongles to monitor two ISM band frequencies commonly used in LoRa without buying an SDR with wide enough bandwidth to cover both ranges. I pretty quickly ran into issues with how SpyServer and rtl_tcp enumerate devices, which appears to be based mostly upon the order in which each device had been plugged in.

With some work, I think I've come upon a flexible and secure solution to handle an arbitrary number of dongles on one system while maintaining deterministic control of each device. This means I can label an individual dongle, connect it to the desired antenna, and then connect to that dongle on the assigned TCP port every time, without regard to the order in which things have been plugged in.

The rest of his post shows the steps which include creating an unprivileged service user, using rtl_eeprom to set device serial numbers and using a script that automatically runs on startup which will enumerate the dongles deterministically each time.

RTL-SDR Tutorial: Setting up and using the SpyServer Remote Streaming Server with an RTL-SDR

A number of people have asked how to use SDR#'s SpyServer with an RTL-SDR. In this tutorial we will show how to set up SpyServer on both Windows and Linux systems. We try to assume as little knowledge as possible, but we do assume that you have decent experience with computers. Also for the Linux/Raspberry Pi setup we need to assume that you have some basic experience with Linux and setting up Raspberry Pi's.

What is SpyServer?

SpyServer is a free RTL-SDR compatible SDR server that is designed to work with the popular SDR# software. It is actually designed for the Airspy range of products, but the author has also made it compatible with RTL-SDR dongles. Running a SpyServer allows you to connect to and use a remotely positioned RTL-SDR over a network connection (such as a local LAN/WiFi or the Internet). Once connected, using the dongle is the same as if the dongle was directly connected to the users PC.

An example SpyServer Overview
An example SpyServer Overview (Can use an RTL-SDR instead of the Airspy HF+)

Remote servers are useful as you may want to set up an antenna in a remote location (such as up on your roof or shack), and don't want to run a long lossy coax cable down to the PC. Instead you could run Ethernet cable, or avoid cables by using WiFi. All you'd need is power for a remote computing device like a Raspberry Pi 3. Perhaps you also have a great antenna location at a friends house, or other property and want to access that antenna remotely. Or maybe you want to use your radio while travelling.

SpyServer is similar to another tool that you may already be familiar with called rtl_tcp. However, SpyServer is regarded as superior because it is signficantly more efficient at network usage. Instead of sending the entire raw data like rtl_tcp does, SpyServer only sends the IQ data of the currently tuned in signal. Waterfall data is processed on the server and sent in compressed form. There is one disadvantage to SpyServer in that it requires slightly more powerful computing hardware like a Pi 2 or Pi 3, whereas rtl_tcp can run on the lowest end hardware.

Network usage when streaming with SpyServer will be about 120 KB/s when listening to WFM and about 38 KB/s when listening to narrow band modes for one client being connected. Multiple clients can connect to the SpyServer and share the same currently tuned bandwidth.

Continue reading

Configuring OpenWRT and RTL_TCP for WiFi Streaming

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.

Configuring OpenWrt and RTL_TCP for wifi

Installing OpenWRT and RTL-SDR on a Used $20 Router

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

SDRSharp SpyServer Now Supports the RTL-SDR

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.

SpySever Running with an RTL-SDR Dongle.
SpySever Running with an RTL-SDR Dongle.

An RTL-SDR ExtIO with Decimation and Tuner Bandwidth Controls

RTL-SDR experimenter Hayati Ayguen ( 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.
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.
Tuner Bandwidth Selection Example.

Hayati has also uploaded some slides which show some of the effects of using various different tuner bandwidths.

Cloud-SDR: A Tool for Remotely Accessing SDR’s like the RTL-SDR and Airspy

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. 

In this interesting post they describe various solutions for remote SDR access, and show why their Cloud-SDR solution is useful.

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.

Cloud-SDR-Big

Currently the hardware supported includes:

  • RTL SDR dongles
  • Perseus SDR
  • BladeRF x40 or x120
  • HackRF
  • AirSpy
  • SDRPlay (under work)
  • USRP UHD (Pro version only)
  • LimeSDR (Pro version only)

On their site they have some tutorials uploaded already. One tutorial shows how to remotely listen to airport radio with a remote Airspy, and one shows how to set up a dual-RTLSDR remote access system. This allows two RTL-SDR’s to be used together, with one streaming directly from the antenna, and the second streaming via an upconverter.

Sharing Two RTL-SDR's with CloudSDR.
Sharing Two RTL-SDR’s with CloudSDR.

There are also several examples of the Cloud-SDR in action over on the authors YouTube channel.