[USRP-users] B210 gain fluctuation

2022-12-03 Thread friedtj
I have an awkward problem whose cause I am unable to pinpoint. 
The two channels TX/RX A and TX/RX B of a B210 are connected for channel 1 to 
an antenna + LNA, 
and for channel 2 to an FPGA GPIO -> Minicircuits ZFSC-2-4 splitter -> 6 dB 
attenuator which 
should present a 50 ohm impedance to the TX/RX B input. An oscilloscope shows 
the output to be 
constant amplitude signal generated by the GPIO at 60 mV amplitude (after 
filtering, splitting and
attenuation) or -14 dBm on a 50 ohm load which should be within the safe limits 
of input power of 
the AD9361 I believe. 
The attached script is used for recording the reference signal transmitted on a 
70 MHz carrier 
by the FPGA on channel B and the received signal on channel A. The settings for 
both channels 
have been generated by GNU Radio 3.8 and manually tuned, for e.g by explicitly 
preventing AGC. 
2 seconds of data are recorded as interleaved complex short and displayed in 
GNU with 
f=fopen('fichier.bin');d=fread(f,inf,'int16');d=d(1:2:end)+j*d(2:2:end);d1=d(1:2:end);d2=d(2:2:end);plot([1:3e5]/5e6,real(d1(1:3e5)));fclose(f)

On the left side is the display from channel A connected to the antenna/LNA 
which is stable and
reproducible. On the right side is the display from channel B which presents 
amplitude fluctuations
which are not reproducible from one run to another. Three records have been 
analyzed from top to
bottom and hardly ever is the same pattern repeated. I *think* I noticed that 
if I change the CH B
gain settings in the script and launch it, the first time I have a flat gain 
and then all subsequent
launches with the same gain setting lead to this varying gain pattern.

Any idea of what the cause might be? This is all running with Boost_107700; 
UHD_3.15.0.0-0 on a
Raspberry Pi 4 (built from Buildroot)

Thanks, JM#!/usr/bin/env python3
# -*- coding: utf-8 -*-

#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: Not titled yet
# GNU Radio version: v3.8.5.0-6-g57bd109d

from gnuradio import blocks
from gnuradio import gr
from gnuradio.filter import firdes
import sys
import signal
from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
from gnuradio import uhd
import time
from gnuradio import zeromq


class b210_continuous_interleaved(gr.top_block):

def __init__(self):
gr.top_block.__init__(self, "Not titled yet")

##
# Variables
##
self.samp_rate = samp_rate = 5e6

##
# Blocks
##
self.uhd_usrp_source_0 = uhd.usrp_source(
",".join(("", "")),
uhd.stream_args(
cpu_format="fc32",
args='',
channels=list(range(0,2)),
),
)
self.uhd_usrp_source_0.set_clock_source('external', 0)
self.uhd_usrp_source_0.set_center_freq(70e6, 0)
self.uhd_usrp_source_0.set_gain(57, 0)
self.uhd_usrp_source_0.set_antenna('TX/RX', 0)
self.uhd_usrp_source_0.set_center_freq(70e6, 1)
# self.uhd_usrp_source_0.set_gain(50-36,1)  # 3/12/22 : retire 35 dB de 
out-ref
self.uhd_usrp_source_0.set_gain(4,1)  # 3/12/22 : retire 35 dB de 
out-ref
self.uhd_usrp_source_0.set_antenna('TX/RX', 1)
self.uhd_usrp_source_0.set_samp_rate(samp_rate)
self.uhd_usrp_source_0.set_time_unknown_pps(uhd.time_spec())
self.uhd_usrp_source_0.set_rx_agc(False, 1)
self.uhd_usrp_source_0.set_rx_agc(False, 0)
self.blocks_interleave_0 = blocks.interleave(gr.sizeof_gr_complex*1, 1)
self.blocks_head_0 = blocks.head(gr.sizeof_short*1, 
int(samp_rate*2*2*2))
self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_short*1, 
'/tmp/fichier.bin', False)
self.blocks_file_sink_0.set_unbuffered(False)
self.blocks_multiply_const_vxx_0 = blocks.multiply_const_cc(32767)
self.blocks_complex_to_interleaved_short_0 = 
blocks.complex_to_interleaved_short(False)

#gpio = "FP0"
#self.uhd_usrp_source_0.set_gpio_attr(gpio, "ATR_RX", 2, 0x3ff)  # 
timestamp sur PPS entrant

##
# Connections
##
self.connect((self.blocks_complex_to_interleaved_short_0, 0), 
(self.blocks_head_0, 0))
self.connect((self.blocks_head_0, 0), (self.blocks_file_sink_0, 0))
self.connect((self.blocks_interleave_0, 0), 
(self.blocks_multiply_const_vxx_0, 0))
self.connect((self.blocks_multiply_const_vxx_0, 0), 
(self.blocks_complex_to_interleaved_short_0, 0))
self.connect((self.uhd_usrp_source_0, 1), (self.blocks_interleave_0, 1))
self.connect((self.uhd_usrp_source_0, 0), (self.blocks_interleave_0, 0))

[USRP-users] Re: B210 gain fluctuation

2022-12-03 Thread Julian Arnold
JM,

could you try disabling IQ imbalance correction and see if this makes any 
difference? If I remember correctly, it can sometimes lead to weird behavior 
like this.

