Gr-smart meters Setup Guide: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
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. | 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. | 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. | ||
| Line 16: | Line 16: | ||
</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== | |||
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> | ||
==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=== | |||
<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=== | |||
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=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd /usr/lib/uhd/utils/ | cd /usr/lib/uhd/utils/ | ||
| Line 43: | Line 43: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==For HackRF Support== | |||
===Install necessary packages=== | |||
<code>sudo apt-get install build-essential cmake libusb-1.0-0-dev pkg-config libfftw3-dev</code> | <code>sudo apt-get install build-essential cmake libusb-1.0-0-dev pkg-config libfftw3-dev</code> | ||
===Install HackRF from source=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/mossmann/hackrf.git | git clone https://github.com/mossmann/hackrf.git | ||
| Line 57: | Line 57: | ||
sudo ldconfig | sudo ldconfig | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install gr-osmosdr for GNU Radio support=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone git://git.osmocom.org/gr-osmosdr | git clone git://git.osmocom.org/gr-osmosdr | ||
| Line 69: | Line 69: | ||
sudo ldconfig | sudo ldconfig | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==For RTL-SDR Support== | |||
<br /> | <br /> | ||
==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. | ||
| Line 79: | Line 79: | ||
#[https://github.com/sandialabs/gr-sandia_utils Sandia Utilities] | #[https://github.com/sandialabs/gr-sandia_utils Sandia Utilities] | ||
===Create a folder to organize them=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd | cd | ||
| Line 86: | Line 86: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===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 100: | Line 100: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install FHSS Utilities=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/sandialabs/gr-fhss_utils.git | git clone https://github.com/sandialabs/gr-fhss_utils.git | ||
| Line 114: | Line 114: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install Timing Utilities=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/sandialabs/gr-timing_utils.git | git clone https://github.com/sandialabs/gr-timing_utils.git | ||
| Line 128: | Line 128: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install Sandia Utilities=== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/sandialabs/gr-sandia_utils.git | git clone https://github.com/sandialabs/gr-sandia_utils.git | ||
| Line 142: | Line 142: | ||
</syntaxhighlight> | </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. | 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. | ||
| Line 149: | Line 149: | ||
#close all open terminals and re-open them | #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: | If your system is like mine they will be in: | ||
| Line 156: | Line 156: | ||
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. | 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. | Add the following to the end of your .bashrc if there is no PYTHONPATH variable. | ||