<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true">
    <p>Hi Marcus, thank you for the reply.</p>
    <p>I've built and installed UHD using AN-445 "Building and
      Installing the USRP Open-Source Toolchain (UHD and GNU Radio) on
      Linux" instructions (<a
href="https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux">https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux</a>)</p>
    <p><br>
    </p>
    <p>Do you think that a gain setting bug is possible when I set the
      gain using this code? and the screen output says all channels are
      set to same gain (60dB)?<br>
    </p>
    <p>This code is an adaptation of the rx_multi_samples.cpp example.</p>
    <p><br>
    </p>
    <p><tt>    // detect which channels to use & init them</tt><tt><br>
      </tt><tt>    std::vector<std::string> channel_strings;</tt><tt><br>
      </tt><tt>    std::vector<size_t> channel_nums;</tt><tt><br>
      </tt><tt>    boost::split(channel_strings, channel_list,
        boost::is_any_of("\"',"));</tt><tt><br>
      </tt><tt>    int current_channel = 0;</tt><tt><br>
      </tt><tt>    for (size_t ch = 0; ch < channel_strings.size();
        ch++) {</tt><tt><br>
      </tt><tt>        size_t chan = std::stoi(channel_strings[ch]);</tt><tt><br>
      </tt><tt>        if (chan >= usrp->get_rx_num_channels()) {</tt><tt><br>
      </tt><tt>            throw std::runtime_error("Invalid channel(s)
        specified.");</tt><tt><br>
      </tt><tt>        } else {</tt><tt><br>
      </tt><tt>        current_channel = std::stoi(channel_strings[ch]);</tt><tt><br>
      </tt><tt>            channel_nums.push_back(current_channel);</tt><tt><br>
      </tt><tt><br>
      </tt><tt>            //set the rx center frequency</tt><tt><br>
      </tt><tt>        std::cout << boost::format("Setting RX
        chan%d Freq: %f Mhz... ") % current_channel % (freq/1e6);</tt><tt><br>
      </tt><tt>            usrp->set_rx_freq(freq, current_channel);</tt><tt><br>
      </tt><tt>            std::cout << boost::format("Actual: %f
        Mhz") % (usrp->get_rx_freq()/1e6) << std::endl;</tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt>            // set the rf gain</tt><tt><br>
      </tt><tt>            if (vm.count("gain")) {</tt><tt><br>
      </tt><tt>                std::cout << boost::format("Setting
        RX chan%d Gain: %f dB... ") % current_channel % gain;</tt><tt><br>
      </tt><tt>                usrp->set_rx_gain(gain,
        current_channel);</tt><tt><br>
      </tt><tt>                std::cout << boost::format("Actual
        RX Gain: %f dB...")</tt><tt><br>
      </tt><tt>                         %
        usrp->get_rx_gain(current_channel)</tt><tt><br>
      </tt><tt>                  << std::endl;</tt><tt><br>
      </tt><tt>            }</tt><tt><br>
      </tt><tt>    }</tt><tt><br>
      </tt><tt>    }</tt><br>
    </p>
    <p><br>
    </p>
    <p>Thanks,</p>
    <p>Baroch<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 25/12/2019 16:18, Marcus Müller
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:d750d9ab21391528e690db20bc4e4530baaebcb1.camel@ettus.com">
      <pre class="moz-quote-pre" wrap="">Hi Baroch,

oh, that's interesting and I must admit I don't really know where to
start looking into this, but let's take this top-down:
How are you setting the gain, and how are you doing the capturing?
My gut feeling tells me there's something in UHD not handling multi-
channel gain setting right, but lacking an N310 on my desk right now, I
can't just trace this with a debugger.
How did you build and install your UHD?
Best regards,
Marcus

On Wed, 2019-12-25 at 15:29 +0200, Baroch Oren via USRP-users wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Hello.
I've been capturing with N310 on 4 channels simultaneously. A strange
behavioure occurs:
First experiment: capturing on a single channel when all the other 3
rx channels are terminated, I get a similar captured gain on every
one of the RX channels.
Second experiment: capturing simultaneously, channel 3 (RF2 RX2)
shows a decreased capture gain in about -14db. all other channels
show capture gain similar to first experiment.
Third experiment: capturing simultaneously on 4 channels, all inputs
terminated: thermal noise of same gain on all 4 channels.

Anyone has any clue for direction to further research this?

My setup: UHD_3.14.1.HEAD-0-g0347a6d8 on Ubuntu

Thanks,
Baroch Oren

_______________________________________________
USRP-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:USRP-users@lists.ettus.com">USRP-users@lists.ettus.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com">http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com</a>
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
    </blockquote>
    <div class="moz-signature">-- <br>
      <div dir="rtl">
        <p><bold>ברוך אורן بروح اورن Baroch Oren</bold></p>
        <p>טל' 058-7799233 cell</p>
        <p><a href="https://www.patreon.com/barochoren">תמכו באקטיביזם
            שלי support my activism</a></p>
      </div>
    </div>
  </body>
</html>