{"record":{"id":"c06aba21a53a0426","repo":"ruvnet/RuView","slug":"interface-interface-not-listed-in-proc-net-wi","errorCode":null,"errorMessage":"Interface '{interface}' not listed in /proc/net/wireless. Available: {names or '(none)'}. Ensure the interface is up and associated with an AP.","messagePattern":"Interface '(.+?)' not listed in /proc/net/wireless\\. Available: (.+?)\\. Ensure the interface is up and associated with an AP\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/sensing/rssi_collector.py","lineNumber":218,"sourceCode":"        except OSError as exc:\n            return False, f\"Cannot read /proc/net/wireless: {exc}\"\n\n        if interface not in content:\n            names = cls._parse_interface_names(content)\n            return False, (\n                f\"Interface '{interface}' not listed in /proc/net/wireless. \"\n                f\"Available: {names or '(none)'}. \"\n                f\"Ensure the interface is up and associated with an AP.\"\n            )\n        return True, \"ok\"\n\n    # -- internals -----------------------------------------------------------\n\n    def _validate_interface(self) -> None:\n        \"\"\"Check that the interface exists on this machine.\"\"\"\n        available, reason = self.is_available(self._interface)\n        if not available:\n            raise RuntimeError(reason)\n\n    @staticmethod\n    def _parse_interface_names(proc_content: str) -> List[str]:\n        \"\"\"Extract interface names from /proc/net/wireless content.\"\"\"\n        names: List[str] = []\n        for line in proc_content.splitlines()[2:]:  # skip header lines\n            parts = line.split(\":\")\n            if len(parts) >= 2:\n                names.append(parts[0].strip())\n        return names\n\n    def _sample_loop(self) -> None:\n        interval = 1.0 / self._rate\n        while self._running:\n            t0 = time.monotonic()\n            try:\n                sample = self._read_sample()\n                self._buffer.append(sample)","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/sensing/rssi_collector.py#L200-L236","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\ncollector = LinuxWifiCollector(interface='wlan0')\ncollector.start()  # RuntimeError: Interface 'wlan0' not listed ...\n\n# after\navailable, reason = LinuxWifiCollector.is_available('wlan0')\nif not available:\n    print(reason)  # prints the 'Available: [...]' list\n    # pick a real name, e.g. 'wlp3s0'\n    interface = 'wlp3s0'\ncollector = LinuxWifiCollector(interface=interface)","handlingStrategy":"validation","validationCode":"import subprocess\nnames = LinuxWifiCollector._parse_interface_names(\n    open('/proc/net/wireless').read())\nif 'wlan0' not in names:\n    interface = names[0] if names else None\n    if interface is None:\n        raise SystemExit('no wireless interfaces; connect WiFi first')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["linux","wifi","rssi","interface","configuration","hardware"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}