Moon Bounce Experiment

Hello All,

I’m working on a receiver to detect an 8 MHz signal being bounced off
the moon. We have constructed a dipole array and the RF receivers are
complete. I just purchased a USRP kit for data acquisition. The goal
is to stream downconverted I/Q time-series with ~ 1 MHz bandwidth over
the USB to a linux box.

I’ve looked through the wiki and I’m going to start installation of
gnuradio on Ubuntu 9.04

What examples should I start running first to make sure I’ve installed
correctly?

Great group, I’m really excited to start working with gnuradio.

Thanks,
Joe Craig

I have managed to install gnuradio and run usrp_fft.py with success!

Now for the questions…

  1. I’m always seeing… "Exception RuntimeError: ‘maximum recursion
    depth exceeded while calling a Python object’ in <type
    ‘exception.AttributeError’> ignored ". What does this mean, and how to
    fix it?
  2. How do I save the I/Q stream to disk? I’m interested in the maximum
    bit resolution for the best dynamic range. I just want the raw time
    samples.
  3. Some of the examples (like usrp_wfm_rcv.py) spit out
    “…aUaUaUaUaU…” to the console and the sound is choppy. What does
    this mean, and is there a way to turn it off?
  4. Is it possible to tweak parameters such as quadrature downconverter
    bandwidth/decimation, etc?

thanks,
Joe Craig

Hi Marcus,

Thanks for the quick reply…

On Oct 20, 2010, at 5:51 PM, Marcus D. Leech wrote:

On 10/20/2010 07:13 PM, Joseph Craig wrote:

I have managed to install gnuradio and run usrp_fft.py with success!

Now for the questions…

  1. I’m always seeing… "Exception RuntimeError: ‘maximum recursion depth
    exceeded while calling a Python object’ in <type ‘exception.AttributeError’>
    ignored ". What does this mean, and how to fix it?

In what application are you seeing this error?

python

  1. How do I save the I/Q stream to disk? I’m interested in the maximum bit
    resolution for the best dynamic range. I just want the raw time samples.

You should investigate gnuradio-companion (GRC), which allows you to put
a signal processing
graph together graphically–like LEGO building blocks. You can very
easily put together a
“baseband recorder” application in about 5 minutes this way.

5 minutes is pretty enticing seeing how this has to be working friday.
How long does it take to setup GRC? Is there a guide?

  1. Some of the examples (like usrp_wfm_rcv.py) spit out “…aUaUaUaUaU…” to
    the console and the sound is choppy. What does this mean, and is there a way to
    turn it off?

It means that you’re experiencing a audio underrun, likely because your
processing chain
can’t “keep up”. Perhaps because you haven’t specified a high enough
decimation, and
the chain is trying to keep up with a unpleasantly-large torrent of data.

ah, yes. should have thought of this. I will check out increasing the
decimation.

you’d use a
“-d” option to the examples (like usrp_fft.py) of “-d 64”, which will
give you 1Msps of
complex samples between the USRP and the host–because the A/D in the
USRP is
64Msps. For the USRP2, the A/D operates at 100Msps, so you’d need to
adjust your
decimation appropriately.

Got it!

You should keep in mind that except for trivial algorithms at modest
bandwidths, you’ll need
a fairly-decent computer to get the best results from your Gnu Radio
experiments. Although
I think you mentioned that at first you only want to record baseband
data to disk at 1Msps,
I’m guessing you’ll want to go beyond that at some point.

it’s a year old linux box we were using for fairly high bandwidth
recording from ethernet, so it should be ok.

Joe

On 10/20/2010 07:13 PM, Joseph Craig wrote:

I have managed to install gnuradio and run usrp_fft.py with success!

Now for the questions…

  1. I’m always seeing… "Exception RuntimeError: ‘maximum recursion depth
    exceeded while calling a Python object’ in <type ‘exception.AttributeError’>
    ignored ". What does this mean, and how to fix it?

