bladeRF icon indicating copy to clipboard operation
bladeRF copied to clipboard

BladeRF becomes unusable after changing sample rate

Open andrepuschmann opened this issue 4 years ago • 29 comments

Hey, I am using the bladeRF 2.0 and I am seeing difficulties when changing the sample rates during operation. This happens with Rx only as well as with Rx/Tx. I've also tried to stop the Rx streaming operation before changing the rate but it doesn't seem to help. I remember this actually working before so I was wondering if that might be a regression or if I am doing something wrong here?

The issue can easily be reproduced with srsLTE and the PDSCH example where we scan for the LTE cell at 1.92 Msamps/s before changing to the actual cell bandwidth, 11.52 Msamps/s for example for a 10 MHz LTE cell. See log below. If that happens, I actually need to kill -9 the application.

I've swapped the cable and also tried on two different machines, different USB ports, etc.

Normal streaming is ok, as long as I don't change the sample rate.

Any ideas what might be causing the issue?

Thanks Andre

$ ./lib/examples/pdsch_ue -f 816e6 -I soapy
Opening RF device with 1 RX antennas...
Soapy has found device #0: backend=libusb, device=0x02:0x1B, driver=bladerf, instance=0, label=BladeRF #0 [ab356e9a..f965f068], serial=ab356e9ac74547478d292539f965f068,
Selecting Soapy device: 0
[INFO] bladerf_open_with_devinfo()
[INFO] bladerf_get_serial() = ab356e9ac74547478d292539f965f068
[INFO] setSampleRate(Rx, 0, 4.000000 MHz), actual = 4.000000 MHz
[INFO] setSampleRate(Tx, 0, 4.000000 MHz), actual = 4.000000 MHz
Setting up Rx stream with 1 channel(s)
[INFO] numBuffs=32
[INFO] bufSize=4096
[INFO] numXfers=16
Setting up Tx stream with 1 channel(s)
[INFO] numBuffs=32
[INFO] bufSize=4096
[INFO] numXfers=16
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
Available device sensors:
 - RFIC_TEMP
Available sensors for Rx channel 0:
 - PRE_RSSI
 - SYM_RSSI
State of gain elements for Rx channel 0 (AGC supported):
 - full: 69.00 dB
State of gain elements for Tx channel 0 (AGC not supported):
 - dsa: -10.00 dB
Rx antenna set to RX
Tx antenna set to TX
Starting AGC thread...
Tunning receiver to 816.000 MHz
Searching for cell...
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
0 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
*Found Cell_id: 190 FDD, CP: Normal  , DetectRatio=100% PSR=5.65, Power=39.7 dBm
 Found Cell_id:   0 FDD, CP: Normal  , DetectRatio= 0% PSR=0.00, Power=-inf dBm
Decoding PBCH for cell 190 (N_id_2=1)
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
00000000000000Setting sampling rate 11.52 MHz
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms

I am using the device through Soapy, all compiled from sources.

$ SoapySDRUtil --info
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.8.0-gf722f9ce
API Version: v0.8.0
ABI Version: v0.8
Install root: /usr/local
Search path:  /usr/local/lib/SoapySDR/modules0.8
Module found: /usr/local/lib/SoapySDR/modules0.8/libLMS7Support.so    (20.01.0-0854a51e)
Module found: /usr/local/lib/SoapySDR/modules0.8/libbladeRFSupport.so (0.4.1-1c1e8aa)

I am also using the latest bladeRf driver and FPGA I believe.

$ bladeRF-cli -e version
[INFO @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:309] Waiting for device to become ready...

  bladeRF-cli version:        1.8.0-git-45521019
  libbladeRF version:         2.2.1-git-45521019

  Firmware version:           2.3.2
  FPGA version:               0.11.0 (configured from SPI flash)

andrepuschmann avatar Apr 25 '20 16:04 andrepuschmann

Quick question, do you know if the libbladeRF tuning mode is set to host or FPGA? If it's currently FPGA, please try to set it to host.

On Sat, Apr 25, 2020 at 9:46 AM Andre Puschmann [email protected] wrote:

Hey, I am using the bladeRF 2.0 and I am seeing difficulties when changing the sample rates during operation. This happens with Rx only as well as with Rx/Tx. I've also tried to stop the Rx streaming operation before changing the rate but it doesn't seem to help. I remember this actually working before so I was wondering if that might be a regression or if I am doing something wrong here?

The issue can easily be reproduced with srsLTE and the PDSCH example where we scan for the LTE cell at 1.92 Msamps/s before changing to the actual cell bandwidth, 11.52 Msamps/s for example for a 10 MHz LTE cell. See log below. If that happens, I actually need to kill -9 the application.

I've swapped the cable and also tried on two different machines, different USB ports, etc.

Normal streaming is ok, as long as I don't change the sample rate.

Any ideas what might be causing the issue?

Thanks Andre

