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

Martin Braun martin.braun at ettus.com
Tue Oct 21 04:17:16 EDT 2014


I can't test it right now, but I believe the file source in GNU Radio has a
vector length option. Set this to two, and you get 'interleaved shorts',
which we use for complex shorts. There's a block 'ishort to complex' if you
want to continue working with  floating point complex.

M
On 21 Oct 2014 07:15, "Hans Van Ingelgom via USRP-users" <
usrp-users at lists.ettus.com> wrote:

> I just did a test with uhd_rx_cfile, but when I try to read these samples
> back into grc, I stumble upon a road block: I can read samples as short,
> but not complex shorts. Maybe an extension to this block is appropriate?
>
> On Tue, Oct 21, 2014 at 5:47 AM, Marcus D. Leech via USRP-users <
> usrp-users at lists.ettus.com> wrote:
>
>>  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 listUSRP-users at lists.ettus.comhttp://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.
>>
>>
>>
>>
>> _______________________________________________
>> USRP-users mailing list
>> USRP-users at lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>
>>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141021/d9b7fa66/attachment-0002.html>


More information about the USRP-users mailing list