ESP-SDR firmware turns ESP32 into a 2.4/5 GHz Software-Defined Radio (SDR)

· CNX Software - Embedded Systems News ·

4 min read Original article ↗

We have seen ESP32s used for everything from simple IoT devices to AI, audio, and vision projects. But while looking for a new project, I found out about ESP-SDR firmware, which turns the ESP32 into a native Software-Defined Radio (SDR) without additional hardware.

This open-source firmware bypasses the ESP32’s fixed-function Wi-Fi and Bluetooth modems and taps directly into the internal ADC signal chain to capture raw I/Q baseband samples. It then sends these samples to a computer over USB or UART, where they can be processed and viewed as a radio spectrum or waterfall display, turning supported ESP32 chips into low-cost software-defined radio receivers without requiring additional SDR hardware.

ESP WebSDR showing the live 2.4 GHz spectrum and waterfall using raw I Q data captured from an ESP32 S3

Key features and supported hardware:

  • Supported chips – ESP32, ESP32-C3, ESP32-C5 (dual-band 2.4/5 GHz), ESP32-C6, ESP32-C61, ESP32-S2, ESP32-S3, and the preview ESP32-S31
  • Tuning range – Nominally 2.4 GHz ISM (2.2–2.7 GHz on some chips) and 5 GHz (4.8–6.0 GHz on ESP32-C5); The C61 can tune up to 2.7 GHz and capture LTE Band 7 and 5G NR Band n7 signals
  • Sample rate and bandwidth – Up to 80 MSa/s with ~13–54 MHz bandwidth, depending on the chip
  • On-Chip FFT – The firmware supports on-chip FFT and sends compact spectrum data instead of raw I/Q samples

According to the developers, Espressif engineers likely left a debug I/Q sampling path in the silicon for factory wafer testing. By using LLMs to reverse-engineer the adctrig function within Espressif’s librftest library, the team figured out how to configure special debug registers.

ESP-SDR WiFi Modem bypass
ESP-SDR firmware bypasses the WiFi Modem

Once enabled, the ESP32 writes raw I/Q samples directly into its internal SRAM. The firmware then uses a ring buffer to move the samples from SRAM and transfer them to a computer over USB or UART. To display the captured signals, you need ESP-WebSDR, a browser-based tool that connects to the ESP32 over USB and shows the radio spectrum and waterfall in real time. You can also use it to flash the ESP-SDR firmware directly from a supported web browser (like Chrome or Edge).

ESPARGOS ESP SDR Raw IQ Capture with ESP32

The ESP32 is fast and can capture data at up to 80 MSa/s, which produces around 2.56 Gbps of data, but getting all that data off the chip is the main problem. USB and UART cannot handle the full data rate, so ESP-WebSDR captures short I/Q snapshots to build the spectrum and waterfall. This means it can miss signals that arrive between capture windows. For continuous streaming, the team is working on SoapyESPSDR for the ESP32-S31, which can stream I/Q data over Gigabit Ethernet at 8 to 16 MSa/s to software such as GNU Radio and Gqrx.

Previously, we have written about several ESP32 radio and SDR projects, but all of them still relied on an external receiver or on processed Wi-Fi data. Just a few days ago, we wrote about how LakeShark firmware turns a LilyGO T-Display P4 into a handheld SDR scanner where the ESP32-P4 has no radio of its own and relies on an RTL-SDR Blog V3 or V4 dongle as the RF front end. We have also covered Chen Liang’s ESP32-C5 Wi-Fi analyzer, which monitors 2.4 GHz and 5 GHz Wi-Fi signals, while ESP-WIFI-CSI works with channel-state information. nRFBOX V2 and ESP32-DIV use an external nRF24 to scan 2.4 GHz. Compared to all of that, ESP-SDR relies on the ESP32’s built-in radio, so no extra SDR hardware is needed. This makes basic spectrum analysis possible on an ESP32 board that can cost less than $5.

Developers Florian Euchner and Zoltan Doczi of the ESPARGOS project found this feature while working on ESPARGOS One, an eight-antenna setup for Wi-Fi sensing. With ESP-SDR, it can also work as an eight-channel SDR and detect and locate signals such as Bluetooth LE and Zigbee in the 2.4 GHz band.

Both ESP-SDR and ESP-WebSDR are open-source projects released under the GPL-3.0 license. You can find the source code on GitHub and try the browser-based SDR demo with a compatible ESP32 development board. They also left a note about AI usage in the ESP-WebSDR repo:

Parts of this code are AI-generated. While we put a lot of manual effort into pyespargos and the firmware for our ESPARGOS One arrays, we don’t have the time to manually review all of the source code for ESP-WebSDR.

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress. We also use affiliate links in articles to earn commissions if you make a purchase after clicking on those links.