discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Diffirence between receive data from USRP and sen


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] Diffirence between receive data from USRP and sent via UDP
Date: Tue, 20 Sep 2011 22:03:46 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10

On 20/09/11 09:55 PM, Luong Tan Phong wrote:
Hi Readers,

My PC has 2 gigabit ethernet controlers. I read data from USRP2 (UHD, COMPLEX_FLOAT32, sample rate = 2.5 MHz) and sent it to another PC via UDP protocol.

If I sent data to another PC directly (use IP address), in System Monitor view : Receiving = 10.0 MiB/s; Sending = 19.6 MiB/s.
    uhd_src = uhd_make_usrp_source(dev_addr, uhd::io_type_t::COMPLEX_FLOAT32, 1);
    uhd_src->set_center_freq(d_rf_freq,0);
    uhd_src->set_samp_rate(2500000);
uhd_src->set_gain(20);
    
    udp_dataSender = gr_make_udp_sink(sizeof(gr_complex), "192.168.1.54", udp_port, 1472, true);
    tb->connect(uhd_src, 0, udp_dataSender, 0);


If I sent data to another PC use broadcast address, in System Monitor view : Receiving = 10.0 MiB/s; Sending = 1.2 MiB/s.
    udp_dataSender = gr_make_udp_sink(sizeof(gr_complex), "192.168.1.255", udp_port, 1472, true);


Could you demonstrate to me the issues, please?

Thanks.


LTP

  
The udp_sink object doesn't support broadcast.  In a "sockets" interface, if you want to use
  a broadcast address, you have to *explicitly turn on* IP broadcast by setting the SO_BROADCAST
  option on the socket (and a few other housekeeping details).  The udp_sink block doesn't do this,
  it will only support unicast.




-- 
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

reply via email to

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