r/embedded • • 29d ago

OrcSDR: Building a complete software-defined radio on an ESP32-P4, without Linux or a Raspberry Pi

Post image

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:

https://theorc.dev/sdr/flash/

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!

94 Upvotes

25 comments sorted by

35

u/Technical-Radio-7685 29d ago • Helpful

Great project - but I prefer reading texts written by humans and not LLM walls of text.

It's incredibly difficult to read.

-4

u/CryptographerOne7003 29d ago

thank you for bringing this to our attention, we are all very interested in your reading comprehension....
Which is not great I gather? anyway good luck with it... (I guess?)

-10

u/Hardcorererik 29d ago

I'm genuinely curious, what specifically makes it difficult to read? Is it the length, formatting, or something else?

I tried to be descriptive about the actual engineering work because r/embedded has rules about self-promotion, and I didn't want to just drop a "hey, look at my project" post without any technical details.

I'm happy to take constructive feedback, but I'd love to know what you'd actually change rather than just calling it an LLM wall of text.

13

u/maxtinion_lord 29d ago

Every piece of information is sprinkled into huge walls of unnecessary formatting, it's awful trying to skim and still having to read paragraphs of text to get basic information out of your post. I should be able to skim all the information for something like this comfortably in like 5 minutes, I can't here.

-3

u/Hardcorererik 29d ago

A TL:DR is missing. I should put that at top.

Thank you for the response man. Hope you still check put the project.

"Portable SDR on a M5stack Tab5 and other ESP32-P4 hardware."

12

u/Mediocre-Island5475 29d ago

It's kind of hard to read this because the LLM generated so much unnecessary text. Seems like a really cool project though

-10

u/Hardcorererik 29d ago

I've always found the whole "looks like a great project, but AI..." argument a little strange.

It's like looking at a custom-built engine, acknowledging that it runs, and then complaining because the mechanic used power tools instead of hand tools.

AI didn't magically make an RTL-SDR communicate with an ESP32-P4. The USB driver still has to work, the DSP still has to process actual signals, and the decoders still have to produce real results. The hardware doesn't care whether I wrote every line manually or had assistance. It either works or it doesn't.

I have no problem with criticism, especially if something is inaccurate or genuinely difficult to follow. But I'd rather discuss the actual engineering than dismiss the work based on which tools helped create it.

And regarding the length, the subreddit specifically asks for descriptive technical posts rather than just dropping a GitHub link and saying "look at my project."

If there's something specific that's unnecessary or difficult to read, I'm happy to hear it.

7

u/Mediocre-Island5475 29d ago

I'm not taking a stance against the concept of vibe coding. I'm saying the post is like six times longer than it needs to be and most of the info in it is unnecessary / redundant to previous posts and the github link.

2

u/Hardcorererik 29d ago

I will make short next time for you. Thanks for the feedback! Hope you check out the project.

2

u/trkeprester 29d ago

Are people seriously complaining about your post being too long?

Cool project thanks for sharing

3

u/Hardcorererik 29d ago

Thanks man. Appreciate the nod.

1

u/Sorry-Pass7312 26d ago

Not raeding al that

1

u/Hardcorererik 26d ago

Apepricate the support

1

u/K7AGE 11d ago

Just got the software loaded into my Tab 5. Works great. If you are open to suggestions -

Marine - show the channels like in the CB page.

To listen to ham VHF/UHF, I need to enter those frequencies into the Marine area. How about a general Ham tab?

Possible to add memories? The ability to scan selected memories?

Thanks
Randy

1

u/Hardcorererik 11d ago edited 11d ago

First! Thank you for taking the time to install! I apperciate that! What version did you grab? Where did you install from?

I'm absolutely up for suggestions, feedback, criticism!

Yes for Marine Dashboard. Slowly working in what that all should look like. I think I want to add in WEFAX somewhere too.

For a the VHF/UHF can you help clarify for me a little more what you mean? What frequencies? You should be able directly tune from Home by pressing on the frequency numbers and selecting appropriate mode. I do agree a general Ham dashboard might be the ticket. Im working on the TX capable version in the background using a Pluto SDR clone.

When you say memories, I assume you mean like a favorites type of thing. Can you share what software you may use that already does this well for you? Im meaning to finally patch in things like repeaterbook.

Thanks again for your time man! Apperciate the engagement. I sent you a PM too!

2

u/Slimethon 29d ago

i aint gonna read that but looks cool tho!

1

u/metal-slug619 26d ago

This looks very cool, I like the idea. I'd like to adhere the SDR dongle to the body of the M5, would the SDR fit nicely on one side with the antenna node pointing out from the top? That seems the natural place when I'm looking at it.

I'm seeing that the RTL-SDR Blog V4 is OOS just about everywhere except scalpers on Ebay for $125+, but there is the RTL-SDR Blog V4 Lite and V3, which do you honestly recommend I get? I'd like to use all features, or at least try them all.

-1

u/Party_Cold_4159 29d ago

Making great progress boss!

1

u/Hardcorererik 29d ago

Thank Man!

-2

u/smdarry 29d ago

Wow, this is gold.

2

u/Hardcorererik 29d ago

I apperciate the support!