Forum: GNU Radio usrp2_wfm_rcv.py

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Catalin Lacatus (Guest)
on 2008-12-10 01:52
(Received via mailing list)
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 <module>
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
Johnathan C. (Guest)
on 2008-12-10 08:07
(Received via mailing list)
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
Catalin Lacatus (Guest)
on 2008-12-11 02:00
(Received via mailing list)
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

.
Johnathan C. (Guest)
on 2008-12-11 19:09
(Received via mailing list)
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
Mike (Guest)
on 2010-03-06 03:20
(Received via mailing list)
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 <module>
    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.
Tim P. (Guest)
on 2010-03-06 21:17
(Received via mailing list)
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
Mike (Guest)
on 2010-03-07 14:49
(Received via mailing list)
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
:)

Cheers,

Mike
This topic is locked and can not be replied to.