- Add fallback direct DOM manipulation in agents.js selectAgent()
- Fix setListeningPostRunning to check agent mode before re-enabling button
- Add debug logging for button state changes
Agent scanner fixes:
- Use non-blocking I/O with select/fcntl to prevent blocking reads
- Pass dwell_time parameter through to scanner function
- Add freqs_scanned counter to status and data endpoints
- Improve SDR test process cleanup with kill() fallback
Frontend listening post fixes:
- Add setListeningPostRunning for UI sync when switching to agent
- Fix button ID (radioScanBtn not scannerStartBtn)
- Handle nested data structure from controller proxy
- Update freqs_scanned and signal_count from polling data
- Disable listen button for agent mode (audio can't stream over HTTP)
Add listening_post to agents.js uiSetters map for mode sync.
Live testing completed:
- Sensor mode: works via agent
- WiFi quick scan: works via agent
- Listening post: works via agent (AM airband, WFM broadcast tested)
- Signal detection: confirmed working via agent
Testing ongoing - modes not yet tested via agent:
- Pager, ADS-B, AIS, ACARS, APRS, DSC, RTL-AMR, TSCM, Bluetooth
- Agent: Add _detect_acarsdec_fork() for f00b4r0/DragonOS support
- Agent: Use --output json:file, --rtlsdr, -m 256 for f00b4r0 fork
- UI: Add setAcarsRunning() to sync button state with agent
- UI: Add 'acars' to syncModeUI uiSetters map
Agent fixes:
- Fix stop not killing secondary processes (pager_rtl, aprs_rtl, rtlamr_tcp)
- Modes using piped processes now properly terminate all child processes
UI state sync fixes:
- Add syncLocalModeStates() to check local status when switching to local
- Fix switchMode() to re-sync with agent/local when changing mode tabs
- Only stop local modes when actually in local mode
- UI now correctly reflects running state when switching agents or modes
- Fix device dropdown for agent mode by checking sdr_devices key
- Fix pager checkStatus() to use agent endpoint when in agent mode
- Fix WiFi checkScanStatus() to be agent-aware
- Fix Bluetooth checkScanStatus() to be agent-aware
These fixes prevent the UI from reverting to 'stopped' state when
the agent is actually running a mode.
- Agent TSCM uses same ThreatDetector and CorrelationEngine as local mode
- Added baseline_id parameter support using get_tscm_baseline()
- Fixed RF scan stop_check to allow agent-specific stop events
- Fixed 'undefined MHz' display for WiFi devices (added essid fallback and null check)
- Fixed signal strength type conversion (string to int) for correlation engine
- Agent threat detection matches local mode behavior:
- No baseline: detects anomaly/hidden_camera threats only
- With baseline: also detects new_device threats
Health Monitoring:
- Add /controller/agents/health endpoint for efficient bulk health checks
- Check all agents in one call with response time tracking
- Update agent status in real-time (30s interval)
- Show latency next to agent status in UI
- Add collapsible "All Agents Health" panel in sidebar
- Log console notifications when agents go online/offline
Response Utilities:
- Add unwrapAgentResponse() to consistently handle controller proxy format
- Add isAgentMode() and getCurrentAgentName() helpers
- Standardize error handling for agent responses
UI Improvements:
- Show response latency (ms) in agent selector dropdown
- Health panel shows status + running modes for each agent
- Better visual feedback for agent status changes
Agent improvements:
- Add process verification (0.5s delay + poll check) for sensor, pager, APRS, DSC modes
- Prevents silent failures when SDR is busy or tools fail to start
- Returns clear error messages when subprocess exits immediately
Frontend agent integration:
- Add agent routing to all SDR modes (pager, sensor, RTLAMR, APRS, listening post, TSCM)
- Add agent routing to WiFi and Bluetooth modes with polling fallback
- Add agent routing to AIS and DSC dashboards
- Implement "Show All Agents" toggle for Bluetooth mode
- Add agent badges to device/network lists
- Handle controller proxy response format (nested 'result' field)
Controller enhancements:
- Add running_modes_detail endpoint showing device info per mode
- Support SDR conflict detection across modes
Documentation:
- Expand DISTRIBUTED_AGENTS.md with complete API reference
- Add troubleshooting guide and security considerations
- Document all supported modes with tools and data formats
UI/CSS:
- Add agent badge styling for remote vs local sources
- Add WiFi and Bluetooth table agent columns
Features:
- Standalone agent server (intercept_agent.py) for remote sensor nodes
- Controller API blueprint for agent management and data aggregation
- Push mechanism for agents to send data to controller
- Pull mechanism for controller to proxy requests to agents
- Multi-agent SSE stream for combined data view
- Agent management page at /controller/manage
- Agent selector dropdown in main UI
- GPS integration for location tagging
- API key authentication for secure agent communication
- Integration with Intercept's dependency checking system
New files:
- intercept_agent.py: Remote agent HTTP server
- intercept_agent.cfg: Agent configuration template
- routes/controller.py: Controller API endpoints
- utils/agent_client.py: HTTP client for agents
- utils/trilateration.py: Multi-agent position calculation
- static/js/core/agents.js: Frontend agent management
- templates/agents.html: Agent management page
- docs/DISTRIBUTED_AGENTS.md: System documentation
Modified:
- app.py: Register controller blueprint
- utils/database.py: Add agents and push_payloads tables
- templates/index.html: Add agent selector section
Implement reliable tracker detection for AirTag, Tile, Samsung SmartTag,
and other BLE trackers based on manufacturer data patterns, service UUIDs,
and advertising payload analysis.
Key changes:
- Add TrackerSignatureEngine with signatures for major tracker brands
- Device fingerprinting to track devices across MAC randomization
- Suspicious presence heuristics (persistence, following patterns)
- New API endpoints: /api/bluetooth/trackers, /diagnostics
- UI updates with tracker badges, confidence, and evidence display
- TSCM integration updated to use v2 tracker detection data
- Unit tests and smoke test scripts for validation
Detection is heuristic-based with confidence scoring (high/medium/low)
and evidence transparency. Backwards compatible with existing APIs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add fallback mechanism to try multiple tools (nmcli -> iw -> iwlist)
- Improve error messages for iw/iwlist with root privilege detection
- Enhance nmcli scanner to try without interface if specific scan fails
- Better error reporting in frontend showing actual backend errors
- Add logging throughout scan process for debugging
This fixes quick scan immediately failing on Linux systems by trying
multiple tools and providing meaningful error messages.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Frontend (wifi.js):
- Show helpful message when quick scan returns no networks
- Suggest using Deep Scan as fallback
- Better error messages with actionable suggestions
Backend (scanner.py):
- Add proper error messages from airport scan failures
- Add proper error messages from nmcli scan failures
- Handle timeouts and missing tools explicitly
- Raise RuntimeError with descriptive messages
These changes help users understand when quick scan tools (airport/nmcli)
aren't working and guide them to use Deep Scan instead.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add calculateChannelStats() in wifi.js to compute stats from networks
- Add fallback to calculate stats when API doesn't provide them
- Add syncLegacyToChannelChart() to sync legacy WiFi data to v2 chart
- Call sync function every 2 seconds when in WiFi mode
The channel chart now updates from both v2 API data and legacy WiFi scans.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Table fixes:
- Add BSSID column header to match data columns
- Remove vendor column from table rows (6 columns total)
- Update placeholder colspan to 6
Layout fixes:
- Use minmax() for right columns to allow shrinking
- Add overflow handling to layout container
- Add min-width: 0 to analysis panel for proper grid behavior
- Add overflow-x: auto to channel chart container
Channel chart fixes:
- Reduce bar width from 20px to 14px
- Reduce bar spacing from 4px to 2px
- Reduce padding for more compact display
- Use viewBox for responsive SVG scaling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Frontend:
- Replace legacy WiFi panels with clean 3-column layout
- Add sortable networks table with filter buttons (All/2.4G/5G/Open/Hidden)
- Add proximity radar panel with zone summary (Near/Mid/Far)
- Add channel analysis panel with band tabs (2.4/5 GHz)
- Add security overview with color-coded counts
- Add slide-up detail drawer for selected networks
- Remove all legacy hidden elements
CSS:
- New wifi-layout-container with status bar
- Networks table with sticky header and row selection
- Responsive grid layout (3-col -> 2-col -> 1-col)
- Zone summary styling with color-coded counts
- Detail drawer with grid layout
JavaScript:
- Update cacheDOM with new element IDs
- Update updateDetailPanel to use drawer structure
- Update updateStats to populate security counts and zones
- Add closeDetail function for drawer
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend:
- New utils/wifi/ package with models, scanner, parsers, channel analyzer
- Quick Scan mode using system tools (nmcli, iw, iwlist, airport)
- Deep Scan mode using airodump-ng with monitor mode
- Hidden SSID correlation engine
- Channel utilization analysis with recommendations
- v2 API endpoints at /wifi/v2/* with SSE streaming
- TSCM integration updated to use new scanner (backwards compatible)
Frontend:
- WiFi mode controller (wifi.js) with dual-mode support
- Channel utilization chart component (channel-chart.js)
- Updated wifi.html template with scan mode tabs and export
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clicking a device in the list or a dot on the radar now highlights
both - the list row gets selected styling and the radar dot shows
an animated pulsing cyan ring for clear visual feedback.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed Baseline section from Bluetooth sidebar (no longer needed)
- Fixed device filter buttons not working (changed display to '' instead
of 'block' to preserve flexbox layout)
- Fixed proximity radar being cut off by bottom panels:
- Added overflow: hidden to radar panel
- Constrained bottom panels to max-height: 120px
- Made radar content respect parent boundaries
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Panel is now always visible with fixed 140px height
- Shows "Select a device to view details" placeholder when empty
- Clicking a device populates the panel without layout shifts
- More compact design:
- Smaller fonts and padding throughout
- Combined Min/Max RSSI into single field
- 4x2 stats grid with minimal spacing
- Services shown inline as comma-separated text
- Panel no longer pushes proximity radar when populated
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added detail panel that appears above the radar when a device is clicked
- Shows comprehensive device information:
- Large RSSI display with visual bar and range indicator
- Protocol, status, and flag badges
- 8-column stats grid: Manufacturer, Mfr ID, Address Type, Seen count,
Min/Max RSSI, First/Last seen timestamps
- Service UUIDs list (when available)
- Copy Address button
- Selected device is highlighted in the device list
- Close button (×) to dismiss the panel
- Cyan accent border and gradient header for visual distinction
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reduced card height from ~130px to ~55px (2.5x more devices visible)
- Added left color strip indicating signal strength at a glance
- Added visual RSSI bar alongside the dBm value
- Condensed info into two lines:
- Primary: Protocol badge, device name, RSSI bar+value, status dot
- Secondary: MAC address, manufacturer, seen count
- Blue glowing dot for new devices, green dot for known
- Hover effect highlights the row
- Click still opens full device details modal
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rearranged layout: Proximity Radar on top, Tracker Detection and
Signal Distribution side-by-side below for better space usage
- Made signal distribution bars thicker (16px) with gradient styling
for better visibility
- Added device filtering with buttons: All, New, Named, Strong signal
- Filter buttons show filtered count (e.g., "5/37") when active
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These features were removed as they were not providing useful functionality:
- Signal History heatmap
- Apple FindMy Network detection
- Device Activity timeline
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The device type classification relied on pattern matching against device
names (e.g., looking for "iphone" or "macbook"), but most Bluetooth devices
don't advertise with human-readable names that match these patterns,
resulting in nearly all devices being categorized as "Other".
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Backend:
- Add device_key.py for stable device identification (identity > public MAC > fingerprint)
- Add distance.py with DistanceEstimator class (path-loss formula, EMA smoothing, confidence scoring)
- Add ring_buffer.py for time-windowed RSSI observation storage
- Extend BTDeviceAggregate with proximity_band, estimated_distance_m, distance_confidence, rssi_ema
- Add new API endpoints: /proximity/snapshot, /heatmap/data, /devices/<key>/timeseries
- Update TSCM integration to include new proximity fields
Frontend:
- Add proximity-radar.js: SVG radar with concentric rings, device dots positioned by distance
- Add timeline-heatmap.js: RSSI history grid with time buckets and color-coded signal strength
- Update bluetooth.js to initialize and feed data to new components
- Replace zone counters with radar visualization and zone summary
- Add proximity-viz.css for component styling
Tests:
- Add test_bluetooth_proximity.py with unit tests for device key stability, EMA smoothing,
distance estimation, band classification, and ring buffer functionality
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove problematic canvas-based radar visualization
- Add simple proximity zone counters (Very Close, Close, Nearby, Far)
- Remove Selected Device panel from HTML
- Add device detail modal with full info display
- Modal shows RSSI, badges, manufacturer, signal stats, timestamps
- Modal closes on overlay click, close button, or Escape key
- Add CSS for modal styling with blur backdrop
- Simplify card rendering (no selection highlighting needed)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove double buffering and timers (overcomplicated)
- Use requestAnimationFrame for smooth batched updates
- Simplify to single deviceAngles map for persistent positions
- Only redraw when device data actually changes
- Dots persist as long as device is in the devices map
- Much simpler code path reduces chance of bugs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add offscreen canvas for double buffering
- Draw all elements to offscreen canvas first
- Copy to visible canvas in single operation
- Increase update intervals (150ms throttle, 2s refresh)
- Eliminates flashing when visualization redraws
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace heatmap with concentric distance zones (Very Close, Close, Nearby, Far)
- Each zone has distinct color coding and shows device counts
- Device dots persist with smooth fading for stale devices (30s threshold)
- Random angle distribution prevents dot overlap
- Glow effect on dots with color based on signal strength
- Periodic refresh timer keeps visualization smooth during inactive periods
- Throttled updates prevent performance issues during rapid scanning
- Center "YOU" marker with subtle glow effect
- Shows instructional text when idle
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace proximity radar with persistent heatmap visualization using radial gradients
- Change device card click to populate Selected Device panel instead of modal
- Fix Device Types panel with proper categorization (phones, computers, audio, wearables)
- Add tracker detection for AirTag, Tile, SmartTag, Chipolo patterns
- Add Apple FindMy Network detection using manufacturer ID 0x004C
- Fix Signal Distribution histogram with Close/Medium/Far/Weak bands
- Make Device Activity timeline collapsible and collapsed by default
- Add contextual "No data" messages for all empty panels
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features added:
- Click-to-open modal with comprehensive device details
- Signal strength with min/max/median/confidence stats
- Device info grid (address, type, manufacturer)
- Observation stats (first/last seen, count)
- Service UUIDs display
- Copy address button
- Live visualization panel updates:
- Device Types (phones, computers, audio, wearables, other)
- Signal Distribution (strong/medium/weak with bars)
- Tracker Detection list
- FindMy devices list
- Proximity Radar canvas:
- Plots devices by RSSI (closer = nearer center)
- Color-coded by signal strength
- Glow effect for visibility
- Improved device name display:
- Shows broadcast name if available
- Falls back to formatted address (AA:BB:...:EE:FF)
- Cards now clickable with hover effect
- Stats recalculated on each device update
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove all CSS class dependencies from device cards
- Use data-bt-device-id attribute instead of class-based selectors
- Add comprehensive inline styles to each element
- Change container from grid to block layout
- Add detailed console logging for debugging
- Remove potential CSS conflicts from .signal-card class
This isolates the card rendering from any CSS that might be
hiding content (like overflow:hidden on .signal-card).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change card HTML generation from template literals to string concatenation
- This avoids potential issues with special characters in device data
- Also disable legacy handleBtDeviceImmediate when BluetoothMode exists
- Use device_id as fallback name if name is missing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Disable legacy addBtDeviceCard when BluetoothMode is active
- Clear device container when starting scan to remove legacy cards
- Fix grid CSS with explicit auto height and align-items: start
- Add visibility rules for all card body elements
- Reset devices map when clearing container
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add explicit default values for all card template variables
- Add try/catch for JSON.stringify
- Add !important CSS rules to ensure card body visibility
- Use ID selector for btDeviceListContent grid layout
- Add console logging for debugging device data
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
DeviceCard.createDeviceCard() returns a DOM element, not an HTML string.
Use replaceWith() and prepend() instead of outerHTML and insertAdjacentHTML.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Bluetooth mode uses its own layout container (btLayoutContainer) which
contains btDeviceListContent for device cards. The output element is hidden
for Bluetooth mode. Also adds device count updates and clears placeholder
when scanning starts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major changes:
- Add utils/bluetooth/ package with DBus scanner, fallback scanners
(bleak, hcitool, bluetoothctl), device aggregation, and heuristics
- New unified API at /api/bluetooth/ with REST endpoints and SSE streaming
- Device observation aggregation with RSSI statistics and range bands
- Behavioral heuristics: new, persistent, beacon-like, strong+stable
- Frontend components: DeviceCard, MessageCard, RSSISparkline
- TSCM integration via get_tscm_bluetooth_snapshot() helper
- Unit tests for aggregator, heuristics, and API endpoints
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the dropdown details panel with a clickable card that opens
a modal dialog showing all signal information including raw data.
Action buttons (Copy/Mute) now float on hover.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add clickable APRS station badges that display raw packet data in a modal
- Integrate SignalGuess into sensor mode cards for frequency identification
- Standardize UI language across timeline and signal components
- Update frequency band naming for consistency (e.g., "Wi-Fi 2.4GHz" → "2.4 GHz wireless band")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>