$ ./lib/examples/pdsch_ue -f 816e6 -I soapy Opening RF device with 1 RX antennas... Soapy has found device #0: backend=libusb, device=0x02:0x1B, driver=bladerf, instance=0, label=BladeRF #0 [ab356e9a..f965f068], serial=ab356e9ac74547478d292539f965f068, Selecting Soapy device: 0 [INFO] bladerf_open_with_devinfo() [INFO] bladerf_get_serial() = ab356e9ac74547478d292539f965f068 [INFO] setSampleRate(Rx, 0, 4.000000 MHz), actual = 4.000000 MHz [INFO] setSampleRate(Tx, 0, 4.000000 MHz), actual = 4.000000 MHz Setting up Rx stream with 1 channel(s) [INFO] numBuffs=32 [INFO] bufSize=4096 [INFO] numXfers=16 Setting up Tx stream with 1 channel(s) [INFO] numBuffs=32 [INFO] bufSize=4096 [INFO] numXfers=16 [INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz [INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz Available device sensors:

  • RFIC_TEMP Available sensors for Rx channel 0:
  • PRE_RSSI
  • SYM_RSSI State of gain elements for Rx channel 0 (AGC supported):
  • full: 69.00 dB State of gain elements for Tx channel 0 (AGC not supported):
  • dsa: -10.00 dB Rx antenna set to RX Tx antenna set to TX Starting AGC thread... Tunning receiver to 816.000 MHz Searching for cell... [INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz 0 Found Cell_id: 0 FDD, CP: Normal , DetectRatio= 0% PSR=0.00, Power=-inf dBm *Found Cell_id: 190 FDD, CP: Normal , DetectRatio=100% PSR=5.65, Power=39.7 dBm Found Cell_id: 0 FDD, CP: Normal , DetectRatio= 0% PSR=0.00, Power=-inf dBm Decoding PBCH for cell 190 (N_id_2=1) [INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz 00000000000000Setting sampling rate 11.52 MHz [ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms [ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms [ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms [ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms [ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms [ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms

I am using the device through Soapy, all compiled from sources.

$ SoapySDRUtil --info ######################################################

Soapy SDR -- the SDR abstraction library

######################################################

Lib Version: v0.8.0-gf722f9ce API Version: v0.8.0 ABI Version: v0.8 Install root: /usr/local Search path: /usr/local/lib/SoapySDR/modules0.8 Module found: /usr/local/lib/SoapySDR/modules0.8/libLMS7Support.so (20.01.0-0854a51e) Module found: /usr/local/lib/SoapySDR/modules0.8/libbladeRFSupport.so (0.4.1-1c1e8aa)

I am also using the latest bladeRf driver and FPGA I believe.

$ bladeRF-cli -e version [INFO @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:309] Waiting for device to become ready...

bladeRF-cli version: 1.8.0-git-45521019 libbladeRF version: 2.2.1-git-45521019

Firmware version: 2.3.2 FPGA version: 0.11.0 (configured from SPI flash)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Nuand/bladeRF/issues/778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3RD3YXS3WYSH437ON7AP3ROMHX5ANCNFSM4MQ2GATQ .

robertghilduta avatar Apr 27 '20 05:04 robertghilduta

Hey Robert, thanks for the hint. I didn't know about those tuning modes but it turned out that it was set to host by default even though it should be FPGA according to this with the FPGA/lib version I am using, shouldn't it?

So export BLADERF_DEFAULT_TUNING_MODE=fpga does fix the issue for the Rx only app like pdsch_ue. But interestingly, the full LTE UE which apparently does Rx and Tx works better with host mode albeit printing errors.

00000000[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
000000000000000000[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
00.
Found Cell:  Mode=FDD, PCI=190, PRB=50, Ports=2, CFO=0.2 KHz
0[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
RF status: O=29, U=0, L=1
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:305] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x560044d0cb20
000000000000000[INFO] setSampleRate(Rx, 0, 11.520000 MHz), actual = 11.520000 MHz
00000000000000000[INFO] setSampleRate(Tx, 0, 11.520000 MHz), actual = 11.520000 MHz

andrepuschmann avatar Apr 27 '20 09:04 andrepuschmann

Hey Robert, if you have a chance, can you try to run our srsLTE radio benchmark tool and see if that works for you? It's included in srsLTE 20.04. Try ./lib/src/radio/test/benchmark_radio -s 11.52e6 -f 801.3e6 -t 10 -x -y for example.

andrepuschmann avatar Jun 22 '20 11:06 andrepuschmann

Ah, that seems able to trigger an issue which is likely either in libbladeRF or the bladeRF HDL. The first failure seems to happen just as the bladeRF's sample rate is changed from 11.52MHz to 1.92MHz. Let me try to see if I can get a better understanding of what's happening within libbladeRF.

rghilduta avatar Jun 22 '20 12:06 rghilduta

Sure, thanks for looking at this issue Robert. The -y parameter "simulates" changes from 11.52MHz (or any other configured value) to 1.92MHz (lowest LTE bandwidth used for cell search). The purpose it to mimic the UE going into cell search and then back to the actual cell bandwidth. While this isn't done every seconds in the normal UE, it still serves as a good radio (API) benchmark.

andrepuschmann avatar Jun 22 '20 12:06 andrepuschmann

Believe I'm having the same issues while trying to setup srsLTE using 2x Micro xA4. Here's a paste from the test you requested above and I'll work backwards from there.

20.04.1

`./benchmark_radio -d bladeRF -s 11.52e6 -f 801.3e6 -t 10 -x -y Instantiating objects and allocating memory... Initialising instances... Opening 1 channels in RF device=bladeRF with args=default Opening bladeRF... Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz

Warning: TX gain was not set. Using open-loop power control (not working properly)

set RX frequency to 801299966 Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz Setting manual TX/RX offset to 0 samples Start capturing 10000 frames of 11520 samples... Changing sampling rate to 11.52 Msamps/s Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz Setting manual TX/RX offset to 0 samples Changing sampling rate to 1.92 Msamps/s Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz Setting manual TX/RX offset to 0 samples /usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;

/usr/src/srsLTE/lib/src/phy/rf/rf_blade_imp.c.434: RX failed: Operation timed out; nsamples=11520;`

`bladeRF-cli -e version

bladeRF-cli version: 1.8.0-git-c8320f71-ppafocal
libbladeRF version: 2.2.1-git-c8320f71-ppafocal

Firmware version: 2.2.0-git-47f93fe1
FPGA version: 0.11.0 `

`######################################################

Soapy SDR -- the SDR abstraction library

######################################################

Lib Version: v0.7.2-1 API Version: v0.7.1 ABI Version: v0.7 Install root: /usr Search path: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7 Search path: /usr/local/lib/x86_64-linux-gnu/SoapySDR/modules0.7 (missing) Search path: /usr/local/lib/SoapySDR/modules0.7 Module found: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/libHackRFSupport.so (0.3.3) Module found: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/libLMS7Support.so (20.01.0) Module found: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/libRedPitaya.so (0.1.1) Module found: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/libairspySupport.so (0.1.2) Module found: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/libaudioSupport.so (0.1.1) Module found: /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.7/libbladeRFSupport.so (0.4.1) `

alphafox02 avatar Jul 14 '20 23:07 alphafox02

I’m having the same issue with the bladerf A4 using master branch from bladerf and srsLTE and the newest firmware and bitstream. Is there any movement on this issue? Would be happy to try a branch.

sparklespdx avatar Sep 05 '20 16:09 sparklespdx

I have found further information about this issue.

I set the default sample rate to 11.52MHz in rf_bladerf_imp.c. This causes srsUE to set the sample rate to 11.52MHz when the device initializes, then sets it to 1.92MHz, searches for a cell, and then sets it to 11.52MHz again when it finds one.

It seems that the radio functions fine when switching down from 11.52Mhz to 1.92Mhz, but going the other direction it starts timing out.

The version of srsLTE I am using will switch back to cell searching once the device has been in an idle state for long enough, and what's really interesting is when the radio is switched back down to 1.92MHz, it works fine and can receive again. Then when it is switched back up to 11.52MHz, it starts timing out.

Opening 1 RF devices with 1 RF channels...
Opening bladeRF...
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz

Warning: TX gain was not set. Using open-loop power control (not working properly)

Waiting PHY to initialize ... Warning: Failed to create thread with real-time priority. Creating it with normal priority: Success
Warning: Failed to create thread with real-time priority. Creating it with normal priority: Success
Warning: Failed to create thread with real-time priority. Creating it with normal priority: Success
Warning: Failed to create thread with real-time priority. Creating it with normal priority: Resource temporarily unavailable
done!
Attaching UE...
Searching cell in DL EARFCN=3400, f_dl=1935.0 MHz, f_ul=1855.0 MHz
set RX frequency to 1935000062
set TX frequency to 1855000062
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
.
.
Found Cell:  Mode=FDD, PCI=393, PRB=50, Ports=4, CFO=1.4 KHz
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
SYNC:  Receiving from radio while in IDLE_RX
SYNC:  Receiving from radio while in IDLE_RX
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
.
Found Cell:  Mode=FDD, PCI=393, PRB=50, Ports=4, CFO=1.1 KHz
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
SYNC:  Receiving from radio while in IDLE_RX
SYNC:  Receiving from radio while in IDLE_RX
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
.
Found Cell:  Mode=FDD, PCI=393, PRB=50, Ports=4, CFO=0.6 KHz
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
SYNC:  Receiving from radio while in IDLE_RX
SYNC:  Receiving from radio while in IDLE_RX
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
.
Found Cell:  Mode=FDD, PCI=393, PRB=50, Ports=4, CFO=1.2 KHz

sparklespdx avatar Sep 22 '20 23:09 sparklespdx

More interesting data; I am using radio_benchmark for troubleshooting. It seems that if the radio is told to change the sample rate to exactly the same sample rate it already has, it still encounters the error (i.e. changing from 1.92e6 to 1.92e6 triggers the bug.

[josh@lappy-mk6 build]$ sudo bash -c "export BLADERF_LOG_LEVEL=debug; export BLADERF_DEFAULT_TUNING_MODE=host; ./lib/src/radio/test/benchmark_radio -d bladerf -s 1.92e6 -f 801.3e6 -t 10 -x -y"
[DEBUG @ host/libraries/libbladeRF/src/init_fini.c:90] libbladeRF 2.2.1-git-b02acdd2-dirty: initializing
Instantiating objects and allocating memory...
Initialising instances...
Opening 1 channels in RF device=bladerf with args=default
Opening bladeRF...
[DEBUG @ host/libraries/libbladeRF/src/backend/usb/libusb.c:189] Bus 002 Device 109: Nuand bladeRF 2.0, serial 8a952f477f514a11a049743f0c98a38b
[DEBUG @ host/libraries/libbladeRF/src/driver/ina219.c:70] Configuration register: 0x019f
[DEBUG @ host/libraries/libbladeRF/src/driver/ina219.c:82] Calibration register: 0xa000
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/common.c:263] Default tuning mode: Host
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2276] bladerf2_set_tuning_mode: New tuning mode: Host
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2311] bladerf2_set_tuning_mode: Releasing FPGA RFIC control
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_fpga.c:251] _rfic_fpga_deinitialize: deinitializing
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2326] bladerf2_set_tuning_mode: Initializing Host RFIC control
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_host.c:84] _rfic_host_initialize: initializating
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_host.c:146] _rfic_host_initialize: initialization complete
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2558] trim DAC is enabled
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2591] saving current trim DAC value: 0x1f6b
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2558] trim DAC is disabled
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2595] restoring old trim DAC value: 0x1f6b
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:207] _bladerf2_initialize: complete
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2276] bladerf2_set_tuning_mode: New tuning mode: FPGA
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2311] bladerf2_set_tuning_mode: Releasing Host RFIC control
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_host.c:156] _rfic_host_deinitialize: deinitializing
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2326] bladerf2_set_tuning_mode: Initializing FPGA RFIC control
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_fpga.c:233] _rfic_fpga_initialize: initializing
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1053] bladerf2_set_sample_rate: enabling 4x decimation/interpolation filters
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz

