Bald Yak, scene 5, debugging

Bald Yak, scene 5, debugging

Author: Onno (VK6FLAB) December 28, 2024 Duration: 5:02
Foundations of Amateur Radio

As you might know, a little while ago I started a new project.

"The Bald Yak project aims to create a modular, bidirectional and distributed signal processing and control system that leverages GNU Radio."

In embarking on this adventure I've been absorbing information as I go whilst explaining what I've learnt to anyone who will sit still long enough. Credit to Glynn VK6PAW and Charles NK8O for their patience.

For most people, me included, the introduction to GNU Radio happens via a graphical user interface where you build so-called flowgraphs. These are made up of little blocks that you wire together to get from a Source, where a signal originates, to a Sink, where it terminates.

Each of these blocks does something to the signal, it might be a filter, an amplifier, it might encode or decode a signal like FM, AM, Wideband FM, or some other modulation like Phase Modulation or OFDM, Orthogonal Frequency Division Multiplexing, a way of transmitting digital information using multiple channels. It's used in places like WiFi, ADSL and DSL, Digital Television as well as modern cellular systems.

Those blocks generally expect a specific type of input and generate some particular output.

After you save your design you can run the flowgraph and behind the scenes some magic happens. Your visual representation of signal flow is translated into either Python or C++ and the resulting application is what is actually run, which is why the user interface that you design your flowgraph in is cunningly named, GNU Radio Companion.

So, what if you want to do something that doesn't yet exist? As it happens, that's where I came across a YouTube video by John VE6EY called "GNURadio Embedded Python Block" which neatly describes a fundamental aspect of how the GNU Radio framework actually operates.

One of the blocks available to you is one called "Python Block", which you can add to your flowgraph just like any other block. What sets it apart from the others is that you can open it up and write some Python code to process the signal.

When you first insert such a block, it's already populated with some skeleton code, so it already does something from the get-go and that's helpful because if you break the code, you get to keep both parts.

Seriously, it allows you to figure out what you broke, rather than having to worry immediately about how specifically the code is wired to the outside world, which let's face it, is not trivial. If you're a programmer, think of it as the "Hello World" of GNU Radio.

If not much of that means anything, think of it as a variable electronic component. If you need it to be a capacitor, it can be that, or a transistor, a whole circuit, or just a filter, all in software, right there at your fingertips and no soldering required.

Now I'm under no illusion that everybody is going to want to get down and dirty with Python at this point, and truth be told, I have a, let's call it "special" relationship with the language, but that is something I'm just going to have to get over if this project is going to go anywhere.

For my sins this week I attempted to recreate the intent of John's video on my own keyboard and discovered that debugging code in this environment might be tricky. It turns out that you can actually print out Python variables within your code and in the GNU Radio environment they'll show up in the console inside the companion window, which is handy if you committed one of many Python sins, like say attempting to compare an integer against a list. Don't ask me how I know.

One thing I'm planning to attempt is to get the same thing going for C++ output. By default GNU Radio Companion uses Python, but you can change it so instead of generating Python, it can generate C++. Whilst I have no immediate need for that, I do know that at some point it's likely that I will, like say when I want to run something on an embedded processor, or some other contraption. So, whilst I have nothing to lose, I want to try out the boundaries of my new toy, besides, I have form, in testing boundaries that is.

I'm Onno VK6FLAB


For anyone curious about the crackle of a distant voice emerging from the static or the thrill of making a contact across the globe using nothing but radio waves, Foundations of Amateur Radio offers a friendly, steady guide. Hosted by Onno (VK6FLAB) from Australia, this long-running podcast acts as a companion for newcomers navigating the initial, often overwhelming, steps into this vast hobby. Each episode deliberately unpacks a single facet of amateur radio, breaking down technical concepts, equipment, and operating practices into digestible pieces. You'll hear practical advice on how to get started, find your place within the global community, and discover which of the hobby's countless avenues-from building antennas to satellite communication or emergency service-might spark your passion. It’s not about dry theory; it’s about demystifying the process and sharing the genuine rewards that keep enthusiasts engaged for a lifetime. Having evolved from its earlier incarnation in 2011, this podcast builds from the ground up, week by week, creating a solid resource that grows with you. Tune in for a down-to-earth conversation that makes the airwaves feel a little more accessible and a lot more inviting.
Author: Language: en-au Episodes: 100

Foundations of Amateur Radio
Podcast Episodes
Bald Yak 20: More Pi with the Soap [not-audio_url] [/not-audio_url]

Duration: 4:48
Foundations of Amateur Radio The thing I think I love most about the hobby of amateur radio is the challenges it represents, not in terms of life or emotional ones, though I will admit that there's some of those .. in no…
Bald Yak 19: SoapyAudio adventures [not-audio_url] [/not-audio_url]

Duration: 5:16
Foundations of Amateur Radio Previously I've talked about a piece of software called SoapyAudio. It's part of the toolkit called SoapySDR which in turn is part of a whole ecosystem called the Pothos framework, coordinate…
Why not use LoTW? [not-audio_url] [/not-audio_url]

Duration: 9:34
Foundations of Amateur Radio The other day I witnessed a fellow amateur attempting to guilt another into using LoTW with comments about how their QSO partner would appreciate confirmation via the service, even if they di…
Some days are like running in place ... [not-audio_url] [/not-audio_url]

Duration: 4:54
Foundations of Amateur Radio Recently I discovered that the antenna that I had connected to my WSPR or Weak Signal Propagation Reporter beacon was not a 40m antenna, instead, it turns out to be a 15m antenna. The how and…
Keeping track of your adventures [not-audio_url] [/not-audio_url]

Duration: 8:21
Foundations of Amateur Radio About a year ago I set upon a new adventure, to determine if the dummy load I own, traditionally seen as a device that doesn't emit any RF, to determine if it was in fact imbued with the abil…
Dealing with Complexity [not-audio_url] [/not-audio_url]

Duration: 6:00
Foundations of Amateur Radio Several years ago, I forget exactly when, I was gifted a device called a "Wio Terminal". It's a micro-controller in a box with a screen, buttons, Wi-Fi, Bluetooth and a boat load of sensors,…
What does amateur radio bring to your life? [not-audio_url] [/not-audio_url]

Duration: 5:36
Foundations of Amateur Radio The other day I went for a walk around the block for the first time in a while. It's something I did for a time and then for several reasons, mostly to do with health, didn't. For me it's the…
You don't need an excuse to make noise! [not-audio_url] [/not-audio_url]

Duration: 3:40
Foundations of Amateur Radio The other day I came across a post on mastodon.radio by Keith W6KME announcing the resumption of the Micro Field Day, spelled using the 12th letter of the Greek alphabet, Mu. This was news to…
What's in an S-unit? [not-audio_url] [/not-audio_url]

Duration: 10:43
Foundations of Amateur Radio The other day fellow amateur Randall VK6WR raised an interesting question. Using his HP 8920A RF Communications Test Set, which you might recall from our adventures in measuring radio harmoni…
Where is the spark .. gap? [not-audio_url] [/not-audio_url]

Duration: 8:35
Foundations of Amateur Radio The thing I love most about this amazing hobby of amateur radio is the sheer size of the community and the depth of knowledge that comes with it. Case in point, the other day I mentioned the…