ruvnet/RuView · error · RuntimeError

WiFi interface '{self._interface}' not found. Check 'netsh w

Error message

WiFi interface '{self._interface}' not found. Check 'netsh wlan show interfaces' for the correct name.

What it means

The Windows RSSI collector's _validate_interface() runs 'netsh wlan show interfaces' and requires the configured interface name to appear in the command output. If the name is absent, netsh either sees no WLAN adapters or lists them under different names (typically 'Wi-Fi'), so the configured name is wrong for this machine. This is a configuration mismatch, not a netsh failure (a missing netsh raises a different error).

Source

Thrown at archive/v1/src/sensing/rssi_collector.py:553

    def get_samples(self, n: Optional[int] = None) -> List[WifiSample]:
        if n is not None:
            return self._buffer.get_last_n(n)
        return self._buffer.get_all()

    def collect_once(self) -> WifiSample:
        return self._read_sample()

    # -- internals -----------------------------------------------------------

    def _validate_interface(self) -> None:
        try:
            result = subprocess.run(
                ["netsh", "wlan", "show", "interfaces"],
                capture_output=True, text=True, timeout=5.0,
            )
            if self._interface not in result.stdout:
                raise RuntimeError(
                    f"WiFi interface '{self._interface}' not found. "
                    f"Check 'netsh wlan show interfaces' for the correct name."
                )
            if "disconnected" in result.stdout.lower().split(self._interface.lower())[1][:200]:
                raise RuntimeError(
                    f"WiFi interface '{self._interface}' is disconnected. "
                    f"Connect to a WiFi network first."
                )
        except FileNotFoundError:
            raise RuntimeError(
                "netsh not found. This collector requires Windows."
            )

    def _sample_loop(self) -> None:
        interval = 1.0 / self._rate
        while self._running:
            t0 = time.monotonic()
            try:

View on GitHub (pinned to 4685618388)

Solutions

  1. Run 'netsh wlan show interfaces' and copy the exact value shown in the 'Name' field (usually 'Wi-Fi') into the collector configuration.
  2. Start the WLAN AutoConfig service: 'net start WlanSvc' (or set it to Automatic in services.msc).
  3. In Device Manager, confirm the WiFi adapter is enabled and its driver is working.
  4. If the machine genuinely has no WiFi, run the collector on hardware that does or use the ESP32 CSI path instead.

Example fix

# before
collector = WindowsWifiCollector(interface='wlan0', rate=2.0)
collector.start()  # RuntimeError: WiFi interface 'wlan0' not found

# after
import subprocess
out = subprocess.run(['netsh', 'wlan', 'show', 'interfaces'],
                     capture_output=True, text=True, timeout=5.0).stdout
names = [ln.split(':', 1)[1].strip() for ln in out.splitlines()
         if ln.strip().startswith('Name')]
if not names:
    raise SystemExit('no WLAN adapter visible to netsh')
collector = WindowsWifiCollector(interface=names[0], rate=2.0)
Defensive patterns

Strategy: validation

Validate before calling

import subprocess, sys
if sys.platform == 'win32':
    out = subprocess.run(['netsh', 'wlan', 'show', 'interfaces'],
                         capture_output=True, text=True, timeout=5.0).stdout
    if 'Wi-Fi' not in out:
        names = [ln.split(':', 1)[1].strip() for ln in out.splitlines()
                 if ln.strip().startswith('Name')]
        raise SystemExit(f'use one of the adapter names: {names}')

Prevention

When it happens

Trigger: Constructing WindowsWifiCollector with a Linux-style name like 'wlan0' on Windows; the adapter was renamed in Windows settings; the machine has no WiFi adapter or the WLAN AutoConfig service is disabled so netsh lists nothing; non-English Windows locales where the adapter name differs.

Common situations: Reusing configuration files across Linux and Windows deployments; disabled or uninstalled WiFi drivers; 'WLAN AutoConfig' (WlanSvc) service stopped; virtual machines without a bridged WiFi adapter.

Related errors


AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16). Data as JSON: /api/errors/00cbf7a80c081259. Report an issue: GitHub.