Warning: TX gain was not set. Using open-loop power control (not working properly)

set RX frequency to 801299966
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Start capturing 10000 frames of 1920 samples...
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
/home/josh/git/srsLTE/lib/src/phy/rf/rf_blade_imp.c.439: RX failed: Operation timed out; nsamples=1920;

Same result when tuning mode is FPGA.

sparklespdx avatar Sep 27 '20 14:09 sparklespdx

This happens to me with bitstream v0.10.2 but not v0.9.0 (on xA4 from Nuand)

dillona avatar Oct 02 '20 21:10 dillona

Thanks for the updates. Is it possible to downgrade the bitstream when using the PPA/20.04? Still learning the ins and outs of the bladerf. I’ll do some research and see if I can find out more and try and run it again as the UE.

alphafox02 avatar Oct 02 '20 21:10 alphafox02

In recent testing with libbladerf 2.4 from git, latest firmware and fpga , my xA4 and xA9 seems fine in the role of the enodeb or ue with srsLTE (can’t recall if uhd or bladerf driver arg worked better). Also works great with croc hunter when configured to use only the srsLTE bladerf driver.

alphafox02 avatar Feb 05 '21 15:02 alphafox02

I can confirm that the problem disappeared after upgrading to the latest FX3 firmware (2021-01-12 - v2.4.0), FPGA (2021-01-12 - v0.12.0) and libbladeRF (git e09200c38).

