Tendai Bhebhe

Making a listening post for the 2.4GHz radio spectrum

A drone has been hovering over a school field for ten minutes, and it isn't broadcasting the Remote ID it is legally required to send. Would anyone know? SenseGrid is my attempt at an answer: a receive-only listening post built from eleven ESP32 boards that cost a few dollars each, with an operator console for people and a bridge for AI agents to read the data stream from the hardware and draw insight from it.

A new Wi-Fi network appears in a café with the café's own name, but it isn't the café's. Would anyone notice?

Something starts transmitting just above the Wi-Fi band, where no ordinary device is allowed to. Would anything flag it?

Almost all of this happens in the radio spectrum, where none of us can see it. Most of the time nothing is wrong. But when something is, the only tools that can tell you are built for airports, militaries and telecom operators: expensive, closed, and needing a specialist to read them. The military term for this kind of passive listening is ESM, electronic support measures: listen, don't transmit, and make sense of what's on the air.

I wanted to find out what a useful version of that looks like for everyone else: a school, a farm, a small business, a curious hobbyist. Built from off-the-shelf boards that cost a few dollars each, open, receive-only, and able to explain what it sees in plain language.

What it's for

Makes part of the radio environment visible and understandable:

  • Drones that don't identify themselves. Remote ID rules exist in many countries, but almost nobody can check them. A box that hears both the drone's Wi-Fi and its Remote ID (or the lack of one) can.
  • Things that shouldn't be there. Energy that no Wi-Fi or Bluetooth device accounts for, a control link hopping across the band, a transmitter outside the licence-exempt band.
  • Changes from normal. A channel suddenly far busier than it usually is at this hour.

And because it can be questioned by an AI agent as well as read on a console, the person asking doesn't need to be a radio engineer. "Is anything unusual on the air right now?" is a reasonable question to ask a machine that has been listening all day.

SenseGrid has three layers, and each one mattered as much as the others, plus a drone simulator to prove they work:

  1. The hardware and firmware: a sealed box of ESP32 boards on a shared sensor bus, designed to deliver honest, auditable data.
  2. The operator console: a browser application a person can run a shift from, with the visuals, controls and accountability that real operation needs.
  3. An AI bridge: the same capabilities exposed over the Model Context Protocol (MCP), so an AI agent can control the hardware , configure different radios for different scenarios and give context based on output of all radios.

The hardware:

A grid of sensors

Every board in the box is flashed with the same firmware. What it does is chosen at runtime, so identical hardware becomes a different specialist with one command:

RoleWhat the radio does
WWi-Fi monitor: counts frames per device or forwards raw 802.11 frames; hops or pins channels
BBluetooth Low Energy scanner, including drone Remote ID over BLE
SWi-Fi-channel energy: occupancy, sweeps, burst detection
KnRF24 radio: measures energy on every 1 MHz from 2400 to 2525 MHz, profiles it, decodes nRF24 packets
SIMDrone simulator for drills: Remote ID over Wi-Fi or BLE, frequency hopping, ESP-NOW
TTest transmitter, deliberately gated
CMaster: radio-silent aggregator

Retasking the whole box for a different job (a drone hunt, a Bluetooth survey, a spectrum watch) is done using some commands dispatched over the I2C bus that links all the radios to the master. The boards are a mix of classic ESP32 devkits and AI-Thinker ESP32-CAM modules; the firmware knows each board's pin map, and only the devkits carry an nRF24L01+ radio for role K.

The SenseGrid box connected to a laptop
The SenseGrid box connected to a laptop.

A radio-silent master and a shared I²C bus

One design rule drove the architecture: every active radio belongs to a sensor. The master board that collects the data has its own radios switched off. It reaches the ten sensor radios over an I²C bus and is the only board connected to the PC, over USB at 921600 baud. Nothing in the box carries networking traffic of its own, so the box doesn't pollute the spectrum it is measuring.

Close-up of the console overview window for radio mode configuration
Console overview window for radio mode configuration.

The bus protocol is small and strict:

  • Each radio has an address between 0x10 and 0x2F and buffers its output in a 4 KB ring.
  • The master polls every radio and always reads a fixed 32-byte chunk: length, sequence number, CRC-8, then payload. A corrupted or missing chunk is detected and counted, never silently glued into the next one.
  • The master reports per-slot bus health (noise, gaps, bad lines), so a struggling radio stands out long before it fails.
  • A radio that drops off the bus retries joining every 3 seconds instead of giving up.
  • The wire format is versioned, so radios on different firmware releases can share one bus during an upgrade.

