SetBandwidth error until reconnecting the device

Hello,

I just got my LimeSDR and now I want to play with it.
I use the latest sources of LimeSuite and SoapySDR. But while trying some example I noticed that sometimes an error “setBandwidth failed” occur, which disappear after disconnecting the USB-Port and connecting it again.

I use the following components:

  • Linux (Ubuntu 16.04) with 4.10.0-37 Kernel
  • libusb 1.12-28
  • LimeSuite v17.10.0 and also master (78122ec) tested
  • SoapySDR master (ba9ad2d)

To simplify the issue I try to use SoapSDRUtil and set the Bandwidth. Sometimes it worked, but quiet often the following occur:

SoapySDRUtil --rate=10000000 --direction=RX
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################
[INFO] Make connection: 'LimeSDR-USB [USB 3.0] 9070105C61E23'
[INFO] Reference clock 30.720 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz
[INFO] Init LMS7002M(0)
[INFO] Ver=7, Rev=1, Mask=1
[INFO] LMS7002M calibration values caching Disable
[ERROR] 
[ERROR] setBandwidth(Rx, 0, 30 MHz) Failed - 
Error in rate test: 
terminate called after throwing an instance of 'std::runtime_error'
  what():  SoapySDR::Device::unmake() unknown device
Abgebrochen (Speicherabzug geschrieben)

The setting of bandwidth failed without any further error message. But more weired is, that the gateware could be found if I try again:

SoapySDRUtil --rate=10000000 --direction=RX
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################
[INFO] Make connection: 'LimeSDR-USB [USB 3.0] 9070105C61E23'
[WARNING] Gateware version mismatch!
  Expected gateware version 2, revision 11
  But found version 0, revision 0
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz
[INFO] Init LMS7002M(0)
[INFO] Ver=0, Rev=0, Mask=0
Error in rate test: ResetChip() failed
terminate called after throwing an instance of 'std::runtime_error'
  what():  SoapySDR::Device::unmake() unknown device
Abgebrochen (Speicherabzug geschrieben)

When I disconnect Lime’s USB interface and connect it again, the most times it work again (sometimes I need to reconnect twice):

######################################################
## Soapy SDR -- the SDR abstraction library
######################################################
[INFO] Make connection: 'LimeSDR-USB [USB 3.0] 9070105C61E23'
[INFO] Reference clock 30.720 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz
[INFO] Init LMS7002M(0)
[INFO] Ver=7, Rev=1, Mask=1
[INFO] LMS7002M calibration values caching Disable
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin RX rate test at 10 Msps
Starting stream loop, press Ctrl+C to exit...
|[INFO] L
9.48016 Msps	37.9206 MBps
9.74007 Msps	38.9603 MBps

What could be the root cause of the issue?

Thank you in advance.

Br,
Sebastian

I just found the opportunity to get TRACE information from SoapySDR

export SOAPY_SDR_LOG_LEVEL=TRACE

More detailed log:

[DEBUG] SoapyLMS7::setSampleRate(Rx, 1, 10 MHz), CGEN=80 MHz, ADC=20 MHz, decim=2
[DEBUG] SoapyLMS7::setSampleRate(Tx, 1, 10 MHz), CGEN=80 MHz, DAC=20 MHz, interp=2
[ERROR] 
[DEBUG] SoapyLMS7::setBandwidth(Rx, 1, 30 MHz)
[DEBUG] MCU algorithm time: 0 ms
[ERROR] setBandwidth(Rx, 1, 30 MHz) Failed - 
Error in rate test: 
terminate called after throwing an instance of 'std::runtime_error'
  what():  SoapySDR::Device::unmake() unknown device
Abgebrochen (Speicherabzug geschrieben)

Sine I downgraded to gateware version 10 the problem disappeared.

Only the version mismatch warning:

[WARNING] Gateware version mismatch!
  Expected gateware version 2, revision 11
  But found version 2, revision 10
1 Like