ruvnet/RuView · error · ValueError
Unsupported router type: {router_type}
Error message
Unsupported router type: {router_type} What it means
ValueError from configure_router when router_type is not a key in the router_configs dict (whose entries include the Intel 5300/linux-80211n-csitool config and other per-firmware profiles). It is a pure configuration-lookup failure: the requested hardware profile was never registered.
Source
Thrown at plans/phase2-architecture/hardware-integration.md:150
'monitor_mode': True,
'channel_width': 20, # MHz
'antenna_config': '3x3'
},
'intel5300': {
'firmware': 'linux-native',
'csi_tool': 'linux-80211n-csitool',
'extraction_rate': 1000, # Hz
'connector_type': 'file',
'log_path': '/tmp/csi.dat',
'antenna_config': '3x3'
}
}
def configure_router(self, router_type, router_ip):
"""Configure router for CSI extraction"""
config = self.router_configs.get(router_type)
if not config:
raise ValueError(f"Unsupported router type: {router_type}")
if config['firmware'] == 'openwrt':
return self._configure_openwrt_router(router_ip, config)
elif config['firmware'] == 'linux-native':
return self._configure_intel_nic(config)
def _configure_openwrt_router(self, router_ip, config):
"""Configure OpenWRT-based router"""
commands = [
# Enable monitor mode
f"iw dev wlan0 interface add mon0 type monitor",
f"ifconfig mon0 up",
# Configure CSI extraction
f"echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/csi_enable",
f"echo {config['extraction_rate']} > /sys/kernel/debug/ieee80211/phy0/ath9k/csi_rate",
# Start UDP streamingView on GitHub (pinned to 4685618388)
Solutions
- Print/call list(self.router_configs.keys()) and pass one of those exact keys
- If the hardware is genuinely new, add a matching entry to router_configs with firmware, csi_tool, and antenna config, plus the corresponding _configure_* branch
- Normalize input (lowercase/strip) before lookup to survive cosmetic differences
- Catch the ValueError and fail the provisioning run with the supported-types list in the message
Example fix
# before
router.configure_router('Intel-5300', '192.168.1.1') # ValueError: Unsupported router type
# after
router_type = 'Intel-5300'.lower()
if router_type not in router.router_configs:
raise SystemExit(f'unsupported router; choose from {sorted(router.router_configs)}')
router.configure_router(router_type, '192.168.1.1') Defensive patterns
Strategy: validation
Validate before calling
supported = set(router.router_configs)
if router_type.lower() not in supported:
raise SystemExit(f'unsupported router type {router_type!r}; choose from {sorted(supported)}')
router.configure_router(router_type.lower(), router_ip) Type guard
def is_supported_router(manager, router_type: str) -> bool:
return router_type.lower() in manager.router_configs Try / catch
try:
router.configure_router(router_type, router_ip)
except ValueError as e:
if 'Unsupported router type' in str(e):
logging.error('supported types: %s', sorted(router.router_configs))
raise Prevention
- Derive router-type lists from router_configs.keys() in ops scripts instead of hardcoding strings
- Normalize casing/whitespace before the lookup
- When adding hardware, register the config entry and the _configure_* branch in the same change
When it happens
Trigger: Calling configure_router('intel_5300') when the dict key is 'intel5300'; passing a router family the class simply does not support (no matching firmware profile); case or hyphen mismatches; new hardware added to the deployment but not to router_configs.
Common situations: Ops scripts hardcoding router model strings that drift from the code's keys; bringing up a new site with unsupported hardware; refactors that renamed config keys while old automation kept the previous spelling.
Related errors
- Unsupported hardware type: {self.hardware_type}
- Pose estimation requires real CSI data input. No CSI data wa
- Insufficient data for header
- Insufficient data for CSI
- Packet too small
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/97c94d973929005b.
Report an issue: GitHub.