Skip to content

feat: implement Mr. Wiggles — real-time wireless signal fox hunting sonar visualizer - #1

Merged
GG-93 merged 5 commits into
mainfrom
copilot/create-signal-visualization-app
Jul 21, 2026
Merged

feat: implement Mr. Wiggles — real-time wireless signal fox hunting sonar visualizer#1
GG-93 merged 5 commits into
mainfrom
copilot/create-signal-visualization-app

Conversation

Copilot AI commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Bootstraps the entire Mr. Wiggles application from an empty repo (only a placeholder README existed). Implements a full-stack real-time signal visualization tool with animated crescent ripples showing RSSI, Direction of Arrival, and frequency data on an HTML5 Canvas.

Backend (backend/src/)

  • index.js — Express server + HTTP + WebSocket (/ws); serves frontend statically; REST API: GET /api/status, GET /api/signals, POST /api/target
  • sdr/demoSDR.js — 5 synthetic Wi-Fi signals at 60 Hz with drifting DoA, fluctuating RSSI, and randomized tx bursts; no hardware required
  • sdr/hardwareSDR.js — Spawns rtl_power (RTL-SDR) or hackrf_sweep (HackRF), parses CSV output, auto-detects available backend
  • processors/signalManager.js — EMA smoothing on RSSI/DoA, RSSI threshold → located flag, stale signal pruning
  • utils/wsServer.js — Rate-limited broadcast loop (default 60 Hz)
  • utils/helpers.jsema, rssiToStrength, normaliseDeg, randomId (crypto-backed), bufToMac

Frontend (frontend/)

  • renderer.js — 240 Hz requestAnimationFrame loop; crescent arcs emanate from centre in DoA direction; arc span and line weight scale with RSSI strength; sinusoidal beat waves modulated along each crescent by beatFreq; nested ring layers (×3); green pulsing hard circle + banner when located
  • app.js — Wires WebSocket updates → renderer + sidebar UI (signal selector, info table, signal list)
  • wsClient.js — WebSocket client with exponential-backoff reconnect

Infrastructure

  • scripts/install-sdr.sh — Interactive RTL-SDR / HackRF udev + driver installer for Ubuntu/Debian/RPi OS
  • docs/extending-antennas.md — Frame contract, DoA estimation approaches (single antenna, rotating directional, phased array), supported protocol table (BLE, Zigbee, LoRa, ADS-B, etc.)
  • .env.example — All tunable parameters: DEMO_MODE, SDR_TYPE, RSSI_THRESHOLD, DOA_SMOOTHING, WS_BROADCAST_RATE_HZ, etc.

Visual parameter mapping

Signal property Canvas effect
RSSI (dBm) Arc thickness + brightness
Direction of Arrival (°) Crescent emanation angle
Frequency (MHz) Ripple travel speed + beat wave rate
Active tx Beat wave animation intensity
RSSI ≥ threshold Glowing green circle + "Signal Located!" banner

Copilot AI added 2 commits July 19, 2026 21:45
- Backend: Express + WebSocket server, DemoSDR synthetic data, HardwareSDR (RTL-SDR/HackRF), SignalManager with EMA smoothing
- Frontend: HTML5 Canvas renderer with crescent ripples, beat waves, located circle; interactive signal menu; WebSocket client with auto-reconnect
- Scripts: install-sdr.sh for RTL-SDR/HackRF Linux driver installation
- Docs: extending-antennas.md guide for adding new SDR backends
- Full README with features, setup, config reference, API docs
- renderer.js: guard beatFreq against zero to prevent unexpected spawn timing
- helpers.js: use crypto.randomBytes for randomId (collision-safe, cryptographically random)
- demoSDR.js: rename _tick_ to _tick (consistent naming), rename _tick counter to _tickCount to avoid property/method shadowing
Copilot AI changed the title [WIP] Add real-time wireless signal visualization application feat: implement Mr. Wiggles — real-time wireless signal fox hunting sonar visualizer Jul 19, 2026
Copilot finished work on behalf of GG-93 July 19, 2026 21:47
Copilot AI requested a review from GG-93 July 19, 2026 21:47

@GG-93 GG-93 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not rtl or hack rf hardware focused make it qctually functional and usable immediately using 2.4g wifi, 5 gwifi, luetooth and bluetooth low energy being received from internal or external computer hard wired wireless modules and or esp 32 chips that are hardwired to a computer. if any of that is possible on a phone that would be nice but i dont know how with ios locked down so tight and android inconsistent between manufacterers

Copilot AI commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

not rtl or hack rf hardware focused make it qctually functional and usable immediately using 2.4g wifi, 5 gwifi, luetooth and bluetooth low energy being received from internal or external computer har...

Done — the app no longer requires RTL-SDR or HackRF. The new DEMO_MODE=false mode uses three native scanners that work with hardware already in any laptop/desktop:

What works out of the box (zero extra deps):

  • Wi-Fi 2.4 GHz + 5 GHz via OS commands (nmcli/iwlist on Linux, airport on macOS, netsh on Windows) — sees every AP your wireless card can see with real RSSI values.

Optional (one npm install):

  • Bluetooth LEnpm install @abandonware/noble inside backend/. Works with any built-in Bluetooth adapter. Discovers nearby BLE devices (phones, earbuds, fitness trackers, beacons, etc.) with live RSSI.
  • ESP32 via USB serialnpm install serialport + set ESP32_PORT=/dev/ttyUSB0 in .env. The ESP32 runs a small Arduino sketch (see docs/esp32-firmware-example.md) that scans Wi-Fi and BLE and streams JSON lines to the backend, so you can use cheap ESP32 modules as remote wireless probes.

Quick start:

cp backend/.env.example backend/.env
# Edit backend/.env → DEMO_MODE=false
npm install          # from repo root
npm start
# open http://localhost:3000

For BLE on Linux, also run sudo bash scripts/install-deps.sh (choice 2 installs BlueZ + noble and sets the required cap_net_raw capability so you don't need root).

Phone/tablet: Any device on the same network can open http://<your-host-ip>:3000 to view the visualizer in its browser. The scanning happens server-side, so iOS/Android limitations don't apply — the phone is just a display.

Demo mode now also includes synthetic BLE devices (iPhone, AirPods, Galaxy Watch, etc.) alongside the Wi-Fi APs so the UI previews realistically without any hardware.

Copilot finished work on behalf of GG-93 July 19, 2026 22:27
Copilot AI requested a review from GG-93 July 19, 2026 22:27
Copilot finished work on behalf of GG-93 July 21, 2026 04:04
Copilot AI requested a review from GG-93 July 21, 2026 04:04
@GG-93
GG-93 marked this pull request as ready for review July 21, 2026 04:05
@GG-93
GG-93 merged commit 72a7977 into main Jul 21, 2026
1 check passed
Copilot stopped work on behalf of GG-93 due to an error July 21, 2026 04:05

@GG-93 GG-93 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants