Post Go back to editing

Pluto SDR

Category: Hardware
Product Number: Pluto SDR

I have been learning with the plutosdr in combination with gnu radio companion. I can transmit basic signals and that is good.

I can also dump the raw IQ samples to a file and send them from python to my plutosdr via the adi library.

With the  beforementioned IQ file. I would like to setup the pluto to run from a battery bank alone and repeat my signal. I therefore wonder if i can use the iio_attr + iio_writedev from command line to configure the radio and send the iq samples? My IQ file is interleaved 32bit floats.

Or am I forced to crosscompile an c app to do so and run it on the device?

An example would be helpfull.

I am also interrested in where I can add extra commands to the pluto that will be run after bootup.

Kind regards and sorry for the wall of text.




Moved to Virtual Classroom.
[edited by: emassa at 10:14 PM (GMT -5) on 10 Jan 2023]
  • There are some undocumented features in pyadi-iio that can help create files that iio_writedev can use. Making the files by hand otherwise is kind of a pain. You will need to convert data to int16 first but pyadi-iio can generate the necessary files. With pyadi-iio you would do the following:

    import adi

    sdr = adi.Pluto()

    sdr._push_to_file = True

    sdr._output_byte_filename = "iq_data.bin"

    # <Scale and convert IQ data to int16 numpy array>


    sdr.tx(data_np) # create file

    This code will create a local file you can provide to iio_writedev.

    For using Pluto standalone you can use a USB stick like so to trigger attribute updates and iio_writedev:


  • Hi Travis,

    I figured out to dump the file, by setting the _push_to_file variable on my working example. A file got generated.

    Then I scp that file onto a Plutosdr and try making it send the file. But I cant figure the commands out.

    I assume I need to set the LO frequency as well as the sample rate and attenuation. I keep getting 

    /usr/bin/iio_attr -a -c -o ad9361-phy TX_LO_frequency 433500000
    Scanning for IIO contexts failed: Input/output error (5)

    My python code I used for sending via network was roughly:

    sample_rate = int(44100*multi)
    center_freq = 433_500_000

    samples = np.fromfile("../grc_send_fm/", np.csingle)
    samples *= 2**14

    sdr = adi.Pluto("ip:")
    sdr._push_to_file = True
    sdr.tx_rf_bandwidth = int(sample_rate)
    sdr.tx_lo = int(center_freq)
    sdr.tx_hardwaregain_chan0 = 0

    How would I do the same using iio_attr and iio_writedev.

    Kind regards