A New Software Automatic Gain Control Algorithm C Library for RTL-SDR and other SDRs

Thank you to Chris Gianakopoulos for writing in and sharing with us the release of his open-source software-based Automatic Gain Control (AGC) library written in C. The library is hardware agnostic and designed to make it easy for programmers to implement an AGC algorithm into their programs. The AGC library can help automatically optimize the signal-to-noise-ratio (SNR) on SDRs with variable-gain amplifiers (VGA). Chris explains:

I converted my software AGC to C code with the following enhancements:

1. It is radio-agnostic.
2. Itis written in C so that both, C and C++ apps can use it.
3. The app provides two callback functions: one to provide the current amplifier gain setting and one to set the amplifier gain.
4. A signal magnitude is provided as input to the AGC algorithm
5. Among other things,the number of bits to represent the signal magnitude, at init time.

For more details, the repo is located at,

https://github.com/wizardyesterday/AutomaticGainControl

I have successfully integrated this AGC into a test version of radio diags, located at

https://github.com/wizardyesterday/RtlSdrWork_agc

-----

An Automatic Gain Control (AGC) is a feeback system that adjusts the gain of a variable-gain amplifier (VGA) to maintain an operating point such as a voltage magnitude level, current magnitude level, or in the case of a digital radio, the magnitude of signal samples presented to the AGC. Typically, an average magnitude of a block of data is used to perform a smoothing action to the input provided to the AGC.

An attempt was made to make an accurate implementation of what was described in the paper (by Fred Harris and Gregory Smith) in the doc/papers/ directory. For details on design and implementation, refer to that paper.

He goes on to mention why a software AGC is useful:

My motivation for creating an AGC was to give people the ability to run SDR software on radios which conain A/D converters that produce 8-bit output samples. With a 48dB (theoretically, ignoring implementation loss), you don't have much to work with in a radio environment with radically different signal strengths.

With an amplifier, whose output drives an A/D converter, on the rtl-sdr, when I listened to aircraft frequencies, I would hear strong tones when a strong signal would be received. The solution was to reduce the LNA and mixer gains.

I asked myself, why would I want to reduce front-end sensitivity when signal overload was not occuring at the variable gain amplifer input? It was A/D converter overload!

With an AGC, the user can establish a safe operating point that allows enough headroom to avoid overload when a strong signal arrives. When the signal goes away, the gain is increased so that you can hear weak signals.

Hopefully, developers of SDR software will see this and implement it into their software!

Our Review of the Vivid Unit GPSDR: A Portable Single Board Computer with Screen and RTL-SDR Expansion Board

As mentioned in a previous post last week, UUGear have recently released their VU GPSDR expansion board for their Vivid Unit single board computer with touchscreen. Together, this combination results in a handheld Linux system, with built-in RTL-SDR and upconverter.

The VU GPSDR has some interesting features, including:

  • GPS-assisted 24 MHz clock for improved frequency accuracy and stability
  • An integrated 108 MHz up-converter for HF (under 30 MHz) reception
  • Dual programmable rotary encoders for tactile control
  • A software-controlled frequency output port for experiments
  • Software features, including OpenStreetMap integration and ADS-B aircraft tracking 
Vivid Unit with VU Extender and VU GPSDR
Vivid Unit with VU Extender and VU GPSDR

Assembly

We won't repeat the assembly steps as the instructions show everything clearly, but we can say that the assembly steps were clear, and the assembly itself was easy. It was simply a case of plugging in a few jumper wires between the Vivid Unit and VU Extender board, screwing down the extender board, and then slotting in the VU GPSDR into the Extender boards mini-PCIe slot, before finally screwing down the GPSDR. Assembly took less than 10 minutes.

Physical Design Review

The system is put together like a sandwich. You have the screen and Vivid Unit on the top, then the Extender board, and finally the VU GPSDR on the bottom.

The Vivid Unit and GPSDR are essentially bare PCBs that connect to one another via the PCIe slot on the Vivid Extender board. This means that there is no enclosure, and you are essentially handling PCB parts in their raw form. In the future, we would like to see an optional enclosure to protect the unit better.

The exposed design results in some flaws that we have to point out. The shielding cans on the VU GPSSDR unit sit on the rear of the system, and during operation, they get very hot to the touch. So much so that handling the unit requires a bit of care to avoid the hot spots. Most of the heat appears to be coming from the AMS1117 LDO on the rear, which gets up to 80 °C, so be careful not to touch it accidentally. From the photos you can see that the RTL2832U and R860 are heatsunk to the shield. This is a good idea to keep the chips cool, but it also means that the metal gets quite hot to the touch. So handling the unit only from the edges is recommended. 

Vivid Unit with the shielding cans removed.
Vivid Unit with the shielding cans removed.
VU GPSDR Thermals
VU GPSDR Thermals

