Dynamically tuning center frequency with gr-limesdr


I have just started working with LimeSuite Source and LimeSuite Sink blocks in gnuradio. I cannot tune the Limesdr usb to a different frequency while the flow graph is running. I have tried it using the available QT widgets in gnuradio such as the range widget and the entry widget(line edit) for this purpose but failed. The spectrum analyzer shows the peak stuck on only one frequency with which the flow graph initially began. If anyone knows a built in function such as uhd::tune_request(double target_freq) as in the case of usrp that would be great. Moreover I am also open to using any other method or suggestion for this project. Any kind of help would be appreciated.

Abdul Samad Usman

Hi abdul_samad,

Could you tell me which GNU Radio and gr-limesdr version you are using? It would be helpful if you attached GNU Radio console output after trying to run gr-limesdr blocks in GNU Radio and screenshot of flow graph you are trying to execute.

gr-limesdr plugin has this feature since the most recent version (gr-limesdr 1.0.0-RC) so make sure you have updated version.

Hi Osvald,

I have attached the screenshot of my flow graph for your convenience where I am trying to control the center frequency using QT GUI Range widget but the peak doesn’t seem to be moving on the spectrum analyzer attached to Tx1_1 port of lime.

The gnuradio version I am using is
3.7.12. However I am not sure about the version gr-limesdr plugin since i cloned it from
https://github.com/myriadrf/gr-limesdr . Please take a look at it and see what you can make of .Thanks for help.


just an idea - I see you have the frequency set to 3MHz. Is this happening also above 30 MHz? There are some special conditions for changing frequency under 30 MHz (see https://github.com/myriadrf/LimeSuite/issues/81). Maybe gr-limesdr is not handling this.


Thanks a lot for your help I now have my program working perfectly.

Hi, abdul_samad.

Based on your reply you are not using the latest version of gr-limesdr blocks. Please update this plugin (I am not sure which reply helped you with your issue so I must warn you about that).

Good luck

Hi Pavel,

gr-limesdr uses LMS_SetLOFrequency(), so this plugin supports frequency below 30 MHz.

Hi Osvald,
I may be wrong and this special situation is handled in gr-limesdr, but I noticed exactly the some problem as described in issue linked above with this sequence (f<30MHz):

In this case LMS_RecvStream fails, no data are received. Why is this happening and what to do with it, is described in the issue. But adbdul_samad says that his program is works perfectly, so this is probably handled. It is just a problem which seemed similar.


Well this issue is pretty old and was fixed in LimeSuite updates. If you are facing this issue after update, let me know. Thank you for your thoughts.

As I understand it, the issue was not fixed, the author was just told to restart the stream, when LMS_SetLOFrequency is called for f < 30MHz, which solved my problem. If you consider this a problem in LimeSuite (I don`t) than it is still there. I believe that is related to this piece of code https://github.com/myriadrf/LimeSuite/blob/master/src/API/lms7_device.cpp#L1295

BTW - the same think is happening in gqrx with the soapy driver. I am using LimeSuite commit 6fcbbc07cb2ead41a9a44a9a8b51d912e8abb24e from Jun 4 2018, which is not the latest version, but old enough compared to the issue.

I looked into gr-limesdr code and haven’t noticed anything to handle this special case, but I haven`t studied it too deeply, so I may have missed it.


You correct, this limitations is still there. When using frequencies <30MHz LMS chip RF sampling clocks are reconfigured, because at these frequencies, wider bandwidth is sampled and then frequency is shifted digitally. If this clock change occurs while streaming is active, it usually messes up the stream.

Also, maximum oversampling is 32. So if you are using low sample rate you will not be able to tune to lowest frequencies. For example, with 1 MHz sample rate you will only be able to get frequencies from 14MHz (32 MHz BW around 30 MHz).