Serial Console
The NanoVNA-H provides a command-line interface (shell) over USB. This allows direct control of all device functions, automation, and scripting.
Connect to the Console
Section titled “Connect to the Console”- Connect NanoVNA-H via USB
- Open terminal software:
- Windows: PuTTY, TeraTerm, or Windows Terminal
- Linux:
screen,minicom, orpicocom - macOS:
screenor CoolTerm
- Connect to the COM port at 115200 baud
- Press Enter to see the prompt
Example: Using screen (Linux/macOS)
Section titled “Example: Using screen (Linux/macOS)”screen /dev/ttyACM0 115200To exit screen: Ctrl+A then K, then Y
Example: Using PuTTY (Windows)
Section titled “Example: Using PuTTY (Windows)”- Open PuTTY
- Select “Serial” connection type
- Enter COM port (e.g., COM3)
- Set speed to 115200
- Click “Open”
Shell Prompt
Section titled “Shell Prompt”When connected, you’ll see:
ch>This is the NanoVNA shell prompt. Type commands and press Enter.
Common Commands
Section titled “Common Commands”Get Help
Section titled “Get Help”helpLists all available commands.
Device Information
Section titled “Device Information”version # Show firmware versioninfo # Show device informationvbat # Show battery voltageFrequency Control
Section titled “Frequency Control”sweep 1000000 100000000 # Start 1MHz, stop 100MHzsweep 1000000 100000000 201 # With 201 pointssweep start 50000 # Set only startsweep stop 300000000 # Set only stopfreq 145000000 # Set CW frequencyTrace Configuration
Section titled “Trace Configuration”trace 0 logmag # Trace 0 to log magnitudetrace 1 swr # Trace 1 to SWRtrace 2 smith # Trace 2 to Smith charttrace 0 scale 10 # Set scale to 10 dB/divtrace 0 refpos 7 # Set reference positionCalibration
Section titled “Calibration”cal open # Capture open standardcal short # Capture short standardcal load # Capture load standardcal thru # Capture thru standardcal isoln # Capture isolationcal done # Calculate calibrationcal on # Enable calibrationcal off # Disable calibrationsave 0 # Save to slot 0recall 1 # Recall from slot 1Markers
Section titled “Markers”marker 1 on # Enable marker 1marker 1 100 # Set to point 100marker 1 off # Disable marker 1marker on # Enable allmarker off # Disable allData Export
Section titled “Data Export”data 0 # Get S11 data (re im pairs)data 1 # Get S21 datafrequencies # Get frequency listcapture # Capture screen (raw data)Configuration
Section titled “Configuration”saveconfig # Save current settingsclearconfig # Reset to defaultssmooth 3 # Set smoothing levelbandwidth 1000 # Set IF bandwidthpower 0 # Set power level (0-3)Command Syntax
Section titled “Command Syntax”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
Getting Command Data
Section titled “Getting Command Data”Many commands output data that can be captured:
Measurement Data
Section titled “Measurement Data”data 0# Output: pairs of real imaginary values# 0.123456 0.234567# 0.345678 0.456789# ...Frequency Points
Section titled “Frequency Points”frequencies# Output: frequency in Hz# 1000000# 2000000# ...Capture data for S-parameter export
Section titled “Capture data for S-parameter export”frequencies > freq.txt # Redirect to file (on PC)data 0 > s11.txtdata 1 > s21.txtScripting
Section titled “Scripting”Send multiple commands from a script:
Python Example
Section titled “Python Example”import serialimport 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 sweepsend_command('sweep 1000000 100000000 201')
# Set tracessend_command('trace 0 logmag')send_command('trace 1 swr')
# Get datafrequencies = send_command('frequencies')s11_data = send_command('data 0')
ser.close()Shell Script Example
Section titled “Shell Script Example”#!/bin/bashPORT=/dev/ttyACM0
echo "sweep 1000000 100000000" > $PORTsleep 0.5echo "data 0" > $PORTcat $PORTPause and Resume
Section titled “Pause and Resume”Control sweep operation:
pause # Stop sweepingresume # Resume sweepingUse pause before making rapid configuration changes to avoid partial sweeps.
Advanced Commands
Section titled “Advanced Commands”tcxo 26000000 # Set TCXO frequencythreshold 290000000 # Set harmonic switch frequencyreset # Soft reset devicetouchcal # Start touch calibrationtransform on # Enable time domain