The I²C bus is the system's real bottleneck: ten radios can produce far more data than it can carry. That constraint shaped the firmware more than anything else.

Earlier versions quietly dropped frames below a threshold, truncated payloads and sanitised strings. That looks tidy, but the PC could never audit a decision the firmware made on its behalf. In 0.5.x every frame a radio demodulates is either delivered in full or counted against a named, live, discoverable filter, and every filter's effective state is reported when a role starts and after every change. Noise can be analysed; silence can't.

The same release line added:

  • RAW and LITE modes for Wi-Fi: individual frames when you need detail, per-device counts per window when the bus can't carry everything, with the effective budget reported.
  • Lossless drop accounting: when the bus saturates, drops are counted and reported, so a quiet period on screen is never mistaken for a quiet sky.
  • Jobs that close with a reason: a transmit or simulation job ends with an explicit event when the radio restarts, so the PC never shows a radio "transmitting" forever.
  • A settable Wi-Fi hop list (0.5.2), so monitors can cover all 13 channels instead of only 1 / 6 / 11.

The PC side: engine and fusion

Interface engine

A Python service owns the serial port. It validates the event stream, rejects corrupted lines with a reason, reassembles paginated events, and relays commands to individual radios with reply matching that isn't fooled by the telemetry flowing around it. It offers three ways in: a REST API, a WebSocket stream, and an MCP server for AI agents. The console and the agent go through the same engine and the same rules.

Those rules are a safety layer where every item exists because something went wrong once:

  • A bus radio is never allowed to become a second master. That crashed the whole bus once.
  • Reboots happen one at a time, and the next waits until the previous radio is back.
  • Simulated drones must have a time-to-live, so a drill can't be left broadcasting.
  • Personal devices are reported in aggregate only. Infrastructure, drones and watch-listed targets are fair game; people's phones are not.

Fusion engine

The fusion engine reads the event stream and runs an escalation ladder:

  • L1: an identified, compliant drone (valid Remote ID, positioned on the map).
  • L2: something suspicious: drone-like Wi-Fi, a new nRF24 link, a traffic spike against a learned per-hour baseline, or radio energy nothing can explain.
  • L3: a non-compliant suspect, for example a drone's Wi-Fi identity with no Remote ID, or a transmitter above 2483.5 MHz, outside the licence-exempt band.

Every alert carries the events that justify it, and a later fact that explains an earlier suspicion produces a de-escalation note instead of silence.

The piece I'm proudest of is spectral fusion. The nRF24 radios can't decode Wi-Fi or Bluetooth; they only know how often each 1 MHz channel is busy. The fusion engine merges their spectra, learns a baseline per channel, segments and classifies emissions (Wi-Fi, BLE advertising, narrowband GFSK, frequency hopping, wideband, microwave oven), and then attributes each one: does this energy rise and fall with the Wi-Fi frames the W radios decode on that channel, or with the BLE adverts the B radios hear? Whatever no decoder can account for is flagged NOID, no identity. That is where an RC control link or an unusual transmitter shows up.

The operator console

The console is where a person runs the system, and it is built for long, careful use rather than demos.

The SenseGrid operator console overview, with every radio shown as a tile coloured by its role
The console's Box panel: every radio as a tile coloured by its role, laid out like the physical box.

Hardware Configuration
Hardware Configuration.
  • The Box: every radio as a tile coloured by its role, laid out like the physical box (master on the left, radios in bus-address order) with live activity sparklines. Click tiles to stage new roles, then apply them in one confirmed step that reboots radios one at a time.
  • Detection strategies as plugins: ready-made plans ("Drone Remote ID hunt", "RC / GFSK control-link hunt", "BLE survey", "2.4 GHz spectrum watch") that put the right radios in the right modes with the fewest reboots. A new strategy is a small JavaScript file against a documented contract.
  • Alerts with evidence: L3 / L2 / L1 lanes, each alert opening to the events behind it and the rule that fired.
  • The picture: drones drawn at the positions they broadcast, plus Wi-Fi, spectrum and nRF energy drawn as radial bands by frequency, and a rail of the strongest emitters.
  • RF energy console: a live 2400–2525 MHz spectrum with Wi-Fi channels shaded by decoded traffic, a waterfall, classified and attributed tracks, and the out-of-band region marked. One click pins a radio on a signal for a once-a-second energy series correlated with Wi-Fi and Bluetooth activity.
  • Seeker mode: a K radio follows one signal as it moves, holds when it drops out, then searches nearby and re-acquires it by its signature, with a frequency-over-time trail on screen and a CSV for offline analysis.
  • Wi-Fi and Bluetooth inventories: per-device rates and signal trends; Bluetooth devices identified offline (Apple, Microsoft, beacons, trackers, Remote ID) from bundled Bluetooth SIG and IEEE tables, with the reasons shown.
  • A command line and batch scripts in a dock at the bottom, going through the same checks as every button.
  • Deliberate transmitting: test transmissions need an arm step with a reason and the operator's identity, a time-limited window and per-job confirmation, with a hazard-tape banner across the console while armed.
  • Accountability: operator and viewer logins, and every command, arm and export in a hash-chained, tamper-evident audit log. History, replay and CSV / JSON export.
  • Runs offline: no build step, no CDN, a bundled font, so it works on an air-gapped laptop.
