Hi, I want to implement an infinite loop which receives data (using USRP + RFX2400) in a vector_sink_b(). The packets are sent by a transmitter after every 't milliseconds'. I tried the code given at the end of paragraph. But it doesnt works and problem which I am facing is that it receives the first correct packet and then rather to wait for the next correct packet it keep on reading the copy of same packet (from I dont know ...may be from buffers??) and extending it every time with previously read data. I mean it do as follows > Suppose first packet contains the string : TEST. at first read it gets: TEST...second time TEST TEST....third time TEST TEST TEST and so on. I was expecting that it will receive a packet and will then waits for other packet? So can you please suggest me what is the problem and how can I solve it. ------------------------------------------------------------------------------------ rx, vec_sink = receive() rx.start() while (rx.is_running): rx_data = vec_sink.data() if (len(rx_data) > 0): #process rx_data rx_data = ' ' #re-initilaze the receive buffer ----------------------------------------------------------------------------------------------------------------------------- The following code works but it only receive one packet and then shutdowns the flowgraph ----------------------------------------------------------------------------------------------------------------------------- rx, vec_sink = receive() rx.start() flag = 1 while (rx.is_running and flag): rx_data = vec_sink.data() if (len(rx_data) > 0): #process rx_data flag = 0 rx.stop() -------------------------------------------------------------------------- -- View this message in context: http://www.nabble.com/vector_sink-read-problem-tp19722765p19722765.html Sent from the GnuRadio mailing list archive at Nabble.com.
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio