Changes

Jump to navigation Jump to search
4,574 bytes removed ,  20:26, 30 December 2022
Updated for GNURadio 3.10 and Ubuntu 22.04
<youtube width="320" height="240">fUK8tcFQwpo</youtube>
==Install Ubuntu 2022.04==
There is nothing special about Ubuntu, it was chosen because it works well across different computers and has a familiar interface. Likely these instructions can be used as a rough guide for what is needed with other distro's.
</syntaxhighlight>
===Install dependencies===The block at the top is standard from the GNU Radio install guide3. The two additional below are vim so you get nice colors in your editor and liborc which is needed for the additional GNU Radio blocks that will be installed.<syntaxhighlight lang10=="bash">sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins python3-zmq python3-scipy python3-gi python3-gi-cairo gobject-introspection gir1.2-gtk-The version packaged with Ubuntu (3.0 xterm</syntaxhighlight><code>sudo apt install liborc-010.41 as of 12-dev vim libsndfile130-dev graphviz curl</code> ==Install GNU Radio 3.9==This guide and the blocks used here are all dependent on GNU Radio 3.8. As 3.9 2022) works fine, has been released for a while more blocks and packages are getting support so this guide may be updated in the future tested up to support 3.910.5<syntaxhighlight lang="bash">sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.9sudo apt updatesudo apt-get install gnuradio python3-packaging
</syntaxhighlight>
==For USRP B200 SDR Hardware Support==This is specific to the USRP B200 software defined radio, if you are using another SDR this will not be necessary. ===Install necessary packages===<code>sudo apt install libuhd-dev uhd-host</code> ===Download firmware needed for different USRP devices===If this doesn't work your files may have been installed in /usr/local/lib instead of /usr/lib <code>sudo /usr/lib/uhd/utils/uhd_images_downloader.py</code>
===Configure USB and test USRP B200All support is now native in GNURadio 3.10. ===<syntaxhighlight lang="bash">cd /usr/lib/uhd/utils/sudo cp uhd-usrp.rules /etc/udev/rules.d/sudo udevadm control --reload-rulessudo udevadm triggeruhd_usrp_probe</syntaxhighlight>
==For HackRF Support=====Install necessary packages===<code>sudo apt install build-essential cmake libusb-1.0-0-dev pkg-config libfftw3-dev</code>* UHD can be used for Ettus USRP hardware===Install * Soapy Custom Source is used for HackRF from source===<syntaxhighlight lang="bash">git clone https://github.com/mossmann/hackrf.gitcd hackrf/host/mkdir buildcd buildcmake ..make -j8sudo make installsudo ldconfig</syntaxhighlight>===Install gr-osmosdr===<syntaxhighlight lang="bash">git clone git://git.osmocom.org/gr-osmosdrcd gr-osmosdr/git checkout mastermkdir buildcd build/cmake ../makesudo make installsudo ldconfig</syntaxhighlight> ==For , AirSpy Support== ===Install necessary packages===<syntaxhighlight lang="bash">sudo apt install libairspy0 libairspy-dev</syntaxhighlight> ===Install gr-osmosdr===<syntaxhighlight lang="bash">git clone git://git.osmocom.org/gr-osmosdrcd gr-osmosdr/git checkout mastermkdir buildcd build/cmake ../makesudo make installsudo ldconfig</syntaxhighlight>==For RTL-SDR Support=====Install RTL-SDR drivers===Follow procedure to install , BladeRF and RTL-SDR drivers: https://www.rtl-sdr.com/rtl-sdr-quick-start-guide/Section: Getting Started on Linux===Install gr-osmosdr===<syntaxhighlight lang="bash">git clone git://git.osmocom.org/gr-osmosdrcd gr-osmosdr/git checkout mastermkdir buildcd build/cmake ../makesudo make installsudo ldconfig</syntaxhighlight>
==Install Frequency Hopping Utilities==
#[https://github.com/sandialabs/gr-pdu_utils PDU Utilities]
#[https://github.com/sandialabs/gr-fhss_utils FHSS Utilities]
#[https://github.com/sandialabs/gr-timing_utils Timing Utilities]
#[https://github.com/sandialabs/gr-sandia_utils Sandia Utilities]
#[https://github.com/sandialabs/gr-fhss_utils FHSS Utilities]
===Create a folder to organize them===
git clone https://github.com/sandialabs/gr-pdu_utils.git
cd gr-pdu_utils/
git checkout maint-3.910
mkdir build
cd build
</syntaxhighlight>
===Install FHSS Sandia Utilities===
<syntaxhighlight lang="bash">
git clone https://github.com/sandialabs/gr-fhss_utilssandia_utils.gitcd gr-fhss_utilssandia_utils/git checkout mastermaint-3.10
mkdir build
cd build/
git clone https://github.com/sandialabs/gr-timing_utils.git
cd gr-timing_utils/
git checkout mastermaint-3.10
mkdir build
cd build
</syntaxhighlight>
===Install Sandia FHSS Utilities (Possibly not needed for GR-3.9)===
<syntaxhighlight lang="bash">
git clone https://github.com/sandialabs/gr-sandia_utilsfhss_utils.gitcd gr-sandia_utilsfhss_utils/git checkout mastermaint-3.10
mkdir build
cd build/
</syntaxhighlight>
==Setup PYTHONPATH==gnuradio-companion will give you errors if it can't find your python libraries that were just installed. Also highly suggest starting gnuradio-companion from a terminal as opposed to the icon in Ubuntu. It gives you a nice way to see console output and you have to configure path variables in other places to run gnuradio-companion with the icon. #Figure out where your dist-packages is located#Open your .bashrc file and add that path#close all open terminals and re-open them ===Figure out where dist-packages is located===If your system is like mine they will be in: <code>/usr/local/lib/python3/dist-packages</code> You can easily confirm by using "ls" to show all the files there, if you see folder names corresponding to the packages installed above you have the correct folder. If not, try searching for other occurrences of "dist-packages" on your system where they may have been placed. ===Edit .bashrc and add PYTHONPATH===Add the following to the end of your .bashrc if there is no PYTHONPATH variable. <code>export PYTHONPATH=/usr/local/lib/python3.8/dist-packages/</code> ====Finish up====
Close all open terminal windows and then open a new one.
==Setup gr-smart_meters==
This contains the GridStream block that will be used to decode Landis+Gyr Smart Meter data along with pre-configured flowgraphs for USRP B200, HackRF and RTL-SDR and a script to decode GPS data transmitted in some cases.
===Python 2.7 dependencies===
Current version of script which does GPS coordinates extraction requires Python 2.7 and numpy library installed.
<syntaxhighlight lang="bash">
sudo apt-get install python2
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
sudo pip2 install numpy
</syntaxhighlight>
===Install gr-smart_meters===
<syntaxhighlight lang="bash">
git clone https://github.com/BitBangingBytes/gr-smart_meters.git
cd gr-smart_meters/
git checkout mastermain
mkdir build
cd build/
===Start GNU Radio from a terminal window===
<code>gnuradio-companion</code>
 
 
 
If you get an error when you start GNU Radio "The xterm executable 'x-terminal-emulator' is missing, edit the following file:<syntaxhighlight lang="bash">
sudo nano /etc/gnuradio/conf.d/grc.conf
</syntaxhighlight>Edit the line to read 'xterm_executable = /usr/bin/gnome-terminal"
===Open flowgraph for your SDR===
In GNU Radio open a flowgraph and navigate to the gr-smart_meters/examples folder. If you have installed everything above you should be able to run it and see smart meter data!

Navigation menu