ruvnet/RuView · error · RuntimeError
Interface '{interface}' not listed in /proc/net/wireless. Av
Error message
Interface '{interface}' not listed in /proc/net/wireless. Available: {names or '(none)'}. Ensure the interface is up and associated with an AP. What it means
is_available() read /proc/net/wireless successfully but the configured interface name does not appear anywhere in its content. /proc/net/wireless only lists wireless interfaces registered with the kernel's cfg80211/wireless-extension layer, so a WiFi card that is down, rfkill-blocked, or a wired interface like eth0 will not appear. The helper even lists the names it did find to help you correct the configuration.
Source
Thrown at archive/v1/src/sensing/rssi_collector.py:218
except OSError as exc:
return False, f"Cannot read /proc/net/wireless: {exc}"
if interface not in content:
names = cls._parse_interface_names(content)
return False, (
f"Interface '{interface}' not listed in /proc/net/wireless. "
f"Available: {names or '(none)'}. "
f"Ensure the interface is up and associated with an AP."
)
return True, "ok"
# -- internals -----------------------------------------------------------
def _validate_interface(self) -> None:
"""Check that the interface exists on this machine."""
available, reason = self.is_available(self._interface)
if not available:
raise RuntimeError(reason)
@staticmethod
def _parse_interface_names(proc_content: str) -> List[str]:
"""Extract interface names from /proc/net/wireless content."""
names: List[str] = []
for line in proc_content.splitlines()[2:]: # skip header lines
parts = line.split(":")
if len(parts) >= 2:
names.append(parts[0].strip())
return names
def _sample_loop(self) -> None:
interval = 1.0 / self._rate
while self._running:
t0 = time.monotonic()
try:
sample = self._read_sample()
self._buffer.append(sample)View on GitHub (pinned to 4685618388)
Solutions
- Run 'cat /proc/net/wireless' and use one of the names it actually lists (the error message also prints them under 'Available:').
- Bring the interface up and associate it with an access point: 'nmcli radio wifi on && nmcli device wifi connect <SSID> password <key>' or 'iw dev <iface> connect <SSID>'.
- Clear rfkill blocks with 'rfkill unblock wifi' if the adapter is soft-blocked.
- Verify the interface exists at all with 'ip link' before constructing the collector.
Example fix
# before
collector = LinuxWifiCollector(interface='wlan0')
collector.start() # RuntimeError: Interface 'wlan0' not listed ...
# after
available, reason = LinuxWifiCollector.is_available('wlan0')
if not available:
print(reason) # prints the 'Available: [...]' list
# pick a real name, e.g. 'wlp3s0'
interface = 'wlp3s0'
collector = LinuxWifiCollector(interface=interface) Defensive patterns
Strategy: validation
Validate before calling
import subprocess
names = LinuxWifiCollector._parse_interface_names(
open('/proc/net/wireless').read())
if 'wlan0' not in names:
interface = names[0] if names else None
if interface is None:
raise SystemExit('no wireless interfaces; connect WiFi first') Prevention
- Derive the interface name at runtime from /proc/net/wireless instead of hardcoding wlan0 (predictable names like wlp3s0 are common).
- Ensure WiFi is associated with an AP before starting collection (nmcli/iw), since unassociated adapters may not report stats.
- Check 'rfkill list' in deployment scripts and unblock WiFi automatically.
When it happens
Trigger: Passing the wrong interface name to LinuxWifiCollector (for example 'wlan0' when the system uses the predictable name 'wlp3s0'); passing a wired interface like 'eth0'; starting the collector while the WiFi interface is down, rfkill-soft-blocked, or not yet registered by the driver.
Common situations: Laptops and servers using systemd predictable interface names (wlp2s0, wlx<mac>) instead of wlan0; WiFi disabled via hardware switch or 'rfkill block wifi'; deployment scripts hardcoded to wlan0; machines where the driver does not export statistics to /proc/net/wireless.
Related errors
- Cannot read /proc/net/wireless: {exc}
- Failed to read /proc/net/wireless for {self._interface}: {ex
- Interface {self._interface} not found in /proc/net/wireless
- MCP specification rejected by ${kernel.resolvedBackend} kern
- WiFi interface '{self._interface}' not found. Check 'netsh w
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/c06aba21a53a0426.
Report an issue: GitHub.