In what application are you seeing this error?

  1. How do I save the I/Q stream to disk? I’m interested in the maximum bit
    resolution for the best dynamic range. I just want the raw time samples.

You should investigate gnuradio-companion (GRC), which allows you to put
a signal processing
graph together graphically–like LEGO building blocks. You can very
easily put together a
“baseband recorder” application in about 5 minutes this way.

  1. Some of the examples (like usrp_wfm_rcv.py) spit out “…aUaUaUaUaU…” to
    the console and the sound is choppy. What does this mean, and is there a way to
    turn it off?

It means that you’re experiencing a audio underrun, likely because your
processing chain
can’t “keep up”. Perhaps because you haven’t specified a high enough
decimation, and
the chain is trying to keep up with a unpleasantly-large torrent of
data.

  1. Is it possible to tweak parameters such as quadrature downconverter
    bandwidth/decimation, etc?

thanks,
Joe Craig

Yes, absolutely. Most of the example programs take a “-d” option that
controls decimation
in the USRP hardware. For example, if you only wanted 1MHz bandwidth,
you’d use a
“-d” option to the examples (like usrp_fft.py) of “-d 64”, which will
give you 1Msps of
complex samples between the USRP and the host–because the A/D in the
USRP is
64Msps. For the USRP2, the A/D operates at 100Msps, so you’d need to
adjust your
decimation appropriately.

You should keep in mind that except for trivial algorithms at modest
bandwidths, you’ll need
a fairly-decent computer to get the best results from your Gnu Radio
experiments. Although
I think you mentioned that at first you only want to record baseband
data to disk at 1Msps,
I’m guessing you’ll want to go beyond that at some point.

I’d explore gnuradio-companion as well.

Good luck!


Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Wed, 2010-10-20 at 18:49 -0600, Joseph Craig wrote:

Now for the questions…

  1. I’m always seeing… "Exception RuntimeError: ‘maximum recursion depth
    exceeded while calling a Python object’ in <type ‘exception.AttributeError’>
    ignored ". What does this mean, and how to fix it?

In what application are you seeing this error?

python

I think Marcus is asking which Python application you are seeing the
exception in. Is it in usrp_fft.py?

5 minutes is pretty enticing seeing how this has to be working friday. How long
does it take to setup GRC? Is there a guide?

You can also use usrp_rx_cfile.py to save the raw complex stream to
disk. The help info for that file is pretty self-explanatory. However,
GRC is very very useful for putting together flowgraphs quickly. Follow
the Gnuradio build guide to get GRC built.

  1. Some of the examples (like usrp_wfm_rcv.py) spit out “…aUaUaUaUaU…”
    to the console and the sound is choppy. What does this mean, and is there a way
    to turn it off?

It means that you’re experiencing a audio underrun, likely because your
processing chain
can’t “keep up”. Perhaps because you haven’t specified a high enough
decimation, and
the chain is trying to keep up with a unpleasantly-large torrent of data.

ah, yes. should have thought of this. I will check out increasing the
decimation.

You might also have the infamous “two-clocks” problem, which I won’t
explain in detail here. But basically the soundcard clock might not be
exactly what it says it is, and if it’s off enough from what the
flowgraph assumes it is, you will drop samples or underrun depending on
which way the error lies. We really need a better sound driver in GR and
if I ever see free time again I’ll be working on it.

Nick

On 10/20/2010 08:49 PM, Joseph Craig wrote:

I have managed to install gnuradio and run usrp_fft.py with success!

I should perhaps have clarified. Which application, written, obviously,
in Python, was producing this error for you?

5 minutes is pretty enticing seeing how this has to be working friday. How long
does it take to setup GRC? Is there a guide?

If built/installed Gnu Radio, you already have GRC/GnuRadioCompanion:

gnuradio-companion

At the prompt in a terminal window should bring up a GRC instance.

All you should need is a usrp-source block, and a file-sink block.

