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 11:57:51 -0500

I also tried the struct.pack('!H',pktno & 0xffff) + data to pack the data as 
pkt_send does. This approach gives the error on gr_chunks_to_symbols_bf 
((unsigned int)in[i]*d_D+d_D)<=d_symbol_table.size() failed, where the symbol 
table size in my case is 2. I dug into the pkt.py and packet_utils.py, which 
gives the idea in order to connect the packed message source with block 
gr.chunks_to_symbols_bf, packed message should be unpacked. If this 
understanding is correct, the message don't have to be packed before insert to 
the flow graph. I found when the message is packed in packet_utils.make_packet, 
it appends a '\x55' in the pack. Does this '\x55' sign tell USRP this is the 
end of this msgq and this msgq only be sent once by calling 
msgq.insert_tail(msg) once?

Any of your help values a lot for me, since this problem is the last problem I 
need to get solved for my project. It really gets stuck here.

Really appreciate any suggestion on solving this problem!

Yan

On 03/07/11, Yan Nie  <address@hidden> wrote:
> 
> 
> 
> 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]