I’ve rebuilt the SDR system from the ground up and it’s online. If you want to know all the details, grab something to drink because this is a long post.
I kept losing the network connection to the Raspberry Pi in the SDR box. The box is in the backyard on the antenna tripod about 75 feet from my office. It is fed with 100′ of outdoor-rated CAT6 Ethernet cable which also carries Power-Over-Ethernet for the box. The box is too far away to use the wifi connection reliably, so the cabled Ethernet needs to work. When it started losing its connection, I needed to figure out why.
To make a very long story much shorter, I tested everything: the Ethernet cable, the port in my switch, all the software configurations, etc. I finally wiped and installed a fresh version of Raspbian to see if reinstalling the OS would fix it. I didn’t want to admit it, but I worried that the Ethernet port on the Pi itself had become flaky; it would work every third boot or so, but would act as if it were off on the other two boots. After troubleshooting everything else, I swapped out the Pi for another one. The Ethernet problems went away. Yep; I had a Pi with a flaky Ethernet port. So I ordered a new Pi, during which I upgraded from the Pi 3B (1.2GHz CPU) to the new Pi 3B+ (1.4GHz CPU).
I’m not quite sure why the Ethernet port went bad. As I’ve said, there’s Power-Over-Ethernet being used. Had the splitter in the box hiccuped and tossed 48VDC at the Ethernet port at some point? Had water gotten in and I didn’t notice it? I still don’t know why. There was a bit of non-conductive thermal grease that had run down between some pins, but even after fully cleaning it off, it was still flaky. So I don’t think that was the cause. In any case, I’ve repurposed that Pi. It’s now a server in my office, using the wifi perfectly fine.
Since I had already wiped the software installation, I had to start from scratch. I also decided to completely document my installation and attempt to automate it. This would allow me to take a new Pi and install all the needed software with no manual intervention.
So I created a project on Github (it’s currently private, but I will probably clean it up and make it public at some point). Right now, this project mainly just houses the README file which has a list of all the manual steps I performed to install everything on the new Pi. Eventually, this project will include additional things like Puppet manifests and any other configuration files needed to run the SDR box (e.g. the OpenWebRX config files). You’ll be able to download the Git repo, install a base Raspbian image on a new Pi, and run the stuff against it to get a working SDR box.
I was pretty excited that I got to upgrade the Pi. The new Pi 3B+ has a few new features: a 15% speed increase, the addition of dual-band (2.4GHz/5GHz) wifi, and Gigabit Ethernet. It also has its own Power-Over-Ethernet circuitry with an add-on board (available separately, and not yet available publicly at the time I put this together). And the port and GPIO pin layouts are the same, but the board layout has been tweaked a bit. I thought it would be a drop-in replacement, but I did have a couple of issues.
In upgrading the Pi to the 3B+, they used a newer SOC (system-on-a-chip, which contains the CPU and most of the I/O circuitry) from Broadcom. This new chip is great but is physically different from the one on the Pi 3B. The awesome aluminum case that I had used previously (which was also a massive heat sink) wouldn’t fit the 3B+; the SOC was too tall.
Initially, this really bothered me. The SDR decoding can use a lot of CPU power. I wanted to set the Pi to run at full-speed all the time by changing to the “performance” governor (it usually uses the “ondemand” governor which changes clock speed dynamically based on load) and now my huge heat sink was gone. So I did some research and some testing.
I learned that the new Pi 3B+ had been redesigned in an unseen way: the entire board and all the edge connectors are now also heat sinks. The new SOC couples the heat to a ground layer inside the PCB. This spreads the heat around the entire unit (and even along cables connected to the edge connectors, if they are plugged in). This reduces the SOC spot temperature significantly.
So I put a regular Pi heat sink on the SOC and ran a software stress test that runs all 4 CPU cores at 100%. While it didn’t run as cool as the original Pi 3B with the aluminum case/heat sink, I couldn’t get it above 66 degrees C, even after running the stress test for half an hour. This is about 10 degrees C hotter than the original, but is still way below the CPU automatic throttle-down temperature of 85 degrees C. This was perfectly acceptable to me, so that’s how I decided to install it. And yes, the HDMI connector began to get warm since it is also a part of the heat sink on the 3B+.
Now, since I didn’t want to mount the Pi unprotected in the box, I had to find another case. I did have a plastic case I wasn’t using, so I tried to use that. It wouldn’t fit due to the new POE pins sticking up near the USB ports. A couple of minutes with a Dremel tool modifying the case took care of that problem. Now I had a new Pi with a new heatsink in a new case, ready to go.
I also reconnected the GPS unit to the new board. While I’m not using it for anything yet, I figured I’d add it to the new box and install procedure in case I want to use GPS positioning and time synchronization in the future. It doesn’t matter for my static installation, but might be useful for travel, Field Day, etc. At this point, I had a new Pi 3B+ and the rest of the box ready to go for software installation and testing.
Since I was documenting this procedure, I installed things slowly, one-by-one. I was actually surprised how much I had to install; documenting a procedure does usually bring your attention to such things. The first thing to install was the newest version of Raspbian, the Raspberry Pi Foundation’s official version of Linux for the Raspberry Pi. Then I did the standard “apt-get update” and “apt-get upgrade” to get any new software upgrades that have come out since the most version of Raspbian was released. Then I installed all the software packages needed for administration of the system or to support the SDR software. Once this was all done, I had the base system ready to go.
Then I had to install OpenWebRX. This is a three-part process. First, you have to manually compile the RTL-SDR driver software. This isn’t hard; it’s just a few simple commands. Second, you compile and install the digital signal processing software, csdr; this was written by the author of OpenWebRX. This is also a simple installation: it’s only a few simple commands to compile and install. And lastly, you copy the OpenWebRX software to a directory from which it can run (I put it in /opt/openwebrx) and tweak the OpenWebRX config file as you want and run the application. At that point, you have a web-accessible SDR system!
At this point, I had a new SDR box! I had rebuilt it. I had the technology. It was better, stronger, faster. At this point, I only have one SDR activated, but I have plans to add up to three more, to the limit of the Pi’s USB ports (a second one is installed, but not active at the moment). Each SDR can cover up to 2.4MHz of bandwidth, but I usually limit them to 1MHz or 2MHz to reduce CPU usage (the wider the bandwidth, the more CPU needed to decode them). Plus, at this point, OpenWebRX doesn’t allow retuning of the center frequency, so there’s no easy way to change the band on an SDR; I have to stop that process, change the config file by hand, and restart it. I’m also going to add a temperature sensor inside the box itself; I’ve already got the sensor, and I’ll incorporate it at some point.
So I closed up the box, put it back on the tripod, connected up the Ethernet and discone antenna cables, and fired it up. It worked! Feel free to take a look. It’s currently tuned to the top end of 2 meters and defaults to the PSRG repeater in Seattle.