sbourdeauducq avatar Feb 27 '21 10:02 sbourdeauducq

I can confirm that the problem disappeared after upgrading to the latest FX3 firmware (2021-01-12 - v2.4.0), FPGA (2021-01-12 - v0.12.0) and libbladeRF (git e09200c).

Unfortunately, the problem does not disappear for me after upgrading to latest, or downgrading to each fpga from v0.12.0 to v0.8.0

  bladeRF-cli version:        1.8.0-git-e09200c3
  libbladeRF version:         2.4.0-git-e09200c3

  Firmware version:           2.4.0-git-a3d5c55f
  FPGA version:               0.9.0 (configured by USB host)

yesimxev avatar Apr 18 '21 00:04 yesimxev

Has any progress been made to this ? I have tested the most recent FPGA/Firmware/master branch combo and the benchmark still fails with gaps and overruns

bladeRF-cli version: 1.8.0-git-d1c38277 libbladeRF version: 2.4.1-git-d1c38277

Firmware version: 2.4.0-git-a3d5c55f FPGA version: 0.14.0 (configured from SPI flash)

Runnign on Ubuntu 20.04LTS // VMware with usb 3.0 DRIVERS USB Speed clocked at ~7700-8000 kb/s (with usbtop)

USB Port was also compared to bare metail Ubuntu 20.04 with exact same numbers on a 1 Gig file creation: dd if=/dev/zero of=/media/user/Verbatim/sparse_file bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 55.122 s, 19.5 MB/s

