Skip to content

Multi-VNA Coordination

mcnanovna can control multiple NanoVNA devices simultaneously, enabling measurements that a single 2-port VNA can’t perform. This page explains the three synchronization tiers and when to use each.

Why Multiple VNAs?

A single NanoVNA provides 2 ports—enough for S11 (reflection) and S21 (transmission) through one device. Multiple VNAs expand your measurement capability:

VNAsPortsEnables
12S11, S21 (standard)
24True 4-port, A/B comparison, long path loss
3+2NPhased arrays, MIMO, multi-element antennas

The Synchronization Challenge

When measuring across multiple VNAs, timing matters:

  • Amplitude comparison: ±5ms is fine—signal levels don’t change that fast
  • Time-aligned capture: Need ±10-50µs for transfer functions
  • Phase alignment: Need shared clock for coherent phase

mcnanovna provides three tiers to match your precision needs.

The Three Tiers

Tier 1: Software

±2-5ms timing

Parallel async execution via software. Works with any firmware, no modifications needed.

Best for: Antenna comparison, SWR checks, signal level surveys

Tier 2: Hardware Trigger

±10-50µs timing

One VNA triggers the others via GPIO. Requires custom firmware and trigger wiring.

Best for: Transfer functions, differential S21, timing-sensitive measurements

Tier 3: Phase Coherent

±1° phase alignment

All VNAs share a 26 MHz clock reference plus hardware trigger.

Best for: Antenna arrays, MIMO, beamforming, phase noise comparison

Tier Details

How It Works

mcnanovna sends scan commands to all VNAs in parallel using Python’s asyncio. The timing depends on USB latency and OS scheduling.

Requirements

  • Multiple VNAs connected via USB
  • Stock firmware (any version)
  • No hardware modifications

Limitations

  • ±2-5ms timing (good enough for most amplitude measurements)
  • No phase relationship between devices
  • USB contention can add jitter

Tools

ToolDescription
sync_sweepParallel sweep across devices
multi_antenna_compareCompare S11 metrics
differential_s21Two-VNA transmission

Example

sync_sweep(
device_ids=["0001234567", "0009876543"],
start_hz=144000000,
stop_hz=148000000,
points=101
)

Smart Tier Selection

Don’t want to think about tiers? Use coordinated_sweep:

coordinated_sweep(
start_hz=144000000,
stop_hz=148000000,
points=101
)

It automatically selects the best method based on detected capabilities:

┌─────────────────────┐
│ coordinated_sweep() │
└──────────┬──────────┘
┌───────────────┼───────────────┐
│ │ │
▼ │ ▼
┌─────────────────┐ │ ┌─────────────────┐
│ All have │ │ │ All have │
│ external_clock? │───Yes──┘ │ hardware_trigger?│
└────────┬────────┘ │ └────────┬────────┘
│No │ │Yes
└────────────┐ │ ┌────────┘
▼ ▼ ▼
┌─────────────────┐
│ Use Tier 3 │
│ phase_coherent │
└─────────────────┘
│No
┌─────────────────┐
│ Use Tier 2 │
│hardware_trigger │
└─────────────────┘
│No
┌─────────────────┐
│ Use Tier 1 │
│ software │
└─────────────────┘

Device Management

Discovery

list_devices()

Returns all connected VNAs with their capabilities:

{
"devices": [
{
"device_id": "0001234567",
"port": "/dev/ttyACM0",
"board": "NanoVNA-H4",
"connected": true,
"capabilities": {
"hardware_trigger": true,
"external_clock": false
}
}
],
"default": "0001234567"
}

Targeting

Default device: When one VNA is connected, it’s automatically the default. With multiple, set one:

set_default_device(device_id="0001234567")

Explicit targeting: Override default with device_id on any tool:

scan(device_id="0009876543", start_hz=144e6, stop_hz=148e6)

Hot-plug Detection

After connecting/disconnecting VNAs:

refresh_devices()

Common Workflows

A/B Antenna Comparison

Connect two antennas to two VNAs, then:

multi_antenna_compare(
device_ids=["antenna_a_vna", "antenna_b_vna"],
start_hz=144000000,
stop_hz=148000000
)

Returns:

MetricAntenna AAntenna B
Min SWR1.151.32
Resonance145.2 MHz144.8 MHz
Bandwidth4.1 MHz3.2 MHz

Long Cable Path Loss

Measure a cable too long to keep both ends near one VNA:

differential_s21(
source_device_id="near_end_vna",
receiver_device_id="far_end_vna",
start_hz=1000000,
stop_hz=500000000
)

The source VNA outputs CW while the receiver measures. Returns S21 magnitude at each frequency.

Guided Prompts

mcnanovna includes prompts for multi-VNA workflows:

PromptDescription
multi_device_setupInitial device discovery and configuration
hardware_trigger_setupTier 2 wiring and testing guide
phase_coherent_setupTier 3 clock reference setup

See Also