Usrp2_wfm_rcv.py


#1

Hello,

-I tried to run usrp2_wfm_rcv.py to test my USRP2 with a BasicRX board
and I got the following error:
¨ ZeroDivisionError: float division ¨

My configuration is
-Ubuntu 8.04, with the latest svn (2 weeks old)-USRP2 with a BasicRX.

Please let me know how I can fix the error “/ZeroDivisionError: float
division”/

Thank you,
Catalin

Error details:

root@gdhcp78:/home/gnuradio/test/GNU1/gnuradio-examples/python/usrp2#
./usrp2_wfm_rcv.py -f 94.5M -O surround41
Using RX d’board 0x0001

gr_fir_ccf: using SSE
gr_fir_fff: using SSE
Traceback (most recent call last):
File “./usrp2_wfm_rcv.py”, line 274, in
app = stdgui2.stdapp (wfm_rx_block, “USRP2 WFM RX”)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py”,
line 36, in init
wx.App.init (self, redirect=False)
File “/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py”,
line 7836, in init
self._BootstrapApp()
File “/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py”,
line 7433, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py”,
line 39, in OnInit
frame = stdframe (self.top_block_maker, self.title, self._nstatus)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py”,
line 60, in init
self.panel = stdpanel (self, self, top_block_maker)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/stdgui2.py”,
line 81, in init
self.top_block = top_block_maker (frame, self, vbox, sys.argv)
File “./usrp2_wfm_rcv.py”, line 103, in init
self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
File “./usrp2_wfm_rcv.py”, line 186, in _build_gui
callback=self.set_gain)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/form.py”,
line 225, in init
nsteps = int((self.max-self.min)/self.step_size)
ZeroDivisionError: float division


#2

On Tue, 2008-12-09 at 18:55 -0500, Catalin Lacatus wrote:

Please let me know how I can fix the error “*/ZeroDivisionError: float
division”/*

Which daughterboard are you using? It looks like the code is getting
bad gain range values for it.

-Johnathan


#3

Hi,

For the first time I was using USRP2 with BasicRX.
Also, I did some tests for different frequencies and gains with Basic RX
and RFX2400. I got the same error

“*/ZeroDivisionError: float
division”/*

Thank you,

Catalin

.


#4

On Wed, Dec 10, 2008 at 4:02 PM, Catalin Lacatus
removed_email_address@domain.invalid wrote:

For the first time I was using USRP2 with BasicRX.
Also, I did some tests for different frequencies and gains with Basic RX and
RFX2400. I got the same error

This appears to be a bug in usrp2_wfm_rx.py, dealing with setting up
the gain slider control in the GUI. I understand why this is
happening with the BasicRX or LFRX, but not yet with the RFX2400.
I’ll look into this further soon.

-Johnathan


#5

Hi,

I just tried running the example on a RFX2400 and it seems to work for
me.

I think the error is caused when the usrp2object.gain_range() command
returns a step size of 0.00000 (like on the BasicRX).

As a quick fix you could try replacing:

    myform['gain'] = \
        form.quantized_slider_field(parent=self.panel, sizer=hbox,

label=“Gain”,
weight=3,
range=self.u.gain_range(),
callback=self.set_gain)

with:

    myform['gain'] = \
        form.quantized_slider_field(parent=self.panel, sizer=hbox,

label=“Gain”,
weight=3,
range=(0.0,70.0,0.03125)
,
callback=self.set_gain)

I couldn’t find a reference to the Flex2400 DB ID after a quick look at
the
USRP2 code which I think means the code will treat the daughterboard as
if
it was a BasicRX.

http://www.ruby-forum.com/topic/177212 suggests you can update the
EEPROM to
convert the board to an RFX2400.

Tim


#6

Hi Tim,

Thanks for pointing me in the right direction.

After some soldering and an eeprom update (
http://gnuradio.org/redmine/wiki/1/USRPClockingNotes), the example now
works
:slight_smile:

Cheers,

Mike


#7

Hi Johnathan,

Have you had any luck with this issue? The same is happening on my
FLEX2400
with USRP2.

Here is the full error message:

./usrp2_wfm_rcv.py -f 2.4G
Using RX d’board 0x0007
This daughterboard does not cover the required frequency range
for this application. Please use a BasicRX or TVRX daughterboard.
Press ENTER to continue anyway, or Ctrl-C to exit.

gr_fir_ccf: using SSE
gr_fir_fff: using SSE
Traceback (most recent call last):
File “./usrp2_wfm_rcv.py”, line 287, in
app = stdgui2.stdapp (wfm_rx_block, “USRP2 WFM RX”)
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 36, in init
wx.App.init (self, redirect=False)
File
“/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py”,
line 7935, in init
self._BootstrapApp()
File
“/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py”,
line 7509, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 39, in OnInit
frame = stdframe (self.top_block_maker, self.title, self._nstatus)
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 60, in init
self.panel = stdpanel (self, self, top_block_maker)
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 81, in init
self.top_block = top_block_maker (frame, self, vbox, sys.argv)
File “./usrp2_wfm_rcv.py”, line 116, in init
self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
File “./usrp2_wfm_rcv.py”, line 199, in _build_gui
callback=self.set_gain)
File “/usr/local/lib/python2.6/dist-packages/gnuradio/wxgui/form.py”,
line
225, in init
nsteps = int((self.max-self.min)/self.step_size)
ZeroDivisionError: float division

Cheers,

Mike

On 11 December 2008 17:05, Johnathan C.