NanoVNA-H and NanoVNA-H4 are very tiny handheld Vector Network Analyzers (VNA). They are standalone portable devices withLCD and battery. This project aims to provide improved firmware for this useful instrument for enthusiast.
This repository contains the source code of the improved NanoVNA-H and NanoVNA-H4 firmware.
The documentation describes the build and flash process on a MacOS or a Linux (Debian or Ubuntu) system, other Linux (or even BSD) systems may behave similar.
UPDATE: Recent gcc version works to build NanoVNA, no need to use old version.
Install cross tools and firmware updating tool.
brew tap px4/px4
brew install gcc-arm-none-eabi-80
brew install dfu-util
Download arm cross tools from here.
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
sudo tar xfj gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 -C /usr/local
PATH=/usr/local/gcc-arm-none-eabi-8-2018-q4-major/bin:$PATH
sudo apt install -y dfu-util
sudo apt install gcc-arm-none-eabi
sudo apt install -y dfu-util
Fetch the firmware source and the submodule, do this once to initialize your local clone from GitHub:
git clone https://github.com/DiSlord/NanoVNA-D.git
cd NanoVNA-D
git submodule update --init --recursive
To get updates from the GitHub repository, go to your NanoVNA-D
directory and type:
git pull
Go to your NanoVNA-D
directory and type:
export TARGET=F072
make clean
make
Go to your NanoVNA-D
directory and type:
export TARGET=F303
make clean
make
When the build of your firmware is finished, you can flash it onto your NanoVNA device. First, let the device enter DFU mode by one of following methods.
- Open the device and jumper
BOOT0
pin toVdd
pin when powering the device. - Select menu Config->DFU (needs recent firmware).
- Press the jog switch on your -H4 when powering the device.
Then, flash the firmware using dfu-util
via USB.
Go to your NanoVNA-D
directory and type:
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/H.bin
Go to your NanoVNA-D
directory and type:
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/H4.bin
Go to your NanoVNA-D
directory and type:
make flash
The low-level tool dfu-util
displays a lot of information that is very useful especially for developers, but can confuse the user.
In particular, please ignore the message about corrupt firmware, this is the normal behaviour of the unit before clearing the status.
It is important to note that after clearing the status, there is no longer an error condition present.
...
Determining device status...
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
Clearing status
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
...
There are several numbers of great companion PC tools from third-party.
- NanoVNA-App software by OneOfEleven
- NanoVNASharp Windows software by hugen79
- NanoVNA WebSerial/WebUSB by cho45
- Android NanoVNA app by cho45
- NanoVNASaver by mihtjel and the members of NanoVNA-Saver
- TAPR VNAR4 supports NanoVNA by erikkaashoek
- The NanoVNA toolbox by Ho-Ro
- see python directory to use NanoVNA with Python and Jupyter Notebook.
- NanoVNA User Guide(ja) by cho45. (en:google translate)
- NanoVNA user group on groups.io.
- Schematics
- PCB Photo
- Block Diagram
- Kit available from https://ttrf.tk/kit/nanovna
Hardware design material is disclosed to prevent bad quality clone. Please let me know if you would have your own unit.