Sunday, December 20, 2020

HamPi and GNURadio by dan kb6nu

 Ham Pi is a distribution for the Raspberry Pi produced by Dave Slotter, W3DJS.  It’s notable because it includes more than 100 ham radio apps, including  apps for running digital modes, antenna modeling apps, logging app, Morse Code apps, and software-defined radio apps.

It’s the SDR apps that I’m most interested in. Shortly after I installed HamPi, I purchased an RTL-SDR dongle from Amazon. 

I plugged it into the RPi and shortly after I was receiving FM broadcast stations with gqrx, an open-source SDR program. Next, I tried it with CubicSDR, and it worked just fine with with this program as well. HamPi also includes CuteSDR and SDRAngel, but I haven’t tried running those yet.

GNU Radio

HamPi also includes a build of GNU Radio. GNU Radio isn’t an SDR program, per se, but a set of tools that allows you to build your own SDR application. You’re provided with a set of functional blocks that you connect up to create an application. For example, the diagram below creates an FM broadcast receiver.

Click to see the full-size image.

I got this flowgraph (that’s the GNU Radio term for the diagram) from VE6EY. As he puts it, an FM receiver is like the “Hello, world” program in other programming languages.

I ran into several problems. The first problem is that I wasn’t getting any sound output. Rightly so, I guessed that I hadn’t set up the audio sink correctly. After playing around a short time with settings, I finally got that to work.

The second problem is that the performance is terrible. I’m now getting sound, but the sound is distorted, and it appears as if the chain just can’t handle the data fast enough. It sounds kind of like when a DMR radio is dropping packets.

I thought it might be because the flowgraph was using the wxWidgets GUI library. So, I changed the WX blocks to QT blocks, but that had no effect. That was kind of disappointing.

I next tried getting some help from the discussion-gnuradio mailing list. I got a bunch of replies—including one really snooty one—but none of the solutions was readily implementable. I was hoping that someone would say something like, “Oh, yeah. Go into this file and change this parameter” or “Run this command and everything will be fine.” Instead, I was told that I really should be running a 64-bit Linux and/or I’m going to have to re-build GNU Radio.

I really would like to get GNU Radio up and running on this Raspberry Pi 4, so I’ll probably end up doing something along those lines, but it’s going to be more work than I anticipated.

No comments:

Post a Comment