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.  

I explored some of the gnuradio examples which use send_pkt to transmit data. 
In send_pkt() approach, they use struct.pack to pack the data then use 
msgq.insert_tail() to feed the data in the flow graph. I tried 
struct.pack('!H',pktno & 0xfff)+data, but after packing the data, the assert 
the error related to size matter on the mapper, which is 
chunks_to_symbols_bf(constellation_table). 

Could anyone give me some suggestion on what's the problem here to allow me 
keep on going? Really appreciate any of your help!

Yan

On 03/06/11, Yan Nie  <yn...@uwo.ca> 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
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to