Skip to content

Serial Console

The NanoVNA-H provides a command-line interface (shell) over USB. This allows direct control of all device functions, automation, and scripting.

  1. Connect NanoVNA-H via USB
  2. Open terminal software:
    • Windows: PuTTY, TeraTerm, or Windows Terminal
    • Linux: screen, minicom, or picocom
    • macOS: screen or CoolTerm
  3. Connect to the COM port at 115200 baud
  4. Press Enter to see the prompt
Terminal window
screen /dev/ttyACM0 115200

To exit screen: Ctrl+A then K, then Y

  1. Open PuTTY
  2. Select “Serial” connection type
  3. Enter COM port (e.g., COM3)
  4. Set speed to 115200
  5. Click “Open”

When connected, you’ll see:

ch>

This is the NanoVNA shell prompt. Type commands and press Enter.

Terminal window
help

Lists all available commands.

Terminal window
version # Show firmware version
info # Show device information
vbat # Show battery voltage
Terminal window
sweep 1000000 100000000 # Start 1MHz, stop 100MHz
sweep 1000000 100000000 201 # With 201 points
sweep start 50000 # Set only start
sweep stop 300000000 # Set only stop
freq 145000000 # Set CW frequency
Terminal window
trace 0 logmag # Trace 0 to log magnitude
trace 1 swr # Trace 1 to SWR
trace 2 smith # Trace 2 to Smith chart
trace 0 scale 10 # Set scale to 10 dB/div
trace 0 refpos 7 # Set reference position
Terminal window
cal open # Capture open standard
cal short # Capture short standard
cal load # Capture load standard
cal thru # Capture thru standard
cal isoln # Capture isolation
cal done # Calculate calibration
cal on # Enable calibration
cal off # Disable calibration
save 0 # Save to slot 0
recall 1 # Recall from slot 1
Terminal window
marker 1 on # Enable marker 1
marker 1 100 # Set to point 100
marker 1 off # Disable marker 1
marker on # Enable all
marker off # Disable all
Terminal window
data 0 # Get S11 data (re im pairs)
data 1 # Get S21 data
frequencies # Get frequency list
capture # Capture screen (raw data)
Terminal window
saveconfig # Save current settings
clearconfig # Reset to defaults
smooth 3 # Set smoothing level
bandwidth 1000 # Set IF bandwidth
power 0 # Set power level (0-3)

Commands follow this general format:

command [argument1] [argument2] [...]

Arguments are space-separated. Numeric values can be:

  • Integer: 1000000
  • Decimal: 1.5
  • Scientific: 1e6, 1.5e-9
  • With unit suffixes in some cases

Many commands output data that can be captured:

Terminal window
data 0
# Output: pairs of real imaginary values
# 0.123456 0.234567
# 0.345678 0.456789
# ...
Terminal window
frequencies
# Output: frequency in Hz
# 1000000
# 2000000
# ...
Terminal window
frequencies > freq.txt # Redirect to file (on PC)
data 0 > s11.txt
data 1 > s21.txt

Send multiple commands from a script:

import serial
import time
ser = serial.Serial('/dev/ttyACM0', 115200, timeout=1)
def send_command(cmd):
ser.write(f'{cmd}\r\n'.encode())
time.sleep(0.1)
return ser.read(10000).decode()
# Configure sweep
send_command('sweep 1000000 100000000 201')
# Set traces
send_command('trace 0 logmag')
send_command('trace 1 swr')
# Get data
frequencies = send_command('frequencies')
s11_data = send_command('data 0')
ser.close()
#!/bin/bash
PORT=/dev/ttyACM0
echo "sweep 1000000 100000000" > $PORT
sleep 0.5
echo "data 0" > $PORT
cat $PORT

Control sweep operation:

Terminal window
pause # Stop sweeping
resume # Resume sweeping

Use pause before making rapid configuration changes to avoid partial sweeps.

Terminal window
tcxo 26000000 # Set TCXO frequency
threshold 290000000 # Set harmonic switch frequency
reset # Soft reset device
touchcal # Start touch calibration
transform on # Enable time domain