Something wrong with calibration procedure

How is the calibration routine in the Ghz ranges … 2 & 3Ghz ?

i calibrated a few months ago and have not since …
Is it time to run it again ?
I used the CLI

LimeSuiteCalibrate --freqStart 500000 --freqStop 3800000000

Is that still used ?

@joshblum has just merged some updates to calibration into the git master branch and should be able to comment further on this.

There were updates to the calibration routines on the master branch. In trying to match this, the SoapySDR wrapper now calibrates when the streams are first started using the LMS7002M::CalibrateRx/Tx()

The old cache may be an issue, I would try to delete ~/.limesuite/LMS7002M_cache_values.db

and should be be any lingering issues with the calibration cache, it can be disabled by passing “cacheCalibrations=0” in the device args

Iv tried the update from git …

Should the old cash be deleted?

kc7noaa@odroid64:~/Downloads/LimeSuite/build$ sudo ldconfig
kc7noaa@odroid64:~/Downloads/LimeSuite/build$ sudo LimeSuiteCalibrate --freqStart 30000 --freqStop 3800000
########################################

Open device with “driver=lime”

########################################
[INFO] Make connection: ‘LimeSDR-USB [USB 2.0] 9060B00473825’
[INFO] Estimated reference clock 30.7198 MHz
[INFO] Selected reference clock 30.720 MHz
[INFO] Device name: LimeSDR-USB
[INFO] Reference: 30.72 MHz
[INFO] Init LMS7002M(0)
[INFO] LMS7002M cache /home/kc7noaa/.limesuite/LMS7002M_cache_values.db
[INFO] Ver=7, Rev=1, Mask=1
[INFO] LMS7002M calibration values caching Enable
[INFO] Rx Filter calibrated from cache
[INFO] Tx Filter calibrated from cache
[INFO] Rx Filter calibrated from cache
[INFO] Tx Filter calibrated from cache
STREAM:LimeSDR-USB
boardSerialNumber:0x9060b00473825
firmwareVersion:3
hardwareVersion:4
protocolVersion:1
########################################

Initialize “STREAM:LimeSDR-USB”

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

Calibrate @ 0.03 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.B @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=91.1895, lvldB=-96.1895
deltadB=87.6978, lvldB=-92.6978
[INFO] L 1084600
bestRxIqCorrs = [(0.7452402681756203-0.17215930858119147j), (1.169739244283486+0.24763569769940105j)]
Failed at 0.03 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.64022088051 seconds
########################################

Calibrate @ 0.53 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=73.7587, lvldB=-78.7587
deltadB=85.3117, lvldB=-90.3117
bestRxIqCorrs = [(0.943152424305427-0.36381403653640493j), (1.0677086206204-0.21067831975140258j)]
Failed at 0.53 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.57345795631 seconds
########################################

Calibrate @ 1.03 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=95.921, lvldB=-100.921
deltadB=93.4292, lvldB=-98.4292
bestRxIqCorrs = [(0.8408964152537145+0j), (1.1663568337454604-0.23200279900975168j)]
Failed at 1.03 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.5135910511 seconds
########################################

Calibrate @ 1.53 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=96.0327, lvldB=-101.033
deltadB=95.3698, lvldB=-100.37
bestRxIqCorrs = [(0.7768869870150185+0.32179712645279124j), (0.6324113435770873-0.43388292008347473j)]
Failed at 1.53 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.54731583595 seconds
########################################

Calibrate @ 2.03 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=75.8496, lvldB=-80.8496
deltadB=92.9759, lvldB=-97.9759
bestRxIqCorrs = [(0.811808105514772+0.05988256340861368j), (1.189207115002721+0j)]
Failed at 2.03 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.42034912109 seconds
########################################

Calibrate @ 2.53 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=109.736, lvldB=-114.736
deltadB=93.8189, lvldB=-98.8189
bestRxIqCorrs = [(0.6695368859614215-0.44737024449843155j), (1.1442089395189443+0.40940450493910263j)]
Failed at 2.53 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.57004213333 seconds
########################################

Calibrate @ 3.03 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=73.2566, lvldB=-78.2566
deltadB=90.2148, lvldB=-95.2148
bestRxIqCorrs = [(1.0267610837271657+0.36738099018068104j), (1.039245318735967+0.10235672987466887j)]
Failed at 3.03 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.54192090034 seconds
########################################

Calibrate @ 3.53 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=74.1082, lvldB=-79.1082
deltadB=89.8417, lvldB=-94.8417
bestRxIqCorrs = [(0.7624609962832543+0.5094601499631364j), (0.9889300762112104+0.024276870733059844j)]
Failed at 3.53 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.58983802795 seconds
########################################

Calibrate @ 4.03 MHz

########################################
SetFrequency using cache values vco:0, csw:13
SetFrequency using cache values vco:0, csw:13
############################################################
Tx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
############################################################
Rx calibration using RSSI INTERNAL ON BOARD loopback
Rx ch.A @ 30 MHz, BW: 30 MHz, RF input: LNAL, PGA: 12, LNA: 1, TIA: 1
Rx calibration: using cached values
Rx calibration values found in cache:
| DC | GAIN | PHASE
—±----±-----±-----
I: | 0 | 2047 | 0
Q: | 0 | 2047 |
############################################################
deltadB=76.3488, lvldB=-81.3488
deltadB=87.2287, lvldB=-92.2287
bestRxIqCorrs = [(0.9236037649997344+0.37264751133400176j), (0.8775181569720708+0.26619222272270493j)]
Failed at 4.03 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 1.54115200043 seconds
Done
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: error [do_close] A cancellation hasn’t even been scheduled on the transfer for which the device is closing
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: error [do_close] A cancellation hasn’t even been scheduled on the transfer for which the device is closing
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=9
[ERROR] BEGIN DATA READING LIBUSB_ERROR_IO
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=9
[ERROR] BEGIN DATA READING LIBUSB_ERROR_IO
terminate called without an active exception
Aborted
kc7noaa@odroid64:~/Downloads/LimeSuite/build$

