I'm going to show you something that will change how you think about the WiFi router sitting in your living room. It's not just a gateway to the internet. It's a radar system that can see you breathing.
Not science fiction. Physics. And you can build one yourself this weekend.
Wait, What? My Router Can See Me?
Here's what's actually happening: Modern WiFi (802.11ac/ax) uses something called beamforming. Your router has multiple antennas, and instead of broadcasting signal in all directions equally, it focuses the signal toward your devices. Think of it like a spotlight instead of a floodlight.
To do this, your router and devices constantly exchange feedback about the signal—specifically, something called BFI (Beamforming Feedback Information). This data describes exactly how the radio waves are bouncing around your room.
Here's the kicker: this feedback is unencrypted. Anyone can capture it. And when you—a big bag of water that reflects radio waves—move through the room, the BFI data changes. Walk across your living room, and the math literally shows your movement.
The Science in Plain English
Your body reflects WiFi signals. When you move, the reflections change. Your router tracks these changes to optimize signal strength. That tracking data is broadcast openly. Capture it, and you have a motion sensor that works through walls.
Researchers have used this to detect breathing patterns, count people in a room, recognize gestures, and even identify specific individuals by how they walk. Commercial products already exist that turn your existing WiFi into a whole-home motion detection system.
The Privacy Implications (Yes, It's Concerning)
Before we get into the fun project part, let's address the elephant in the room: this is a privacy issue.
Your WiFi network is constantly broadcasting information that can reveal:
- Whether anyone is home
- How many people are in a room
- General movement patterns throughout your house
- Potentially, specific activities (cooking, sleeping, exercising)
Someone with the right equipment parked outside your house could theoretically capture this data. They don't need to be on your network. They just need to receive the BFI frames your router is broadcasting.
"The same technology that makes your WiFi faster also makes your home transparent to anyone who knows how to look."
This isn't hypothetical. Research papers have demonstrated it. The only reason it's not more widely exploited is that most people don't know it's possible. That's... not great security.
Why Build This Yourself?
So why am I telling you how to do this? A few reasons:
1. Understanding the threat model. You can't protect against something you don't understand. Seeing this work with your own eyes makes it real in a way that reading about it doesn't.
2. Legitimate uses are actually cool. Smart home motion detection without cameras. Presence sensing for automation. Fall detection for elderly relatives. Energy savings by knowing which rooms are occupied. All without installing sensors everywhere.
3. It's genuinely fascinating. You're turning radio waves into a visualization of physical space. That's cyberpunk as hell.
What we're building is ethical, own-network-only experimentation. You're monitoring your own WiFi, in your own house, to understand technology you're already using. That's not just legal—it's smart.
Two Paths: Choose Your Adventure
I'm going to give you two options depending on your comfort level and what hardware you have lying around.
Path A: The Full Experience (Linux + Wi-BFI)
- Time: 30-60 minutes
- Difficulty: Medium (command line required)
- Hardware: Linux machine + WiFi adapter with monitor mode
- Result: Live visualization of BFI data, see your movement in real-time plots
Path B: Plug and Play (ESP32 + ESPectre)
- Time: 15-30 minutes
- Difficulty: Easy (web flasher, copy-paste config)
- Hardware: ESP32-S3 or ESP32-C6 board (~$10)
- Result: Working motion sensor in Home Assistant
Path A: The Wi-BFI Deep Dive
This is the "see the actual data" approach. You'll capture real BFI frames from your router and visualize them changing as you move around. It's the same method researchers use in academic papers.
What You Need
- Linux machine — Ubuntu 22.04/24.04, or a Raspberry Pi
- WiFi adapter with monitor mode — Most built-in Intel/Broadcom/Realtek chips work. If not, a $15 USB dongle like TP-Link AC600 or Alfa AWUS036ACH will do it.
- Your existing WiFi router — Any 802.11ac or 802.11ax router (which is basically any router from the last 5 years)
Step 1: Install the Tools
Open a terminal and run:
1# Install system dependencies
2sudo apt update
3sudo apt install tshark wireshark aircrack-ng git -y
4
5# Install Miniconda (skip if you already have conda)
6wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
7bash Miniconda3-latest-Linux-x86_64.sh -b
8~/miniconda3/bin/conda init
9# Close and reopen terminal after thisStep 2: Clone Wi-BFI
1# Get the tool
2git clone https://github.com/kfoysalhaque/Wi-BFI.git
3cd Wi-BFI
4
5# Create the environment
6conda env create -f wi-bfi.yml
7conda activate wi-bfiStep 3: Find Your Network Info
You need to know your router's channel and bandwidth. Run:
1# See your wireless interface name
2iw dev
3
4# Or open Wireshark and scan for networksNote your interface name (usually wlan0 or wlp2s0), channel (like 36 or 149), and bandwidth (80MHz is common for 5GHz).
Step 4: Start Capturing
Open two terminals. In the first one, start the capture:
1cd ~/Wi-BFI/Demo
2
3# Replace values with your actual settings
4./angle_collection.sh my_capture wlan0 36 80MHz 1In the second terminal, start the live visualization:
1cd ~/Wi-BFI
2
3# Replace YOUR_PHONE_MAC with your phone's MAC address
4# (find it in your router's admin page or phone settings)
5python main_live_plot.py AX SU 4x2 80 YOUR_PHONE_MAC my_capture 1Step 5: Watch the Magic
Now walk around the room. Watch the plots. See those angles and amplitudes wobbling? That's your body reflecting WiFi waves. The math is literally tracking you moving through space.
Stand still, and the plot stabilizes. Walk past your phone, and it spikes. Wave your arms, and you'll see corresponding changes. That's the same data that can be used for motion detection, gesture recognition, or... surveillance.
Path B: The ESP32 Easy Mode
Don't want to mess with Linux and monitor mode? Get an ESP32 board and have a working motion sensor in 15 minutes.
What You Need
- ESP32-S3 or ESP32-C6 board — About $8-12 on Amazon. The ESP32-C6 is newer and works great.
- USB-C cable — To flash the board
- Home Assistant — Optional but recommended for the full experience
The ESPectre Project
ESPectre is an open-source project specifically designed to turn your WiFi into a motion sensor. It's brilliant in its simplicity.
GitHub: github.com/francescopace/espectre
Setup Steps
1. Flash the board — Go to the ESPectre web flasher (linked in their repo). Plug in your ESP32, click flash, done.
2. Configure WiFi — The board creates a hotspot. Connect to it, enter your home WiFi credentials.
3. Add to Home Assistant — If you're running Home Assistant, it auto-discovers as a motion sensor entity. You can then trigger automations: lights on when motion detected, alerts when you're away, etc.
4. That's literally it. You now have a motion sensor that works through walls, doesn't require line of sight, and uses your existing WiFi infrastructure.
Real-World Uses
- Whole-home presence: Know which rooms are occupied without cameras
- Sleep tracking: Detect when someone is in bed (without wearables)
- Security: Alert if motion detected when everyone's away
- Automation: HVAC, lighting based on actual room occupancy
- Elder care: Fall detection, activity monitoring
Home Assistant: Where It Gets Really Fun
Here's where we turn a cool science project into genuinely useful home automation. Once your WiFi motion sensor is talking to Home Assistant, you can build automations that would otherwise require dozens of PIR sensors, cameras, or expensive commercial systems.
The beauty of WiFi sensing is that it works through walls. One ESP32 in your hallway can detect motion in multiple rooms. No line-of-sight required. No dead zones. No batteries to replace.
Example Automations (Copy-Paste YAML)
1. Lights on when you enter a room:
1automation:
2 - alias: "Living Room Motion Lights"
3 trigger:
4 - platform: state
5 entity_id: binary_sensor.wifi_motion_living_room
6 to: "on"
7 condition:
8 - condition: sun
9 after: sunset
10 action:
11 - service: light.turn_on
12 target:
13 entity_id: light.living_room
14 data:
15 brightness_pct: 80
16 transition: 22. Away mode security alerts:
1automation:
2 - alias: "Motion Alert When Away"
3 trigger:
4 - platform: state
5 entity_id: binary_sensor.wifi_motion_main_floor
6 to: "on"
7 condition:
8 - condition: state
9 entity_id: input_boolean.away_mode
10 state: "on"
11 action:
12 - service: notify.mobile_app
13 data:
14 title: "Motion Detected!"
15 message: "Movement in the house while you're away."
16 data:
17 priority: high
18 ttl: 03. Smart HVAC based on room occupancy:
1automation:
2 - alias: "Office HVAC When Occupied"
3 trigger:
4 - platform: state
5 entity_id: binary_sensor.wifi_motion_office
6 to: "on"
7 for:
8 minutes: 2
9 action:
10 - service: climate.set_temperature
11 target:
12 entity_id: climate.office
13 data:
14 temperature: 72
15 hvac_mode: heat_cool
16
17 - alias: "Office HVAC Standby When Empty"
18 trigger:
19 - platform: state
20 entity_id: binary_sensor.wifi_motion_office
21 to: "off"
22 for:
23 minutes: 15
24 action:
25 - service: climate.set_temperature
26 target:
27 entity_id: climate.office
28 data:
29 temperature: 65
30 hvac_mode: auto4. Bedtime detection (no wearables needed):
1automation:
2 - alias: "Detect Bedtime"
3 trigger:
4 - platform: state
5 entity_id: binary_sensor.wifi_motion_bedroom
6 to: "on"
7 condition:
8 - condition: time
9 after: "22:00:00"
10 before: "02:00:00"
11 - condition: state
12 entity_id: binary_sensor.wifi_motion_living_room
13 state: "off"
14 for:
15 minutes: 10
16 action:
17 - service: scene.turn_on
18 target:
19 entity_id: scene.goodnight
20 - service: lock.lock
21 target:
22 entity_id: lock.front_door
23 - service: alarm_control_panel.arm_night
24 target:
25 entity_id: alarm_control_panel.home5. Elder care / fall detection alert:
1automation:
2 - alias: "No Motion Alert - Elder Care"
3 trigger:
4 - platform: state
5 entity_id: binary_sensor.wifi_motion_parents_house
6 to: "off"
7 for:
8 hours: 4
9 condition:
10 - condition: time
11 after: "08:00:00"
12 before: "22:00:00"
13 action:
14 - service: notify.mobile_app
15 data:
16 title: "Check on Mom"
17 message: "No motion detected for 4 hours during daytime."
18 data:
19 priority: highPro Tips for Home Assistant Integration
- Multiple sensors: Deploy 2-3 ESP32s for whole-home coverage. One per floor works well.
- Tune sensitivity: Adjust the detection threshold in ESPectre config to avoid false positives from pets.
- Combine with other sensors: Use WiFi motion as a "broad stroke" detector, then refine with door/window sensors for specifics.
- Template sensors: Create binary sensors that combine multiple rooms into zones (upstairs, downstairs, etc.)
- History tracking: Use the Recorder component to log motion patterns over time. Useful for security analysis.
The Killer Use Case: Whole-Home Presence
Traditional motion sensors (PIR) only detect heat and movement. They can't tell if someone is sitting still. WiFi sensing can. It detects the tiny movements of breathing, typing, or just existing in a space.
This means you can build automations that know you're in a room even when you're working quietly at your desk. Lights don't turn off because you stopped moving. HVAC doesn't dial down because you're reading a book.
That's presence detection, not just motion detection. And you built it for $10.
Taking It Further: Add Motion Detection
Once you have live BFI data streaming (from Path A), you can add actual motion detection with about 10 lines of Python. The concept is simple: if the variance of the angles exceeds a threshold, something moved.
1import numpy as np
2
3# Assuming you have a stream of angle data
4def detect_motion(angle_buffer, threshold=0.5):
5 """Returns True if motion detected in recent samples"""
6 if len(angle_buffer) < 10:
7 return False
8 variance = np.var(angle_buffer[-10:])
9 return variance > threshold
10
11# In your main loop:
12if detect_motion(recent_angles):
13 print("Motion detected!")
14 # Trigger alert, log event, whatever you wantThis is a basic version. Research papers use more sophisticated techniques—machine learning classifiers, multiple antenna streams, temporal patterns—to distinguish between types of motion, count people, or even recognize specific activities.
What This Means for Privacy
Now that you've seen it work, let's talk about what this means:
Your WiFi is always broadcasting. Even when you're not actively using it, your router and devices are exchanging BFI data. Anyone within radio range can capture these frames.
Encryption doesn't help here. BFI is part of the physical layer handshake. It happens before encryption. WPA3, VPNs, none of that matters for this specific data.
The only real mitigation is physical: Faraday cages (impractical), reducing transmit power (breaks your WiFi), or accepting that your home's occupancy pattern is effectively public information within radio range.
This isn't about fear-mongering. It's about informed consent. You're using technology that has these properties. Now you know.
Wrapping Up
You just learned that your WiFi router is basically a radar system, built your own motion detector using radio waves, and hopefully gained a better understanding of how the invisible signals around us carry information about our physical world.
The technology is neutral. It can be used for convenient home automation or concerning surveillance. What matters is understanding it, so you can make informed decisions about the tradeoffs you're making.
And hey, you also have a cool weekend project to show off. "Yeah, I turned my WiFi into a motion sensor. No big deal."
That's pretty fun.
Resources
- Wi-BFI: github.com/kfoysalhaque/Wi-BFI
- ESPectre: github.com/francescopace/espectre
- Research paper on WiFi sensing: Search "WiFi CSI human activity recognition" on Google Scholar for deep dives