Diffirence between receive data from USRP and sent via UDP

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_bandwidth(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);

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

On 20/09/11 09:55 PM, Luong Tan P. wrote:

uhd_src->set_samp_rate(2500000);

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.