Secondly, because the Vivid Unit does not have a built-in battery, you need to power it separately via its USB-C port on the side. This makes the ergonomics of handling the unit a little trickier as you also have a cable sticking out. UUGear has noted that they are working on an 18650 battery pack, so this issue may be resolved in the future.

Finally, the "GPS" in the GPSDR comes from the fact that there is a GPSDO with a built-in GPS patch antenna on board. When active, a GPSDO provides excellent frequency stability, meaning that signals will be on frequency and will not drift.

But because of how the system is designed, the GPS patch antenna faces the ground when you look at the screen, even though it should face upward to get a clear view of the sky for satellite signals. However, despite this, we were happy to see that even while upside down, the patch antenna was able to receive several GNSS satellites with sufficient strength in order to obtain a fix when used outdoors.

Indoors, of course, no GPS fix is possible. But the uBlox NEO-M8N GPS module used in the GPSDR also has a fallback TCXO, so even without any GPS fix, the frequency accuracy of the system is good. UUGear also noted that the GPSDO automatically activates once a GPS fix is achieved, so no action is needed when you take the unit outdoors.

Realistically, the design issue with the GPS patch doesn't really matter anyway. For most use cases in handheld operation, the built-in TCXO will be sufficient. Any use case requiring extreme GPSDO precision will probably involve the device being mounted upside down and used remotely. 

The screen is clear and bright, the two encoder wheels are non-indented and are in a good spot, and so is the SMA antenna port, although the VU Extender's USB-C plug can block the antenna SMA port if a really fat plug is used (normal-sized USB-C plugs fit OK). The screen is large and has a high resolution, making it possible to use the onscreen keyboard. However, it is still a little fiddly for typing and clicking, so we ended up plugging in a small wireless keyboard.

Continue reading

Two YouTube Reviews of the new PortaRF – A New HackRF Portapack Combo

Recently, OpenSourceSDRLab, a Chinese store and lab that sells existing SDR products, and some unique products of their own design, has started taking pre-orders for their new "PortaRF" product

The PortaRF melds the HackRF and Portapack into a single PCB. They advertise it as an evolution of the PortaPack H4M, which is their popular clone of the original PortaPack, upgraded from the original. The PortaPack H4M has become one the most recommended HackRF PortaPack options on the market, even surpassing the original HackRF PortaPack, due to its high quality, excellent features, and significantly lower cost compared to the original.

The PortaRF features several improvements, including a larger 4" IPS screen compared to the 3.2" non-IPS screen on the H4M, increased flash storage from 1MB to 2MB, a higher internal battery capacity of 3000 mAh, and the addition of a new joystick control. Interestingly, OpenSourceSDRLab has also indicated that the production version may come with an AI module, which will allow the PortaRF to respond to voice commands.

The PortaRF is expected to ship around November 20, and it costs US$220, shipped from China. In comparison, the PortaPack H4M sells for US$165, shipped from China.

Recently, two reviews of the PortaRF were uploaded to YouTube. The first is by TechMinds, which provides an overview of the features and opens it up, showing the internals.

PortaRF - A NEW HackRF PortaPack Combo In One Single Board

The second review is from sn0ren who also reviews the features, and shows the internals. Sn0ren also makes some notes about his likes and dislikes with the new design.

HackRF Portapack Evolved? This is PortaRF

VU GPSDR: An RTL-SDR Expansion Board for the Vivid Single Board Computer

Thank you to Shawn from UUGear for writing in and sharing with us news about the release of "VU GPSDR" an RTL-SDR expansion board for the "Vivid Unit" single board computer. The Vivid single-board computer (SBC) is based on the RK3399 CPU (same chip used on the Orange Pi 4), and comes with a built-in 5.5" touchscreen.

The VU GPSDR is an expansion board for the Vivid Unit that, when combined with a VU Extender board, sits on the back of the Vivid Unit, transforming the computing platform into a portable SDR capable of running software like their fork of SDR++ or an OpenStreetMap display of live ADS-B aircraft positions.

The VU GPSDR also integrates a GPSDO (GPS disciplined oscillator), with a built-in GPS patch antenna, for precise frequency tuning. It also comes with a built-in HF upconverter and two encoder wheels, presumably customizable, but primarily for tuning and volume control. Finally, they have also integrated a software-controlled frequency output port for experimenters.

The Vivid Unit costs €99.00 (approximately US$115) on its own. The Vivid Unit Extender, which is required for using expansion boards, costs €25.00 (approximately US$29). The VU GPSDR itself costs €65.00 (approximately US$75). So, in total, for a complete RTL-SDR system, you are looking at a total cost of €189 (US$220).

Shawn has also recently sent us a review sample, which we will be testing out and writing a review for within the next week, so stay tuned for that!

The VU GPSDR Expansion Board for the Vivid Unit Single Board Computer
The VU GPSDR Expansion Board for the Vivid Unit Single Board Computer

DSG-22.6 GHz: An Open Source 300 MHz to 22.6 GHz Signal Generator

