Tagged: rtl_power

Software for creating an Interactive RTL_POWER Visualization

RTL-SDR.com reader Dominic Chen recently wrote in to let us know about a new piece of software he’s created. The software is called d3-waterfall, and is an interactive web based waterfall display. It takes CSV data from the commonly used rtl_power software and produces an interactive labelled waterfall which can be viewed in a web browser. rtl_power is a program that allows RTL-SDRs to produce signal power scans over an arbitrarily wide swath of bandwidth, by quickly hopping between ~2 MHz chunks of live bandwidth.

Dominics software is built using “d3.js” and HTML5. The waterfall axes are automatically labelled, there are multiple color schemes and there is pan/zoom support. The main feature is that it is mouse interactive, so when you mouse over a frequency it shows what the signal is. The default signal frequency data is taken directly from our sister site sigidwiki.com, so it may not be accurate for your particular area. But the labels are editable, so it can be customized.

An example of a previous scan can be seen on Dominic’s website (note that this is a 65mb link so be careful if you are data restricted). The software can be downloaded from its GitHub page.

The interactive waterfall.
The interactive waterfall.

rx_tools: RTL-SDR Command Line Tools (rtl_power, rtl_fm, rtl_sdr) Now Compatible With Almost Any SDR

Developer R. X. Seger has recently released rx_tools which provides SDR independent ports for the popular command line RTL-SDR tools rtl_power, rtl_fm and rtl_sdr. This means that these tools can now be used on almost any SDR, such as the bladeRF, HackRF, SDRplay, Airspy and LimeSDR. If you don’t know what the tools do, then here is a quick break down:

rtl_fm / rx_fm: Allows you to decode and listen to FM/AM/SSB radio.
rtl_sdr / rx_sdr: Allows you to record raw samples for future processing.
rtl_power / rx_power: Allows you to do wideband scans over arbitrarily wide swaths of bandwidth by hopping over and recording signal power levels over multiple chunks of spectrum.

rx_tools is based on SoapySDR which is an SDR abstraction layer. If software is developed with SoapySDR, then the software can be more easily used with any SDR, assuming a Soapy plugin for that particular SDR is written. This stops the need for software to be re-written many times for different SDR’s as instead the plugin only needs to be written once.

rx_power scan with the HackRF at 5 GHz over 9 hours.
rx_power scan with the HackRF at 5 GHz over 9 hours.

Radio Astronomy Tool rtl_power_fftw Updated

The rtl_power program allows you to use the RTL-SDR to perform a power scan over an arbitrarily large portion of the frequency spectrum (within the RTL-SDR’s supported frequency range) by hopping over ~2 MHz swaths of bandwidth. The updated rtl_power_fftw software was originally written by Klemen Blokar and Andrej Lajovic and is an update over the regular rtl_power program. It uses a faster FFT processing algorithm and has several other enhancements that make it more useful for radio astronomy purposes.

Recently Mario Cannistrà has released a new version of rtl_power_fftw which has several additional improvements applied. He intends to use it in his RTL-SDR based radio astronomy IoT project which is presented on his Hackster.io blog. He writes:

I added the following command line parameters:

  • -e param for session duration
    this allows to specify the recording duration in sec, mins… etc just like it was possible with rtl-power
  • -q flag to limit verbosity
    this will allow the various printouts to happen only the first time and not on every scan
  • -m param to produce binary matrix output and separate metadata file
    this will get a file name (no extension) and use it to store the power values in binary format within a .bin file + a metadata text file with .met extension

Summary of my requirements:

  • I wanted to leverage the ability of rtl-power-fftw to specify N average values to integrate for less than 1 second when needed. Plus running multi-MHz scans and storing for several minutes.
  • I wanted to use a binary format instead of the .csv one in order to obtain the smallest possible size since I’m logging all the night long (CSV’s blank delimiters and decimal dots were wasting my precious microSD space)
  • keep high the precision on decimal digits saving float values (could be important for other usages)
  • obtain a complete stream of binary values representing all the bins for each scan, one scan after the other, in a matrix like organization
  • …that would allow me to plot the waterfall extremely fast with gnuplot
  • …and then add specific annotations and file properties/metadata in a more convenient way using python
Example rtl_power_fftw output: A scan of Jupiter's radio emissions.
Example rtl_power_fftw output: A scan of Jupiter’s radio emissions.

Creating an RF Proximity Alarm (Close Call) with an RTL-SDR

“Close Call” is a feature that some radio scanners have which notifies the user when there is a radio transmitter that is in the near vicinity (such as from a police radio). It works by detecting the strength of signals from near field emissions, and it requires a strong RF signal to trigger.

Over on the ar15.com forums, user seek2 wanted something similar to the “close call” feature, but didn’t want certain transmissions like APRS signals from hams driving by to set it off. He also didn’t want to be restricted to near field emissions, rather he wanted something that acted more like a squelch that would activate for strong signals only.

To implement this seek2 used an RTL-SDR dongle, together with the rtl_power spectrum scanning software. He outputs the signal strength data generated by rtl_power to a CSV file which is then piped into a tail -f terminal command in Linux which simply outputs the latest lines of the CSV file as it updates in real time. Then he uses a simple Python script to monitor the output and to set off an alarm and report strong signals when it see’s them. His script is also used to filter out reports from strong unwanted signals like APRS.

