LimeSDR Made Simple series

So far 14 !!! times
on all topics around…
You are real need for help :frowning:

Yes, I am very frustrated and I need help! My Ubuntu 16.04 with required software for using LimeSDR shows openmoko device, but not LimeUtil, not LimeSuiteGUI and else cant see my device? I need to solve that problem… :frowning:

There is very much of manuals, but nothing of them describes what to do if something goes wrong! Like: “Do this, appears this, next…” No variants if result could be different? All manuals I saw describes only: “type sudo LimeUtil --find and you will se your device”. But for me i writes: “found no devices!”.

@LimeSDR1 - Daniil,

I just answered your question on another topic feed - - GO READ IT AND DON’T MULTIPLE POST THE SAME ISSUES IN THE FORUM.

73 de Marty, KN0CK

So is it working now?

You probably want to use a higher sample rate as you get [ERROR] Cannot achieve desired sample rate: rate too low. See the call to SoapySDRDevice_setSampleRate, that uses 1MS/s. Maybe try 10e6.

As for the [ERROR] Rx calibration: MCU error 5 (Loopback signal weak: not connected/insufficient gain?)

  • Make sure you’re using the correct antenna (LNAL for low frequencies, LNAH for high, LNAW if you need both low and high). Right now SoapySDRDevice_setAntenna is using LNAL (which is fine for the 1MHz to 2MHz in the example).
  • Try also using a higher gain. SoapySDRDevice_setGain is currently at 20 (it goes from -12 to 61).

I increased the sample rate to 1e6 yesterday, which fixed the sample rate issue. Then I got another issue. It runs ok, if I scan few frequencies. If I sweep from 800MHz to 1000MHz with 1MHz step, I have following error:

[INFO] Rx calibration finished
Freq is: 982000000.000000, RMS is: 0.000544
[INFO] Rx calibration finished
Freq is: 983000000.000000, RMS is: 0.000604
[INFO] Rx calibration finished
Freq is: 984000000.000000, RMS is: 0.000539
[INFO] Rx calibration finished
Freq is: 985000000.000000, RMS is: 0.000518
[INFO] Rx calibration finished
Freq is: 986000000.000000, RMS is: 0.000464
[INFO] Rx calibration finished
[ERROR] Read(64 bytes) failed
[ERROR] Read(64 bytes) failed
[ERROR] Read(64 bytes) failed
Freq is: 987000000.000000, RMS is: 0.000563
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] SetFrequencyCGEN(128 MHz) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed
[ERROR] Write(64 bytes) failed

Today, I went back to 100e3 sample rate and performed sweep several time without errors. I’m not sure what has changed, since I did some other testing between. This Read/Write error is somehow related to power?

Anyway, I would like to modify the example to use it like spectrum analyzer with tracking generator. Any suggestions, what is good approach?

I also run quite often into the [ERROR] Read(64 bytes) failed, see "[ERROR] Read(64 bytes) failed" and "cannot deliver frequency" after receiving for some time I still have no clue as to why it happens. I get this both with my own C++ program as well as with Pothos, so I guess it’s not just an error in my code.

I would like to modify the example to use it like spectrum analyzer with tracking generator.

What you mean by “tracking generator”?

I would like to measure for example RF filters, so I would like to TX from one port and RX from another. Transmitter should be at same frequency as receiver. I guess scalar network analyzer would have more or less same meaning.

Matti, you might want to use the VNA example code from blog post 9, included in examples in the pyLMS7002M repository; it will give you essentially the right measurement without doing much (or any) work adapting the code to your purposes. It broadcasts on frequency and gives you amplitude and phase. Since you only need it to be a scalar network analyzer, it’s almost certainly sufficient to just run this code, with the frequency range and number of steps you want, and use the amplitude relative to the unfiltered amplitude

HOWEVER, the python library seems to suffer from an issue I’ve been having, where the phase angle jumps at random at 180 degree intervals, and I haven’t been able to figure out why. I made a post about this in pyLMS7002M, but I haven’t had the time to try to figure out how to fix it; at any rate, though, using straight-through with two SMA cables and a female-female SMA adapter when it prompts you for “short”, then putting the DUT in and making the same measurement when it prompts you for the DUT, will give you a table of amplitude and phase measurements; the ratio of amplitude measurements, for each frequency, will be the attenuation of your filter. In order to avoid dealing with insertion loss, I would put an attenuator, at least 10dB, on the transmitter side.

If you find your measurements are pretty well phase stable, it’ll also give you the phase response of your filter, but if you run into the same issue I was having (passthrough measurements flip by 180 degrees, but are otherwise stable) then you might have to stay with just amplitude measurements.

I have also tested VNA example from post 9. It was working well. There was some small discontinuity in amplitude graphs, but I think it is not a big problem. I would like to use C/C++ to make same as the python example.

Well, if you’re using the LimeSDR or LimeSDR Mini, you should be able to use the RF shunt for a reference phase. I don’t know exactly how to do that, but it sounds like that’s the approach being taken by other people. I need to do essentially what you’re doing, but with phase stability; I don’t think you’re so much affected by the phase stability issue.

Have you tried loading the MCU code made for the Python example, using a C program, and then using the C program to query the same registers?

If you would like some help making this work, I need to do essentially the same project, either by rewriting the code in C to do the work the Python example does, or by adding the code in Python to toggle the RF shunt for that phase reference.