{"id":152,"date":"2013-09-30T20:58:23","date_gmt":"2013-09-30T18:58:23","guid":{"rendered":"http:\/\/blog.matthias.roehser.de\/?p=152"},"modified":"2014-07-05T15:51:26","modified_gmt":"2014-07-05T13:51:26","slug":"getting-started-with-software-defined-radio-sdr-bladerf-gnuradio-osmocom-gqrx","status":"publish","type":"post","link":"https:\/\/blog.matthias.roehser.de\/?p=152","title":{"rendered":"Getting started with Software Defined Radio (SDR), bladeRF, GnuRadio, Osmocom, GQRX"},"content":{"rendered":"<h1>Strategy<\/h1>\n<p>Many tutorials already exist, that cover building bladeRF drivers, Gnuradio, Osmocom and GQRX from source. The main difference here is, that I will NOT install the built packages into my system directories or modify system files. Instead I will keep them separately in a folder in my home directory and use a startup script, that temporarily sets up the environment using the software. That way I can just delete the folder, reboot and I have a &#8220;clean&#8221; system again.<\/p>\n<p>Why should I go this way? Well, I like to experiment a lot, sometimes I&#8217;m working on several projects in parallel. That also includes messing up stuff. The described strategy offers the easiest way to clean up and start over again without reinstalling the operating system.<\/p>\n<h1>Let&#8217;s get started<\/h1>\n<p>I&#8217;m starting off with a fresh Ubuntu 13.10 (beta) here. First we install several packages that set up the build environment.<\/p>\n<pre>sudo apt-get install git g++ cmake cmake-curses-gui libboost-all-dev libfftw3-dev libcppunit-dev python swig python-numpy doxygen python-cheetah python-gtk2-dev libgsl0-dev qt-sdk libqwt-dev python-qt4-dev python-qwt5-qt4 jackd qjackctl libsdl1.2-dev liblog4cpp5-dev phonon-backend-gstreamer phonon-backend-vlc libusb-1.0-0-dev libtecla1-dev python-wxgtk2.8 wx2.8-headers\u00a0libjack-jackd2-dev<\/pre>\n<p>Let&#8217;s build stuff. Run these steps without superuser priviledges and change the pathnames according to your system. You will notice, that I use ccmake instead of cmake. This is a convenient tool to inspect and edit the available build settings. You could also go with cmake using the apropriate command parameters.<\/p>\n<h1>Building gnuradio<\/h1>\n<pre>git clone http:\/\/git.gnuradio.org\/git\/gnuradio.git\r\ncd gnuradio\r\nmkdir build\r\ncd build\/\r\nccmake ..\/<\/pre>\n<p>Edit CMAKE_INSTALL_PREFIX: \/home\/matthias\/downloads\/sdr\/installed<\/p>\n<pre>make\r\nmake install<\/pre>\n<h1>Building bladeRF libraries<\/h1>\n<pre>git clone https:\/\/github.com\/Nuand\/bladeRF.git\r\ncd bladeRF\/host\r\nmkdir build\r\ncd build\/\r\nccmake ..\/<\/pre>\n<p>Edit CMAKE_INSTALL_PREFIX: \/home\/matthias\/downloads\/sdr\/installed<br \/>\nSet INSTALL_UDEV_RULES to OFF<\/p>\n<pre>make\r\nmake install<\/pre>\n<p>There might be errors about not beeing able to install some rules to a system directory. Ignore this for now.<\/p>\n<h1>Build RTL-SDR<\/h1>\n<pre>git clone git:\/\/git.osmocom.org\/rtl-sdr.git\r\ncd rtl-sdr\r\nmkdir build\r\ncd build\/\r\nccmake ..\/<\/pre>\n<p>Edit CMAKE_INSTALL_PREFIX: \/home\/matthias\/downloads\/sdr\/installed<br \/>\nEdit Gnuradio_DIR: \/home\/matthias\/downloads\/sdr\/installed\/lib\/cmake\/gnuradio<\/p>\n<pre>make\r\nmake install<\/pre>\n<h1>Build OsmocomSDR GnuRadio block<\/h1>\n<pre>git clone git:\/\/git.osmocom.org\/gr-osmosdr\r\ncd gr-osmosdr\r\nmkdir build\r\ncd build\/\r\nccmake ..\/<\/pre>\n<p>Edit CMAKE_INSTALL_PREFIX: \/home\/matthias\/downloads\/sdr\/installed<\/p>\n<pre>make\r\nmake install<\/pre>\n<h1>Building gqrx<\/h1>\n<pre>git clone https:\/\/github.com\/csete\/gqrx\r\nmkdir build\r\ncd build\r\nPKG_CONFIG_PATH=\/home\/matthias\/downloads\/sdr\/installed\/lib\/pkgconfig\/ qmake-qt4 PREFIX=\/home\/matthias\/downloads\/sdr\/installed ..\/\r\nLD_LIBRARY_PATH=\/home\/matthias\/downloads\/sdr\/installed\/lib make\r\nmake install<\/pre>\n<h1>Finally<\/h1>\n<p>Ok, we are done compiling. If you examined the commands, then you propably guessed how to run the programs. However it is painfull to enter these long commands each time when you start the programs, so we create some nice scripts to ease the pain.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Strategy Many tutorials already exist, that cover building bladeRF drivers, Gnuradio, Osmocom and GQRX from source. The main difference here is, that I will NOT install the built packages into my system directories or modify system files. Instead I will keep them separately in a folder in my home directory and use a startup script, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":11,"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":163,"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions\/163"}],"wp:attachment":[{"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.matthias.roehser.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}