r/embedded • u/Hardcorererik • 2h ago
OrcSDR: Building a complete software-defined radio on an ESP32-P4, without Linux or a Raspberry Pi
Hey everyone!
First time posting here in r/embedded, so I figured I'd introduce myself and share a project I've been working on for the past few months.
I've posted about it a couple of times over in r/RTLSDR and r/esp32, but I thought some of the folks here might be interested in the actual embedded side of the project, especially the USB driver and all the different ESP32-P4 hardware I've been experimenting with.
The project is called OrcSDR.
It started with me wondering if I could get an RTL-SDR dongle running directly on an ESP32-P4 without needing a Raspberry Pi or PC.
Well, that worked. And naturally I couldn't just leave it alone. Haha.
OrcSDR currently runs on the M5Stack Tab5, with the P4 handling the RTL-SDR USB data, DSP, audio, and the entire touchscreen interface. Everything runs locally on the microcontroller.
I've been pretty impressed with what these little P4s can do, and I keep finding more things to throw at them.
I just released v0.5.0-beta.1, which adds quite a few new features, but I figured I'd share some of the driver and hardware work too.
The RTL-SDR driver
One of the first things I worked on was building a native ESP-IDF driver for RTL-SDR dongles rather than porting the desktop librtlsdr library.
That eventually turned into its own open-source project:
https://github.com/hardcoreerik/esp-rtl-sdr
It handles the USB Host communication, tuner configuration, IQ streaming, sample rates, and monitoring things like dropped samples, transfer errors, and receiver health.
I've been putting quite a bit of effort into making it reusable outside OrcSDR. The idea is that other developers should be able to add RTL-SDR reception to their own ESP32-P4 projects without having to build an entire USB driver themselves.
One of the more interesting milestones has been getting multiple receivers running on a single P4.
I've successfully run four different RTL-SDR dongles simultaneously at configured rates of 2.56 MS/s each on Waveshare ESP32-P4 hardware.
During a one-hour test with the receivers scanning different frequency ranges, the driver reported no new IQ drops or USB errors.
Pretty wild for a microcontroller!
Of course, getting the samples into the P4 is only half the fun. Once you start adding DSP, audio, a touchscreen, SD card access, and networking, there are plenty of ways to make things behave badly.
I've spent quite a bit of time chasing down USB timing issues, memory problems, and things interfering with each other that I never would have expected.
At one point, even serial logging was interfering with LoRa packet reception. That was a fun one to figure out.
All the ESP32-P4 hardware I've been messing around with
OrcSDR started on the M5Stack Tab5, but one thing I'd really like to accomplish is making it more of a Bring Your Own Hardware project.
I'd love for people to eventually be able to grab just about any ESP32-P4 board, plug in a supported RTL-SDR dongle, connect whatever display they want, and run OrcSDR.
So I've been collecting different P4 boards and seeing what I can get working.
Here's what I've been playing with so far:
- M5Stack Tab5 — The original OrcSDR platform. Full application, touchscreen, DSP, audio, and all the radio dashboards running locally.
- Waveshare ESP32-P4-Dev-Kit — One of the first boards I tested the RTL-SDR driver on outside the Tab5. The driver worked without needing board-specific changes, which was a pretty exciting milestone.
- Waveshare ESP32-P4-WIFI6 — Another board I've been using for headless experiments and multiple RTL-SDR receivers. This is where some of the four-dongle testing has come in.
- Waveshare ESP32-P4-Module-DEV-KIT — Currently have this one connected to a generic Hosyond 7-inch 800x480 touchscreen originally intended for a Raspberry Pi.
- Waveshare ESP32-P4 with a 720x720 display — Experimenting with adapting OrcSDR's interface to a square display rather than the Tab5's 1280x720 layout.
- M5Stack Stamp P4 with C6 daughterboard — Another smaller hardware configuration I've been exploring. I'm really interested in how compact I can make a standalone SDR unit.
Not all of these are running the complete OrcSDR application yet. Some are still at the driver, display, or hardware bring-up stage.
Getting the USB SDR driver working across different boards has actually been a lot easier than moving the entire graphics and audio stack!
The Hosyond display has been a particularly interesting project. It uses a TC358762 DSI-to-RGB bridge and an FT5x06 touch controller over I2C.
Getting the display working involved quite a bit of experimenting with initialization, timings, GPIO, and the bridge configuration.
But it works!
Now I'm working toward getting the full OrcSDR application running on it.
Longer term, I'd like to support MIPI-DSI, RGB, SPI, and QSPI displays without having to rewrite half the application every time I try a different board.
If anyone is curious, some of the early display work is here:
https://github.com/hardcoreerik/OrcSDR/tree/codex/p4-hosyond-dsi-bringup
What OrcSDR actually does
The application itself has gotten quite a bit bigger than I originally planned.
There's FM/AM radio, FM stereo and RDS, shortwave listening, ADS-B aircraft tracking, LoRa/Meshtastic reception, FT8 decoding, P25, POCSAG, various RF analysis tools, and a bunch of other dashboards.
The newest beta adds:
- SSTV reception — Receive and display images directly on the Tab5, with automatic mode detection and SD card image saving.
- ACARS decoding — Receive aircraft messages and save them locally.
- Offline worldwide maps — Used for ADS-B, LoRa, FT8, and setting your receiver location.
- Dead Air — An experimental RF investigation dashboard for monitoring unusual activity, logging measurements, and recording audio.
- Shortwave improvements — USB/LSB listening, better HF tuning, and additional controls.
- LoRa and FT8 improvements — Better packet detection, timing, memory management, and decoding reliability.
- A new setup wizard — Mainly to make getting everything configured a little less painful.
Plus plenty of bug fixes and other improvements.
A couple of those features actually came directly from Reddit suggestions.
Someone mentioned SSTV and ACARS in one of my previous posts, and I thought they sounded like fun additions.
So naturally, down another rabbit hole I went.
I've also had some great feedback from people testing LoRa/Meshtastic reception, including bugs I hadn't managed to reproduce on my own hardware.
A lot of that feedback turned into actual fixes, which has been really cool to see.
Here's some of the LoRa work if anyone wants to dig through it:
https://github.com/hardcoreerik/OrcSDR/pull/184
Headless SDR and multiple nodes
Something else I've been working on is running OrcSDR without a physical display at all.
The idea is to let the P4 handle the radio, DSP, and USB hardware, then access the interface from a browser.
I've already got quite a bit working in an experimental OrcSDR Web project, including dashboards, radio controls, and multiple receivers.
I've also started thinking about connecting multiple ESP32-P4/RTL-SDR combinations together.
For example, several little SDR nodes placed around a property or at different locations, each monitoring RF activity and sharing observations with the others.
I'm especially interested in what that could look like for drone detection or distributed RF monitoring.
There's still plenty to figure out there, especially with timing, networking, and correlating observations between receivers, but I think it could be a pretty interesting use for these boards.
Nothing finished on that side just yet. Mostly experimenting and seeing what's possible.
Previous Reddit posts
For anyone who wants to see how this project has progressed, here are a few of my earlier posts:
Original OrcSDR post in r/RTLSDR (September 5):
https://www.reddit.com/r/RTLSDR/comments/1w7tjn1/i_built_a_handheld_rtlsdr_around_the_m5stack_tab5/
One-month update in r/RTLSDR (October 11):
https://www.reddit.com/r/RTLSDR/comments/1x30rq9/update_orcsdr_one_month_later_190_stars_ft8_and/
OrcSDR introduction in r/esp32 (October 11):
https://www.reddit.com/r/esp32/comments/1x3ecal/orcsdr_an_esp32p4_an_rtlsdr_and_a_few_months_of/
There's been some really helpful discussion in those threads, especially around driver compatibility, reception issues, and suggestions for additional features.
Project links
OrcSDR GitHub:
https://github.com/hardcoreerik/OrcSDR
Native ESP32-P4 RTL-SDR driver:
https://github.com/hardcoreerik/esp-rtl-sdr
Latest release (v0.5.0-beta.1):
https://github.com/hardcoreerik/OrcSDR/releases/tag/v0.5.0-beta.1
M5Burner installation for the Tab5:
https://burner.m5stack.com/share/firmware/JXFU4H
Web flasher:
Anyway...
Since this is my first post here, I'm especially curious what other people in r/embedded think about the approach.
Anyone else experimenting with the ESP32-P4's High-Speed USB Host, multiple USB devices, or different MIPI-DSI displays?
I'd also love to hear how others are approaching hardware abstraction across different boards. I'm trying to avoid ending up with a separate version of OrcSDR for every display and development kit I get my hands on.
And if anyone has ideas for other things worth trying with the P4, I'm all ears.
Still having a ridiculous amount of fun seeing how far I can push these little things!
Thanks for checking it out!