The basic setup procedure is to first prepare a linux machine and then compile and install UHD from Ettus. For the development, an Ubuntu 18.04.4LTS (64-bit) is used. A "minimal installation" is used as the starting point and these notes are mostly a record of additional steps that were required.
- Install VirtualBox
- Download the VirtualBox Guest Additions
- Download a disk image for Ubuntu 18.04.4LTS
- Install the linux "normally"
- Optionally, in the account Settings, remove automatic screen locking (Privacy) and blanking (Power)
For installing the VirtualBox Guest Additions, you will need more software
sudo apt update
sudo apt install gcc make perl
- Install the guest additions (VirtualBox menu "Devices")
- Eject the guest additions virtual DVD
- Reboot the linux
- Choose a larger virtual screen for the linux (VirtualBox menu "View")
- In the VirtualBox settings for the virtual machine, change the default mouse handling to allow copying of text between the host and the VM (Settings-General-Advanced-Shared Clipboard-Birectional). You will need to restart the virtual machine for the changes to take effect
While there are really nice text editors, it is often convenient to use a pretty minimal editor such as vim
when doing configurations of the system or small changes in the software remotely via ssh
, which is also needed when remote editing from, e.g., atom
. So, there are a few additional packages to install
sudo apt install vim openssh-server
The Doppler software uses only Python3, so it is convenient to define an alias in .bashrc
alias python=python3
See https://files.ettus.com/manual/page_install.html for more details
Installing from source requires some additional packages. Also, the actual Doppler software needs SciPy
and Matplotlib
.
sudo apt install wget python3-pip git
sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-mako doxygen python-docutils cmake build-essential
python3 -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose h5py
Compile the source, note that you should choose the LTS branch, the latest version froze when trying to record from the USRP (in VirtualBox)
git clone https://github.com/EttusResearch/uhd.git
cd uhd
git checkout UHD-3.15.LTS
cd host
mkdir build
cd build
cmake -DENABLE_PYTHON_API=ON ../
make
make test
sudo make install
sudo ldconfig
The python API will be installed in a directory that needs to be added to the path. The simplest way is to add the following in .bashrc
export PYTHONPATH="/usr/local/lib/python3/dist-packages/"
Increase buffer size by adding the following to /etc/sysctl.conf
net.core.rmem_max=50000000
net.core.wmem_max=50000000
Set thread priority, see https://files.ettus.com/manual/page_general.html#general_threading
sudo addgroup usrp
sudo adduser myuser usrp
Add the following line to /etc/security/limits.conf
@usrp - rtprio 99
There are comments in the web that installing the volk-libraries often speed up the GNUradio routines.
sudo apt-get install libvolk1-bin
volk_profile
This needs to be tested...