Difference between revisions of "Gr-smart meters Setup Guide"

From RECESSIM, A Reverse Engineering Community
Jump to navigation Jump to search
Line 11: Line 11:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Install dependencies ===
+
===Install dependencies===
 
The block at the top is standard from the GNU Radio install guide. The two additional below are additional, 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 lang="bash">
 
The block at the top is standard from the GNU Radio install guide. The two additional below are additional, 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 lang="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-3.0
 
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-3.0
 
</syntaxhighlight><code>sudo apt install liborc-0.4-dev vim</code>  
 
</syntaxhighlight><code>sudo apt install liborc-0.4-dev vim</code>  
  
=== Install GNU Radio 3.8 ===
+
===Install GNU Radio 3.8===
 
This guide and the blocks used here are all dependent on GNU Radio 3.8. As 3.9 has been released for a while more blocks and packages are getting support so this guide may be updated in the future to support 3.9.<syntaxhighlight lang="bash">
 
This guide and the blocks used here are all dependent on GNU Radio 3.8. As 3.9 has been released for a while more blocks and packages are getting support so this guide may be updated in the future to support 3.9.<syntaxhighlight lang="bash">
 
sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.8
 
sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.8
Line 23: Line 23:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Install UHD for USRP B200 Support ===
+
===Install UHD for USRP B200 Support===
 
This is specific to the USRP B200 software defined radio, if you are using another SDR this will not be necessary.
 
This is specific to the USRP B200 software defined radio, if you are using another SDR this will not be necessary.
  
==== Install necessary packages ====
+
====Install necessary packages====
 
<code>sudo apt-get install libuhd-dev libuhd3.15.0 uhd-host</code>
 
<code>sudo apt-get install libuhd-dev libuhd3.15.0 uhd-host</code>
  
==== Download firmware needed for different USRP devices ====
+
====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
 
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>
 
<code>sudo /usr/lib/uhd/utils/uhd_images_downloader.py</code>
  
==== Configure USB and test USRP B200 ====
+
====Configure USB and test USRP B200====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cd /usr/lib/uhd/utils/
 
cd /usr/lib/uhd/utils/
Line 43: Line 43:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Install Frequency Hopping Utilities ===
+
===Install Frequency Hopping Utilities===
 
If you already have GNU Radio and your SDR setup you should start here to install the Sandia Laboratories out of tree (OOT) modules. Four different OOT modules are needed.
 
If you already have GNU Radio and your SDR setup you should start here to install the Sandia Laboratories out of tree (OOT) modules. Four different OOT modules are needed.
  
# [https://github.com/sandialabs/gr-pdu_utils PDU Utilities]
+
#[https://github.com/sandialabs/gr-pdu_utils PDU Utilities]
# [https://github.com/sandialabs/gr-fhss_utils FHSS Utilities]
+
#[https://github.com/sandialabs/gr-fhss_utils FHSS Utilities]
# [https://github.com/sandialabs/gr-timing_utils Timing Utilities]
+
#[https://github.com/sandialabs/gr-timing_utils Timing Utilities]
# [https://github.com/sandialabs/gr-sandia_utils Sandia Utilities]
+
#[https://github.com/sandialabs/gr-sandia_utils Sandia Utilities]
  
==== Create a folder to organize them ====
+
====Create a folder to organize them====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cd
 
cd
Line 58: Line 58:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Install PDU Utilities ====
+
====Install PDU Utilities====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
git clone https://github.com/sandialabs/gr-pdu_utils.git
 
git clone https://github.com/sandialabs/gr-pdu_utils.git
Line 69: Line 69:
 
sudo make install
 
sudo make install
 
sudo ldconfig
 
sudo ldconfig
 +
</syntaxhighlight>
 +
 +
==== Install FHSS Utilities ====
 +
<syntaxhighlight lang="bash">
 +
git clone https://github.com/sandialabs/gr-fhss_utils.git
 +
cd gr-fhss_utils/
 +
git checkout maint-3.8
 +
mkdir build
 +
cd build/
 +
cmake ..
 +
make -j8
 +
sudo make install
 +
sudo ldconfig
 +
cd ..
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 17:02, 25 April 2021

The following install guide details the steps from a fresh Ubuntu 20.04 install to a fully running GNU Radio + USRP B200 frequency hopping spread spectrum setup needed to capture smart meter data. The guide will be updated/broken out as additional SDR's like the HackRF and RTL-SDR are added.

Install Ubuntu 20.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.

For now, this step is to install a base version of Ubuntu 20.04, mine was a minimal install. After finishing your install ensure you update everything.

sudo apt update
sudo apt upgrade

Install dependencies

The block at the top is standard from the GNU Radio install guide. The two additional below are additional, vim so you get nice colors in your editor and liborc which is needed for the additional GNU Radio blocks that will be installed.

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-3.0

sudo apt install liborc-0.4-dev vim

Install GNU Radio 3.8

This guide and the blocks used here are all dependent on GNU Radio 3.8. As 3.9 has been released for a while more blocks and packages are getting support so this guide may be updated in the future to support 3.9.

sudo add-apt-repository ppa:gnuradio/gnuradio-releases-3.8
sudo apt update
sudo apt install gnuradio

Install UHD for USRP B200 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

sudo apt-get install libuhd-dev libuhd3.15.0 uhd-host

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

sudo /usr/lib/uhd/utils/uhd_images_downloader.py

Configure USB and test USRP B200

cd /usr/lib/uhd/utils/
sudo cp uhd-usrp.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger
uhd_usrp_probe

Install Frequency Hopping Utilities

If you already have GNU Radio and your SDR setup you should start here to install the Sandia Laboratories out of tree (OOT) modules. Four different OOT modules are needed.

  1. PDU Utilities
  2. FHSS Utilities
  3. Timing Utilities
  4. Sandia Utilities

Create a folder to organize them

cd
mkdir FHSS_Utils
cd FHSS_Utils

Install PDU Utilities

git clone https://github.com/sandialabs/gr-pdu_utils.git
cd gr-pdu_utils/
git checkout maint-3.8
mkdir build
cd build
cmake ..
make -j8
sudo make install
sudo ldconfig

Install FHSS Utilities

git clone https://github.com/sandialabs/gr-fhss_utils.git
cd gr-fhss_utils/
git checkout maint-3.8
mkdir build
cd build/
cmake ..
make -j8
sudo make install
sudo ldconfig
cd ..