All writing

Field test4 min read

Trying to build a Wi-Fi radar on a MacBook (and settling for a hot/cold meter)

Why consumer Macs will not give you angle-of-arrival data, digging into Apple Silicon HID gyroscopes for step tracking, and making peace with noisy RSSI.

RSSI Hot / Cold Simulator
AP
-78 dBmSteady
Drag the dot across the room. Hide the AP and flip between Raw and Smoothed to feel how multipath noise fights you.

Every now and then you get a slightly ridiculous idea that sounds like it should take an afternoon. Mine was: can I walk around a building with my MacBook and have it point a little radar arrow at the Wi-Fi router?

Short answer: no. Not honestly, anyway.

If you drag the dot around the simulator above, hide the access point, and switch between Raw and Smoothed, you’ll feel the exact problem within about five seconds. You’re not looking at a clean radial gradient. You’re looking at a wobbly, wall-warped signal that jumps several dB if you turn your shoulders slightly.

Still, building Router Finder in Swift for macOS (and an iOS companion) taught me a load of interesting things about what a MacBook will and won’t tell you about the physical world around it.

Why a MacBook can’t really do Wi-Fi radar

Real indoor positioning uses things like Channel State Information (CSI), antenna phase arrays, or Fine Timing Measurement (802.11mc) to work out which direction a radio wave arrived from.

Consumer macOS gives you none of that. Through CoreWLAN, what you actually get from a normal MacBook is a periodic scan of nearby networks and a single integer per access point: RSSI (Received Signal Strength Indicator), measured in dBm.

On paper, radio signal strength falls off nicely with distance. In a real house or office, it does whatever it feels like:

  • Multipath reflections mean taking half a step sideways can bounce your reading up or down by 4–6 dB.
  • Walls and furniture aren’t uniform. Walking behind a brick chimney or a fridge looks identical to walking five metres further away.
  • Your own body is basically a big bag of water sitting between the router and the laptop’s antenna. Turning 180 degrees changes the number even if your feet haven’t moved.

So if an app draws a confident compass arrow pointing at your router using nothing but CoreWLAN RSSI, it is mostly guessing.

What actually works: a hot/cold meter

Once I stopped trying to pretend a MacBook is a phased-array radar, the design got much better.

Instead of faking a bearing, Router Finder samples CoreWLAN at roughly 1 Hz, lets you lock onto a specific BSSID (handy when a mesh network broadcasts the same SSID from three rooms), smooths the raw RSSI stream, and turns the whole thing into a straightforward warmer / colder game.

Walk five paces down a corridor. Did the smoothed average climb by 4 dB? Keep going. Did it drop? Turn around and try the other doorway. It’s surprisingly usable once you stop staring at individual raw readings and only pay attention to the trend over a few seconds.

The weird detour: Apple Silicon HID sensors

Of course, I couldn’t completely leave the "can we plot where I walked?" question alone.

If you want to draw a rough breadcrumb trail of RSSI readings on a floorplan, you need to know how far you’ve walked and which way you turned. An iPhone makes that easy with Core Motion. A MacBook doesn’t expose a nice CMPedometer API — even though Apple Silicon MacBooks actually have an accelerometer and gyroscope inside them.

They sit behind IOKit as AppleSPUHIDDevice HID sensors.

I ended up adding an experimental motion mode that reads the accelerometer and gyroscope directly from Apple Silicon HID, detects walking steps from vertical acceleration peaks, integrates yaw for heading, and stamps each Wi-Fi sample with an estimated (x, y) coordinate that you can export as CSV.

One fun bug popped up immediately: RF scan lag. A CoreWLAN scan doesn’t return instantaneously. By the time the callback fires with a fresh RSSI value, you’ve already taken another step or two. Pairing the scan result with now's position smears your heatmap forward along whatever direction you’re walking.

The fix was keeping a tiny ring buffer of recent motion snapshots and matching each completed Wi-Fi scan to the position from slightly earlier, when the scan actually sampled the air.

Knowing when to stop polishing a physics limit

Even with step tracking and scan-lag compensation, dead-reckoning from a laptop held open in your hands drifts fast. It’s a fun experiment and great for dumping CSV logs when you’re curious about dead zones in a flat, not something you’d ever ship as indoor GPS.

That’s honestly one of my favourite parts about small weekend projects: you chase the ambitious version, run straight into the real hardware boundary, learn how IOKit HID and CoreWLAN actually behave underneath, and keep the simple part that works. In this case, a smoothed dBm readout and a warmer/colder indicator beat a fake radar every time.