Cheers,
Julian

> Am 03.12.2022 um 11:41 schrieb frie...@free.fr:
> 
> I have an awkward problem whose cause I am unable to pinpoint. 
> The two channels TX/RX A and TX/RX B of a B210 are connected for channel 1 to 
> an antenna + LNA, 
> and for channel 2 to an FPGA GPIO -> Minicircuits ZFSC-2-4 splitter -> 6 dB 
> attenuator which 
> should present a 50 ohm impedance to the TX/RX B input. An oscilloscope shows 
> the output to be 
> constant amplitude signal generated by the GPIO at 60 mV amplitude (after 
> filtering, splitting and
> attenuation) or -14 dBm on a 50 ohm load which should be within the safe 
> limits of input power of 
> the AD9361 I believe. 
> The attached script is used for recording the reference signal transmitted on 
> a 70 MHz carrier 
> by the FPGA on channel B and the received signal on channel A. The settings 
> for both channels 
> have been generated by GNU Radio 3.8 and manually tuned, for e.g by 
> explicitly preventing AGC. 
> 2 seconds of data are recorded as interleaved complex short and displayed in 
> GNU with 
> f=fopen('fichier.bin');d=fread(f,inf,'int16');d=d(1:2:end)+j*d(2:2:end);d1=d(1:2:end);d2=d(2:2:end);plot([1:3e5]/5e6,real(d1(1:3e5)));fclose(f)
> 
> On the left side is the display from channel A connected to the antenna/LNA 
> which is stable and
> reproducible. On the right side is the display from channel B which presents 
> amplitude fluctuations
> which are not reproducible from one run to another. Three records have been 
> analyzed from top to
> bottom and hardly ever is the same pattern repeated. I *think* I noticed that 
> if I change the CH B
> gain settings in the script and launch it, the first time I have a flat gain 
> and then all subsequent
> launches with the same gain setting lead to this varying gain pattern.
> 
> Any idea of what the cause might be? This is all running with Boost_107700; 
> UHD_3.15.0.0-0 on a
> Raspberry Pi 4 (built from Buildroot)
> 
> Thanks, JM
> 
> 
> ___
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
___
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com


[USRP-users] Re: B210 gain fluctuation

2022-12-03 Thread friedtj

That was it! 
Thank you very much. For the record, adding
self.uhd_usrp_source_0.set_auto_iq_balance(False, 0)
self.uhd_usrp_source_0.set_auto_iq_balance(False, 1)
solves the problem.

Thank you, JM

- Mail original -
De: "Julian Arnold" 
À: "friedtj" 
Cc: "usrp-users" 
Envoyé: Samedi 3 Décembre 2022 13:17:17
Objet: Re: [USRP-users] B210 gain fluctuation

JM,

could you try disabling IQ imbalance correction and see if this makes any 
difference? If I remember correctly, it can sometimes lead to weird behavior 
like this.

Cheers,
Julian

> Am 03.12.2022 um 11:41 schrieb frie...@free.fr:
> 
> I have an awkward problem whose cause I am unable to pinpoint. 
> The two channels TX/RX A and TX/RX B of a B210 are connected for channel 1 to 
> an antenna + LNA, 
> and for channel 2 to an FPGA GPIO -> Minicircuits ZFSC-2-4 splitter -> 6 dB 
> attenuator which 
> should present a 50 ohm impedance to the TX/RX B input. An oscilloscope shows 
> the output to be 
> constant amplitude signal generated by the GPIO at 60 mV amplitude (after 
> filtering, splitting and
> attenuation) or -14 dBm on a 50 ohm load which should be within the safe 
> limits of input power of 
> the AD9361 I believe. 
> The attached script is used for recording the reference signal transmitted on 
> a 70 MHz carrier 
> by the FPGA on channel B and the received signal on channel A. The settings 
> for both channels 
> have been generated by GNU Radio 3.8 and manually tuned, for e.g by 
> explicitly preventing AGC. 
> 2 seconds of data are recorded as interleaved complex short and displayed in 
> GNU with 
> f=fopen('fichier.bin');d=fread(f,inf,'int16');d=d(1:2:end)+j*d(2:2:end);d1=d(1:2:end);d2=d(2:2:end);plot([1:3e5]/5e6,real(d1(1:3e5)));fclose(f)
> 
> On the left side is the display from channel A connected to the antenna/LNA 
> which is stable and
> reproducible. On the right side is the display from channel B which presents 
> amplitude fluctuations
> which are not reproducible from one run to another. Three records have been 
> analyzed from top to
> bottom and hardly ever is the same pattern repeated. I *think* I noticed that 
> if I change the CH B
> gain settings in the script and launch it, the first time I have a flat gain 
> and then all subsequent
> launches with the same gain setting lead to this varying gain pattern.
> 
> Any idea of what the cause might be? This is all running with Boost_107700; 
> UHD_3.15.0.0-0 on a
> Raspberry Pi 4 (built from Buildroot)
> 
> Thanks, JM
> 
> 
> ___
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
___
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com


[USRP-users] Re: Question: maximum single channel sample rate on X410 with DPDK

2022-12-03 Thread perper
Hello,

Streaming over multiple SFP+ links works for X411 currently: 
https://github.com/ptrkrysik/uhd/

Best Regards,\
Piotr Krysik
___
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com