discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] message_source repeatly transmit msg 10times


From: Yan Nie
Subject: Re: [Discuss-gnuradio] message_source repeatly transmit msg 10times
Date: Mon, 07 Mar 2011 02:36:26 -0500

I also tried msgq.flush() to delete all of the data in the queue as soon the data is inserted to the message queue. This approach allows the data repeatly transmitted in various times, ranging from once to 10 times.  Could anyone give me some suggestion to allow me keep on going.

I also tried struct.pack('!H', pktno & 0xffff) + data to pack the data 



On 03/06/11, Yan Nie <address@hidden> wrote:
Dear all,

I'm using message_source generate data source then modulated and transmitting through USRP1 board with LFTX plugged-in. After building the flow graph, I used the msgq_insert to insert 1950 bytes data into the flow graph to be transmitted, then insert another group of data which is 97500 bytes into the the flow graph. The result turns out these two group of data are repeatly sent 10 times. What could be the problem here?

This problem really troubles me for a while and it seems to be the biggest problem that I really need to solve for my project, and I dug into the source code related to message_source and gr_message, but couldn't get any clue why this happens here. Really need your help!

Really appreciate any of you help!

Thanks,
Yan

the code related:
#message_source in tb block
indata = gr.message_source(gr.sizeof_char, 1950)
msgq = indata.msgq()
constellation = [-1,1]
mapper = chunks_to_symbols_bf(constellation)
#setup USRP and signal amplitude setting......
usink  = ...
connect(indata,mapper,usink)

#flowgraph running in main
try:
   tb.start()
   while 1: 
          i = 0
          tb.set_amp(5000)
          msg_13bit = gr.messge_from_string(payload_13bit) #payload_13bit is 1950 bytes
          tb.msgq.insert_tail(msg_13bit)
          tb.set_amp(0)
          while (i<50)
              msg_stop = gr.message_from_string(payload_stop) #payload_stop is 1950 bytes
              tb.msgq.inset_tail(msg_stop)
              i +=1
    tb.wait()

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

reply via email to

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