Thank you to Süleyman Dündar for submitting news about the pre-release of their new product called "DSG-22.6 GHz". DSG-22.6 GHz is a compact, handheld, open-source RF signal generator covering a continuous range from 300 MHz to 22.6 GHz with 1 Hz tuning resolution, 40BC harmonic level, and power output ranging from 15 dBm to -50 dBm.

An RF signal generator produces a clean, stable radio frequency signal at a chosen frequency. It is a helpful tool for testing SDRs and other radio equipment, such as low-noise amplifiers (LNAs), RF filters, mixers etc.

Competition to the DSG-22.6 GHz may include the ERASynth Micro and moRFeus; however, neither covers the wide frequency range of the DSG-22.6 GHz, and it appears that the ERASynth Micro has been discontinued.

Currently, the product is in the pre-release crowdfunding stage on Crowd Supply, so pricing hasn't been revealed. Interested individuals can subscribe to receive updates on their campaign page. The open source code can also be found on GitHub.

DSG-22.6 GHz. An upcoming wide frequency range, hand held and fully open source signal generator.
DSG-22.6 GHz. An upcoming wide frequency range, hand held and fully open source signal generator.

 

Amateur Radio Direction Finding With a KrakenSDR: AREG Presentation

Over on YouTube, we've seen a talk by Mark Jessop that may be interesting to some readers, as it covers Amateur Radio Direction Finding / Fox Hunting with the KrakenSDR, as well as various other radio tools. If you are unaware, KrakenSDR is our 5-channel coherent RTL-SDR based software defined radio system, designed for coherent applications like radio direction finding.

In the talk, Mark explains the amateur radio fox hunting sport, which involves the organizer hiding a transmitter somewhere in a defined area and having participants search for it using just its radio emissions. He goes on to show the different types of antennas, radio systems and vehicle setups participants used.

Mark further explains that on his particular vehicle, he uses a KrakenSDR as the primary receive system. He explains how the KrakenSDR works, how he integrated it into this vehicle and the custom software and LED display that he is using with it. 

ARDF at Mt Gambier - by Mark VK5QI and Grant VK5GR - AREG September 2025 Presentation

ESP32 Bus Pirate: Turn your ESP32 into a Multi-Purpose Hacker Tool

Thank you to "Geo" for writing in and sharing with us his open source project called "ESP32-Bus-Pirate" which he thinks might be of interest to those in the RTL-SDR community. The ESP32 is a popular low-cost microcontroller due to the fact that it has WiFi and Bluetooth capabilities built in. Although the ESP32 does not have true SDR capabilities, it can leverage its numerous built-in hardware radio components to achieve various interesting feats. Geo writes:

This firmware turns an inexpensive ESP32-S3 board into a multi-protocol debugging and hacking tool, inspired by the original Bus Pirate and the Flipper Zero.

It currently supports a wide range of protocols and devices, including I²C, SPI, UART, 1-Wire, CAN, infrared, smartcards, and more. It also communicates with radio protocols as Subghz, RFID, RF24, WiFi, Bluetooth.

Compared to existing solutions, the focus is on:

Accessibility — runs on cheap ESP32-S3 hardware (around $7–$10).

Versatility — one device can probe, sniff, and interact with multiple buses.

Extensibility — open-source and modular, making it easy to add new protocol support.

I believe this could be useful for hardware hackers, security researchers, and hobbyists looking for a low-cost, flexible alternative to commercial tools.

With the firmware installed on a compatible ESP32 device, it is possible to create WiFi, Bluetooth, and RF24 sniffers, scanners, and spoofers, as well as perform general sub-GHz and RFID sniffing, scanning, and replay attacks. It also has a host of non-RF capabilities useful for hacking devices.

PhaseLoom: A Software Defined Radio Powered by the Chip used in the Commodore 64, NES and other Early Home Computers

The MOS Technology 6502 is, by today's standards, an ancient chip, having just turned 50 this September 8. It was the chip behind the early age of home computing, powering iconic systems like the Apple I & II, Commodore 64, Atari, and Nintendo Entertainment System. It is, therefore, fascinating that someone has managed to use this chip as a core component in a modern software-defined radio system.

Over on his blog, Anders B Nielsen describes PhaseLoom, a 6502-based "Quadrature Sampling Detector Phase-Locked Loop SDR frontend". Realistically, we want to point out that the 6502 isn't actually doing any digital signal processing (DSP). The 6502 is used as an assembly programmed controller for a SI5351-based local oscillator and multiplexor chip that generates IQ data. Piping the IQ data into a PC with a soundcard is still required to actually get data out. However, Anders notes that he eventually hopes to get some DSP running on the 6502.

With the setup he is currently able to tune just to he 40m band, noting that performance isn't great, but at least it works!

Anders' video below explains the entire design and concept in detail, and we note that he is currently selling a full kit on his store and has uploaded the schematics to GitHub.

A 6502 Software Defined Radio