{"id":7055,"date":"2021-01-16T18:50:00","date_gmt":"2021-01-16T13:20:00","guid":{"rendered":"https:\/\/nuclearrambo.com\/wordpress\/?p=7055"},"modified":"2024-10-03T15:10:32","modified_gmt":"2024-10-03T09:40:32","slug":"gnuradio-application-autostart","status":"publish","type":"post","link":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/","title":{"rendered":"Auto start your GNU Radio script at boot on any Raspberry Pi"},"content":{"rendered":"\n<p class=\"has-drop-cap\">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<a href=\"https:\/\/nuclearrambo.com\/wordpress\/?s=gnuradio\"> GNU Radio<\/a>. 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.<\/p>\n\n\n\n<p class=\"has-large-font-size\">GNU Radio script<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p class=\"has-large-font-size\">Working with Linux<\/p>\n\n\n\n<p>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).<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python \/path\/to\/gnu_radio_blk_script.py<\/pre>\n\n\n\n<p>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 &#8220;xterm&#8221;. On Raspberry Pi, we can do this with the following command<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install xterm<\/pre>\n\n\n\n<p>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.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir \/home\/.config\/autostart\nsudo nano \/home\/.config\/autostart\/lxterm-autostart.desktop<\/pre>\n\n\n\n<p>Inside the newly created &#8220;lxterm-autostart.desktop&#8221; file, paste the following code.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[Desktop Entry]\nEncoding=UTF-8\nName=GNU Radio autostart\nComment=Execute a gnu radio python script\nExec=\/usr\/bin\/lxterm -e 'python \/path\/to\/your\/script.py'<\/pre>\n\n\n\n<p>Make sure you enter your script&#8217;s path correctly. Simply reboot your Pi board and you should have your script fire up at system startup. <\/p>\n\n\n\n<p>In my case, I had a PlutoSDR attached to the Raspberry pi. The GNU Radio script had a repeating waveform being generated. <\/p>\n\n\n\n<center><p><script type=\"text\/javascript\">\n\tatOptions = {\n\t\t'key' : 'a488f095e80c8a74746e5fdca977eaea',\n\t\t'format' : 'iframe',\n\t\t'height' : 90,\n\t\t'width' : 728,\n\t\t'params' : {}\n\t};\n\tdocument.write('<scr' + 'ipt type=\"text\/javascript\" src=\"http' + (location.protocol === 'https:' ? 's' : '') + ':\/\/www.profitabledisplaynetwork.com\/a488f095e80c8a74746e5fdca977eaea\/invoke.js\"><\/scr' + 'ipt>');\n<\/script><\/p><\/center>\n\n\n\n<p class=\"has-large-font-size\">Conclusion<\/p>\n\n\n\n<p>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. <\/p>\n\n\n\n<p>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 <a href=\"https:\/\/nuclearrambo.com\/wordpress\/?s=limesdr\" target=\"_blank\" rel=\"noreferrer noopener\">LimeSDR<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":6748,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1694,1701],"tags":[1714,1556,1766,1767,1718],"class_list":["post-7055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amateur-radio","category-computers","tag-gnuradio","tag-ham-radio","tag-plutosdr","tag-raspberry-pi","tag-rtlsdr"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Auto start your GNU Radio script at boot on any Raspberry Pi<\/title>\n<meta name=\"description\" content=\"Have your gnu radio application auto start whenever your Raspberry pi boots. You can even have any SDR attached to your Pi.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Auto start your GNU Radio script at boot on any Raspberry Pi\" \/>\n<meta property=\"og:description\" content=\"Have your gnu radio application auto start whenever your Raspberry pi boots. You can even have any SDR attached to your Pi.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\" \/>\n<meta property=\"og:site_name\" content=\"Nuclearrambo\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-16T13:20:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-03T09:40:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2020\/04\/20_2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"nuclearrambo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@darkusul\" \/>\n<meta name=\"twitter:site\" content=\"@darkusul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"nuclearrambo\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\"},\"author\":{\"name\":\"nuclearrambo\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c\"},\"headline\":\"Auto start your GNU Radio script at boot on any Raspberry Pi\",\"datePublished\":\"2021-01-16T13:20:00+00:00\",\"dateModified\":\"2024-10-03T09:40:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\"},\"wordCount\":444,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#organization\"},\"keywords\":[\"gnuradio\",\"ham radio\",\"plutosdr\",\"raspberry pi\",\"rtlsdr\"],\"articleSection\":[\"Amateur Radio\",\"Computers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\",\"name\":\"Auto start your GNU Radio script at boot on any Raspberry Pi\",\"isPartOf\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#website\"},\"datePublished\":\"2021-01-16T13:20:00+00:00\",\"dateModified\":\"2024-10-03T09:40:32+00:00\",\"description\":\"Have your gnu radio application auto start whenever your Raspberry pi boots. You can even have any SDR attached to your Pi.\",\"breadcrumb\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/nuclearrambo.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Auto start your GNU Radio script at boot on any Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#website\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/\",\"name\":\"Nuclearrambo\",\"description\":\"Information is FREE! Progress is MUST! Awakening is inevitable!\",\"publisher\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nuclearrambo.com\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#organization\",\"name\":\"Nuclearrambo\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png\",\"contentUrl\":\"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png\",\"width\":1489,\"height\":1152,\"caption\":\"Nuclearrambo\"},\"image\":{\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/darkusul\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c\",\"name\":\"nuclearrambo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g\",\"caption\":\"nuclearrambo\"},\"description\":\"Salil is an electronics enthusiast working on various electronics 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, TYT UV8000E and Quansheng UVK6 Handheld transceivers.\",\"sameAs\":[\"http:\/\/nuclearrambo.com\/wordpress\"],\"url\":\"https:\/\/nuclearrambo.com\/wordpress\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Auto start your GNU Radio script at boot on any Raspberry Pi","description":"Have your gnu radio application auto start whenever your Raspberry pi boots. You can even have any SDR attached to your Pi.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/","og_locale":"en_US","og_type":"article","og_title":"Auto start your GNU Radio script at boot on any Raspberry Pi","og_description":"Have your gnu radio application auto start whenever your Raspberry pi boots. You can even have any SDR attached to your Pi.","og_url":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/","og_site_name":"Nuclearrambo","article_published_time":"2021-01-16T13:20:00+00:00","article_modified_time":"2024-10-03T09:40:32+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2020\/04\/20_2.png","type":"image\/png"}],"author":"nuclearrambo","twitter_card":"summary_large_image","twitter_creator":"@darkusul","twitter_site":"@darkusul","twitter_misc":{"Written by":"nuclearrambo"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#article","isPartOf":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/"},"author":{"name":"nuclearrambo","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c"},"headline":"Auto start your GNU Radio script at boot on any Raspberry Pi","datePublished":"2021-01-16T13:20:00+00:00","dateModified":"2024-10-03T09:40:32+00:00","mainEntityOfPage":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/"},"wordCount":444,"commentCount":2,"publisher":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#organization"},"keywords":["gnuradio","ham radio","plutosdr","raspberry pi","rtlsdr"],"articleSection":["Amateur Radio","Computers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/","url":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/","name":"Auto start your GNU Radio script at boot on any Raspberry Pi","isPartOf":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#website"},"datePublished":"2021-01-16T13:20:00+00:00","dateModified":"2024-10-03T09:40:32+00:00","description":"Have your gnu radio application auto start whenever your Raspberry pi boots. You can even have any SDR attached to your Pi.","breadcrumb":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nuclearrambo.com\/wordpress\/gnuradio-application-autostart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nuclearrambo.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Auto start your GNU Radio script at boot on any Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/nuclearrambo.com\/wordpress\/#website","url":"https:\/\/nuclearrambo.com\/wordpress\/","name":"Nuclearrambo","description":"Information is FREE! Progress is MUST! Awakening is inevitable!","publisher":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nuclearrambo.com\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nuclearrambo.com\/wordpress\/#organization","name":"Nuclearrambo","url":"https:\/\/nuclearrambo.com\/wordpress\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/","url":"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png","contentUrl":"https:\/\/nuclearrambo.com\/wordpress\/wp-content\/uploads\/2021\/01\/logo-nuclearrambo.png","width":1489,"height":1152,"caption":"Nuclearrambo"},"image":{"@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/darkusul"]},{"@type":"Person","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/6093ae9d048d4789bd3d18c136577a0c","name":"nuclearrambo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nuclearrambo.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cc8a9d2d82dd7e65e77405f7b4ccaa34450e8a268f369ac893882cc5f13a797?s=96&r=g","caption":"nuclearrambo"},"description":"Salil is an electronics enthusiast working on various electronics 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, TYT UV8000E and Quansheng UVK6 Handheld transceivers.","sameAs":["http:\/\/nuclearrambo.com\/wordpress"],"url":"https:\/\/nuclearrambo.com\/wordpress\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts\/7055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/comments?post=7055"}],"version-history":[{"count":9,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts\/7055\/revisions"}],"predecessor-version":[{"id":8416,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/posts\/7055\/revisions\/8416"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/media\/6748"}],"wp:attachment":[{"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/media?parent=7055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/categories?post=7055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuclearrambo.com\/wordpress\/wp-json\/wp\/v2\/tags?post=7055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}