[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] USRP2 start/stop issues
From: |
Tom Rondeau |
Subject: |
[Discuss-gnuradio] USRP2 start/stop issues |
Date: |
Tue, 1 Sep 2009 18:23:24 -0400 |
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?
Test program:
------------------------------------------------------------------
#!/usr/bin/env python
from gnuradio import gr, usrp2
class usrp2_test(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
rate = 100
src = usrp2.source_32fc("eth1", "")
src.set_decim(rate)
src.set_center_freq(10e6)
snk = gr.null_sink(gr.sizeof_gr_complex)
self.connect(src, snk)
def main():
tb = usrp2_test()
tb.start()
tb.stop()
tb.wait()
tb.start()
tb.stop()
tb.wait()
if __name__ == "__main__":
main()
-----------------------------------------------------------------------
Tom
- [Discuss-gnuradio] USRP2 start/stop issues,
Tom Rondeau <=
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Eric Blossom, 2009/09/01
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Eric Blossom, 2009/09/04
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Firas Abbas, 2009/09/05
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Josh Blum, 2009/09/05
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Brian Padalino, 2009/09/05
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Johnathan Corgan, 2009/09/05
- Re: [Discuss-gnuradio] USRP2 start/stop issues, Firas Abbas, 2009/09/06