Can't get LimeSDR to work with 3rd party software

Hi,

i have not used my LimeSDR-USB for a longer time and wanted to use it now. I updated all the libraries and software to the latest versions and updated the firmware and gateware.

When i do the quick tests with LimeSuiteGUI everything works as expected (https://wiki.myriadrf.org/LimeSDR-USB_Quick_Test)

But when i execute LimeQuickTest i get the first error in a loopback test:

[ TESTING STARTED ]
->Start time: Sat Mar 23 13:12:50 2019

->Device: LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=0009060B00542515
  Serial Number: 0009060B00542515

[ Clock Network Test ]
->FX3 GPIF clock test
  Test results: 17385; 21141; 24897 - PASSED
->Si5351C test
  CLK0: 17554 / 17554 - PASSED
  CLK1: 17554 / 17554 - PASSED
  CLK2: 17554 / 17554 - PASSED
  CLK3: 17554 / 17554 - PASSED
  CLK4: 17554 / 17554 - PASSED
  CLK5: 17554 / 17554 - PASSED
  CLK6: 17554 / 17554 - PASSED
->ADF4002 Test
  Result: 10 - PASSED
->VCTCXO test
  Results : 5112936 (min); 5113065 (max) - PASSED
->Clock Network Test PASSED

[ FPGA EEPROM Test ]
->Read EEPROM
->Read data: 11 02 15 11 02 15 02
->FPGA EEPROM Test PASSED

[ LMS7002M Test ]
->Perform Registers Test
->External Reset line test
  Reg 0x20: Write value 0xFFFD, Read value 0xFFFD
  Reg 0x20: value after reset 0x0FFFF
->LMS7002M Test PASSED

[ RF Loopback Test ]
Note: The test should be run without anything connected to RF ports
->Configure LMS
->Run Tests (TX_2-> LNA_L):
  CH0 (SXR=800.0MHz, SXT=805.0MHz): Result:(-14.4 dBFS, 5.00 MHz) - PASSED
  CH1 (SXR=800.0MHz, SXT=805.0MHz): Result:(-17.0 dBFS, 5.00 MHz) - PASSED
->Run Tests (TX_1 -> LNA_W):
  CH0 (SXR=1800.0MHz, SXT=1805.0MHz): Result:(-23.7 dBFS, 5.00 MHz) - FAILED
  CH1 (SXR=1800.0MHz, SXT=1805.0MHz): Result:(-18.8 dBFS, 5.00 MHz) - PASSED
->Run Tests (TX_2-> LNA_H):
  CH0 (SXR=2500.0MHz, SXT=2505.0MHz): Result:(-16.7 dBFS, 5.00 MHz) - PASSED
  CH1 (SXR=2500.0MHz, SXT=2505.0MHz): Result:(-16.1 dBFS, 5.00 MHz) - PASSED
->RF Loopback Test FAILED

=> Board tests FAILED <=

Elapsed time: 1.35 seconds

Then i tried gqrx without any luck either. After first start i get:

gr-osmosdr v0.1.4-127-g4d83c606 (0.1.5git) gnuradio 3.7.10
built-in source types: file fcd rtl rtl_tcp rfspace soapy redpitaya 
Resampling audio 96000 -> 48000
BookmarksFile is /home/quakeman/.config/gqrx/bookmarks.csv
gr-osmosdr v0.1.4-127-g4d83c606 (0.1.5git) gnuradio 3.7.10
built-in source types: file fcd rtl rtl_tcp rfspace soapy redpitaya 
[INFO] Make connection: 'LimeSDR-USB [USB 3.0] 9060B00542515'
[INFO] Reference clock 30,72 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30,72 MHz
[INFO] LMS7002M calibration values caching Disable
terminate called after throwing an instance of 'std::invalid_argument'
  what():  destination port 1 out of range for source_impl(47)

But maybe my settings are not correct for gqrx. I found no docu what settings are allowed so i leave the default ones.

Input rate = 5000000
Bandwidth = 0
LNB LO = 0

Then i tried sdrangel which i compiled as a docker container described on the sdrangel readme. But when i start it i always get the following error, when it tries to access the LimeSDR:

2019-03-23 13:11:44.710 (D) DeviceLimeSDRParams::open: serial: LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=0009060B00542515 type: 2
Undefined/Failure
Gateware version mismatch!
  Expected gateware version 2, revision 20
  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

Reference clock 30.72 MHz
TuneVCO(CGEN) - failed to lock (cmphl!=0)
SetFrequencyCGEN(80 MHz) failed
2019-03-23 13:11:45.024 (C) DeviceLimeSDRParams::open: cannot init device  LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=0009060B00542515

So i can say that LimeSuitGUI is the only completely working software at the moment. Maybe someone has a few tips for me what i’m doing wrong.

Ciao,
Rainer

@Fox_Mulder - Rainer,

I would start by updating your Pothosware to the latest version posted and then also making sure that LimeSuite is up to date as well (part of Pothosware). Then do a reprogram on your LimeSDR USB to install the latest gateware. Check the version after programming.

GQRX in the Windows install of Pothosware is broken - not working for anyone (including me). Update your LimeSDR and then pull down and run the latest SDRConsole or SDRAngel to run your LimeSDR - GQRX is not working at the moment until the author(s) fix it…We’re still waiting…

73 de Marty, KN0CK

Hi,

thanks for the fast response. I forgot to say that i’m working with Linux and not Windows.

What i already updated and compiled to the latest GIT version before i posted here:

LimeSuit (v19.01.0-g8bf4230b)
SoapySDR (v0.8.0-g38c05bde)
GQRX (latest GIT)
SDRangel (latest GIT v4.5.0)

My LimeSDR has the following version (Device Info from LimeSuiteGUI):

Firmware: 4
Hardware: 4
Protocol: 1
Gateware: 2.20

If i try to update it again it says that the firmware and gateware is already up to date.

When i run LimeUtil --find i see my LimeSDR:

* [LimeSDR-USB, media=USB 3.0, module=FX3, addr=1d50:6108, serial=0009060B00542515]

And when i run SoapySDRUtil --find=“driver=lime” i also see it:

Found device 0
  addr = 1d50:6108
  driver = lime
  label = LimeSDR-USB [USB 3.0] 9060B00542515
  media = USB 3.0
  module = FX3
  name = LimeSDR-USB
  serial = 0009060B00542515

Because the native LimeSuitGUI works with all examples i think my LimeSDR is working correctly. But because no 3rd party apps are working i expect it has to do something with the abstraction layer. And when i understand it right this is SoapySDR.

So at the moment i wonder how i can test SoapySDR if it really can access my LimeSDR.

Update:
I installed gr-limesdr and tried a few of the examples in gnuradio and they also work. So it really seems to be something with SoapySDR in my case. :thinking:

Ciao,
Rainer

@Fox_Mulder - Rainer,

Right now about the only apps that are confirmed working for the LimeSDR (USB or Mini) on Linux is CubicSDR and SDRAngel. GQRX is out of commission until it’s repaired by the author(s) and there are other apps being developed that I know about but aren’t together enough to publish at this time. There are probably other apps that will work under SoapySDR, but I’m not readily aware of them.

73 de Marty, KN0CK

1 Like

So after another long pause i had the time go try again to get my LimeSDR working. And now i got it working with sdrangel and found the problem why it didn’t work the other times when i tried.

The problem in my case is that my LimeSDR can be initialized only once after i connect it to the PC. So if i start LimeSuiteGUI as first application it works. When i try to start any other application which tries to access the LimeSDR i get the Initialization error:

Expected gateware version 2, revision 20
But found version 0, revision 0

When i disconnect and reconnect it to the USB Port it can be initialized again and works. That is a really strange behavior in my eyes and i wonder why it doesn’t work a second time. :thinking:

With sdrangel i got it working now but i can’t use it in a normal way. When i connect my LimeSDR and start sdrangel i can see that it is initialized successfully. But sdrangel starts by default with “fileinput” as device. When i change it to my LimeSDR i can see that sdrangel tries to initialize it again which fails. So i have to do a specific procedure to get it working.

  1. Connect LimeSDR to PC
  2. Start sdrangel to detect the LimeSDR
  3. Disconnect LimeSDR from PC (because it can’t be initialized again)
  4. Connect LimeSDR again
  5. Select LimeSDR in sdrangel as source (Initialization works again)

It can be seen that this is not the best procedure to use my LimeSDR, but at the moment it is the only solution for me that works. :woozy_face:

So if somebody has a clue for me why i can’t initialize my LimeSDR a second time i would really appreciate it.

Ciao,
Rainer

1 Like

Limitation of linux libusb drivers, the same usb interface can be claimed only once. When the first connection is established, all subsequent connection attempts will fail until the first one is closed. When you unplug the device, the first live connection is invalidated and closed, so then the second attempt to connect succeeds.

2 Likes

So i always have to disconnect and reconnect my LimeSDR when i want to use it with another program or sdr-angel (because of two inits)?

This is not really a nice workflow. Does this also happens for other Linux users, because i never read about it anywhere?

You don’t have to disconnect and reconnect the board. The limitation is that only one application can use the device at the same time. You can’t have LimeSuiteGUI connected to the board and at the same time expect sdrangel to run with it.

If the double initialization is happening only in sdr-angel, then it is sdr-angel’s bug, If it is happening with all your applications then you are doing something wrong like trying to use multiple applications with the same board. I haven’t seen anyone else to run into issue like this.

2 Likes

Sorry for the late answer, but it seems the notification of new messages in this thread isn’t working for me at the moment. :thinking:

I know that only one application can access the LimeSDR at the same time. But as i described my problem is that i can’t run any other or the same application again after i used the LimeSDR the first time after i attached it to the usb port. As soon as the hardware is initialized a second time it doesn’t work anymore. I always have to physically disconnect and reconnect it to the usb port.

Now that i know it i can work around this but it is very strange.

Could it be temperature related?

Ed

I don’t think so because the problem is the same when i first use my LimeSDR (and it is on room temperature) or when i used it for some time and it gets hotter.

Ciao,
Rainer