HELP: USRP1+WBXv3 "Overflow"

Good day,

We are beginners using the USRP1 with WBX v.3 50-2200 daughterboard and
GNU radio Companion version 3.7.5.1 with UHD_003.008.000-18-g864f84b5
installed on Ubuntu 14.04 LTS operating system. Our goal in using these
is
to create an SDR WBFM receiver.We have followed what was done in the
video
posted by the ettus research
(http://www.ettus.com/kb/detail/sdr-for-beginners-building-an-fm-receiver-with-the-usrp-and-gnu-radio
http://www.ettus.com/kb/detail/sdr-for-beginners-building-an-fm-receiver-with-the-usrp-and-gnu-radio)
but have encountered some problems. As we ran the GRC file, both the FFT
plot and Scope plot appeared but all we could hear are static sounds
together with the script shown below:

Executing: “/media/thesis/Data/Downloads/Thesis/FM Reciever using
GRC/fm_example.py”

linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.000-18-g864f84b5

Using Volk machine: sse4_1_64_orc
– Opening a USRP1 device…
– Using FPGA clock rate of 64.000000MHz…

UHD Warning:
The hardware does not support the requested RX sample rate:
Target sample rate: 5.000000 MSps
Actual sample rate: 5.333333 MSps
– Tune Request: 88.100000 MHz
– The RF LO does not support the requested frequency:
– Requested LO Frequency: 88.100000 MHz
– RF LO Result: 88.099634 MHz
– Attempted to use the DSP to reach the requested frequency:
– Desired DSP Frequency: -0.000366 MHz
– DSP Result: -0.000366 MHz
– Successfully tuned to 88.100000 MHz

INFO: Audio sink arch: alsa
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

Done

As we are doing all the simulations, we did not use any antenna yet.
However, we are waiting for the arrival of the antenna LP0410 400 MHz to
1
GHz Log Periodic PCB directional antenna, at 5-6dBi Gain. We have
purchased
this antenna for it is capable to receive signals from 88.1MHz to
107.9MHz
(frequency range of all the FM stations that we are about to receive).

-SKA15-

On 12/16/2014 12:24 AM, Thesis 2015 wrote:

(http://www.ettus.com/kb/detail/sdr-for-beginners-building-an-fm-receiver-with-the-usrp-and-gnu-radio)

– Opening a USRP1 device…
– Attempted to use the DSP to reach the requested frequency:
However, we are waiting for the arrival of the antenna LP0410 400 MHz
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
The example is designed for an N200/N210, for which a 5Msps sample-rate
is legal.

On the USRP1, the master-clock is at 64MHz, so you can’t produce 5Msps
from that, since that isn’t an integer fraction of the master-clock
rate.

Re-jig the graph to use 4Msps as the input sample-rate. Pay attention
to parts of the graph where it interpolates or re-samples, and make
certain
that re-sampling will still work with a 4Msps sample-rate.

An antenna made for 400-1000 MHz is not exactly the right thing to
receive 88-108 MHz :slight_smile: Just use a piece of wire, length about 75cm, this
should be enough for first tests.

Ralph.

From: [email protected]lid
[mailto:[email protected]lid] On Behalf Of
Thesis 2015
Sent: Tuesday, December 16, 2014 6:24 AM
To: [email protected]
Subject: [Discuss-gnuradio] HELP: USRP1+WBXv3 “Overflow”

Good day,

We are beginners using the USRP1 with WBX v.3 50-2200 daughterboard and
GNU radio Companion version 3.7.5.1 with UHD_003.008.000-18-g864f84b5
installed on Ubuntu 14.04 LTS operating system. Our goal in using these
is to create an SDR WBFM receiver.

We have followed what was done in the video posted by the ettus research
(http://www.ettus.com/kb/detail/sdr-for-beginners-building-an-fm-receiver-with-the-usrp-and-gnu-radio)
but have encountered some problems. As we ran the GRC file, both the FFT
plot and Scope plot appeared but all we could hear are static sounds
together with the script shown below:

Executing: “/media/thesis/Data/Downloads/Thesis/FM Reciever using
GRC/fm_example.py”

linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.000-18-g864f84b5

Using Volk machine: sse4_1_64_orc

– Opening a USRP1 device…

– Using FPGA clock rate of 64.000000MHz…

UHD Warning:

The hardware does not support the requested RX sample rate:

Target sample rate: 5.000000 MSps

Actual sample rate: 5.333333 MSps

– Tune Request: 88.100000 MHz

– The RF LO does not support the requested frequency:

– Requested LO Frequency: 88.100000 MHz

– RF LO Result: 88.099634 MHz

– Attempted to use the DSP to reach the requested frequency:

– Desired DSP Frequency: -0.000366 MHz

– DSP Result: -0.000366 MHz

– Successfully tuned to 88.100000 MHz

INFO: Audio sink arch: alsa

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

Done

As we are doing all the simulations, we did not use any antenna yet.
However, we are waiting for the arrival of the antenna LP0410 400 MHz to
1 GHz Log Periodic PCB directional antenna, at 5-6dBi Gain. We have
purchased this antenna for it is capable to receive signals from 88.1MHz
to 107.9MHz (frequency range of all the FM stations that we are about to
receive).

-SKA15-

We’re sorry. We made a mistake with the frequency range that the antenna
could receive. It is actually 40MHz - 1.2GHz.

-SKA15-

I’m afraid you did not make a mistake – the LP0410 [1] is specified for
usage between 400 and 1200 MHz. Whilst it will still pick up some signal
at frequencies below 400MHz, operating it at a quarter of the lower
cutoff freq. will lead to very suboptimal results.

If you know your frequency range as well as you do, I recommend trying
Ralph’s proposed 1/2 wavelength monopole antenna.

Greetings,
Marcus

[1]http://www.ettus.com/product/details/LP0410

Considering the saturation level of most commercial FM stations, using a
simple whip antenna will prove more than adequate. While a wide-range
log-periodic antenna might prove useful as you get farther into your
research, especially for broadband signals requiring a directional
antenna,
using simpler tools while learning is usually beneficial.

gerry

On Wed, Dec 17, 2014 at 4:06 AM, Marcus Müller
[email protected]
wrote:

Discuss-gnuradio mailing
[email protected]://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Gerry Creager
NSSL/CIMMS
405.325.6371
++++++++++++++++++++++
“Big whorls have little whorls,
That feed on their velocity;
And little whorls have lesser whorls,
And so on to viscosity.”
Lewis Fry Richardson (1881-1953)

Hello SKA15,

well, I’m pretty sure there is some way to do this in GRC; but honestly,
this sounds like something that would be very little lines of code in
python; I recommend going through the guided tutorials [1] in order to
understand how to write a python block that will emit the right stream
tags at the right time.

Greetings,
Marcus

[1] http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials

Good Day,

We are able to receive FM signals using the USRP1 with WBXv3 50-2200
having
a 750cm solid wire that serves as an antenna. We were wondering how to
modify the generated GRC python code. We are planning on changing the
center frequency automatically with an interval of 200MHz in a specified
time. Thank you.

-SKA15-

On Thu, Dec 18, 2014 at 12:19 AM, Gerry Creager - NOAA Affiliate <

Hello SKA15,

I don’t understand what you refer to, sorry.
Anyway, what I can tell is that this is something that most probably
gets easier by actually trying, so go ahead and implement it. I think
I’ve given you some inspiration in the form of using stream tags with
your device block. From your mail address I’d guess that you’re writing
a thesis – that would be something that will lead to experience and
documentable progress.

Greetings,
Marcus

Good day.
Would it be fine if we placed a while or for loop statement under the
variables section so that it would increment by 200kHz and would change
to
different frequencies within the FM spectrum.
If you have any other ideas that could help us, it would be greatly
appreciated.

-SKA15-

On Sun, Dec 28, 2014 at 10:13 PM, Thesis 2015 [email protected]
wrote:

Good day.
Would it be fine if we placed a while or for loop statement under the
variables section so that it would increment by 200kHz and would change to
different frequencies within the FM spectrum.
If you have any other ideas that could help us, it would be greatly
appreciated.

-SKA15-

As Marcus said, feel free to play with these things to figure it out.
But
one hint you’ll probably need is that any changes to the flowgraph need
to
happen after the top_block has already started. So look for the tb.run()
or
tb.start(). If using tb.run() this is a blocking call that you’ll need
to
change:

tb.start()

tb.stop()
tb.wait()

Something like that.

Tom

Hi Thesis,

first of all: be sure to actually copy and paste the code you’re using;
what you’ve pasted can’t run, since python is case sensitive and start()
and wait() are written in lower letters.

I don’t understand what you mean with “close the scope”; can you
elaborate?

Greetings,
Marcus

Hello everyone!
We have been able to modify the python file to allow the receiver to
jump
from one frequency to another. We have modified it to be able to receive
signals from local FM stations and jump from one frequency to another
using
the python file attached.
(Note:we modified it at the end part using:
tb1 = fm_example()
tb1.Start(True)
tb1.Wait()
freq = freq+200e3

We have also tried to increment it by 200kHZ for all frequencies using
just
the same code.We tried it up to tb70 and there is a certain point(after
tb33, i believe) where it says the following error.(please see attached
image)

We would like to ask the following questions:
1.From what I understand, tb.Wait is used for waiting for the flowgraph
to
finish.
WIth the code we used, we close the scope then it runs again with an
incremented frequency.
Do you have any suggestions as to what code we can use to
automatically
close the
scope so it jumps to another frequency after a certain amount of
seconds(lets say 10 seconds)?
2.What causes the error in the second similar code(pls see attached
image)?
Thank you very much and have a good day.

Hi Thesis,

first of all: be sure to actually copy and paste the code you’re using;
what you’ve pasted can’t run, since python is case sensitive and start()
and wait() are written in lower letters.

I don’t understand what you mean with “close the scope”; can you
elaborate?

Greetings,
Marcus

Hello.Sorry about that.Here is the generated code with a few of our
modifications at the end.


#!/usr/bin/env python
##################################################

Gnuradio Python Flow Graph

Title: Fm Example

Generated: Tue Jan 6 10:37:52 2015

##################################################

from gnuradio import analog
from gnuradio import audio
from gnuradio import eng_notation
from gnuradio import filter
from gnuradio import gr
from gnuradio import uhd
from gnuradio import wxgui
from gnuradio.eng_option import eng_option
from gnuradio.fft import window
from gnuradio.filter import firdes
from gnuradio.wxgui import fftsink2
from gnuradio.wxgui import forms
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import time
import wx

class fm_example(grc_wxgui.top_block_gui):

def __init__(self):

    grc_wxgui.top_block_gui.__init__(self, title="Fm Example")
    _icon_path = 

“/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png”
self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))

    ##################################################
    # Variables
    ##################################################
    self.samp_rate = samp_rate = 4e6
    #self.freq = freq = 88.1e6
self.freq = freq
    ##################################################
    # Blocks
    ##################################################
    self.notebook_0 = self.notebook_0 = wx.Notebook(self.GetWin(),

style=wx.NB_LEFT)
self.notebook_0.AddPage(grc_wxgui.Panel(self.notebook_0), “RF
Spectrum”)
self.notebook_0.AddPage(grc_wxgui.Panel(self.notebook_0), “Demod
Spectrum”)
self.Add(self.notebook_0)
self._freq_text_box = forms.text_box(
parent=self.GetWin(),
value=self.freq,
callback=self.set_freq,
label=‘freq’,
converter=forms.float_converter(),
)
self.Add(self._freq_text_box)
self.wxgui_fftsink2_1 = fftsink2.fft_sink_f(
self.notebook_0.GetPage(1).GetWin(),
baseband_freq=0,
y_per_div=10,
y_divs=10,
ref_level=0,
ref_scale=2.0,
sample_rate=600e3,
fft_size=1024,
fft_rate=15,
average=False,
avg_alpha=None,
title=“FFT Plot”,
peak_hold=False,
win=window.rectangular,
)
self.notebook_0.GetPage(1).Add(self.wxgui_fftsink2_1.win)
self.wxgui_fftsink2_0 = fftsink2.fft_sink_c(
self.notebook_0.GetPage(0).GetWin(),
baseband_freq=freq,
y_per_div=10,
y_divs=10,
ref_level=0,
ref_scale=2.0,
sample_rate=samp_rate,
fft_size=1024,
fft_rate=15,
average=False,
avg_alpha=None,
title=“FFT Plot”,
peak_hold=False,
)
self.notebook_0.GetPage(0).Add(self.wxgui_fftsink2_0.win)
self.uhd_usrp_source_0 = uhd.usrp_source(
“,”.join((“serial=2R2CU0U1”, “”)),
uhd.stream_args(
cpu_format=“fc32”,
channels=range(1),
),
)
self.uhd_usrp_source_0.set_subdev_spec(“A:0”, 0)
self.uhd_usrp_source_0.set_samp_rate(samp_rate)
self.uhd_usrp_source_0.set_center_freq(freq, 0)
self.uhd_usrp_source_0.set_gain(15, 0)
self.uhd_usrp_source_0.set_antenna(“RX2”, 0)
self.rational_resampler_xxx_0 = filter.rational_resampler_fff(
interpolation=240,
decimation=48,
taps=None,
fractional_bw=None,
)
self.low_pass_filter_0 = filter.fir_filter_ccf(20,
firdes.low_pass(
1, samp_rate, 100e3, 10e3, firdes.WIN_HANN, 6.76))
self.audio_sink_0 = audio.sink(48000, “”, False)
self.analog_wfm_rcv_0 = analog.wfm_rcv(
quad_rate=600e3,
audio_decimation=20,
)

    ##################################################
    # Connections
    ##################################################
    self.connect((self.uhd_usrp_source_0, 0), 

(self.wxgui_fftsink2_0,
0))
self.connect((self.uhd_usrp_source_0, 0),
(self.low_pass_filter_0,
0))
self.connect((self.analog_wfm_rcv_0, 0), (self.wxgui_fftsink2_1,
0))
self.connect((self.low_pass_filter_0, 0),
(self.analog_wfm_rcv_0,
0))
self.connect((self.rational_resampler_xxx_0, 0),
(self.audio_sink_0, 0))
self.connect((self.analog_wfm_rcv_0, 0),
(self.rational_resampler_xxx_0, 0))

def get_samp_rate(self):
    return self.samp_rate

def set_samp_rate(self, samp_rate):
    self.samp_rate = samp_rate
    self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate)
    self.uhd_usrp_source_0.set_samp_rate(self.samp_rate)
    self.low_pass_filter_0.set_taps(firdes.low_pass(1, 

self.samp_rate,
100e3, 10e3, firdes.WIN_HANN, 6.76))

def get_freq(self):
    return self.freq

def set_freq(self, freq):
    self.freq = freq
    self.wxgui_fftsink2_0.set_baseband_freq(self.freq)
    self.uhd_usrp_source_0.set_center_freq(self.freq, 0)
    self._freq_text_box.set_value(self.freq)

if name == ‘main’:
import ctypes
import sys
if sys.platform.startswith(‘linux’):
try:
x11 = ctypes.cdll.LoadLibrary(‘libX11.so’)
x11.XInitThreads()
except:
print “Warning: failed to XInitThreads()”
parser = OptionParser(option_class=eng_option, usage="%prog:
[options]")
(options, args) = parser.parse_args()
freq = 88.1e6

tb1 = fm_example()
tb1.Start(True)
tb1.Wait()
freq = freq+200e3

tb2 = fm_example()
tb2.Start(True)
tb2.Wait()
freq = freq+200e3

tb3 = fm_example()
tb3.Start(True)
tb3.Wait()
freq = freq+200e3

tb4 = fm_example()
tb4.Start(True)
tb4.Wait()
freq = freq+200e3

tb5 = fm_example()
tb5.Start(True)
tb5.Wait()
freq = freq+200e3

Actually,we didn’t type Start and Wait in lowercase letters since when
we
generated the code,
the first letters were already capitalized.
Also, our code was supposed to be up to tb50(I didn’t paste it all since
they were just the same lines of code).
But when tb33 runs, an error occurs (please see attached image )
Is there a limit to the number of "tb"s ?
We would also like to apologize for our mistake.What we meant by
“closing
the scope” was closing the output display, after running our modified
code
so that the next “tb” could run. Do you guys have any suggestions as to
how
to close the display
automatically(for a few seconds,if possible) so that the next “tb” with
an
incremented freq could run?

Thank you very much for your time & help and have a good day.

-SKA15-

On Thu, Feb 5, 2015 at 6:55 PM, Marcus Müller [email protected]