The usrp-source block takes parameters like decimation,
center-frequency, gain.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 10/20/2010 08:57 PM, Nick F. wrote:

You can also use usrp_rx_cfile.py to save the raw complex stream to
disk. The help info for that file is pretty self-explanatory. However,
GRC is very very useful for putting together flowgraphs quickly. Follow
the Gnuradio build guide to get GRC built.

Forgot about usrp_rx_cfile.py doh!


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Oct 20, 2010, at 7:07 PM, Eric B. wrote:

tarball? If so, which one?
git? If so, which branch?

I’ve install gnuradio from Synaptic Package Manager. Looks like 3.0.4

I see this error when every gnuradio python application is run.

thanks,
Joe Craig

On Oct 20, 2010, at 6:58 PM, Marcus D. Leech wrote:

graph together graphically–like LEGO building blocks. You can very
At the prompt in a terminal window should bring up a GRC instance.

nope, command not found. I thought it was because I installed gnuradio
with synaptic, so I installed gnuradio-companion via apt-get, still
nothing. where should the program files appear?

All you should need is a usrp-source block, and a file-sink block.

sounds like simulink. should be easy.

Joe

On Wed, Oct 20, 2010 at 06:49:21PM -0600, Joseph Craig wrote:

Now for the questions…

  1. I’m always seeing… "Exception RuntimeError: ‘maximum recursion depth
    exceeded while calling a Python object’ in <type ‘exception.AttributeError’>
    ignored ". What does this mean, and how to fix it?

In what application are you seeing this error?

python

Which version of GNU Radio are you using?

tarball? If so, which one?
git? If so, which branch?

Eric

On 10/21/2010 01:02 AM, Joseph Craig wrote:

On Oct 20, 2010, at 5:51 PM, Marcus D. Leech wrote:

My recollection is that there was a compatibility issue between older
Gnu Radio code, and
the Python2.6 that’s in Ubuntu 9.X and more recent.

Really, you’ll have much better joy if you install from GIT source,
following the directions found
here:

http://gnuradio.org/redmine/wiki/gnuradio/BuildGuide

You’ll have to uninstall the version that Synaptic installed.

Gnu radio is still very much a rapidly-evolving beast, which means that
installing from GIT source
is really a good way to go. The packagers for various Linux
distributions can’t possibly “keep up”
with the codebase.


Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Oct 20, 2010, at 11:19 PM, Marcus D. Leech wrote:

I’ve install gnuradio from Synaptic Package Manager. Looks like 3.0.4

You’ll have to uninstall the version that Synaptic installed.

Gnu radio is still very much a rapidly-evolving beast, which means that
installing from GIT source
is really a good way to go. The packagers for various Linux
distributions can’t possibly “keep up”
with the codebase.

Ok, I’ve been reinstalling with GIT distro for some time now. I’m
almost there. I’m on Ubuntu 8.04 and I seem to have all the packages,
the only things left are:

gcell
gr-gcell
gr-audio-jack
gr-audio-osx
gr-audio-portaudio
gr-audio-windows
gr-comedi
gr-video-sdl
gr-qtgui

When I run usrp_fft.py …

File “usrp_fft.py”, line 24, in
from gnuradio import usrp
File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/init.py”,
line 25, in

File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”,
line 6, in
ImportError: No module named _usrp_swig

thanks for the help.
Joe

On 10/22/2010 12:17 AM, Joseph Craig wrote:

gr-video-sdl
gr-qtgui

You don’t need any of the above for basic functionality.

Joe

Have you set your PYTHONPATH variable to point to
/usr/lib/python2.6/dist-packages ?


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Oct 21, 2010, at 10:29 PM, Marcus D. Leech wrote:

gr-comedi
File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/init.py”, line 25, in

File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”, line 6, in

ImportError: No module named _usrp_swig

thanks for the help.
Joe

Have you set your PYTHONPATH variable to point to
/usr/lib/python2.6/dist-packages ?

