Gr-smart meters Setup Guide: Difference between revisions
m 1. xterm is needed for gnuradio (not included in basic 20.04 install) 2. directory change need to be done twice to get out from build and project folders 3. numpy installation for Python 2.7 4. RTL-SDR drivers (should be installed before gr-osmosdr) |
Categorisation per 2026-09 category review |
||
| (27 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
The following install guide details the steps from a fresh Ubuntu | The following install guide details the steps from a fresh Ubuntu 22.04 install to a fully running GNU Radio + USRP B200, HackRF, AirSpy and RTL-SDR frequency hopping spread spectrum setup needed to capture smart meter data. | ||
'''This video shows the overall process but using a prior version of GNURadio. Instructions below are the latest.''' | |||
<youtube width="320" height="240">fUK8tcFQwpo</youtube> | <youtube width="320" height="240">fUK8tcFQwpo</youtube> | ||
==Install Ubuntu | '''For other Linux distributions please see:''' [[Gr-smart meters Setup on other distros]] | ||
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 Windows Subsystem for Linux (WSL) please see:''' [[Gr-smart meters on WSL]] | |||
==Install Ubuntu 22.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. See also [[Gr-smart meters Setup on other distros]] | |||
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. | 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. | ||
< | <pre> | ||
sudo apt update | sudo apt update | ||
sudo apt upgrade | sudo apt upgrade | ||
</pre> | |||
Also install the following | |||
<syntaxhighlight lang="bash"> | |||
sudo apt install libsndfile1-dev cmake | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | ====For flavors other than Ubuntu or depending on your window environment you may need:==== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
add apt-get install -y gobject-introspection gir1.2-gtk-3.0 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==Install GNU Radio 3.10== | |||
The version packaged with Ubuntu (3.10.1 as of 12-30-2022) works fine, has been tested up to 3.10.5<syntaxhighlight lang="bash"> | |||
sudo apt-get install gnuradio | |||
<syntaxhighlight lang="bash"> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==SDR Hardware Support== | ||
=== | ===All support is now native in GNURadio 3.10.=== | ||
*UHD can be used for Ettus USRP hardware | |||
*Soapy Custom Source is used for HackRF, AirSpy, BladeRF and RTL-SDR | |||
==Install Frequency Hopping Utilities== | ==Install Frequency Hopping Utilities== | ||
| Line 112: | Line 44: | ||
#[https://github.com/sandialabs/gr-pdu_utils PDU Utilities] | #[https://github.com/sandialabs/gr-pdu_utils PDU 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] | ||
#[https://github.com/sandialabs/gr-fhss_utils FHSS Utilities] | |||
===Create a folder to organize them=== | ===Create a folder to organize them=== | ||
| Line 127: | Line 59: | ||
git clone https://github.com/sandialabs/gr-pdu_utils.git | git clone https://github.com/sandialabs/gr-pdu_utils.git | ||
cd gr-pdu_utils/ | cd gr-pdu_utils/ | ||
git checkout maint-3. | git checkout maint-3.10 | ||
mkdir build | mkdir build | ||
cd build | cd build | ||
| Line 137: | Line 69: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install | ===Install Sandia Utilities=== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/sandialabs/gr- | git clone https://github.com/sandialabs/gr-sandia_utils.git | ||
cd gr- | cd gr-sandia_utils/ | ||
git checkout maint-3. | git checkout maint-3.10 | ||
mkdir build | mkdir build | ||
cd build/ | cd build/ | ||
| Line 155: | Line 87: | ||
git clone https://github.com/sandialabs/gr-timing_utils.git | git clone https://github.com/sandialabs/gr-timing_utils.git | ||
cd gr-timing_utils/ | cd gr-timing_utils/ | ||
git checkout maint-3. | git checkout maint-3.10 | ||
mkdir build | mkdir build | ||
cd build | cd build | ||
| Line 165: | Line 97: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install | ===Install FHSS Utilities=== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
git clone https://github.com/sandialabs/gr- | git clone https://github.com/sandialabs/gr-fhss_utils.git | ||
cd gr- | cd gr-fhss_utils/ | ||
git checkout maint-3. | git checkout maint-3.10 | ||
mkdir build | mkdir build | ||
cd build/ | cd build/ | ||
| Line 179: | Line 111: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Finish up=== | |||
Close all open terminal windows and then open a new one. | Close all open terminal windows and then open a new one. | ||
| Line 207: | Line 120: | ||
git clone https://github.com/BitBangingBytes/gr-smart_meters.git | git clone https://github.com/BitBangingBytes/gr-smart_meters.git | ||
cd gr-smart_meters/ | cd gr-smart_meters/ | ||
git checkout maint-3.10 | |||
mkdir build | mkdir build | ||
cd build/ | cd build/ | ||
| Line 214: | Line 128: | ||
sudo ldconfig | sudo ldconfig | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Install python packages needed for Google Maps and Google Earth=== | |||
If pip isn't installed: <pre> sudo apt install python3-pip </pre> | |||
Then: | |||
<syntaxhighlight lang="bash"> | |||
pip install gmplot simplekml | |||
</syntaxhighlight> | |||
===Start GNU Radio from a terminal window=== | ===Start GNU Radio from a terminal window=== | ||
<code>gnuradio-companion</code> | <code>gnuradio-companion</code> | ||
===Open flowgraph for your SDR=== | ===Open flowgraph for your SDR=== | ||
In GNU Radio open a flowgraph and navigate to the gr-smart_meters/ | 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! | ||
==Determining your power providers CRC== | ==Determining your power providers CRC== | ||
CRC check is set to false in the sample flowgraphs so you will see data but can't be sure there aren't any errors. Every power provider is assigned a unique CRC so neighboring smart meter systems do not interfere with each other. To determine this you need to capture at least 4 good packets and use reveng to reverse the CRC. | CRC check is set to false in the sample flowgraphs so you will see data but can't be sure there aren't any errors. Every power provider is assigned a unique CRC so neighboring smart meter systems do not interfere with each other. To determine this you need to capture at least 4 good packets and use reveng to reverse the CRC. | ||
| Line 246: | Line 168: | ||
The init value is what you enter into the GridStream block, you can now enable the CRC and know you have correct data! | The init value is what you enter into the GridStream block, you can now enable the CRC and know you have correct data! | ||
{{#widget:CRCprefix}} | |||
[[Category:Smart meters]] | |||
[[Category:Software-defined radio]] | |||