Wednesday, January 27, 2016

Fast Autocorrlelation Sink broke? Here's the fix

If this diagram doesn't work for you:

There's a very easy fix, outlined here. The issue is that GNURadio is asking wxGUI for the window size before the window is created. The fix is to edit This file is likely located in ./usr/lib/python2.7/dist-packages/grc_gnuradio/wxgui/ assuming your build prefix is /usr.

This defers creation of the GUI element and removes the error. And as you'd expect the autcorrelation of random noise is not very interesting :)

Wednesday, January 13, 2016

GNURadio: Getting audio to work in a VM

I've been going through a number of GNURadio tutorials and the waveform generator (signal sources) and display sinks have worked just fine. But then I hit a tutorial using the RTL-SDR stick as input and a flowgraph to process FM radio and an audio sink... and I get choppy audio! I started googling and most people blame the VM, but YouTube audio works just fine.

Then I stumbled across this post which contained the answer:

Ok, here are the contents of my ~/.gnuradio/config.conf:

default_input_device = default
default_output_device = default
#period_time = 0.010                      # in seconds (default)
period_time = 0.100                      # in seconds
nperiods = 4                 # total buffering = period_time * nperiods
#verbose = false
verbose = true

The actual change I made was to increase audio_alsa/period_time from
to 0.100.  Play around with it until it works on your system.  My only
guess is that perhaps the default ALSA buffer sizes are small enough
they are often consumed by ALSA before GnuRadio will fill them.


By default (at least in my Kali Linux VM) config.conf does not exist. Copy and paste the block of code to ~/gnuradio/config.conf.

For me, the above settings didn't work, but increasing period_time to 0.400 and nperiods to 16 and audio is crystal clear! Try the above settings, then mine, then something in between... hopefully this works!