Auto start your GNU Radio script at boot on any Raspberry Pi

Help us grow. Share with your friends!

This is going to be a small tutorial that will allow you to run your GNU Radio script automatically at system boot. I am using a Raspberry Pi 4, a Pluto SDR and GNU Radio. You need all sort of flexibility when you are on the field. For example, you created a nice GNU Radio block diagram that processes radio signals. Now, when you go out on the field, you should be actually focusing on testing your script and its performance. Not spend time playing around in the terminal just to fire up your script. On the other hand, this tutorial will come handy when its time for you to launch it on several other devices. In such situations, an application that loads at power on will always be preferable.

GNU Radio script

Fortunately, all versions of GNU Radio generate a python script. You will find it sitting alongside your .grc file or whatever extension they have come up with in the recent version. If you are using a GNU Radio version lower than 3.8, you require Python 2.7. On the other hand, GNU Radio 3.8 onwards, the generated script is run with Python 3.

Working with Linux

Try to fire up your terminal and run this python script. That way you will find that it works just as fine (given that everything else is correctly compiled).

Now that you are sure of your script, we are fine to move on to further steps. The next step requires you to install a terminal called “xterm”. On Raspberry Pi, we can do this with the following command

Once you are done installing xterm, we can configure it to execute our script after boot process. In order to do so, create a new directory as follows and further create a new file.

Inside the newly created “lxterm-autostart.desktop” file, paste the following code.

Make sure you enter your script’s path correctly. Simply reboot your Pi board and you should have your script fire up at system startup.

In my case, I had a PlutoSDR attached to the Raspberry pi. The GNU Radio script had a repeating waveform being generated.

Conclusion

To conclude, these set of steps had my job done the way I needed. The usual linux methods such as crontab or running with /etc/rc.local did not work out with GNU Radio and a PlutoSDR attached. If any of you readers find a simpler way, let me know in the comment.

On the other hand, you should also be able to auto-start your GNU Radio application with any other SDR, such as the RTL-SDR or even LimeSDR.

nuclearrambo

Salil is an electronics enthusiast working on various RF and Microwave systems. In his free time he writes on the blog, talks over ham radio or builds circuits. He has Yaesu FT2900R VHF transceiver, FT450D HF transceiver and a TYT UV8000E Handheld transceiver.

You may also like...

2 Responses

  1. F1ATB says:

    I spent one day looking for a solution to launch GNU Radio. Here an other solution I proposed explained in this post.
    https://f1atb.fr/index.php/2021/03/20/launch-gnu-radio-script-at-boot/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.