[USRP-users] Message source, UHD sink transmit problem

Josh Blum josh at ettus.com
Sat Sep 15 02:46:03 EDT 2012



On 09/14/2012 05:33 PM, Rob Rhinehart wrote:
> I'm using a gr.message_source block to send packets to a uhd usrp sink.
> 
> My test setup is essentially:
> 
> msgq = gr.msg_queue()
> msg_src = gr.message_source(1, msgq)
> 
> while True:
>    payload = "something"
>    msg = gr.message_from_string(payload)
>    self.msgq.insert_tail(msg)
>    time.sleep(1)
> 
> I was worried about using an infinite loop but it seems to work fine for
> tunnel.py
> 
> I know the messages are properly removed from the queue and modulated (as
> self.msgq.count() returns 0) but the USRP doesn't actually transmit them
> until I kill the flow graph. How can I ensure the USRP transmits the data
> as it's removed from the message queue?
> 

The usrp sink should transmit samples ASAP, unless there is a time tag
on those samples, which I dont think would be the case given message source.

If its worth your while, you might just stick some prints into the
sink's work function and see what the block really thinks its getting
(or not getting):
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/lib/gr_uhd_usrp_sink.cc#n305

-josh




More information about the USRP-users mailing list