Revision e4d3f63c host/docs/usrp2.rst

b/host/docs/usrp2.rst
315 315
    clock_config.pps_source = uhd::clock_config_t::PPS_MIMO;
316 316
    usrp->set_clock_config(clock_config, slave_index);
317 317

  
318

  
319
------------------------------------------------------------------------
320
Alternative stream destination
321
------------------------------------------------------------------------
322
It is possible to program the USRP to send RX packets to an alternative IP/UDP destination.
323

  
324
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
325
Set the subnet and gateway
326
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
327
To use an alternative streaming destination,
328
the device needs to be able to determine if the destination address
329
is within its subnet, and ARP appropriately.
330
Therefore, the user should ensure that subnet and gateway addresses
331
have been programmed into the device's EEPROM.
332

  
333
Run the following commands:
334
::
335

  
336
    cd <install-path>/share/uhd/utils
337
    ./usrp_burn_mb_eeprom --args=<optional device args> --key=subnet --val=255.255.255.0
338
    ./usrp_burn_mb_eeprom --args=<optional device args> --key=gateway --val=192.168.10.1
339

  
340
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
341
Create a receive streamer
342
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
343
Set the stream args "addr" and "port" values to the alternative destination.
344
Packets will be sent to this destination when the user issues a stream command.
345

  
346
::
347

  
348
    //create a receive streamer, host type does not matter
349
    uhd::stream_args_t stream_args("fc32");
350

  
351
    //resolvable address and port for a remote udp socket
352
    stream_args.args["addr"] = "192.168.10.42";
353
    stream_args.args["port"] = "12345";
354

  
355
    //create the streamer
356
    uhd::rx_streamer::sptr rx_stream = usrp->get_rx_stream(stream_args);
357

  
358
    //issue stream command
359
    uhd::stream_cmd_t stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
360
    stream_cmd.num_samps = total_num_samps;
361
    stream_cmd.stream_now = true;
362
    usrp->issue_stream_cmd(stream_cmd);
363

  
364
**Note:**
365
Calling recv() on this streamer object should yield a timeout.
366

  
318 367
------------------------------------------------------------------------
319 368
Hardware setup notes
320 369
------------------------------------------------------------------------

Also available in: Unified diff