Detected devices listed on the console
Detected devices listed on the console

Drone drills and Remote ID testing

You can't develop a drone detector by waiting for drones to fly past. So any radio in the box can become one: the SIM role turns a spare board into a simulated drone on the bench, and the rest of the box tries to catch it.

What the simulator broadcasts

  • Remote ID over Bluetooth and Remote ID over Wi-Fi beacons, the two broadcast methods drones use to announce who and where they are (ASTM F3411 / Open Drone ID message formats).
  • Targets for the other detectors: a channel hopper for the RF detector, ESP-NOW bursts, and a Wi-Fi access point.
  • Everything is set by the operator from the console: drone ID, ID type, aircraft type, self-ID text, operator ID, home position, altitude, speed, and a flight path (hover, circle or line). Position is recomputed for every broadcast, so the drone actually moves.
  • Every simulated drone needs a time-to-live. It stops by itself, and the console tracks it as an emitter from launch, so it never reports "all clear" while a test drone is still flying.

How the box detects it

  • B radios decode Remote ID from Bluetooth adverts; W radios decode it from Wi-Fi beacons. The PC fuses both into one contact per drone ID.
  • A compliant drone becomes an L1 alert and is drawn on the map at the position it reports, with its take-off point, a trail of recent fixes, and distance and bearing from the site.
  • A drone's Wi-Fi with no Remote ID becomes an L3 non-compliant alert, and a position broadcast with no ID is flagged as suspicious, so the drills exercise both the compliant and the non-compliant paths.

The drills

DrillResult
One drone over Bluetoothpicked up by a B radio in about 0.5 s and tracked cleanly
The same drone on a phonean ordinary Remote ID app on my phone showed it too: an independent decoder confirming the broadcasts follow the standard, not just my own parser
Wi-Fi Remote IDdecoded exactly by the W radios, then on the phone
One drone circling, then two on separate orbitstracked as separate contacts with their own paths
Five-drone swarmfive drones, each with its own ID, address, home position and path: the box reported five distinct drones, and the phone showed the swarm

What the drills found

Every drill turned something up. That was the point:

  • Merged drones: simulated drones initially shared an identity and collapsed into one contact; each radio now has its own.
  • A drone that wouldn't fly: at the default 120 m altitude, a simulated drone spent about 40 seconds climbing before it moved, so short drills barely went anywhere.
  • "My phone doesn't show the ID": the Wi-Fi Remote ID beacons went out every 333 ms while advertising a 100 ms interval, and the identity message rode only every third beacon, so phones rarely caught a complete set. Firmware 0.5.2 sends a beacon every ~102 ms with identity and location in every one.
  • Strict apps flagged the content: the aircraft type said "gyroplane" and every ID was declared a manufacturer serial number. Both are now correct by default and settable.

A note on responsibility: the simulator exists to test my own detectors on the bench. Drills run at low power with a time limit, and every simulator radio goes back to a listening role when the drill ends.

Testing a Wi-Fi attack: deauthentication detection

A deauth flood abuses an ordinary 802.11 management frame, the one an access point uses to tell a device "you're disconnected". Anyone can forge it, so an attacker can repeatedly knock phones and laptops off a network, often as the first step toward luring them onto a fake one.

What the box can do

Can a radio see deauth frames?Yes. W radios listen with the management-frame filter on. In full RAW mode each frame is delivered with its type and subtype (deauth is management subtype 12, disassociation subtype 10), plus the victim, sender and network addresses.
Can it see them in the default LITE mode?Not as deauths. LITE only counts frames per device to save bus bandwidth; the subtype is lost. A flood shows up as a traffic spike, which the existing spike rule flags, but it can't be named as an attack.

