discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Re[Discuss-gnuradio] configuring flow graph


From: Eric Blossom
Subject: Re: Re[Discuss-gnuradio] configuring flow graph
Date: Sat, 16 Aug 2008 08:25:57 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Sat, Aug 16, 2008 at 06:25:10AM -0700, mehdimolu wrote:
> 
> I want to implement MIMO using gnuradio.
> I already could do differential and coherent(BPSK) communication link
> between two USRPs( daughter board Flex 2400 ).
> right now for channel estimation in MIMO  I need to do reconfigure flow
> graph. As mentioned in 
>            www.gnuradio.org/trac/wiki/Tutorials/WritePythonApplications
> after fg.stop() I call fg.wait() and then reconfigure flow graph, as bellow
>                         ...
>                         fg.stop()
>                       fg.wait()               #reconfigure flow graph
>                       print "hello"
>                       fg.disconnect(fg.amp, fg.u)
>                       self.subdev[0].set_enable(False)
>                       self.subdev[1].set_enable(True)
>                       fg.connect(fg.amp, fg.u)
>                       fg.start()  
>                         ...
> but code waits in gt.wait() and never goes ahead(never prints "hello").
> what shall I do to fix it?
> thanks,
> Mehdi 

First off, please upgrade to the lastest stable or svn trunk code.

  http://gnuradio.org/trac/wiki/Download

Then modify your code to use gr.top_block instead of gr.flow_graph.
Finally surround your connects and disconnects with
top_block.lock()/unlock().  Do not use stop()/start() to perform the
reconfiguration, use lock()/unlock().

See gr-utils/src/python/usrp_siggen.py for an example of correct usage.
Look at the _configure_graph method.

Eric




reply via email to

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