USBTOP reports ~100e3 throughput on this port during file creation

sudo bash -c "export BLADERF_LOG_LEVEL=debug; export BLADERF_DEFAULT_TUNING_MODE=host; ./lib/src/radio/test/benchmark_radio -d bladerf -s 1.92e6 -f 801.3e6 -t 10 -x -y" [DEBUG @ host/libraries/libbladeRF/src/init_fini.c:90] libbladeRF 2.4.1-git-d1c38277: initializing Instantiating objects and allocating memory... Initialising instances... Opening 1 channels in RF device=bladerf with args=default Available RF device list: bladeRF Opening bladeRF... [DEBUG @ host/libraries/libbladeRF/src/backend/usb/libusb.c:189] Bus 004 Device 013: Nuand bladeRF 2.0, serial 92bfacb990d74ded85cf32a954e35f9f [DEBUG @ host/libraries/libbladeRF/src/driver/ina219.c:70] Configuration register: 0x019f [DEBUG @ host/libraries/libbladeRF/src/driver/ina219.c:82] Calibration register: 0xa000 [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/common.c:270] Default tuning mode: Host [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2287] bladerf2_set_tuning_mode: New tuning mode: Host [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2337] bladerf2_set_tuning_mode: Initializing Host RFIC control [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_host.c:85] _rfic_host_initialize: initializating [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/rfic_host.c:154] _rfic_host_initialize: initialization complete [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2569] trim DAC is enabled [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2602] saving current trim DAC value: 0x1bd7 [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2569] trim DAC is disabled [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:2606] restoring old trim DAC value: 0x1bd7 [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:207] _bladerf2_initialize: complete [DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1062] bladerf2_set_sample_rate: enabling 4x decimation/interpolation filters Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz

Warning: TX gain was not set. Using open-loop power control (not working properly)

set RX frequency to 801299966 Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz Setting manual TX/RX offset to 0 samples Start capturing 10000 sub-frames of 1920 samples (approx. 10s) ... Changing sampling rate to 1.92 Msamps/s Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz [repeat 9 times] Finished streaming with 18 gaps, 0 late timestamps, 74 overflows, 0 underflow... Tearing down... Failed! [DEBUG @ host/libraries/libbladeRF/src/init_fini.c:98] libbladeRF 2.4.1-git-d1c38277: deinitializing

us-maker avatar Nov 30 '21 19:11 us-maker

My issue is gone since I'm using srsRAN, however I'm not sure with @andrepuschmann tried that or the latest updates from Nuand

yesimxev avatar Nov 30 '21 20:11 yesimxev

I have 2 BladeRF xA4 Micro's, used one as spectrum analyzer with gqrx on a cabled connection from the Radio under test(with benchmark_radio executing ) and saw no transmit. Does benchmark_radio @andrepuschmann actually transmit with -x? I tested same frequency with a simple FM modulation (same freq/ sample rate) through GRC and received a good xmit.

us-maker avatar Dec 01 '21 15:12 us-maker

Can you provide the versions and physical setup you are using @yesimxev? Thanks

us-maker avatar Dec 01 '21 16:12 us-maker

I am having difficulty for running srsRAN application (as eNodeB) with BladeRF xA9. The COTS UE does not register although it sees the signal from the enb.

So I tried the benchmark test to see if there is a problem. I am having the same problem with the benchmark_radio command below:

sudo bash -c "export BLADERF_LOG_LEVEL=debug; export BLADERF_DEFAULT_TUNING_MODE=host; ./lib/src/radio/test/benchmark_radio -d bladerf -s 1.92e6 -f 801.3e6 -t 10 -x -y"

The logs are ending with these lines:

Finished streaming with 18 gaps, 0 late timestamps, 1649 overflows, 0 underflow...
Tearing down...
Failed!
[DEBUG @ host/libraries/libbladeRF/src/init_fini.c:98] libbladeRF 2.4.1-git-4d9b0b87: deinitializing

The bladeRF software versions are as follows:

bladeRF> version 

  bladeRF-cli version:        1.8.0-git-4d9b0b87
  libbladeRF version:         2.4.1-git-4d9b0b87

  Firmware version:           2.4.0-git-a3d5c55f
  FPGA version:               0.11.1 (configured from SPI flash)

Can someone provide running versions of bladeRF and srsRAN with the configuration files? @andrepuschmann @alphafox02 @yesimxev

Thanks

devmuroid avatar Mar 17 '22 13:03 devmuroid

Please flash firmware v2.4.1 and load/flash fpga v0.14.0. They have several fixes, anyway I noticed you try with the latest lib. Fw and libs should always match https://www.nuand.com/fpga_images/

yesimxev avatar Mar 17 '22 17:03 yesimxev