It is…

for line in sys.path: print line

/usr/lib/python2.6
/usr/lib/python2.6/plat-linux2
/usr/lib/python2.6/lib-tk
/usr/lib/python2.6/lib-old
/usr/lib/python2.6/lib-dynload
/usr/lib/python2.6/dist-packages
/usr/lib/python2.6/dist-packages/Numeric
/usr/lib/python2.6/dist-packages/PIL
/usr/lib/python2.6/dist-packages/gst-0.10
/var/lib/python-support/python2.6
/usr/lib/python2.6/dist-packages/gtk-2.0
/var/lib/python-support/python2.6/gtk-2.0
/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode
/usr/local/lib/python2.6/dist-packages

On Oct 22, 2010, at 12:03 AM, Josh B. wrote:

the python path is fine, its finding usrp_swig.py, but failing to import the
_usrp_swig.so library. Try running sudo ldconfig.

That did not help, any other ideas?

Joe

When I run usrp_fft.py …

File “usrp_fft.py”, line 24, in
from gnuradio import usrp
File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/init.py”, line 25,
in

File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”, line 6,
in

ImportError: No module named _usrp_swig

the python path is fine, its finding usrp_swig.py, but failing to import
the _usrp_swig.so library. Try running sudo ldconfig.

-josh

On Oct 22, 2010, at 7:54 AM, Josh B. wrote:

File “usrp_fft.py”, line 24, in

Maybe its really missing the file. In any case, I think your install is borked.
I would remove any traces of gnuradio on your system and follow the BulidGuide for
your particular version of ubuntu:
http://gnuradio.org/redmine/wiki/gnuradio/BuildGuide

I’m trying that. Will “sudo make uninstall” completely remove the
installation?

thanks,
Joe

On 10/21/2010 11:08 PM, Joseph Craig wrote:

File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”, line
6, in
ImportError: No module named _usrp_swig

the python path is fine, its finding usrp_swig.py, but failing to import the
_usrp_swig.so library. Try running sudo ldconfig.

That did not help, any other ideas?

Maybe its really missing the file. In any case, I think your install is
borked. I would remove any traces of gnuradio on your system and follow
the BulidGuide for your particular version of ubuntu:
http://gnuradio.org/redmine/wiki/gnuradio/BuildGuide

-josh

On Oct 22, 2010, at 7:54 AM, Josh B. wrote:

File “usrp_fft.py”, line 24, in

Maybe its really missing the file. In any case, I think your install is borked.
I would remove any traces of gnuradio on your system and follow the BulidGuide for
your particular version of ubuntu:
http://gnuradio.org/redmine/wiki/gnuradio/BuildGuide

I think I found a dependency problem with libsdl if this clues you into
anything.

I originally installed gnuradio with synaptic and everything worked, but
I can’t even get that installed again, it complains about trying to
overwrite usr/lib/libusrp.la which is also in package libusrp0-dev

thanks for your help on this. I would really like to just get back to
the synaptic install and capture a long file with usrp_rx_cfile.py

sudo apt-get install libsdl1.2-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run `apt-get -f install’ to correct these:
The following packages have unmet dependencies:
libgnuradio-usrp: Depends: libusrp (= 3.2.2-1) but it is not going to
be installed
libsdl1.2-dev: Depends: libx11-dev but it is not going to be installed
Depends: libglu1-mesa-dev but it is not going to be
installed
Recommends: libxt-dev but it is not going to be
installed
Recommends: libxext-dev but it is not going to be
installed
Recommends: libaa1-dev but it is not going to be
installed
Recommends: libesd0-dev but it is not going to be
installed
Recommends: libdirectfb-dev (>= 0.9.22) but it is not
going to be installed
Recommends: libcaca-dev but it is not going to be
installed
python-gnuradio-usrp: Depends: libusrp but it is not going to be
installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or
specify a solution).

Joe