Forum: GNU Radio 3.0.3 libusrp bug with usrp_basic_rx::start/stop

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
29a495c486439f1d9823914fb6879782?d=identicon&s=25 Dave Gotwisner (Guest)
on 2007-05-30 20:31
(Received via mailing list)
The last thread I posted had indicated problems related to overruns.

The problem turns out that start/stop weren't consistent in how they
started and stopped things in gnuradio-3.0.3.  It worked out that
roughly every 800000 samples in my test, we got an overrun (except if
the total was before the first stop()).

The problem lies in the start order:
    d_ephandle->start() followed by set_rx_enable(true)

and the stop order of:
    d_ephandle->stop() followed by set_rx_enable(false).

To fix the problem, the calls in stop() had to be flipped.

Here's the patch:
*** usrp_basic.cc.orig  2007-05-30 10:30:10.000000000 +0000
--- usrp_basic.cc       2007-05-30 10:23:11.000000000 +0000
***************
*** 541,556 ****
--- 541,565 ----
  {
    bool ok = usrp_basic::stop();

+ #if 1
+   if (!set_rx_enable(false)){
+     fprintf (stderr, "usrp_basic_rx: set_rx_enable(false) failed\n");
+     usb_strerror ();
+     ok = false;
+   }
+ #endif
    if (!d_ephandle->stop()){
      fprintf (stderr, "usrp_basic_rx: failed to stop end point
streaming");
      usb_strerror ();
      ok = false;
    }
+ #if 0
    if (!set_rx_enable(false)){
      fprintf (stderr, "usrp_basic_rx: set_rx_enable(false) failed\n");
      usb_strerror ();
      ok = false;
    }
+ #endif
    return false;
  }


    Dave
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2007-05-30 20:42
(Received via mailing list)
On Wed, May 30, 2007 at 11:29:42AM -0700, Dave Gotwisner wrote:
> and the stop order of:
>  {
>      fprintf (stderr, "usrp_basic_rx: failed to stop end point streaming");
>    return false;
>  }
>
>
>    Dave

Hi Dave,

Thanks for your efforts on this. I'll apply the patch to the trunk.

Glad to hear it's working for you.

Eric
This topic is locked and can not be replied to.