{"record":{"id":"102f6c88c5d4ae28","repo":"ruvnet/RuView","slug":"unknown-router-csi-format","errorCode":null,"errorMessage":"Unknown router CSI format","messagePattern":"Unknown router CSI format","errorType":"exception","errorClass":"CSIParseError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/hardware/csi_extractor.py","lineNumber":401,"sourceCode":"        Args:\n            raw_data: Raw bytes from router\n            \n        Returns:\n            Parsed CSI data\n            \n        Raises:\n            CSIParseError: If data format is invalid\n        \"\"\"\n        if not raw_data:\n            raise CSIParseError(\"Empty data received\")\n        \n        # Handle different router formats\n        data_str = raw_data.decode('utf-8')\n        \n        if data_str.startswith('ATHEROS_CSI:'):\n            return self._parse_atheros_format(raw_data)\n        else:\n            raise CSIParseError(\"Unknown router CSI format\")\n    \n    def _parse_atheros_format(self, raw_data: bytes) -> CSIData:\n        \"\"\"Parse Atheros CSI format.\n\n        Raises:\n            CSIExtractionError: Always, because Atheros CSI parsing requires\n                the Atheros CSI Tool binary format parser which has not been\n                implemented yet. Use the ESP32 parser or contribute an\n                Atheros implementation.\n        \"\"\"\n        raise CSIExtractionError(\n            \"Atheros CSI format parsing is not yet implemented. \"\n            \"The Atheros CSI Tool outputs a binary format that requires a dedicated parser. \"\n            \"To collect real CSI data from Atheros-based routers, you must implement \"\n            \"the binary format parser following the Atheros CSI Tool specification. \"\n            \"See docs/hardware-setup.md for supported hardware and data formats.\"\n        )\n","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/hardware/csi_extractor.py#L383-L419","documentation":"RouterCSIParser recognizes exactly one payload prefix: decoded data must start with 'ATHEROS_CSI:'; everything else raises CSIParseError('Unknown router CSI format'). The router CSI path is Atheros-specific in the archive/v1 pipeline — other vendors' capture tools (OpenWrt nl80211, Intel, Nexmon) are not recognized at all.","triggerScenarios":"Feeding CSI output from a non-Atheros tool; feeding ESP32 'CSI_DATA:' lines to the router parser; whitespace or a preamble before 'ATHEROS_CSI:'; hardware_type configured as 'router' while the actual device is an ESP32 node.","commonSituations":"hardware_type misconfiguration routing data to the wrong parser; assuming generic router support exists; a vendor tool version that changed its line prefix.","solutions":["If the data source is an ESP32 node, set hardware_type='esp32' (with the right parser_format) so the ESP32 parser is used","Verify the router actually runs the Atheros CSI tool and emits 'ATHEROS_CSI:' lines before selecting hardware_type='router'","For other vendors there is no archive/v1 support: convert the data or extend the parser"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"line = raw.strip()\nif not line.startswith(b'ATHEROS_CSI:'):\n    if line.startswith(b'CSI_DATA:'):\n        return esp32_parser.parse(raw)  # misrouted ESP32 data\n    raise CSIParseError('Unknown router CSI format')\nreturn router_parser.parse(raw)","typeGuard":"def is_atheros_csi(raw: bytes) -> bool:\n    return bool(raw) and raw.strip().startswith(b'ATHEROS_CSI:')","tryCatchPattern":"try:\n    data = router_parser.parse(raw)\nexcept CSIParseError as e:\n    logger.warning('unsupported router payload prefix: %r', raw[:16])","preventionTips":["Set hardware_type='esp32' for ESP32 nodes; reserve 'router' for Atheros CSI tool captures","Check the emitted prefix before wiring a router source into the pipeline","This parser has exactly one supported format — validate the prefix at the capture boundary, not after"],"tags":["router","parsing","atheros","configuration"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}