Post Go back to editing

ADALM-Pluto: How to change settings with quick settling


One of our users of the ADALM-Pluto is applying it in labs for their communication course. Extending on the possibilities in the lab, they want to change the settings of the receiver quickly. Using GNURadio they encounter 1 sec stall / blank time after doing a change. 

I myself checked with SDR# and e.g. a frequency change seems to be immediate. 

Below the description (without pictures) and attached a pdf with the same description and the pictures:


The software package we currently use is GNURadio. This package communicates with the PlutoSDR by using the LIBIIO library (over usb). Below you will find a straight-forward block diagram to transmit and receive a single sine wave with the same device:


As you can see, I also implemented a numeral input variable for the local frequency (ID: carrier). When this block diagram is compiled into the corresponding python code, the following GUI is created, which allows us to change the local frequency 'on the fly':

[FFT plot]


In the waterfall display below, we can see the FFT plot over time where the amplitude is represented by a color. I think this is where the miscommunication happened; Whenever the local frequency is changed, the device cannot transmit or receive any samples to or from the device for ~1 second (between ~5.1 and ~5.2 seconds in the graph below). We called this a 'reboot' in our previous e-mail because the device is unresponsive for a noticable amount of time, but we probably should have called it an 'unavailability' since the device is not actually rebooting, but merely changing the local frequency attribute.


Our purpose is to have many adalm plutos communicate with each other over a set of carrier frequencies. For this to happen, each unit needs to claim an available (unused) frequency and do a frequency sweep to find other devices transmitting on other frequencies. If we need one second to switch per frequency, the sweeping process will take too long. We need to get this 'transition' time down to a few milliseconds - preferably even less - otherwise the device won't be usable for our purpose.


I looked through the code and found the following:


The python function that we get from GNURadio to change the local frequency is this:

[python def set_carrier]


The 'set_params' method above calls the following C function from the gr-iio library:


If I follow the chain of all functions that call each other, the C function linked from the gr-iio repository above links back to this command from the libiio repository:


Assuming I observed this chain of functions correctly, does that mean that since GNURadio is directly writing the lo_fr (local frequency) attribute to the ad9371 chip using the libiio library, that there is no more optimal or faster way of doing this? Does this mean that we are stuck with the delay of 1 second to change between frequencies? Is this a limitation by the method of communicating between the petalinux mcu with the ad9371 chip inside the adalm pluto or a limitation from communicating with the device externally over usb? Is there other software we can use (than GNURadio) that allows us to do a frequency sweep at a higher speed?



Could you please help with how to getting the settling of settings for the Pluto fast?


Best regards,


  • Just a quick edit, I meant 25us not 25ns.  But I still think that is in a range that works for you.


  • Hi,

       I am a newbie to the use of adalm-pluto. I am trying to frequency hop over multiple frequencies, but the frequency change takes about 500ms to execute. Searching for the reason of this issue, I stumbled upon this old post and thought this could be the reason for the time it takes the Pluto to switch TX frequency - trying to save all params instead of just the out_altvoltage1_TX_LO_frequency.

       I could not find this single paramter update (for source or sink) in the latest gr-iio code. Is this functionality not checked into the main branch?

       Thanks for all your help,



  • This functionality has been replaced by the attribute sink block. That allows you to update one attribute at a time.


  • Travis,

       Thanks a ton for the quick response. I am able to run the attr_sink.grc from the iio_examples directoy of gr-iio code base. However, when I try to update the TX_LO_frequency by setting the following:

    Attribute Type: Channel

    Input/Output: Output

    Channel Name: altvoltage1

    Attribute Name (from attribute updater): to any of "frequency"/"lo_frequency"/"LO_frequency"/"TX_LO_frequency"

    the update to the attribute fails with:

    Attribute write '<value>' failed to ad9361-phy:altvoltage1:TX_LO_frequency

    My belief is I am using the wrong attribute name - but I am not sure.

    Will be of huge help if you could shed some light on my mistake, so, I can correct the same.

    Thanks and regards,


  • My mistake. I had not tried all the combinations of the channel name and the frequency value. Using altvoltage1 and frequency as the combination worked for me. Now, I do not see any error being spit back. Thanks a ton for all your help.



Reply Children
  • While quick change of frequencies in close vicinity seems to work, if I try to switch frequencies that are wide apart, the change does not seem to take effect. Any pointers on what I am doing wrong? Thanks a ton for all your help.



  • Are you changing to an LO within range? What values are you using?


  • Hi,, 

      I am trying to switch between 1.7, 1.8, 1.9 and 2.3 GHz.

      Thanks for your help.



  • Do you get any errors that show up? Can you read back the LO you set to see it updated to the new value?


  • Travis,

       I do not see any error.

       Used an iio attribute source (with update interval set to 1 ms) to spit out the TX_LO frequency and here are the observations:

       1. When the frequencies that I am changing to are within 80MHz, and my update interval in iio attribute updater is set to 10 ms, the iio source shows updates happening about every 2 seconds. This freq update speed slows down to about once in 4 seconds, if I ramp up the updater update interval to 2 ms.

       2. When the frequencies that I am changing to are wide apart (1.7, 1.8, 1.9, 2.3 GHz) and my update interval in iio attribute updater is set to 10ms, the iio source shows updates happening about every 16-20 seconds. This freq update almost stops if I ramp up the updater's update interval to 2ms. Once I set the update interval to 20ms, the updates start showing up in about 4 seconds. And once I set the update interval (for attribute updater) to 500ms, I see the updates happening in about 2 seconds.

       Is the iio attribute source not updating the freqs fast enough? You had informed that with the use of single attribute change (iio aatribute updater and iio attribute sink), the changes are expected to happen in about 25ns and not take seconds.

       Thanks for all your help.



  • I'm a bit confused as you mentioned the LO was not updating at all... maybe that is fixed now.

    My guess what is happening is that you are generating so many write and read requests is that it's flooding the USB 2 interface. Changing the LO is a complex process for the hardware and drivers as it must recalibrate the device. If you need to frequency hop I would recommend looking at the fastlock control of AD9363. Otherwise, increase the time between updates.


  • Travis,

       You are right. Lowering the updater interval and checking the iio source shows that updates are happening. 

        I will try and use fast lock feature for my requirement.

        Thanks a ton for your help,