-
Notifications
You must be signed in to change notification settings - Fork 92
Installation
Skip ahead for gr-lora
installation instructions.
gr-lora
requires a working installation of GNU Radio, including development headers. This is the only prerequisite.
There are a number of ways to install GNU Radio, including through your system package manager (aptitude
, macports
, etc.) or GNU Radio's proprietary installation management system (PYBombs
). However, I recommend building from source. It's not that hard to do, gives you insight into and control over what gets installed, and most importantly allows you to configure your install path and permissions. See the following for more information:
I install GNU Radio to a custom subdirectory under /opt
that is owned by my user account, for example /opt/gnuradio
. This allows me to install and run GNU Radio without root. Since /opt not a default system path, it requires manually extending system paths to include this search path. Within .bashrc
/.zshrc
/equivalent, add:
export PATH=\
/opt/gnuradio/bin:\
$PATH
export LD_LIBRARY_PATH=\
/opt/gnuradio/lib:\
$LD_LIBRARY_PATH
export CPATH=\
/opt/gnuradio/include:\
$CPATH
export PYTHONPATH=\
/opt/gnuradio/lib/python2.7/[site|dist]-packages:\ #NB: system dependent `site-packages` or `dist-packages`
$PYTHONPATH
export PKG_CONFIG_PATH=\
/opt/gnuradio/lib/pkgconfig:\
$PKG_CONFIG_PATH
export GRC_BLOCKS_PATH=\
/opt/gnuradio/share/gnuradio/grc/blocks:\
$GRC_BLOCKS_PATH
Once your .*rc file is updated, either reboot or source it to update your path: source [.bashrc|.zshrc]
Device drivers and out of tree GNU Radio modules can be installed this way. Device drivers can be run with local non-root permissions by configuring udev
rules, which will require copying a udev
rules file to /etc/udev/rules.d
. This one-time copy operation will require root.
gr-lora
is installed as one installs any out of tree module. The steps follow:
/opt/gr-lora
may be replaced with a path of your choosing.
sudo mkdir /opt/gr-lora
sudo chown [USER]:[GROUP] /opt/gr-lora
git clone git://github.com/BastilleResearch/gr-lora.git
cd gr-lora
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/gr-lora ../
make
make install
sudo ldconfig
git clone git://github.com/BastilleResearch/gr-lora.git
cd gr-lora
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
Once complete, add gr-lora
's install paths to CPATH
, LD_LIBRARY_PATH
, PYTHONPATH
, and GRC_BLOCKS_PATH
.
export LD_LIBRARY_PATH=\
/opt/gnuradio/lib:\
/opt/gr-lora/lib:\
$LD_LIBRARY_PATH
export CPATH=\
/opt/gnuradio/include:\
/opt/gr-lora/include:\
$CPATH
export PYTHONPATH=\
/opt/gnuradio/lib/python2.7/[site|dist]-packages:\
/opt/gr-lora/lib/python2.7/[site|dist]-packages:\ #NB: system dependent `site-packages` or `dist-packages`
$PYTHONPATH
export GRC_BLOCKS_PATH=\
/opt/gnuradio/share/gnuradio/grc/blocks:\
/opt/gr-lora/share/gnuradio/grc/blocks:\
$GRC_BLOCKS_PATH
As before, either reboot or source your .*rc
file to update said paths.