Forum: GNU Radio GRC question

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.
0da1162a377fa79bbdf917ae298e3aa1?d=identicon&s=25 Scott Bierly (Guest)
on 2009-01-25 06:59
(Received via mailing list)
Attachment: Scott_Dual_FFT_RFX900_test.grc (7 KB)
Attachment: Scott_Dual_FFT_RFX900.py (2 KB)
Has anyone successfully used GRC with  USRP Dual Source and/or USRP Dual
Sink blocks?  The attached .grc file and .py file are my simple test
case,
which bombs like this:

Generating:
"/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py"

Executing: "/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py"

Traceback (most recent call last):
  File "/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py",
line
72, in <module>
    tb = Scott_Dual_FFT_RFX900()
  File "/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py",
line
45, in __init__
    tx_enb_b=True,
  File
"/usr/local/lib/python2.5/site-packages/grc_gnuradio/usrp/simple_usrp.py",
line 360, in __init__
    gr.io_signature(2, 2, constructor_to_size[self.constructor[0]]),
TypeError: 'instancemethod' object is unsubscriptable


I added the Sink to see what would happen, but originally only had the
USRP
Dual Source as a simple diagnostic test, and that bombed this way:

Generating:
"/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py"

Executing: "/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py"

Traceback (most recent call last):
  File "/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py",
line
56, in <module>
    tb = Scott_Dual_FFT_RFX900()
  File "/home/scott/src/gnuradio/scott-grc/Scott_Dual_FFT_RFX900.py",
line
43, in __init__
    rx_ant_b="RX2",
  File
"/usr/local/lib/python2.5/site-packages/grc_gnuradio/usrp/simple_usrp.py",
line 320, in __init__
    gr.io_signature(2, 2, constructor_to_size[self.constructor[0]]),
TypeError: 'instancemethod' object is unsubscriptable

>>> Done


I'm having a hard time figuring out from this what I might have done
wrong.
I will confess I don't understand how to setup the mux yet, but that
does
not appear to be related to this problem.

I'm running off the subversion gnuradio build 10260, which contains GRC
version 3.1SVN.

Thanks for any help.
--Scott
4252201ac30d6dd44d8090ce1070e35f?d=identicon&s=25 Josh Blum (Guest)
on 2009-01-25 07:53
(Received via mailing list)
Funny, I was working on exactly this. The usrp dual source is
underutilized, and Im giving the grc/usrp api an overhaul. It will be
tested and checked in on monday.

The bug you are getting now is due to me forgetting to 100% fix
something after the daughter board c++ switcheroo. So for now, in
grc/src/grc_gnuradio/usrp/simple_usrp.py... look for

constructor = usrp.source_c

and replace it with

constructor = (usrp.source_c, )

sudo make install
0da1162a377fa79bbdf917ae298e3aa1?d=identicon&s=25 Scott Bierly (Guest)
on 2009-01-25 21:09
(Received via mailing list)
Attachment: simple_usrp.py (10 KB)
Thanks Josh!  That did the trick.  I actually had to change a sink too,
I've
attached the file for reference, and here's the diff:

scott@lab-linux-2:~/src/gnuradio/grc/src/grc_gnuradio/usrp$ diff
simple_usrp.py simple_usrp.py.save
336,337c336,337
< class dual_source_c(_dual_source): constructor = (usrp.source_c, )
< class dual_source_s(_dual_source): constructor = (usrp.source_s, )
---
> class dual_source_c(_dual_source): constructor = usrp.source_c
> class dual_source_s(_dual_source): constructor = usrp.source_s
377,378c377,378
< class dual_sink_c(_dual_sink): constructor = (usrp.sink_c, )
< class dual_sink_s(_dual_sink): constructor = (usrp.sink_s, )
---
> class dual_sink_c(_dual_sink): constructor = usrp.sink_c
> class dual_sink_s(_dual_sink): constructor = usrp.sink_s

I can build dual grc flowgraphs fine now.  As soon as I decipher how to
setup the RX/TX muxes, I'll be in business!  The zero setting for "auto"
does not seem to choose well for these dual cases.  I've discovered that
0x32103210 allows me to build a dual Spectrum analyzer using a pair of
RFX900's, although I don't know why that setting works.  I can't get a
dual
Siggen to work yet, but I'll keep hacking....

--Scott

PS:  GRC is really awesome
4252201ac30d6dd44d8090ce1070e35f?d=identicon&s=25 Josh Blum (Guest)
on 2009-01-25 22:13
(Received via mailing list)
This may help you with the muxes: see the comments for the TX and RX mux

http://www.gnuradio.org/trac/browser/gnuradio/trun...

Soon, there will be better configuration options and you will not have
to deal with muxes!

-Josh
This topic is locked and can not be replied to.