Example of configuration for SDR source block in PothosSDR

I tried to use PothosSDR with LimeSDR but no luck unfortunately.
Simple workflow from SDR source and spectrogram does not start.
Message window shows the following:
Error: SDRSource0.activate(): Exception: SDRBlock::activate - stream not setup!

Could somebody from community give one correct example of how to configure SDR source block in Pothos?
For example, for receive FM broadcasting as simplest example.

Thank you in advance!

Hi Roman,

The Bluetooth LE and LoRa examples both use LimeSDR.

Hi Andrew,
Thank you for answer! The examples provided need making builds under Linux. I try to use Windows for very simple example

.

I see the following messages in Message Window, one of them is in red and sounds like warning:
[19:01:41.656000] SoapySDR: GetDC_IQ_Interp(240 MHz, ch=0, tx=0): no matches between [239, 241] MHz.
What is wrong in this setup? Thank you for reply!

[19:01:40.425708] PothosGui.MainWindow: Welcome to Pothos v0.4.2-PothosSDR-2017.02.04-vc14-x64
[19:01:40.616676] PothosGui.GraphEditor: Loading D:/Python27/Saves_2013/Simple.pothos
[19:01:40.762891] PothosGui.MainWindow: Initialization complete
[19:01:41.128000] : Win32; Microsoft Visual C++ version 14.0; Boost_106300; UHD_003.010.001.HEAD-0-gc705922a
[19:01:41.154000] SoapySDR: Make connection: ‘USB 3.0 (LimeSDR-USB)’
[19:01:41.330000] SoapySDR: Device name: LimeSDR-USB
[19:01:41.330000] SoapySDR: Reference: 30.72 MHz
[19:01:41.330000] SoapySDR: Init LMS7002M(0)
[19:01:41.330000] SoapySDR: Ver=7, Rev=1, Mask=1
[19:01:41.380000] SoapySDR: LMS7002M calibration values caching Enable
[19:01:41.462000] SoapySDR: SoapyLMS7::setFrequency(Rx, 0, BB, 0 MHz)
[19:01:41.465000] SoapySDR: SoapyLMS7::setAntenna(Tx, 0, BAND1)
[19:01:41.465000] SoapySDR: SoapyLMS7::setGain(Rx, 0, PGA, 0 dB)
[19:01:41.465000] SoapySDR: SoapyLMS7::setGain(Rx, 0, LNA, 0 dB)
[19:01:41.481000] SoapySDR: Rx Filter calibrated from cache
[19:01:41.481000] SoapySDR: SoapyLMS7::setBandwidth(Tx, 0, 30 MHz)
[19:01:41.481000] SoapySDR: Tx Filter calibrated from cache
[19:01:41.499000] SoapySDR: SoapyLMS7::setFrequency(Rx, 1, BB, 0 MHz)
[19:01:41.500000] SoapySDR: SoapyLMS7::setFrequency(Tx, 1, BB, 0 MHz)
[19:01:41.501000] SoapySDR: SoapyLMS7::setAntenna(Rx, 1, LNAL)
[19:01:41.503000] SoapySDR: SoapyLMS7::setAntenna(Tx, 1, BAND1)
[19:01:41.504000] SoapySDR: SoapyLMS7::setGain(Rx, 1, PGA, 0 dB)
[19:01:41.504000] SoapySDR: SoapyLMS7::setGain(Rx, 1, LNA, 0 dB)
[19:01:41.505000] SoapySDR: SoapyLMS7::setGain(Rx, 1, TIA, 0 dB)
[19:01:41.505000] SoapySDR: SoapyLMS7::setGain(Tx, 1, PAD, -50 dB)
[19:01:41.505000] SoapySDR: SoapyLMS7::setSampleRate(Rx, 1, 10 MHz), CGEN=80 MHz, ADC=20 MHz, decim=2
[19:01:41.508000] : ConnectionSTREAM::ConfigureFPGA_PLL(tx=20MHz, rx=10MHz)
[19:01:41.513000] SoapySDR: SoapyLMS7::setSampleRate(Tx, 1, 10 MHz), CGEN=80 MHz, DAC=20 MHz, interp=2
[19:01:41.516000] : ConnectionSTREAM::ConfigureFPGA_PLL(tx=10MHz, rx=10MHz)
[19:01:41.523000] SoapySDR: SoapyLMS7::setBandwidth(Rx, 1, 30 MHz)
[19:01:41.526000] SoapySDR: Rx Filter calibrated from cache
[19:01:41.527000] SoapySDR: SoapyLMS7::setBandwidth(Tx, 1, 30 MHz)
[19:01:41.529000] SoapySDR: Tx Filter calibrated from cache
[19:01:41.540000] SoapySDR: SoapyLMS7::setSampleRate(Rx, 0, 1 MHz), CGEN=128 MHz, ADC=32 MHz, decim=32
[19:01:41.650000] : ConnectionSTREAM::ConfigureFPGA_PLL(tx=1MHz, rx=1MHz)
[19:01:41.652000] SoapySDR: SoapyLMS7::setFrequency(Rx, 0, RF, 240 MHz)
[19:01:41.656000] SoapySDR: GetDC_IQ_Interp(240 MHz, ch=0, tx=0): no matches between [239, 241] MHz
[19:01:41.656000] SoapySDR: SoapyLMS7::setFrequency(Rx, 0, BB, 0 MHz)
[19:01:41.659000] SoapySDR: SoapyLMS7::setGain(Rx, 0, LNA, 0 dB)
[19:01:41.659000] SoapySDR: SoapyLMS7::setGain(Rx, 0, TIA, 0 dB)
[19:01:41.659000] SoapySDR: SoapyLMS7::setGain(Rx, 0, PGA, -12 dB)
[19:01:41.660000] SoapySDR: SoapyLMS7::setAntenna(Rx, 0, LNAL)
[19:01:41.662000] SoapySDR: SoapyLMS7::setBandwidth(Rx, 0, 10 MHz)
[19:01:41.665000] SoapySDR: Rx Filter calibrated from cache

