USRP driver and dependency installation
Installation on Ubuntu 22.04
Install UHD and GNU Radio and all needed dependencies:
UHD installation
UHD installation from source code is required
See https://files.ettus.com/manual/page_build_guide.html
Alternatively, first install the following dependencies
CMAKE: http://www.cmake.org/cmake/resources/software.html
BOOST: http://www.boost.org/users/download/
LibUSB: http://sourceforge.net/projects/libusb/files/libusb-1.0/
Python: http://www.python.org/download/
Mako: http://www.makotemplates.org/download.html
Doxygen: http://www.doxygen.nl/download.html
You can setup all above by using
sudo apt-get install autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool \
g++ git inetutils-tools libboost-all-dev libncurses5 libncurses5-dev libusb-1.0-0 libusb-1.0-0-dev \
libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools \
python3-ruamel.yaml
then download and isntall UHD:
git clone --branch UHD-4.0 https://github.com/ettusresearch/uhd.git uhd
cd /uhd/host/
mkdir build
cd build
cmake ..
make
make test
sudo make install
sudo ldconfig
Set variable environment
export LD_LIBRARY_PATH=/usr/local/lib
export UHD_IMAGES_DIR=/usr/local/share/uhd/images
and run
uhd_find_devices
You also need to run
sudo uhd_images_downloader
Finally, you need to locate and add libuhd.a or libuhd.so to your project
Further, to take FFT, we need to a library that I would recommend FFTW, which can be installed in Ubuntu by (see a tutorial here ! )
sudo apt-get install libfftw3-dev
Or alternatively install it from source code, by downloading it from here
http://www.fftw.org/download.html
then
tar -xvf fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure
make
sudo make install
the libfftw3.a will be installed in
usr/local/lib/
Finally, it should be added to the project as a library, as the standard procedure for using libraries.
GNU Radio Installation
For our applications, we just need binary installation of GNU Radio
sudo apt update
sudo apt install gnuradio-dev gr-osmosdr cmake libsndfile1-dev
Now, we need to also run images_downloader in
/usr/lib/x86_64-linux-gnu/uhd/utils/uhd_images_downloader.py
You might have to disconnect and re-connect your SDR if it was already connected to your computer.
Optimize VOLK
GNU Radio use VOLK to do most of the computations. To allow VOLK to chose the best implementations of its DSP algorithms you should run
volk_profile