Launch GNU Radio script at boot

GNU Radio Auto Start

With a GNU Radio application (3.7) running on a Raspberry PI or an Orange PI, it may be interesting to run the Python script generated by GNU Radio Companion at boot. If you put the python program launch in a crontab task or the /etc/rc.local file, the program will start and stop immediately. You’ll waste hours figuring out why …

Structure of the Python file

Edit the script generated by GNU Radio companion. It includes a ‘class’ bearing the name of the file and at the end the main function of launching ‘main ()’. Example for the file ‘’.

The source of the issue is that the program once started waits for an ‘Enter’ to stop. This appears at launch in a Crontab.
See the message ‘Press Enter to Quit’.

In order to avoid it, we will not modify the file generated by GNU Radio Companion in order to be able to modify it if we want to improve the processing. We will create a python launch script which will import the ‘class’. In the same folder where the gnu radio python file is located, create the ‘’ file which will import it.

import remote_rx_ssb_v1

def my_main(top_block_cls=remote_rx_ssb_v1.remote_rx_ssb_v1, options=None):
    tb = top_block_cls()
if __name__ == '__main__':

Call this file in a crontab at launch and GNU-Radio will be launched at boot.

Posts about GNU Radio

Leave a Reply

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