‹ All articles

Tutorials

ESP32 SDR in GNU Radio with marble’s esp-sdr-zephyr

Build multiapp, select osmosdr, and connect GNU Radio through SoapySDR. Includes the permanent tainted-board warning and a two-board coax bench.

marble’s esp-sdr-zephyr is the deeper end of the ESP32 SDR experiments: raw I/Q reception, sample playback and several small radio applications under Zephyr. Here we use a XIAO ESP32S3, multiapp and osmosdr to reach GNU Radio. This is experimental lab software, not a substitute for a qualified commercial transceiver.

Read this before flashing: a board can be permanently tainted

The upstream warning is unusually strong: firmware may permanently alter the radio’s analog characteristics. Boards that have run it should be marked visibly, treated as tainted and excluded from future certified-product use. Reflashing stock firmware is not a promise of restoration. Use spare development boards you can retire from that role.

Upstream says do not perform radiated tests. Its suggested development arrangement is two boards connected through coax and 30–60 dB attenuation. Follow that restriction even if you hold a ham license. Also read the US legal checklist for ESP32 transmit experiments.

What you’ll need

Some links may earn the show a small commission at no cost to you, which helps pay for airtime. No affiliate purchase links are included in this draft.

  • A Linux development environment with the Zephyr SDK, west, build dependencies, CMake and a supported toolchain; use the upstream Zephyr environment instructions.
  • Two spare XIAO ESP32S3 boards with suitable, correctly routed RF connectors for the two-board test. This guide’s board target is not interchangeable with every ESP32-S3 board.
  • Native-USB data cables, 50-ohm coax and adapters, and 30–60 dB attenuation rated for 2.4 GHz and possible TX power; shielded containment.
  • GNU Radio, gr-osmosdr with Soapy support, SoapySDR development tools and libusb development files for the host module.

Step 1: Create the pinned Zephyr workspace

After installing Zephyr’s prerequisites, run the upstream workspace sequence. These commands download source and binary dependencies; inspect the project and its licenses first. Record the release/commit you use, because this project is moving quickly.

west init -m https://github.com/cyber-murmel/esp-sdr-zephyr esp-sdr-ws
cd esp-sdr-ws
west update
west blobs fetch hal_espressif
west blobs fetch esp-sdr-zephyr
west build --pristine --sysbuild --board xiao_esp32s3/esp32s3/procpu esp-sdr-zephyr/apps/multiapp
west flash
west dfu --storage

Flash one board at a time. The last step loads the multiapp storage content; follow the matching release’s instructions for recovery and DFU. Do not substitute generic ESP-IDF binaries or a C6/C5 board target into this S3 walkthrough.

Step 2: Start osmosdr on the board

Open the board’s USB shell using a serial terminal. List the installed apps, then start the SDR app:

app list
app run osmosdr

This is a HackRF-style USB protocol, not a claim that the board is a HackRF or that an unmodified HackRF driver will discover it. The supplied SoapySDR module is the host bridge. The link is half duplex: activating TX stops RX on that board.

Step 3: Build and discover the host module

cmake -S esp-sdr-zephyr/apps/osmosdr/soapy -B build-soapy
cmake --build build-soapy
export SOAPY_SDR_PLUGIN_PATH=$PWD/build-soapy
SoapySDRUtil --find="driver=esdr"

Run the SDR application from that same shell so it inherits the module path. If discovery fails, check USB permissions, the app running on the board and the module’s SoapySDR ABI. Do not make every USB device world-writable as a shortcut.

Step 4: Make a receive-only GNU Radio flowgraph

Step 5: Two-board coax test — only after checking the RF path

With both boards powered off, connect board A’s RF connector through the attenuator chain to board B’s RF connector. Confirm antenna routing from the board schematic: attaching coax does not necessarily disconnect a PCB antenna. Begin with 60 dB attenuation and the weakest TX power step; check the receiver input budget and attenuator rating. Use shielding and verify leakage. Never connect the two RF ports directly.

Keep board B on the receive flowgraph. In a separate GNU Radio flowgraph, send a small-amplitude complex Signal Source (for example a 10 kHz offset tone at 250 kS/s) to an Osmocom Sink selecting board A’s serial with soapy=0,driver=esdr,serial=ACTUAL_TX_SERIAL. Use the same 2405 MHz contained bench center, start at the weakest TX gain step, run only a short test, then stop TX. A hardware sink paces the flowgraph; do not add a Throttle block to fight it.

Look for the offset tone on B. If it clips, reduce TX drive or increase attenuation. Repeat with the roles reversed only after stopping both graphs. Record serials, firmware version, rate, gain settings, attenuation and observed drift. This establishes a bench link, not compliance or a useful on-air power rating.

Limits that matter

Sources checked Nov 5, 2026: upstream README and permanent-damage warning · osmosdr host setup and measured limits · project documentation.

This tutorial accompanies the Nov 7, 2026 episode of Echos in the Ether on WRMI with Chris, KD0CQ. These are project-documentation-based instructions, not a claim that I have bench-tested every board or measured its emissions. 73!

More to read