How to dynamically stop the host PC receiving samples from USRP and restart it again without touchin

Hi,

In my applications, after the flow graph is initialized, I need to
dynamically control the receiving of the USRP samples, i.e, at time T1,
I
want the USRP to transfer the received samples to PC, while in T2, I do
not
allow the PC to receive these samples.
Stop receiving the unusing packets from USRP can save the traffic over
ethernet and decrease the demands of processing resource on host PC.

the gr_mute block seems only suppress the incoming packets to further
processing, but these unusing samples can still come into the flow
graph.

Also, the tb.run and tb.wait can be executed more than twice as wish,
but
it seems to be not so flexible. It would be good if there some commands
called to control the block of uhd.usrp_source to achieve such purpose?

Alex,
Dreams can come true just believe.

On 05/30/2012 06:33 PM, Alex Z. wrote:

processing, but these unusing samples can still come into the flow graph.

Also, the tb.run and tb.wait can be executed more than twice as wish, but
it seems to be not so flexible. It would be good if there some commands
called to control the block of uhd.usrp_source to achieve such purpose?

I had a post on this recently, wish I could find it in the archives…

So, the problem with stopping streaming is that the work function will
return zero and the scheduler marks the block as done.

So, if you take this changeset here. You should be able to stop and
restart a running USRP without problem.
http://gnuradio.org/cgit/jblum.git/log/?h=wip_uhd_stopper

Use the following methods on the block:

usrp->start()
usrp->stop()
and if you want to be precise about time, call
usrp->set_stream_time(…) before calling start()

-josh

Hello Josh,

I am testing this solution. But before I get the result, just want to
make
sure:
Does the stream command STREAM_MODE_STOP_CONTINUOUS stop the incoming
packets from the USRP to PC, or just stop the flow graph to receive the
packets from USRP while the packets are still coming into the PC thru
the
ethernet between USRP and PC?

On Thu, May 31, 2012 at 1:28 PM, Josh B. [email protected] wrote:

Stop receiving the unusing packets from USRP can save the traffic over

Use the following methods on the block:

Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

Alex,
Dreams can come true just believe.

It is great to hear this solution!

On Thu, May 31, 2012 at 1:28 PM, Josh B. [email protected] wrote:

Stop receiving the unusing packets from USRP can save the traffic over

Use the following methods on the block:

Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

Alex,
Dreams can come true just believe.

On 06/01/2012 10:07 AM, Alex Z. wrote:

Hello Josh,

I am testing this solution. But before I get the result, just want to make
sure:
Does the stream command STREAM_MODE_STOP_CONTINUOUS stop the incoming
packets from the USRP to PC, or just stop the flow graph to receive the
packets from USRP while the packets are still coming into the PC thru the
ethernet between USRP and PC?

Yup, the usrp->stop() calls STREAM_MODE_STOP_CONTINUOUS, which actually
stops the flow of packets from USRP to host.

-josh