Installing NanoVNASaver in Ubuntu Linux

Installing NanoVNASaver in Ubuntu Linux

The NanoVNA is a small handheld vector network analyzer, and it is extremely popular in the amateur radio community. It finds uses ranging from testing and measuring coaxial cables to testing and measuring the performance of antennas. We have owned a NanoVNA for well over a year at this point, and we bring it with us on all of our portable operations to quickly check the SWR of our antennas before operating (as we typically operate QRP with a Yaesu FT-818, which does not have an integrated tuner).

The NanoVNA is extremely powerful as is; however, its user experience can be greatly improved by hooking it directly to a PC and using third-party software to control the device. One such software is NanoVNASaver. This software is an open source project started by Rune B. Broberg (5Q5R), and it allows users to visualize data on their computer and perform some operations, such as calibration and frequency sweeps. If you’ve ever used a NanoVNA, you know how valuable being able to see the plots on a larger screen is!

The installation instructions provided on the project’s GitHub repository (linked above) are definitely sufficient to get most users up and going. However, I did run into a few small gotchas when installing NanoVNASaver today, so I wanted to document the process I followed and comment on why I took the steps I took. Disclaimer: There are always some inherent risks installing software. Please see the full disclaimer at the bottom of this article!

Installation Overview

NanoVNASaver is a Python-based application, and as such, it needs to have access to a few third-party libraries. As a software engineer, I routinely work on various Python projects, and oftentimes, these can have package conflicts (with various versions). Thus, I chose to install NanoVNASaver such that it runs using a Python virtual environment to keep its dependencies separate from other projects.

Installation Steps

All of the following steps are performed in the terminal.

  1. Clone the repository
git clone git@github.com:NanoVNA-Saver/nanovna-saver.git
  1. Create and activate a Python 3 virtual environment
python3 -m venv venv
source venv/bin/activate
  1. Install the dependencies
pip install -r requirements.txt
  1. Launch the application
python nanovna-saver.py

If the application launches successfully, you’re good to go! However, you might run into a permissions issue when the application attempts to access the device over your serial (USB) ports.

Setting permissions for serial port access

If the application fails to start because it does not have permissions to access ttyACM0, you can attempt the following:

  1. See which groups have access to ttyACM0:
ls -l /dev/ttyACM0
  1. Add your user account to the group (here, dialout):
    sudo usermod -a -G dialout $USER
    
  2. Logout (or restart)

Starting Application

Note that each time you want to run the application, you’ll need to start your virtual environment (if it isn’t already active):

# change into directory housing application
cd ~/nanovna-saver
source venv/bin/activate
python nanovna-saver

Disclaimer

There are always some inherent risks when installing software, particularly when dealing with system configurations or third-party applications. While this guide is provided in good faith to assist users with the installation process, please note that by proceeding, you acknowledge that any modifications you make to your system are at your own risk. The instructions herein are provided “as is” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability or fitness for a particular purpose. The author or publisher of this guide shall not be held liable for any direct or indirect damages or loss of any kind arising from the use of this software, including, but not limited to, system malfunctions, data loss, or any other damages resulting from the operation or installation as described. It is highly recommended that you back up your data before making any changes to your system and proceed with caution. By continuing with the installation, you accept full responsibility for any consequences and agree that the author or publisher is indemnified against any claims.