[USRP-users] E310 Tx Rx Loopback using GNU Radio

Marcus Müller marcus.mueller at ettus.com
Mon Mar 14 06:12:53 EDT 2016

Hi Bhushan,

Let's tackle this step-by-step, and isolate potential problems; I'm very
optimistic we can get this to work in your environment.

First, can you just have a flow graph:

    USRP source->head(nsamples=10000)->file sink(file=/tmp/samples.fc32) ,

execute it and then copy over the file to your host PC and analyse it
(eg.with the gr_plot_psd_c tool that comes with GNU Radio, or by loading
it into numpy¹ , or by loading it into matlab [1][2]).
Are the amplitudes as you expect them to be, or is there clipping or
maybe only very small amplitudes (<<0.1)? Is the signal you fed into the
USRP there, and does its PSD look right?
If not, decrease (in case of clipping) or increase (in case of
amplitudes being too small) the gain, play with the RF frequency etc.
I'd say, a good setting would be if you feed in a tone, and the digital
amplitude of that would roughly be 0.4.

Next, instead of feeding a live signal into the USRP sink, start e.g.
with a baseband tone, generated by a signal source:

    signal source(fsample=320e3, freq=16e3, ampl=0.4) -> USRP sink

You should be able to see that on your external measurment device. If
not, increase gain, etc.

Now, assuming this leads to some settings that make your RX and TX work
on their own, using these settings in your flow graph should work.

By the way, it's really much more comfortable to install GNU Radio on
your PC, too, and use the GNU Radio Companion on your PC to do the flow
graph design, and then copy the resulting Python progran over to the
E310 than to do X forwarding just to see the GNU Radio companion's GUI
on your PC. I can understand you're hesitant to go through the
installation of GNU Radio and its dependencies, but luckily, there's the
GNU Radio live DVD[3] which you can download, burn to a DVD / write to a
USB stick and boot from, giving you an instantly usable GNU Radio
installation on your PC, without modifying anything on the PC.

Best regards,

; the octave scripts work with Matlab, too.
[3] https://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioLiveDVD

¹ here's a quick and dirty python analysis script I just came up with;
haven't tried it myself, but I don't think I made too many mistakes:

import numpy
samples = numpy.fromfile("/path/to/file", dtype=numpy.complex64)
digital_power_of_samples = numpy.abs(samples)**2
mean_power = digital_power_of_samples.mean()
max_power = max(digital_power_of_samples)

print "mean power: {:f} (should be >0.05 and <0.7), max_power: {:f} (should be >0.3, <1, respectively)".format(mean_power, max_power)
print "variance(I): {:f}, variance(Q): {:f} (I should roughly equal Q variance, equal mean power/2)".format(numpy.var(samples.real), numpy.var(samples.imag))

PS: It's normal to just reply to the mailing list and not to you
individually if you write a mail to that list; since you're on that
list, you'd get that mail, anyways, and having the same mail twice
doesn't really help.
You're using gmail, so "starring" the conversation on the mailing list
should lead to replies on the mailing list being highlighted in your inbox.

On 14.03.2016 10:29, BHUSHAN PAWAR wrote:
> Hi all,
> I have set the input frequency to 435M now. But I still can not see
> any signal at both transmitter channels.
> What could be the possible reason?
> P.S. I didn't receive your last reply in my inbox or spam folder. I
> read your reply in daily usrp user digest.
> *Thanks & Regards,*
> *Bhushan R.V. Pawar.*
> On Fri, Mar 11, 2016 at 3:51 PM, BHUSHAN PAWAR
> <bhushan.rv.pawar at gmail.com <mailto:bhushan.rv.pawar at gmail.com>> wrote:
>     Hi all,
>     I am trying to achieve simple Rx to Tx loopback using GNU Radio.
>     As you can see in the attached image, I have connected UHD USRP
>     Source to UHD USRP sink via a Multiply Constant block.
>     Using a signal generator, I am providing 10MHz signal to the RX2
>     input and trying to transmit signal from both transmitter channels.
>     However, I can observe a distorted signal from TRX-B channel but
>     no signal from TRX-A channel on the oscilloscope..What is the
>     reason for this?
>     *
>     Thanks & Regards,*
>     *Bhushan R.V. Pawar.*

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

More information about the USRP-users mailing list