I have loaded v0.14.0 fpga but used the libbladeRF 2.4.1 version that was mentioned above with the latest firmware version of 2.4.0 (latest release is 2.4.0 as far as I see) according to the releases page on https://github.com/Nuand/bladeRF/releases

* FPGA bitstream                v0.14.0
* FX3 firmware                  v2.4.0
* libbladeRF                    v2.4.1
* bladeRF-cli                   v1.8.0
* MATLAB & Simulink bindings    v1.0.5
* Python bindings               v1.2.1

The srsenb starting log is as follows:

Opening 1 channels in RF device=soapy with args=default
Soapy has found device #0: backend=libusb, device=0x02:0x11, driver=bladerf, instance=0, label=BladeRF #0 [9ffbb05f..e1e2c2df], serial=9ffbb05ff656470d9fc59235e1e2c2df, 
Selecting Soapy device: 0
[INFO] bladerf_open_with_devinfo()
[INFO] bladerf_get_serial() = 9ffbb05ff656470d9fc59235e1e2c2df
[INFO] setSampleRate(Rx, 0, 4.000000 MHz), actual = 4.000000 MHz
[INFO] setSampleRate(Tx, 0, 4.000000 MHz), actual = 4.000000 MHz
Setting up Rx stream with 1 channel(s)
Setting up Tx stream with 1 channel(s)
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
Available device sensors: 
 - RFIC_TEMP
Available sensors for Rx channel 0: 
 - PRE_RSSI
 - SYM_RSSI
State of gain elements for Rx channel 0 (AGC supported):
 - full: 71.00 dB
State of gain elements for Tx channel 0 (AGC not supported):
 - dsa: -10.00 dB
Rx antenna set to RX
Tx antenna set to TX

==== eNodeB started ===
Type <t> to view trace
[INFO] setSampleRate(Rx, 0, 5.760000 MHz), actual = 5.760000 MHz
[INFO] setSampleRate(Tx, 0, 5.760000 MHz), actual = 5.760000 MHz
Setting frequency: DL=2680.0 Mhz, UL=2560.0 MHz for cc_idx=0 nof_prb=25
0000000

As a side note, when the TX port is connected to a spectrum analyzer, we see notches at the ends of the LTE signal bandwidth. (while these notches are not there with other SDR cards such as Ettus B200 mini)

Any help is appreciated about the configuration of correctly working srsenb with bladeRFxA9.

Thanks in advance

devmuroid avatar Mar 18 '22 07:03 devmuroid

You are right, I forgot actually the latest version is 2.4.0. Is your issue gone? As far as I remember, according to @rghilduta , the bandwitdth very end can be ignored if it doesn't affect usage. Can't remember if it can be trimmed or fine tuned

yesimxev avatar Mar 18 '22 14:03 yesimxev

UPDATE: after troubleshooting, I have it working, the issue was VMware (even though usb 3.0 was enabled). When I plugged bladeRF into usb2.0 port on a separate machine, I noticed the same errors that I saw in VMWare. Switching to a USB 3.0 port on the separate machine (with Debian on metal), and the errors seem to have gone away.

Hello, experiencing the same issue as @devmuroid:

Versions

Card: bladeRF 2.0 xA4 bladeRF-cli version: 1.8.0-git-3a411c87 libbladeRF version: 2.4.1-git-4d9b0b87

Firmware version: 2.4.0-git-a3d5c55f FPGA version: 0.14.0 (configured from SPI flash)

Benchmark log (FPGA tuning mode, device=bladeRF)