dmesg:

[20131.949612] usb 1-1.4: usbfs: process 18829 (python) did not claim interface 0 before use
kc7noaa@odroid64:~$

Yes.

OK, im sure that the location of that cash is listed in the forum …
where is it located?

On Linux there is a db in the .limesuite dir (note preceding dot - meaning hidden) under your home directory.

.LimeSuite or .limesuite

andrew@snow:~$ ls -l .limesuite
total 144
-rw-r–r-- 1 andrew andrew 13312 May 31 09:27 LMS7002M_cache_values.db

Hey … does the calibration work for the microwave areas yet?

Just did a new calibration and noticed that even at 2.8Ghz calibration failed …

Failed at 2878.5 MHz, skipping…
ret=-1, flags=0, timeNs=0
Cal took 1.78085207939 seconds
########################################

Calibrate @ 2879 MHz

########################################
############################################################
Tx calibration using RSSI MCU INTERNAL ON BOARD loopback
Tx ch.A @ 2879.7 MHz, BW: 30 MHz, RF output: BAND2, Gain: 37
Performed by: MCU

MCU algorithm time: 1 ms
Current MCU firmware: 3, DC/IQ calibration full
MCU Ref. clock: 30.72 MHz

Couldn’t see when the failures started – my buffer is set too small.

I was able to record where the cal failure takes place.

After working on other things for a few months, I got back to the LimeSDR the other day. I updated the firmware and rebuilt SoapySDR and LimeSuite from git (this is on Ubuntu 16.04). The LimeSuite Device Info screen says:
Firmware: 3
Hardware: 4
Protocol: 1
Gateware: 2
Gateware rev: 8

And SoapySDRUtil --info says:
######################################################

Soapy SDR – the SDR abstraction library

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

Lib Version: v0.6.0-g2f6a449e
API Version: v0.6.0
ABI Version: v0.6
Install root: /usr/local
Search path: /usr/local/lib/SoapySDR/modules0.6
Module found: /usr/local/lib/SoapySDR/modules0.6/libLMS7Support.so
Loading modules… done
Available factories…lime, null,

The LimeSuite version number is 17.03.0-g9eca76d1, built 2017-06-10.

When I issue the following cal command:
$ LimeSuiteCalibrate --freqStart 2.09e9 --freqStop 2.11e9
the following error eventually results for the first frequency:

bestRxIqCorrs = [(1.0105848250985343+0.024808464980358432j), (1.1623231012200503-0.05710127237721869j)]
Failed at 2090 MHz, skipping…
unknown setting key: STORE_RX_CORRECTIONS
Cal took 11.4917948246 seconds

and all subsequent frequencies fail with this message:
Failed at 2110 MHz, skipping…
ret=-1, flags=0, timeNs=0
Cal took 3.46489500999 seconds

Please note that this same calibration command runs successfully on another machine (RPi3) which has earlier versions of the software:

~ $ LimeUtil --info
Version information:
Library version: v17.03.0-g798a81ac
Build timestamp: 2017-04-26
Interface version: v2017.3.0
Binary interface: 17.03-1

SoapySDRUtil --info
Lib Version: v0.6.0-gfcecfdae
API Version: v0.6.0
ABI Version: v0.6-dev
Install root: /usr/local
Search path: /usr/local/lib/SoapySDR/modules0.6-dev
Module found: /usr/local/lib/SoapySDR/modules0.6-dev/libLMS7Support.so
Module found: /usr/local/lib/SoapySDR/modules0.6-dev/libremoteSupport.so
Loading modules… done
Available factories…lime, null, remote,

So, it looks as though something broke between these versions.

Try renaming or removing the only .db file in /home/.limesuite/

Also a reboot / sudo ldconfig …

Yup, did all those things.

Because unknown setting key seems suspect

And after trying on a more stable system … im still getting tge same error as you …

Im confused as to why this is happening … os it a bug or just a failure in the process of updating.

@joshblum any advice on how to proceeded?
Or @andrewback

I got a segfault from LimeSuiteCalibrate. I’m using LimeUtil --cal instead. I just updated and recompiled from git.

After a sudo apt-get update / upgrade / dist-upgrade, it was working again … BUT

after starting a limited calibration 1ghz to 1.5ghz i wanted to do a single frequency – so i hit “Ctrl-C” to stop the program … it WAS working with out error.

after that i could not get the calibration program from having the for mentioned error !!! — ahhh COME ON !!!

I removed the .db file from .limesuite and made sure that the date/time was updated before the calibration routine was started …

tried the same thing with the Odroid-X2 — did not work.
Still not sure what the dividing line is …

Does Limesuite --cal do both DC offset AND I/Q image calibration?

hi
i get this error. how pair it?
NFO] Ver=7, Rev=1, Mask=1
[INFO] LMS7002M calibration values caching Disable
[INFO] L
libusb: warning [handle_timeout] async cancel failed -5 errno=22