# CC1101Sniffer — pulse forensics at 433.92 MHz

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

> Every garage door, tire sensor and unlicensed gadget in the neighborhood
> mutters in morse-adjacent gibberish, and I want to know what each one is
> saying. So we taught an ESP32 to record the actual pulse widths, then handed
> the patience work to a machine that does not sleep. The first version recorded
> the heat death of the universe instead of a signal; the fix is in the notes.

## What it is

A parked-frequency **OOK/ASK sniffer**: the CC1101's GDO0 pin feeds a GPIO edge
interrupt that timestamps every pulse in microseconds; the firmware records
pulse trains with per-burst RSSI, serves them over HTTP, and can hand the
recorded trains to a cloud LLM for a "what am I looking at?" verdict.

## Hardware

| Part | Notes |
|---|---|
| MCU | ESP32-D0WD-V3 |
| Radio | CC1101, SPI, 433.92 MHz default (any legal band by config) |
| Wiring | GDO0 → GPIO27 (edge interrupt), plus SPI pins as in the sweep brief |

## How it works

- The CC1101 is parked on one frequency (default **433.920 MHz**), OOK/ASK,
  async serial mode on GDO0.
- Every edge is timestamped in microseconds into a double-buffered ring; a
  burst closes after a configurable gap, and the burst is stored with peak RSSI
  and duration.
- `/capture.csv` serves the bursts (pulse widths + RSSI); `/rssi.csv` logs 1 Hz
  RSSI for background sensing. Serial commands: `f` frequency, `d` dump,
  `c` clear, `s` stats, `r` RSSI stream.

## The squelch (the lesson)

v1.0.0 had **no squelch**: the receiver's noise floor generates thousands of
random microsecond edges per second, and the "sniffer" dutifully recorded the
noise torrent. The fix, which is the actual engineering here:

- adaptive RSSI floor: fast-down 0.20, slow-up 0.01;
- open the capture gate at `floor + 14 dB`, close at `floor + 7 dB`;
- discard noise edges while closed;
- log a `[CARRIER]` row when RF energy is present but no edges arrive
  (continuous or non-OOK signals).

## What it heard

- A family of ~1.9 ms pulses at −61 dBm — consistent with TPMS tire sensors
  (Schrader class). Sporadic, car-dependent.
- A dense train of ~250/480 µs pulses at −71 dBm — consistent with an RKE
  (remote keyless entry) fob press.
- A 1-2 s, −38…−55 dBm shouter that never repeated in any recorded session —
  unidentified to this day. The file remains open.

## Build it yourself

1. Arduino core 3.x; CC1101 with GDO0 wired to an interrupt-capable GPIO.
2. Flash; open the serial log; wait for `[CARRIER]` and capture lines.
3. Use the frequency command to park on your own target band (check your local
   regulations; this is a receive-only tool).

## Verification

- Press a known 433 MHz remote near the antenna: the burst should appear in
  `/capture.csv` with plausible pulse widths (hundreds of µs).
- With no transmitter nearby the capture file should stay small — if it
  grows without bound, your squelch thresholds need raising.

## Traps and field notes

- Pulse-level analysis is expensive for LLMs; strip to a compact digest
  (widths histogram + repeat intervals) before sending, and turn off
  long-form "reasoning" modes.
- The CC1101's async output is not edge-perfect at very short pulses; treat
  the first and last pulse of a burst with suspicion.
- 433.92 MHz is crowded — expect to meet your neighbors' entire garage.

## Safety

- **Receive-only.** No transmission hardware or code path exists in this
  project; do not add one for bands you are not licensed to use.

## Use this brief with an LLM

Feed this file to your assistant and ask it to classify pulse trains, build a
decoder for a specific device family, or port the capture pipeline to another
radio. The squelch parameters and CSV schema are documented above.