$ BLADERF_DEFAULT_TUNING_MODE=fpga ./lib/src/radio/test/benchmark_radio -s 11.52e6 -f 801.3e6 -t 10 -x -y -d bladeRF
Instantiating objects and allocating memory...
Initialising instances...
Opening 1 channels in RF device=bladeRF with args=default
Available RF device list: soapy  bladeRF 
Opening bladeRF...
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:79] Firmware version (v2.4.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:103] FPGA version (v0.14.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz

Warning: TX gain was not set. Using open-loop power control (not working properly)

set RX frequency to 801299966
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Start capturing 10000 sub-frames of 11520 samples (approx. 10s) ...
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
/home/user/projects/radio/srsRAN/lib/src/phy/rf/rf_blade_imp.c:534: TX failed: Invalid operation or parameter
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Finished streaming with 114 gaps, 1 late timestamps, 2390 overflows, 0 underflow...
Tearing down...
Failed!

Benchmark log (Host tuning mode, device=bladeRF)

 BLADERF_DEFAULT_TUNING_MODE=host ./lib/src/radio/test/benchmark_radio -s 11.52e6 -f 801.3e6 -t 10 -x -y -d bladeRF
Instantiating objects and allocating memory...
Initialising instances...
Opening 1 channels in RF device=bladeRF with args=default
Available RF device list: soapy  bladeRF 
Opening bladeRF...
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:79] Firmware version (v2.4.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:103] FPGA version (v0.14.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz

Warning: TX gain was not set. Using open-loop power control (not working properly)

set RX frequency to 801299966
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Start capturing 10000 sub-frames of 11520 samples (approx. 10s) ...
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
/home/user/projects/radio/srsRAN/lib/src/phy/rf/rf_blade_imp.c:534: TX failed: Invalid operation or parameter
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 11.52 Msamps/s
Set RX sampling rate 11.52 Mhz, filter BW: 9.22 Mhz
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Set RX sampling rate 1.92 Mhz, filter BW: 1.92 Mhz
Setting manual TX/RX offset to 0 samples
Finished streaming with 49 gaps, 1 late timestamps, 2402 overflows, 0 underflow...
Tearing down...
Failed!

Benchmark log (soapy)

 BLADERF_DEFAULT_TUNING_MODE=fpga ./lib/src/radio/test/benchmark_radio -s 11.52e6 -f 801.3e6 -t 10 -x -y 
Instantiating objects and allocating memory...
Initialising instances...
Opening 1 channels in RF device= with args=default
Available RF device list: soapy  bladeRF 
Trying to open RF device 'soapy'
Soapy has found device #0: backend=libusb, device=0x04:0x09, driver=bladerf, instance=0, label=BladeRF #0 [d255df41..84fb6e13], serial=d255df41752b4dfda40bcade84fb6e13, 
Selecting Soapy device: 0
[INFO] bladerf_open_with_devinfo()
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:79] Firmware version (v2.4.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
[INFO @ host/libraries/libbladeRF/src/helpers/version.c:103] FPGA version (v0.14.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
[INFO] bladerf_get_serial() = d255df41752b4dfda40bcade84fb6e13
[INFO] setSampleRate(Rx, 0, 4.000000 MHz), actual = 4.000000 MHz
[INFO] setSampleRate(Tx, 0, 4.000000 MHz), actual = 4.000000 MHz
Setting up Rx stream with 1 channel(s)
Setting up Tx stream with 1 channel(s)
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
Available device sensors: 
 - RFIC_TEMP
Available sensors for Rx channel 0: 
 - PRE_RSSI
 - SYM_RSSI
State of gain elements for Rx channel 0 (AGC supported):
State of gain elements for Tx channel 0 (AGC not supported):
Rx antenna set to RX
Tx antenna set to TX
RF device 'soapy' successfully opened

Warning: TX gain was not set. Using open-loop power control (not working properly)

[INFO] setSampleRate(Rx, 0, 11.520000 MHz), actual = 11.520000 MHz
[INFO] setSampleRate(Tx, 0, 11.520000 MHz), actual = 11.520000 MHz
Setting manual TX/RX offset to 0 samples
Start capturing 10000 sub-frames of 11520 samples (approx. 10s) ...
Changing sampling rate to 11.52 Msamps/s
[INFO] setSampleRate(Rx, 0, 11.520000 MHz), actual = 11.520000 MHz
[INFO] setSampleRate(Tx, 0, 11.520000 MHz), actual = 11.520000 MHz
Setting manual TX/RX offset to 0 samples
00000000000000Changing sampling rate to 1.92 Msamps/s
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
Setting manual TX/RX offset to 0 samples
/home/user/projects/radio/srsRAN/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/user/projects/radio/srsRAN/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
... continues for ages.

knt141 avatar Mar 22 '22 01:03 knt141

I have tried with different computers with Ubuntu 20.04 and 21.10 with host and fpga modes but benchmark_radio still fails.

devmuroid avatar Mar 22 '22 13:03 devmuroid

Is their any update on this issue or any combination of firmware and libbladerf version that can support the srsue ?

grmono avatar Aug 27 '22 20:08 grmono

Usb3.0, latest fpga, libs and srsran did the trick for others

yesimxev avatar Aug 28 '22 07:08 yesimxev

Usb3.0, latest fpga, libs and srsran did the trick for others

Unfortunately that doesn't work for me, i am using USB3 for sure on ubuntu 22.04 with the latest fpga / bitstream firmware and libbladerf library my bladerf board is the xa4 and i am also using the latest version of srsran.

The issue is exactly as described here , pdsch_ue is working fine for me but srsue is stuck once it tries to switch down to 1.92Mhz also the benchamrk test fails with all drivers (soapy,bladerf), i have tried the following so far i made changes to srsue rf_blade_impl.c to change 1.92Mhz to 11.52e6 and also set srate in ue.conf to 11.52e6 this seems to at least help the UE to proceed and attach but this doesn't work on all earfcns only on specific earfcns such as 2850 but it fails on 1350/6400 etc.

Also even tho the UE seems to attach and go to RRC IDLE in the ue_mac.pcap the ue doesn't actually capture correct info since the packets in the pcap are garbage and cannot be analyzed correctly, i think the only way for srsue to actually work correctly is to actually set the 1.92Mhz rate as originally intended but this bug still seems to apply for the bladerf lib since if the rate is set from 11.52Mhz to 1.92Mhz the boards times out and is unresponsive.

grmono avatar Aug 28 '22 14:08 grmono

The one person that told me the xa4 worked as a UE also said they added this to the arguments --rf.srate=11520000

I’ll follow up and see what else they used.

alphafox02 avatar Aug 28 '22 19:08 alphafox02

The one person that told me the xa4 worked as a UE also said they added this to the arguments --rf.srate=11520000

I’ll follow up and see what else they used.

I tried this aswell and this works only for specific earfcns such as the 2850 that work with this rate but it does not work on other earfcns like the 1350/6400 etc, regardless the issue on the bladerf that causes the timeout when switched to a lower rate from a higher rate is still applicable at least for the xa4 board that i can test on

grmono avatar Aug 29 '22 11:08 grmono

Hey, I have the same issue with a bladeRF 2.0 micro xA5.

  bladeRF-cli version:        1.8.0-git-21084112-dirty
  libbladeRF version:         2.4.1-git-21084112-dirty

  Firmware version:           2.4.0-git-a3d5c55f
  FPGA version:               0.14.0

I tried many of the proposed solutions above. Though it looks like downgrading the FPGA image might do the trick, I cannot do it as the xA5 and the xA4 don't share the same FPGA.

export BLADERF_DEFAULT_TUNING_MODE=host
sudo ./lib/src/radio/test/benchmark_radio -d bladerf -s 1.92e6 -f 801.3e6 -t 10 -x -y

See the output below.

Instantiating objects and allocating memory...
Initialising instances...
Opening 1 channels in RF device= with args=default
Available RF device list: UHD  soapy  bladeRF 
Trying to open RF device 'UHD'
[INFO] [UHD] linux; GNU C++ version 9.4.0; Boost_107100; UHD_4.3.0.0-6-g5aa6bc44
[INFO] [LOGGING] Fastpath logging disabled at runtime.
Opening USRP channels=1, args: 
[INFO] [UHD RF] RF UHD Generic instance constructed
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_uhd_imp.cc:930: uhd_init failed, freeing...
[ERROR] [UHD RF] LookupError: KeyError: No devices found for ----->
Empty Device Address
Unable to open RF device 'UHD'
Trying to open RF device 'soapy'
Soapy has found device #0: backend=libusb, device=0x04:0x08, driver=bladerf, instance=0, label=BladeRF #0 [7a3c782d..ef922e52], serial=7a3c782d209b4d5e93d03d03ef922e52, 
Selecting Soapy device: 0
[INFO] bladerf_open_with_devinfo()
[INFO] bladerf_get_serial() = 7a3c782d209b4d5e93d03d03ef922e52
[INFO] setSampleRate(Rx, 0, 4.000000 MHz), actual = 4.000000 MHz
[INFO] setSampleRate(Tx, 0, 4.000000 MHz), actual = 4.000000 MHz
Setting up Rx stream with 1 channel(s)
Setting up Tx stream with 1 channel(s)
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
Available device sensors: 
 - RFIC_TEMP
Available sensors for Rx channel 0: 
 - PRE_RSSI
 - SYM_RSSI
State of gain elements for Rx channel 0 (AGC supported):
 - full: 71.00 dB
State of gain elements for Tx channel 0 (AGC not supported):
 - dsa: -10.00 dB
Rx antenna set to RX
Tx antenna set to TX
RF device 'soapy' successfully opened

Warning: TX gain was not set. Using open-loop power control (not working properly)

[INFO] setSampleRate(Rx, 0, 11.520000 MHz), actual = 11.520000 MHz
[INFO] setSampleRate(Tx, 0, 11.520000 MHz), actual = 11.520000 MHz
Setting manual TX/RX offset to 0 samples
Start capturing 10000 sub-frames of 11520 samples (approx. 10s) ...
Changing sampling rate to 11.52 Msamps/s
[INFO] setSampleRate(Rx, 0, 11.520000 MHz), actual = 11.520000 MHz
[INFO] setSampleRate(Tx, 0, 11.520000 MHz), actual = 11.520000 MHz
Setting manual TX/RX offset to 0 samples
00Changing sampling rate to 1.92 Msamps/s
[INFO] setSampleRate(Rx, 0, 1.920000 MHz), actual = 1.920000 MHz
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed4070f40
[INFO] setSampleRate(Tx, 0, 1.920000 MHz), actual = 1.920000 MHz
Setting manual TX/RX offset to 0 samples
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
0/home/nuc/srsRAN21.10-master/lib/src/phy/rf/rf_soapy_imp.c:1001: Couldn't write all samples after 100 trials.
00[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed41091a0
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed410d1b0
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed41111c0
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed41151d0
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed41191e0
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed411d1f0
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed4121200
[ERROR @ host/libraries/libbladeRF/src/backend/usb/libusb.c:1089] Transfer timed out for buffer 0x7f1ed4125210
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms
[ERROR @ host/libraries/libbladeRF/src/streaming/sync.c:336] wait_for_buffer: Timed out waiting for buf_ready after 400 ms

Any ideas?

Thanks!

Antonio

aaalbanese avatar Nov 22 '22 18:11 aaalbanese