What I built

  • A live detector: it reads the raw frame stream from the engine, picks out deauth and disassociation frames, extracts the victim, sender and network from each one, keeps a rolling rate per network, and prints a FLOOD line when it crosses a threshold. It runs on its own, without the fusion engine, so it can be pointed at a controlled test directly.
  • A detection rule: in the same shape as the fusion engine's other rules: elevated deauth traffic on one network raises an L2 "suspected Wi-Fi deauth" alert; a sustained flood hitting several devices raises an L3 "Wi-Fi deauth flood", with the actual frames attached as evidence.

How it tested

I ran the rule through the real fusion engine with synthetic frames:

InputResult
10 deauth frames to one device in 10 sno alert (below the warning threshold)
18 frames across 4 devicesL2 suspected deauth
45 frames across 6 devicesL3 deauth flood, with the frames and victim list as evidence

What it taught me

  • It needs a dedicated radio. Seeing deauths means running one W radio in RAW mode on the network's channel, which costs bus bandwidth the other radios share.
  • The thresholds need a real baseline. Devices roaming between access points use the same frames legitimately. Before the rule goes live, it needs an hour of normal traffic recorded on a real network, then thresholds set above what's normal there.
  • Spoofed addresses are expected. The "sender" in a deauth flood is forged by design, so the rule reports it but never treats it as an identity.

The AI bridge: asking the hardware questions

The console shows everything, but reading it still takes RF knowledge: what a busy channel 6 means, or why a 2 MHz-wide burst at 2504 MHz matters. So the engine also speaks the Model Context Protocol. It exposes the box as about sixty typed tools (enumerate the bus, read a radio's settings, summarise the Wi-Fi picture, list drones, pull the nRF energy profile, check fleet health, change a radio's role) that an AI agent can call.

That makes it possible to ask the box questions in plain language:

You askThe agent does
"Which radios are on the bus, and are they healthy?"probes the bus, reads the roster and health counters, points out the radio with noise or drops
"How many Bluetooth devices can you see right now?"reads the B radios and answers in aggregate: counts and device types, never anyone's identity
"Is there anything on the spectrum that isn't Wi-Fi or Bluetooth?"lines the nRF energy profile up with what the other radios decode and reports what's left over
"Retask two radios to listen for drones and tell me if one shows up"changes roles one radio at a time, waits for each to return, then watches for Remote ID
An AI chat session asking the SenseGrid box via MCP for a RF summary
Asking the box a question through the MCP bridge, and the agent's plain-language answer.

Where it helped on the bench: it flagged a faulty radio from its bus error counts within minutes, linked a group of radios browning out together to a shared power rail, closed a "spoofing" scare by checking how two look-alike networks actually behaved (they were ordinary personal devices), and confirmed the five-drone swarm drill described above.

It is a complement to the console. The agent is good at reading a lot of data fast and answering a specific question; the console is better for continuous watching, spatial and spectral pictures, and controlled, audited action.

It also needs the same guardrails as anyone else. The project's most serious incident came from an agent: asked to "silence" some radios, it switched three of them to the master role, two masters fought over the bus and the box went down. The engine now refuses that command outright for every client, and I keep the agent asking before anything that changes the box or transmits. AI on real hardware is only as safe as the layer underneath it.

Where this is going

The direction I find exciting is simple to say: a small, affordable listening post with a local AI that watches the radio environment for you and tells you, in plain language, when something changes:

"A drone with no Remote ID has been over the north side for four minutes."

"A new network is using your network's name."

"Something has been transmitting at 2504 MHz every few seconds since 3 pm. Nothing nearby explains it."

Lessons from the bench

  • Power is a feature. Several radios browning out together pointed to a marginal shared supply rail long before it looked like a software problem.
  • The bus budget is the design. Most firmware decisions (RAW vs LITE, drop accounting, ring-gated flushing) came from ten radios sharing one I²C bus.
  • Test against the real thing. A mock fleet is invaluable for UI work, but the real master answered some commands in plain text where the mock sent JSON, and only the hardware revealed it.
  • Make the safe path the easy path. Guardrails that live in one shared path (confirmations, serialised reboots, the transmit arm window).

Built with

ESP32 (classic devkits and ESP32-CAM) · nRF24L01+ · I²C · Arduino / ESP-IDF · Python (Starlette, Uvicorn, httpx, pyserial) · SQLite · Model Context Protocol (MCP) · vanilla JavaScript ES modules · SVG / Canvas