[Top][All Lists]

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

Re: [Discuss-gnuradio] USRP2 start/stop issues

From: Eric Blossom
Subject: Re: [Discuss-gnuradio] USRP2 start/stop issues
Date: Fri, 4 Sep 2009 04:14:08 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Sep 01, 2009 at 03:58:32PM -0700, Eric Blossom wrote:
> On Tue, Sep 01, 2009 at 06:23:24PM -0400, Tom Rondeau wrote:
> > I have an application where I have to start and stop the USRP2
> > multiple times at various points, but I've been having trouble getting
> > it to work. I traced it down to see that when the stop control message
> > is sent, the host never processes the reply pack from the USRP2. Using
> > Wireshark, I can see that this packet is being sent. After the failure
> > of the stop command, the remaining commands to restart the USRP2 and
> > set its parameters fail.
> > 
> > To make this easier to debug, I found out that the simple program
> > below exercises the problem nicely. To see the failures, I just print
> > out the success message from "usrp2::impl::stop_rx_streaming" and from
> > "usrp2::impl::start_rx_streaming" (in /usrp2/host/lib/usrp2_impl.cc).
> > This is what happens:
> > 
> > usrp2::stop_rx_streaming: success=1
> > usrp2::start_rx_streaming: success=1
> > usrp2::stop_rx_streaming: success=0
> > usrp2::start_rx_streaming: success=0
> > usrp2::stop_rx_streaming: success=0
> > 
> > The first stop_rx_streaming comes during the initialization of the
> > USRP2 to make sure its not streaming yet.
> > 
> > Strangely (or maybe not; I can think of a some good reasons for this
> > behavior), when you set the "rate" variable to above 300 to slow down
> > the transmissions, everything works fine. At rate=200 it's flaky;
> > sometimes it works and sometimes it doesn't. So there seems to be some
> > timing issue involved.
> > 
> > I've been looking and feel like I'm getting close to an answer, but it
> > keeps escaping me. Any ideas on what's causing this?

It's fixed!  I ran your test case 500 times w/o failure.

There was a race in the code that notified the caller when the reply
came in.  I also used your "don't enqueue when trying to stop" idea too.

Please pull from http://gnuradio.org/git/eb.git u2-hang


reply via email to

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