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: mehdimolu
Subject: Re: Re[Discuss-gnuradio] configuring flow graph
Date: Mon, 18 Aug 2008 02:31:37 -0700 (PDT)

Hello,
thanks to Eric for his efforts in the forum.
I did the modifications recommended. but still problem is not solved.
I used lock()/unlock instead stop()/start() but still unlock doesn't work, I
mean in the code below 

                      ...
                        tb.lock()
                        print "Locked to Reconfigure"
                        tb.disconnect(tb.amp, tb.u)
                        tb.subdev[0].set_enable(False)             # disable 
Antenna 1
                        tb.subdev[1].set_enable(True)              # enable 
Antenna 2
                        tb.connect(tb.amp, tb.u)
                        print "Reconfigured"
                        tb.unlock()
                        print "Start Again" 
                        ...

but still it doesn't print "Start Again" .
I already in another example was able to reconfigure chain and run it again
but in this code I couldn't understand why it doesn't work.
this flow graph contains stream_to_streams and  streams_to_stream
blocks(which I have not used them in aforementioned example).
I am not really sure the problem is due to these blocks or ...
every help is appreciated.
Mehdi





Eric Blossom wrote:
> 
> 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
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Reconfiguring-flow-graph-tp19011449p19028311.html
Sent from the GnuRadio mailing list archive at Nabble.com.





reply via email to

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