REDHAWK: An Open Source SDR Developed By The Government
A window into the kinds of things people have built with C++
If you are looking for a very comprehensive article about what REDHAWK is, how to install it, and how to use it, then stop reading this…read this instead. What I have just linked is the official REDHAWK documentation. It says:
REDHAWK is a software package that supports the design, development, deployment, management, and upgrading of real-time, network-enabled Software-Defined Radios (SDR). This chapter provides a high-level overview of REDHAWK and its capabilities…
A signal processing application developed in REDHAWK can be deployed on anything from a single Linux computer to network-enabled system of Linux computers. Typically, the integration of hardware and software required for such a form of multi-asset computing is a non-trivial undertaking, requiring a significant expenditure of resources. REDHAWK takes care of the complicated “under the hood” hardware/software integration challenges so that developers can focus on application development: an in-depth understanding of hardware and software systems is not required for basic REDHAWK use.
REDHAWK was developed and released as open source software to the general public — everyone is free to download it and scrutinize the source code. It is the result of work carried out by the United States government, specifically the NSA. You can find the NSA publicly announce this here, on nsa.gov.
If you look for REDHAWK online or on job boards, you may notice that its community of users is pretty…niche. Yes, it does occasionally make the rounds on Reddit, but for the most part it seems like a pretty obscure technology that not many people have heard of or used. I even heard someone joke that there are only 80 people in the world who know how to use it.
The journey into ShlinkedIn has been nice…I even wrote an article about it on HackerNoon. I want to take a closer look at how they work with databases. I want to really dive into Elixir/Phoenix LiveView, and also finish that bug I assigned myself to ages ago.
But something has come up. For the time being, my interest is back in C++ and “low-level things” in general. I want to dig into that again, then maybe return to web development world on a later date.
Installation instructions are available here.
There is something you will notice here right away. It may be the first question you ask. Why is it that REDHAWK only works on CentOS?
As far as I can tell, there are no efforts to support REDHAWK on Windows or MacOS…fine. I have heard a few people mention that you can get REDHAWK to work on Ubuntu. Data point of Evan, but I did not figure out how to get this to work.
I am writing to you today from a Windows laptop running Windows 11. I followed this guy, which contains documentation on running Linux via Windows subsystem. This means I did not have to go to the trouble of burning a literal disc, or installing VirtualBox, or anything like that.
Now, there are a few missteps I took in the setup process. Among them, and after failing to get it to work on Ubuntu, I tried getting this to work on CentOS 8. That failed, so I tried downgrading the REDHAWK version. I was just about ready to give up…
Yes, I DID have libboost installed. I tried — skip-broken, but that seemed like a bad idea and I was not able to use “rhide” when all was said and done.
Long story short, I just had to install from the CentOS 7 version. Yes, it had to be the zip file that was filled with RPMs…I don’t know what part of my brain convinced me that maybe I should first try installing the one that wasn’t filled with RPMs. I also had to use this StackOverflow link to fix an issue with mirrors.
So, my steps were:
- Get CentOS 7
- Use the command I just mentioned to successfully run yum commands
- Get REDHAWK SDR 2.2.9 from this guy
“Wait…but why should i care about any of this?”
I have an RTL-SDR I purchased for about $20. Using this and some not-REDHAWK software, I was able to listen to the radio the way I would on a regular radio. So, I suppose MAYBE that was a LITTLE cheaper.
The real reason REDHAWK matters, at least to some people, is that it’s professional government-sponsored code with some interesting features. You can drag-and-drop components within a little Eclipse-based IDE, configure things such as port numbers and input/output, then push a button to auto-generate C++ or Python code based on what you specified in the window.
This is a window into the SDR community, it may be a window into middleware, and it is just a little closer to the hardware than a lot of the things I have been writing about thus far.
Out of the box are ready-to-use REDHAWK components. In the center is a place where the user can drag-and-drop individual components, including pre-made ones or ones they have developed themselves, and they then have the option to auto-generate code accordingly. In future posts, I hope to touch on things like waveforms and components and the very confusing and annoying thing called SDRROOT.
My spin on this is just a little bit different. I have something called the “We Need” series, where I talk about technologies like Java, Python, and gRPC. The reception to this series has been mixed. “We Need Python” was criticized for its incorrect claim that Python is not compiled, which I think was fair. But “We Need HTML” was completely ripped apart for a reason I think was unfair — I had a WordPress example to demonstrate that web building tools still use HTML, but someone left a scathing comment because he hates WordPress.
“We Need gRPC,” which the editor renamed “Do We Need gRPC,” mostly sparked a discussion among the microservices community about REST/JSON vs. gRPC/protobuf, though one person criticized it for defining things in that way.
I want a “We Need C++” post, but I kind of want to edge my way into it.
Look at that. Look at that sweet, sweet C++ REDHAWK source code from TuneFilterDecimate. Look at the scope resolution operator, the arrow usage, the standard output.
No idea what it does, other than what I can gather from the README, but it almost makes me want to pick up a DSP book and learn more about how these things work. I can drag in a TuneFilterDecimate component, and I can read up on what it does from a high level, but this source code actually tells the story of how it works.
The SDR Community
So one person asked about beginning SDR projects, and another person said that you can use this to track aircraft. That’s nice.
Someone else paired it with HackRF. That’s kind of badass.
The REDHAWK community is apparently small, but the SDR community is huge. While tracking keywords on YouTube, I noticed the name Samy Kamkar start to show up. Yup, him, that guy who made a worm that took down MySpace. I think you know where this blog post is going next.
Hacking! I…guess. Wait, why would you hack a doorbell?
When we learned C++ in college, we coded with data structures like stacks and min heaps, we used pointers, and we studied object-oriented programming.
I could write a “We Need C++” article about things like pointers, but that would only be part of the story. There would probably have to be some modern C++ post, and it would certainly be better to have code examples to point to.
There are a few places I considered going before writing this. Gem5? I have written about that open source project at UC Davis before, and their source code actually looks more modern than the C++ I see in REDHAWK. REDHAWK remains a good example of C++ in general, and it could also be interesting to explore a C++ codebase like ZeroMQ.