discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Receiving on both sub devices at the same time (L


From: Einar Thorsrud
Subject: Re: [Discuss-gnuradio] Receiving on both sub devices at the same time (LFRX)
Date: Mon, 16 Feb 2009 20:54:29 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Josh Blum wrote:
Can you post the python code that GRC generated for the flow graph?

The python code is attached to this e-mail. Is it possible to see the problem from the python file?

side_b is a keyword argument in __init__, I am afraid that you may have
multiple versions of gnuradio installed.... What version of gnuradio are
you running?

I did try to look around (and use "locate") without finding several parallel versions of GNU Radio installed. I went on deleting all GNU Radio related in "/Library/Python/2.5/site-packages/" and "/usr/local/share/" before reinstalling from the latest SVN revision (10443).

I am not able to test with the USRP again until to morrow, so I can not confirm whether or not this made any difference, but I did not see anything that to me indicated several versions (I may be wrong).

also see:
http://gnuradio.org/trac/browser/gnuradio/trunk/grc/src/grc_gnuradio/usrp

You have to do something like, create one usrp source, create 2
subdevices, and deinterleave the usrp stream into 2 streams. See the
link posted above to get an idea.

I have read some of the files in the above URL, and will give doing it manually a try to morrow if the problem with the dual-sink persists. However I suspect that the dual source will be preferable if possible, as it will be more readable and easy to implement.

- Einar
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: untitled
# Author: unknown
# Description: gnuradio flow graph
# Generated: Mon Feb 16 19:59:41 2009
##################################################

from gnuradio import gr
from grc_gnuradio import usrp as grc_usrp
from grc_gnuradio import wxgui as grc_wxgui
import wx

class top_block(grc_wxgui.top_block_gui):

        def __init__(self):
                grc_wxgui.top_block_gui.__init__(
                        self,
                        title="GRC - Executing: untitled",
                )

                ##################################################
                # Variables
                ##################################################
                self.samp_rate = samp_rate = 32000

                ##################################################
                # Blocks
                ##################################################
                self.gr_complex_to_real_0 = gr.complex_to_real(1)
                self.gr_complex_to_real_1 = gr.complex_to_real(1)
                self.gr_float_to_complex_0 = gr.float_to_complex()
                self.gr_vector_sink_x_0 = gr.vector_sink_c()
                self.usrp_dual_source_x_0 = grc_usrp.dual_source_c(which=0, 
side_a='A', rx_ant_a='RXA', side_b='A', rx_ant_b='RXB')
                self.usrp_dual_source_x_0.set_decim_rate(64)
                self.usrp_dual_source_x_0.set_frequency_a(0, verbose=True)
                self.usrp_dual_source_x_0.set_frequency_b(0, verbose=True)
                self.usrp_dual_source_x_0.set_gain_a(1)
                self.usrp_dual_source_x_0.set_gain_b(1)

                ##################################################
                # Connections
                ##################################################
                self.connect((self.usrp_dual_source_x_0, 0), 
(self.gr_complex_to_real_0, 0))
                self.connect((self.gr_complex_to_real_0, 0), 
(self.gr_float_to_complex_0, 0))
                self.connect((self.usrp_dual_source_x_0, 1), 
(self.gr_complex_to_real_1, 0))
                self.connect((self.gr_complex_to_real_1, 0), 
(self.gr_float_to_complex_0, 1))
                self.connect((self.gr_float_to_complex_0, 0), 
(self.gr_vector_sink_x_0, 0))

        def set_samp_rate(self, samp_rate):
                self.samp_rate = samp_rate

if __name__ == '__main__':
        tb = top_block()
        tb.Run()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]