How to capture the Rx data using uhd_rx_cfile and agree with the uhd_fft Scope mode data

Hello community,

I am trying to use the uhd_rx_cfile command to capture some rx samples
in
the hope of recovering what I see as streaming samples in the uhd_fft
Scope
mode display. Since I am really new to GR+USRP, I have a couple of
difficulties:

  1. The uhd_rx_cfile command help menu does not provide a BW option
  2. When using the uhd_rx_cfile command and specifying a frequency, it
    seems
    to record a sinusoid, again possibly a bw issue. However, I am not quite
    sure whether I am looking at the same signal port input. I intend to
    look
    at LFRX daughter board port B input.
  3. I have not been able to reproduce what I saw in the uhd_fft Scope
    mode
    streaming data. Without any gain, I am seeing streaming data at a level
    of
    +/- 200 units, which may be reasonable noise. How do I capture the same
    data into a file. Since my difficulty with “uhd_rx_cfile” command, hence
    this question. I have also experimented with the “rx_samples_to_file”
    command with worse experience.

I could go directly to GRC GUI directly and try to learn to do
everything
there. But I think there is value in being able to do this simple thing
from the command line. Your help and suggestions are appreciated.

LD Zhang

On 09/25/2012 07:29 PM, LD Zhang wrote:

sure whether I am looking at the same signal port input. I intend to look
from the command line. Your help and suggestions are appreciated.

I will second this motion.

All of the hooks are available in the USRP source block, most of which
can be changed at runtime with a simple variable widget. Its nice to
change setting at runtime to see the effect.

Also, you can easily attach a file sink and a scope sink and an fft
sink. That way you know that you have captured to file the same thing
you are observing.

Also, be careful with the format of the file data. Its a binary array of
std::complex, not float, not double, etc…

-josh

Hi,

I did try and made a GRC example of using a USRP Source and a fft sink,
scope sink, and a file sink to test out the idea.

When looking at the scope sink, the data is about +/- 2x10^-4. I changed
the gain of the USRP source block to 20 dB. But nothing happened to the
signal amplitude. How is this possible?

Please see the attached GRC if you want to see what I am doing. Thanks.

LD

On 09/26/2012 01:36 AM, LD Zhang wrote:

Hi,

I did try and made a GRC example of using a USRP Source and a fft sink,
scope sink, and a file sink to test out the idea.

When looking at the scope sink, the data is about +/- 2x10^-4. I changed
the gain of the USRP source block to 20 dB. But nothing happened to the
signal amplitude. How is this possible?

You mentioned LFRX? There are no configurable gain elements for the LFRX
daughterboard.

If this helps, the various gain ranges are listed for various
daughterboard frontends here:
http://files.ettus.com/uhd_docs/manual/html/dboards.html#basic-rx-and-lfrx

-josh

On 09/27/2012 02:42 PM, LD Zhang wrote:

Yes. I can understand the LFRX does not have any adjustable gain. But what
comes out of the USRP source should be samples already digitized. Surely
there is gain to be adjusted before the ADC. According what I see, it is
from 0 to 6dB (in voltage?). I don’t see how this can be inserted into the
USRP source block.

You are correct. The N210 has a 6db digital gain. Attached is a GRC
flowgraph that loopsback TX and RX with Basic daguhterboards. You can
see the digital gain slider in action.

The gain parameter in the GRC block is a amalgamation of ADC and RF
frontend gain elements. The API also allows for individual control, but
this level of control is not available in the GRC gain parameter.

Also I have some related questions:

  1. the float numbers out of the USRP source block appear to be in volts.
    There is no indication of what units it is in.

They are in counts where 1.0 corresponds to fullscale ADC.

  1. Is there any way of specifying bandpass filters before the ADC? This
    would probably be independent of the LFRX, but something on the motherboard
    before the ADC? I do see an option in the USRP block that seem to do this.
    However this bandpass may be after the ADC?

The bandwidth parameter is for configuring frontend bandwidth filters.
You can find out here which boards are configurable w/ this feature:

http://files.ettus.com/uhd_docs/manual/html/dboards.html

-josh

Yes. I can understand the LFRX does not have any adjustable gain. But
what
comes out of the USRP source should be samples already digitized. Surely
there is gain to be adjusted before the ADC. According what I see, it is
from 0 to 6dB (in voltage?). I don’t see how this can be inserted into
the
USRP source block.

Also I have some related questions:

  1. the float numbers out of the USRP source block appear to be in volts.
    There is no indication of what units it is in.
  2. Is there any way of specifying bandpass filters before the ADC? This
    would probably be independent of the LFRX, but something on the
    motherboard
    before the ADC? I do see an option in the USRP block that seem to do
    this.
    However this bandpass may be after the ADC?

Thanks,

LD

I looked and ran the attached GRC file. It does work. I have a question
on
whether the slider gain is applied before or after the ADC?

LD

On 09/28/2012 04:34 PM, LD Zhang wrote:

I looked and ran the attached GRC file. It does work. I have a question on
whether the slider gain is applied before or after the ADC?

The set_gain call applies to all gain elements on the RF frontend and in
the ADC. In this case, when using LFRX + N210, set_gain only adjusts 6dB
of digital gain in the ADC itself.

-josh