I was able to do very basic flowgraph in the PothosSDR. It allows to change frequency, gain and choose frontend and allows to see the signal in the Spectrogram and Periodogram windows. I share it here for other noobs to try.
I have another question - is it possible to change rx filter bandwidth “on the fly”, when flowgraph is running?
When I try to do this, I get “time error”:
Pothos.Block.work: SDRSource0: Exception: SDRSource::work(): readStream TIME_ERROR

1 Like

This is one for @joshblum.

It looks like streaming isnt recovering from ILimeSDRStreaming::EnterSelfCalibration/ExitSelfCalibration. Interestingly you can knock out this line LMS7002M_SelfCalState state(rfic); and the problem seems to go away. Ultimately we want to protect the streaming when tuning the filters, so I’m investigating as to whats happening.

Roman, could you share that test2 file ?

Thank you for answer! I will try to knock out this line.

I would be glad to share it but discourse allows to attach only pictures. Drop me email, I will send it to you.

kc7noa at gee male dott com

gmail

Sent. Have fun!

Thank you

Me 2 please :slight_smile: limesdr at flightsystems.biz

Hi Roman,

Could I get a copy?

n1jez at amsat dot org

Tnx!

Mike

I had this same problem and tried recompiling LimeSuite after commenting out LMS7002M_SelfCalState state(rfic); from Settings.cpp (line 879 in the current commit). This didn’t seem to fix the problem though, I’m still getting the same error that Roman was:
[WARNING] GetDC_IQ_Interp(2412 MHz, ch=0, tx=0): no matches between [2411, 2413] MHz
[INFO] SoapyLMS7::setFrequency(Rx, 0, BB, 0 MHz)
I’m running gnuradio in Ubuntu.

Roman, did you have better luck?

No, I have not tried it yet.
But re-compilation was suggested by Josh to get rid of ““time error”:
Pothos.Block.work: SDRSource0: Exception: SDRSource::work(): readStream TIME_ERROR”.

I see “get DC” warnings in my message window but it doesn’t prevent LimeSDR from functioning as receiver.

Hi Roman,

Can you please send me your example ? dpenev at gmail at com

I have tried to build sdr-ble-demo and LoRa-SDR. I want to get some feelings about using Pothos vs. Gnuradio
Building both projects in Win10 using cmake fails with:

LINK : fatal error LNK1104: cannot open file ‘PocoFoundationd.lib’

I have PothosSDR installed using binaries and I do have this library there.
What is the best way to resolve this external reference in Windows and cmake?

Thanks
Dimitar

That correct, the DC/IQ warning is just about the pre computed calibrations table. The streaming should be fine.

Can you make sure the build type is either Release or RelWithDebInfo. The installer does not include debug libraries, and I believe that when its built in the debug mode, the Poco config stuff looks for files ending a “d”.

Also the demos are included in the installer FWIW.

Hi Josh,

Thank you for the answer. I made step forward but now the making process doesn’t find PocoFoundation.lib.

  1. I have PothosSDR binary installed on my PC
  2. Together with it I have lot of static libraries in teh standard installation path (c:\Program Files\PothosSDR\lib)
  3. I think the above installer sets some environment variables.
  4. Building LoRa-SDR example fails to find my libs in c:\Program Files\PothosSDR\lib
    (If I copy all libraries from the above path to the LoRa-SDR building directory the cmake building completes OK)

Do I miss some environment variables and cmake can not find the libraries? Or how is it suppose to work?
I had similar issues compiling Pothos in Windows which at the end appeared to be environment variables related.
Apparently I am missing something :slight_smile:

Thanks
Dimitar