[USRP-users] Most performant way to save samples to disk from a B200?

Marcus D. Leech mleech at ripnet.com
Mon Oct 20 23:47:53 EDT 2014


On 10/20/2014 11:42 PM, Hans Van Ingelgom via USRP-users wrote:
> Hello,
>
> I want to record samples to disk from a B200. I could make a flowgraph 
> in gnuradio-companion, but that will save floating point values. Is 
> there a more efficient way to store samples, as the raw format is only 
> 12 bits? Any tips on getting the most performance?
>
> (I have been playing with this thing for a few months now, and 
> "drinking from a firehose" is a saying that really applies to that 
> piece of hardware).
>
> Thanks,
> Hans Van Ingelgom
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
Here's the --help output for rx_samples_to_file:

./rx_samples_to_file --help
linux; GNU C++ version 4.7.2 20121109 (Red Hat 4.7.2-8); Boost_105000; 
UHD_003.007.002-94-ge56809a0

UHD RX samples to file Allowed options:
   --help                         help message
   --args arg                     multi uhd device address args
   --file arg (=usrp_samples.dat) name of the file to write binary 
samples to
   --type arg (=short)            sample type: double, float, or short
   --nsamps arg (=0)              total number of samples to receive
   --time arg (=0)                total number of seconds to receive
   --spb arg (=10000)             samples per buffer
   --rate arg (=1000000)          rate of incoming samples
   --freq arg (=0)                RF center frequency in Hz
   --gain arg                     gain for the RF chain
   --ant arg                      daughterboard antenna selection
   --subdev arg                   daughterboard subdevice specification
   --bw arg                       daughterboard IF filter bandwidth in Hz
   --ref arg (=internal)          reference source (internal, external, 
mimo)
   --wirefmt arg (=sc16)          wire format (sc8 or sc16)
   --setup arg (=1)               seconds of setup time
   --progress                     periodically display short-term bandwidth
   --stats                        show average bandwidth on exit
   --sizemap                      track packet size and display 
breakdown on
                                  exit
   --null                         run without writing to file
   --continue                     don't abort on a bad packet
   --skip-lo                      skip checking LO lock status
   --int-n                        tune USRP with integer-N tuning

And, uhd_rx_cfile  (A Gnu Radio app):

linux; GNU C++ version 4.7.2 20121109 (Red Hat 4.7.2-8); Boost_105000; 
UHD_003.007.002-94-ge56809a0

Usage: uhd_rx_cfile: [options] output_filename

Options:
   -h, --help            show this help message and exit
   -a ARGS, --args=ARGS  UHD device address args , [default=]
   --spec=SPEC           Subdevice of UHD device where appropriate
   -A ANTENNA, --antenna=ANTENNA
                         select Rx Antenna where appropriate
   --samp-rate=SAMP_RATE
                         set sample rate (bandwidth) [default=1000000.0]
   -f FREQ, --freq=FREQ  set frequency to FREQ
   -g GAIN, --gain=GAIN  set gain in dB (default is midpoint)
   -s, --output-shorts   output interleaved shorts instead of complex floats
   -N NSAMPLES, --nsamples=NSAMPLES
                         number of samples to collect [default=+inf]
   -v, --verbose         verbose output
   --lo-offset=LO_OFFSET
                         set daughterboard LO offset to OFFSET [default=hw
                         default]
   --wire-format=WIRE_FORMAT
                         set wire format from USRP [default=sc16
   --stream-args=STREAM_ARGS
                         set stream arguments [default=]
   --show-async-msg      Show asynchronous message notifications from UHD
                         [default=False]
linux; GNU C++ version 4.7.2 20121109 (Red Hat 4.7.2-8); Boost_105000; 
UHD_003.007.002-94-ge56809a0

Usage: uhd_rx_cfile: [options] output_filename

Options:
   -h, --help            show this help message and exit
   -a ARGS, --args=ARGS  UHD device address args , [default=]
   --spec=SPEC           Subdevice of UHD device where appropriate
   -A ANTENNA, --antenna=ANTENNA
                         select Rx Antenna where appropriate
   --samp-rate=SAMP_RATE
                         set sample rate (bandwidth) [default=1000000.0]
   -f FREQ, --freq=FREQ  set frequency to FREQ
   -g GAIN, --gain=GAIN  set gain in dB (default is midpoint)
   -s, --output-shorts   output interleaved shorts instead of complex floats
   -N NSAMPLES, --nsamples=NSAMPLES
                         number of samples to collect [default=+inf]
   -v, --verbose         verbose output
   --lo-offset=LO_OFFSET
                         set daughterboard LO offset to OFFSET [default=hw
                         default]
   --wire-format=WIRE_FORMAT
                         set wire format from USRP [default=sc16
   --stream-args=STREAM_ARGS
                         set stream arguments [default=]
   --show-async-msg      Show asynchronous message notifications from UHD
                         [default=False]


You should try them both--they both support recording data as "shorts".  
Which is certainly space efficient.  There is no packed-12-bit recording 
format.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141020/3e390e3e/attachment-0002.html>


More information about the USRP-users mailing list