{"id":39,"date":"2019-04-14T00:36:52","date_gmt":"2019-04-14T07:36:52","guid":{"rendered":"https:\/\/my.apolonio.tech\/?p=39"},"modified":"2019-10-08T21:42:13","modified_gmt":"2019-10-09T04:42:13","slug":"building-an-rtl-sdr-linux-box","status":"publish","type":"post","link":"https:\/\/my.apolonio.tech\/?p=39","title":{"rendered":"Building an RTL SDR Linux Box"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Introduction<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the instructions on installing RTL-SDR on a Linux Box<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Assumption<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">I am going to assume that you know a bit about Linux like\nbuilding a CentOS box, adding accounts, and setting IP addresses.&nbsp; These tasks are out of scope for this\ndocument.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Build the CentOS box<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">We need to start somewhere, so we will start with a CentOS 7.6.1810\nLinux box with at least 4GB of RAM with a GNOME desktop and Development tools.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/my.apolonio.tech\/wp-content\/uploads\/2019\/04\/CentOS-Minimal.png\" alt=\"\" class=\"wp-image-42\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">More packages will be added later<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Set preferences<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">After you build your box configure it as needed per your personal\npreferences &nbsp;and procedures.&nbsp;&nbsp; Couple things you should do though<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>User accounts &#8211; make sure to add the users who will access the RTL-SDR device to the dialout group<pre>sudo usermod -G wheel,dialout larry<\/pre><\/li><li>You should not have to disable the firewall or SELinux to go through these procedures<\/li><li>Patch your system<pre>sudo yum -y update<\/pre><\/li><li>Make sure your system has the proper drivers and has Internet access.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">At this point you have CentOS 7 basic GUI\/dev install with\nupdate to date patches<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After a reboot your system , we will begin the actual\ninstall.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Install Additional CentOS packages<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Install these additional packages from the base centos\nrepository<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo yum install libusb-devel git automake pulseaudio-libs-devel gtk3 gtk3-devel freeglut freeglut-devel gcc-c++ \\<br>gcc kernel-devel qt5-qtsvg fftw libstdc++ systemd-devel libusb1-devel<br><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Install Packages from EPEL<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">The of the rtl software come from epel repository, although audicity\nis not required, it does help when analyzing some recorded files,&nbsp; cmake3 and the rtl-sdr dev files are need to\ncompile some of the code we use.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo yum install epel-release<br>sudo yum install rtl-sdr.x86_64 rtl-sdr-devel audacity cmake3 <br><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Configure Drivers\/Modules for RTL<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">File tweaks load and give proper permissions for the RTL\ndevice and prevent the wrong module from installing<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After installing rtl-sdr copy the rtl-sdr rules to the udev\nfolder<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cp \/usr\/lib\/udev\/rules.d\/10-rtl-sdr.rules \/etc\/udev\/rules.d\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the file using sudo<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/etc\/udev\/rules.d\/10-rtl-sdr.rules<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following command in vi to add the dialout group\nbefore the ENV section on the file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">:%s\/, ENV\/, GROUP=\"dialout\", ENV\/g <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now you have to make sure the dvb driver does not load,\nfailure to do this will cause your system to reboot when accessing the RTL\ndevice<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a blacklist file in modprobe.d<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/etc\/modprobe.d\/blacklist-rtl.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The only thing needed in that file is the following single\nline<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">blacklist dvb_usb_rtl28xxu<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Shared Library Locations<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">As we add these software packages, the will write libraries\nto a pair of directories. You will need to specify where libraries are, you can\ndo that now so you won\u2019t have to do it later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a local.conf file <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/etc\/ld.so.conf.d\/local.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And add these two simple lines to it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/local\/lib64<br>\/usr\/local\/lib<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Reboot and Validate<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Reboot to enable the rtl drives and permissions<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, the rtl-sdr should be working via command\nline.&nbsp; Test it by using the following\ncommand<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rtl_test -t<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"178\" src=\"https:\/\/my.apolonio.tech\/wp-content\/uploads\/2019\/04\/rtl_test-success.png\" alt=\"\" class=\"wp-image-44\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If your system reboots inadvertently, check \u201cConfigure Drivers\/Modules for RTL\u201d section in this document&nbsp; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also make sure the account you are using is in the dialout\ngroup and the rtl-sdr.rules file has the ialout group in it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the test passes, at this point you can do command line\nrtl_sdr stuff lice recording FM stations<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Download the sources<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Now we can use wget and git to download the source code we\nneed<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go to your home directory and create a folder called src, we\nare going to use this folder to do all are work.&nbsp; Then download all of the files and source\ncode<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> cd<br> mkdir src<br> cd src<br> git clone https:\/\/github.com\/pothosware\/SoapySDR.git<br> git clone https:\/\/github.com\/jgaeddert\/liquid-dsp<br> wget https:\/\/github.com\/wxWidgets\/wxWidgets\/releases\/download\/v3.1.2\/wxWidgets-3.1.2.tar.bz2<br> git clone https:\/\/github.com\/cjcliffe\/CubicSDR.git<br> git clone https:\/\/github.com\/pothosware\/SoapyRTLSDR.git<br> git clone https:\/\/github.com\/pothosware\/SoapySDRPlay.git<br> git clone https:\/\/github.com\/myriadrf\/LimeSuite.git <\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Install CubicSDR<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">This section is pretty long, but this is the meat of the\ninstall.&nbsp; But most of these have a\nsimilar install process, you should be able to copy and paste each section<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install SoapySDR<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/SoapySDR<br>mkdir build<br>cd build<br>cmake3 ..\/ -DCMAKE_BUILD_TYPE=Release<br>make -j4<br>sudo make install<br>sudo ldconfig<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The following command tests it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SoapySDRUtil --info <\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install liquid-dsp<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/liquid-dsp<br>.\/bootstrap.sh<br>CFLAGS=\"-march=native -O3\" .\/configure --enable-fftoverride <br>make -j4<br>sudo make install<br>sudo ldconfig<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install wxWidgets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is probably the one component that takes the longest to\ncompile<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\ntar -xvjf wxWidgets-3.1.2.tar.bz2  \ncd wxWidgets-3.1.2\/\nmkdir -p ~\/Develop\/wxWidgets-staticlib\n.\/autogen.sh \n.\/configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng \\\n--with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview \\\n--disable-webviewwebkit --prefix=\/home\/user<code>\/Develop\/wxWidgets-staticlib<\/code> CXXFLAGS=\"-std=c++0x\"\nmake -j4\nsudo make install<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install the SDRplay API<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using a browser, download the following and install<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/www.sdrplay.com\/linuxdl.php\">http:\/\/www.sdrplay.com\/linuxdl.php<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Assuming you downloaded it into the src directory change\nperms and run<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src<br>chmod +x SDRplay_RSP_API-Linux-2.13.1.run<br>sudo .\/SDRplay_RSP_API-Linux-2.13.1.run<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately you have to reinstall SoapySDR because some\nfiles were overwritten when installing the SDRplay API<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/SoapySDR\/build<br>sudo make install<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test Again<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SoapySDRUtil --info<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some support modules for the SoapSDR.&nbsp; Test each module after install to validate\nyour are on the right track<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install the SoapyRTLSDR module<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/SoapyRTLSDR<br>mkdir build<br>cd build<br>cmake3 .. -DCMAKE_BUILD_TYPE=Release<br>make<br>sudo make install<br>sudo ldconfig<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SoapySDRUtil --info<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install the SoapySDRPlay module<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/SoapySDRPlay<br>mkdir build<br>cd build<br>cmake3 .. -DCMAKE_BUILD_TYPE=Release<br>make<br>sudo make install<br>sudo ldconfig<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SoapySDRUtil --info<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install the Limesuite Module<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the Steps<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/LimeSuite<br>mkdir builddir<br>cd builddir<br>cmake3 .. -DENABLE_EXAMPLES=off -DENABLE_GUI=off -DCMAKE_BUILD_TYPE=Release<br>make<br>RESULT=<code>SoapySDRUtil --sparse --info | grep \"Search path:\"<\/code>; MODULEPATH=${RESULT:12}; sudo cp SoapyLMS7\/libLMS7Support.so $MODULEPATH<br>sudo ldconfig<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SoapySDRUtil --info<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Finally install CubeSDR<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is the actual software package itself<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/CubicSDR<br>mkdir build<br>cd build<br>cmake3 ..\/ -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~\/Develop\/wxWidgets-staticlib\/bin\/wx-config<br>make<br>sudo make instal<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this point you can run CubeSDR to view radio waves<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Other Packages<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some reliatively easy to install packages <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Download<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">cd src<br>git clone https:\/\/github.com\/merbanan\/rtl_433.git<br>git clone git:\/\/github.com\/tedsluis\/dump1090.git<br>git clone https:\/\/github.com\/gat3way\/rtl_acars_ng.git<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install the rtl_433 package to view transmissions from 433Mhz devices around you<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/rtl_433<br>mkdir build<br>cd build<br>cmake3 .. -DCMAKE_BUILD_TYPE=Release<br>make<br>sudo make install<br>sudo ldconfig<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install dump1090 to view airplanes around you<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/dump1090\/<br>make<br>sudo cp dump1090 \/usr\/local\/bin\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">More information planes transmit<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~\/src\/rtl_acars_ng<br>make<br>sudo cp rtl_acars_ng \/usr\/local\/bin\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Sample run<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rtl_acars_ng -f 131550000<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Here are the instructions on installing RTL-SDR on a Linux Box Assumption I am going to assume that you know a bit about Linux like building a CentOS box, adding accounts, and setting&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-software-defined-radio"],"_links":{"self":[{"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=39"}],"version-history":[{"count":4,"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/my.apolonio.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}