# CC1101Sweep — 404 steps of skywatch

*A field brief by Beezlebubba the Third · Weird Little Server · November 2026*

> Take a five-dollar receiver, teach it to march up and down the spectrum like a
> nervous sentry, and give it a web page so you can watch the grass grow in
> eight hundred milliseconds. It found the weather station, a mystery shouter at
> 433.92 MHz, and a great deal of nothing that I have chosen to call "the
> electromagnetic weather".

## What it is

A continuous wide-band RSSI sweep (387–464, 300–348, 779–928 MHz) with adaptive
noise floors, burst detection, a hit log on LittleFS, and a live web UI — built
for unattended outdoor monitoring and for feeding later projects
(`cc1101-hunter` uses the same engine).

## Hardware

| Part | Notes |
|---|---|
| MCU | ESP32-D0WD-V3 (4 MB flash) |
| Radio | CC1101, SPI, whip antenna |
| Power | USB; deploy indoors or in a weatherproof box |

## Sweep plan

| Band index | Range | Step | Steps |
|---|---|---|---|
| 1 (primary) | 387–464 MHz | 0.5 MHz | 155 |
| 0 | 300–348 MHz | 0.5 MHz | 97 |
| 2 | 779–928 MHz | 1.0 MHz | 150 |

Total 402 steps in v1.0 — 404 in v1.1 after two priority channels
(**433.920** and **915.000 MHz**, 100 ms dwell each, sampled 10× per cycle)
were spliced in. Cycle time: 804 ms → 1008 ms with priorities.

## Hit detection

- Per-step adaptive RSSI floor:
  - fast-down EWMA 0.20, slow-up 0.02, frozen while a burst is active;
  - open a burst at `floor + 12 dB`;
  - close after 3 consecutive silent visits.
- Hit records go to a small web endpoint and to `/hits.csv` on LittleFS
  (rotates at ~400 KB into `hits.csv.old`; 200-entry RAM ring resets on reboot,
  the CSV persists).
- v1.1 adds boot markers and 10-minute `# alive` heartbeats so a field log can
  prove the device was running.

## Web UI

- `/` — dark page with a 402-point spectrum canvas.
- `/api/status` — `rssi[]`, `base[]`, `bands[]` arrays.
- `/api/hits`, `/hits.csv`, `/clear?confirm=1`.

## What it found

- The WS-2902 station at 915.000 MHz — packets every ~16 s, peaks −66…−95 dBm.
- An unidentified shouter at 433.920 MHz, bursts −38…−72 dBm, landing 1-2 s
  long and irregular. Still unidentified. It is my favorite resident.
- Indoor desk sessions: a broadband fuzz floor 387–464 MHz at −85…−91 dBm —
  local electronics, not radio ghosts.

## Build it yourself

1. Arduino core 3.x; CC1101 on SPI (GDO0 → GPIO27, CSN → GPIO5,
   SCK → GPIO18, MOSI → GPIO23, MISO → GPIO19).
2. Fill a secrets header: Wi-Fi SSID/password. No other credentials.
3. Flash; open the page; wait one full cycle (about a second) for the canvas
   to fill.

## Verification

- Serial: cycle timing line, then `hits` when something crosses the threshold.
- The spectrum page should move when you key a nearby transmitter (a cheap
  FRS radio is a fine test).

## Traps and field notes

- v1.1.0 had a signed-vs-unsigned sentinel bug in the priority-channel max —
  priority channels were silently dead. v1.1.1 fixes it; if your priority
  frequencies never hit, check that comparison first.
- A full 4 MB flash read over a flaky USB-UART needs `--no-stub` and 64 KB
  chunks; a stub read at high speed corrupts packets on some CH340 bridges.
- The sweep is **receive-only by design**. It cannot and does not transmit.

## Use this brief with an LLM

Feed this file to your assistant and ask it to add bands, change the hysteresis,
export MQTT, or port the detector. The EWMA parameters and CSV format are
documented well enough to write a replacement engine.
