From 21721e967bb9da50623b4889456fff893a5262e5 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Fri, 4 Nov 2022 18:18:35 +0100 Subject: [PATCH 1/2] workaround issue of N310 with UHD >= 4.2.0 when changing the BW UHD issue was reported here: https://github.com/EttusResearch/uhd/issues/644 --- radio/USRP/USERSPACE/LIB/usrp_lib.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/radio/USRP/USERSPACE/LIB/usrp_lib.cpp b/radio/USRP/USERSPACE/LIB/usrp_lib.cpp index 2a351dcce0..2b38ee4fb1 100644 --- a/radio/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/radio/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1417,11 +1417,13 @@ extern "C" { s->tx_stream = s->usrp->get_tx_stream(stream_args_tx); /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ - for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i+choffset); + if (device->type != USRP_N300_DEV) { // N310 with UHD >= 4.2.0 has issues with changing the BW + for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i+choffset); - for(int i=0; i<((int) s->usrp->get_rx_num_channels()) && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i+choffset); + for(int i=0; i<((int) s->usrp->get_rx_num_channels()) && iusrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i+choffset); + } for (int i=0; i Date: Wed, 16 Nov 2022 09:22:32 +0000 Subject: [PATCH 2/2] extend comment on issue with USRP N310 and UHD >= 4.2.0 --- radio/USRP/USERSPACE/LIB/usrp_lib.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radio/USRP/USERSPACE/LIB/usrp_lib.cpp b/radio/USRP/USERSPACE/LIB/usrp_lib.cpp index 2b38ee4fb1..abbaddb255 100644 --- a/radio/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/radio/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1417,7 +1417,9 @@ extern "C" { s->tx_stream = s->usrp->get_tx_stream(stream_args_tx); /* Setting TX/RX BW after streamers are created due to USRP calibration issue */ - if (device->type != USRP_N300_DEV) { // N310 with UHD >= 4.2.0 has issues with changing the BW + // N310 with UHD >= 4.2.0 has issues with changing the BW, which is a NOP on N310 in earlier versions + // see also: https://github.com/EttusResearch/uhd/issues/644 + if (device->type != USRP_N300_DEV) { for(int i=0; i<((int) s->usrp->get_tx_num_channels()) && iusrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i+choffset);