Below is a video showing an example of Close Call working on a Uniden hardware radio scanner for reference.

QSpectrumAnalyzer Updated to support rtl_power_fftw

QSpectrumAnalyzer is a Linux GUI for rtl_power which allows you to easily do wideband scans that are much wider than the RTL-SDR’s maximum bandwidth. RTL_power works by quickly switching between different frequencies and recording power values in each hop, then stitching them all together. A GUI for rtl_power can be used to display an FFT spectrum and waterfall for easy analysis.

Recently we posted about the release of rtl_power_fftw, which was a modified version of rtl_power. This modified version used a more efficient FFT library and reduces the acquisition time, which for rtl_power was capped at 1 second per scan. Essentially this means that rtl_power_fftw can do frequency scans much faster (though with less integration). In basic terms this means that you can now visualize large spectrum sweeps whilst having the waterfall look near real time.

Now QSpectrumAnalyzer has been updated to support rtl_power_fftw. To use rtl_power_fftw you’ll need to download and compile it yourself from https://github.com/AD-Vega/rtl-power-fftw. The compilation instructions are shown on the Github page, but you’ll also need to install the pkg-config, libtclap-dev and libfftw3-dev libraries first. Then once compiled in QSpectrumAnalyzer you can select the rtl_power_fftw binary in the settings.

The latest release of QSpectrumAnalyzer can be downloaded from https://github.com/xmikos/qspectrumanalyzer/releases.

QSpectrumAnalyzer with rtl_power_fftw doing a 7 MHz scan of the FM broadcast band.
QSpectrumAnalyzer with rtl_power_fftw doing a 7 MHz scan of the FM broadcast band.

rtl_power_fftw: An improved version of rtl_power designed for radio astronomy

As the RTL-SDR’s maximum usable bandwidth is about 2.8 MHz, programs like rtl_power were written to scan over wider bandwidths by quickly hopping between different swaths of the frequency spectrum and then stitching the data together.

Now a new improved version of rtl_power called rtl_power_fftw has recently been developed and released. This version is designed for radio astronomy use, but also overcomes several issues general users may encounter with rtl_power. One of the authors, Klemen wrote in to us with this information:

I would like to tell you about a program we have been developing at Astronomical Society Vega – Ljubljana, namely one for measuring power spectrum with rtl dongles.

It addresses several shortcomings of the rtl_power program shipped with librtlsdr. The most notable is that it uses a much faster FFT algorithm (from the fftw3 library) and separate threads for acquiring data and FFT processing. This means that even the lowly raspberry pi is capable of processing spectra of sizes up to ~1024 bins in real-time (no slower than data acquisition). This enables the user to sample spectrum continuously and more efficiently.

The other benefit is the output format: data is presented in a gnuplot-friendly way, so plotting is simple, and no data is mangled to make an illusion that spectral hopping is not needed: FFT of each frequency hop is output separately, and user can make and informed decision on how to process data – the program stays out of this, to preserve the accuracy of the gathered data.

The program was developed for use in radio astronomy where all these things matter. Code is available on Github:

https://github.com/AD-Vega/rtl-power-fftw

Spektrum: New RTL-SDR Spectrum Analyzer Software

Recently a reader of RTL-SDR.com, Pavel wrote in to let us know about a new program called “Spektrum” which he has written. Spektrum runs on Windows and Linux and turns an RTL-SDR dongle into a spectrum analyzer in a similar way to rtl_power GUI front ends and RTLSDR Scanner. However one key improvement is that it is based on a version of rtl_power that has been modified by Pavel in order to make it more responsive and remove the need to wait until a full sweep is completed before you can see any results. The modified version of rtl_power can be found at https://github.com/pavels/rtl-sdr.

Spektrum also has an additional “relative mode” feature. This allows Spektrum to be easily used together with a wideband noise source to measure things like filter characteristics and the VSWR of antennas. See our previous tutorial on this here, but note that in our tutorial we used Excel instead of Spektrum to do relative measurements.

The Processing language was used to create Spektrum and Pavel has also released his processing library for accessing rtl_power functionality over at https://github.com/pavels/processing-rtlspektum-lib/releases.

Ready to use releases of Spektrum for Windows and Linux 64-Bit OSes can be downloaded from https://github.com/pavels/spektrum/releases. Note that there may be a bug with the current release which causes only a gray window to show, but we’ve contacted the author about it and it may be fixed soon.

Spektrum: A new spectrum analyzer program for the RTL-SDR
Spektrum: A new spectrum analyzer program for the RTL-SDR

RTL-gopow: New heat map tool

Rtl_power is a tool that allows you to create wide band signal strength heat maps over a long length of time. It works by very quickly hopping across the spectrum, capturing the RTL-SDR bandwidth of about 2 MHz at a time, and then displaying it on a heat map. This is useful for seeing what frequencies are active and at what times. 

Usually to obtain a heat map with rtl_power you need to record the data first, and then pass it through a Python program called heatmap.py which creates the heat map image file. Now there is rtl_gopow which is a new program that directly creates a PNG heat map file from an rtl_power sweep. It is currently available for OSX, Linux, Linux ARM, and Windows.

You can download the binary releases here.

2.5 hour long heat map generated by RTL_GOPOW
2.5 hour long heat map generated by RTL_GOPOW