WiFi promiscuous-mode detector for Flock Safety surveillance cameras
Ported to standard ESP32 hardware for maximum accessibility and cost savings.
- Setup Instructions - Get started in 3 steps
- Solderless Build Guide - No soldering required! ($9-11 total)
- 3D Printable Case - Professional enclosure design
- Business Analysis - Market opportunity & financials
- Porting Guide - Technical documentation
This package contains everything you need to build and deploy your own Flock-You detector:
- main.cpp - Modified for ESP32 (GPIO 25, 2, 17)
- platformio.ini - ESP32 DevKit configuration
- partitions_4mb.csv - Optimized for 4MB flash
- api/ - Flask dashboard for GPS wardriving
- datasets/ - OUI lists & research data
- openscad/ - Parametric case source files
- stl/ - Ready-to-print STL files (coming soon)
- assembly_photos/ - Step-by-step build photos (coming soon)
- Complete user manuals
- Troubleshooting guides
- Business planning resources
- Technical specifications
| Build Type | Components | Total Cost | Detection Accuracy |
|---|---|---|---|
| Minimal | ESP32 + USB cable | $5 | β 100% |
| Breadboard | + Buzzer + breadboard | $9-11 | β 100% |
| With Case | + 3D printed enclosure | $10-12 | β 100% |
| OUI-SPY | Pre-built board | $85 | β 100% |
Same detection performance, 85% cost savings!
Cost: $5 | Time: 5 minutes | Difficulty: βββββ
- ESP32 DevKit + USB cable
- Onboard LED provides visual feedback
- Perfect for testing or silent operation
- Instructions
Cost: $9-11 | Time: 10 minutes | Difficulty: βββββ
- Add passive buzzer module + breadboard
- Audio chirps on detection
- No soldering required
- Full Guide
Cost: $10-12 | Time: 15 minutes + 3hr print | Difficulty: βββββ
- 3D printed case with snap-fit lid
- LED light pipe
- USB strain relief Case Design
Minimum:
- ESP32 DevKit ($5-6)
- USB Micro cable ($1)
Recommended:
- ESP32 Breadboard Kit ($15-20)
- Includes everything: ESP32 + breadboard + jumpers + buzzer
# Install PlatformIO
pip install platformio
# Clone / enter the repo
cd flock-you-esp32
# WiFi-only (recommended first flash β works on any ESP32 DevKit)
pio run -e esp32dev -t upload && pio device monitor
# WiFi + BLE coexistence (continuous BLE scan + WiFi simultaneously)
pio run -e esp32dev-ble -t upload && pio device monitor
# M5Atom variants β use the unified flasher script
./flash.sh # interactively identifies your device
./flash.sh --once # flash one device and exitAll supported environments:
| Environment | Board | BLE |
|---|---|---|
esp32dev |
ESP32 DevKit | β |
esp32dev-ble |
ESP32 DevKit | β COEX |
m5atom-lite |
M5Atom Lite | β |
m5atom-lite-ble |
M5Atom Lite | β COEX |
m5atom-echo |
M5Atom Echo | β |
m5atom-echo-ble |
M5Atom Echo | β COEX |
m5atom-voice |
M5Atom Voice | β |
m5atom-voice-ble |
M5Atom Voice | β COEX |
m5atom-voices3r |
Atom VoiceS3R (S3) | β |
m5atom-voices3r-ble |
Atom VoiceS3R (S3) | β COEX |
lilygo-t-dongle-c5 |
LILYGO T-Dongle C5 | β |
lilygo-t-dongle-c5-ble |
LILYGO T-Dongle C5 | β NimBLE 2.x |
- Device boots with Super Mario 1-2 startup tune
- LED flashes on WiFi traffic
- Buzzer chirps on Flock camera detection
- Drive near known camera locations to verify
That's it! You're detecting.
This firmware uses five research-proven techniques with a confidence score (0β100):
- Monitors 2.4 GHz management & data frames
- Three OUI confidence tiers (PR#39):
- HIGH (32 OUIs) β exclusively Flock Safety registered β score 40, always alerts
- MFR (6 OUIs) β Liteon/USI contract manufacturer β score 20, silent log only
- SoundThinking (1 OUI) β acoustic sensor co-deployed with Flock β score 35, alerts
- addr1 receiver-side detection (catches sleeping cameras)
- addr3 BSSID fallback for randomized addr2 frames (now ON by default)
- Flock cameras send probe requests with empty SSID
- Combined score OUI+probe = 62 β HIGH CONFIDENCE on first match
- Field-tested: 11/12 cameras detected, only 2 false positives
- Patterns:
"Flock Camera net.","Flock-XXXXXX","FLOCK-XXXXXX","penguin","pigvision" "Flock Camera net."cameras use locally-administered MACs (OUI matching won't work)ALERT_LAA_SSIDtype detects these β SSID is the sole WiFi handle- Sequential-MAC heuristic:
:DE/:DFlast-byte pair on adjacent channels β +10 pts
- Passive NimBLE scan for Flock BLE advertisements
- Checks: mfr-ID
0x09C8(XUNTONG/Flock), Raven 128-bit service UUIDs (GainSec), device names - BLE_COEX_MODE=1 (default for all
-bleenvironments): ESP-IDF SW coexistence scheduler runs WiFi promiscuous + BLE simultaneously β no promiscuous pause needed - BLE hit within 60 s of WiFi hit β +20 confidence bonus
- addr2 (transmitter) β standard detection
- addr1 (receiver) β catches cameras receiving probe responses
- addr3 (BSSID) β fallback for randomized MACs
Confidence tiers: < 30 = LOW (log only) Β· 30β59 = PROBABLE Β· β₯ 60 = HIGH (alert)
See DETECTION_IMPROVEMENTS.md for full scoring tables and examples.
The detection pattern library (fy_detect.h) is fully tested via a host-side
Unity test suite β no ESP32 hardware needed:
cd flock-you-esp32
pio test -e native # run all 38 tests
pio test -e native -f test_ble_matching # MAC / BLE name / mfr-ID tests (22)
pio test -e native -f test_uuid_matching # Raven UUID / firmware version (16)All 38 tests pass against the current fy_detect.h. The test suite covers:
- All 32 high-confidence Flock OUI prefixes (case-insensitive)
- All 6 contract-manufacturer OUIs (Liteon/USI)
- SoundThinking OUI isolation (not in high or mfr lists)
- BLE device name substring matching (case-insensitive)
- BLE mfr-ID
0x09C8match + rejection of the old incorrect0x05A7 - All 8 Raven 128-bit GATT service UUIDs (case-insensitive)
- Raven firmware version estimation from UUID categories
Super Mario Bros. World 1-2 (underground theme)
- 6 notes: C5 β C4 β A4 β A3 β G#4 β G#3
- Confirms buzzer is working
Two fast ascending beeps (2000 Hz β 2800 Hz)
- First time seeing a camera MAC
- Or camera reappears after 30+ seconds
- This is the only runtime audio alert β the firmware does not emit
any periodic/idle "still tracking" beep. Audio fires exclusively on a
genuine new-detection event (
confidence >= CHIRP_MIN_CONFIDENCE).
Onboard LED flashes on every detection
- Works even without buzzer
- Visible through case light pipe
- Real-time detection visualization
- GPS coordinate tagging (USB puck or browser)
- Export formats: JSON, CSV, KML (Google Earth)
- Multi-device support
- Historical tracking
cd firmware/api
pip install -r requirements.txt
python flockyou.pyOpen http://localhost:5000 and select your serial port.
The lilygo-t-dongle-c5 and lilygo-t-dongle-c5-ble environments target the
LILYGO T-Dongle C5 β a USB-C dongle packing an ESP32-C5 (dual-band WiFi 6 + BT 5),
an ST7735S 80Γ160 colour TFT, and a WS2812B RGB LED.
| State | Display | RGB LED |
|---|---|---|
| Startup | Splash screen "T-Dongle C5 ready" β "Scanningβ¦" | Blue blink Γ 3, then green |
| Idle scanning | Scanning⦠· Channel & detection count |
Dim green |
| Detection (conf < 30) | Detection type (large) Β· MAC tail Β· RSSI Β· Channel Β· Confidence% | Dim green |
| Detection (conf 30β59) | Same, dark-orange background | Amber |
| Detection (conf β₯ 60) | Same, dark-red background | Red |
| Signal | GPIO |
|---|---|
| TFT SCLK | 5 |
| TFT MOSI | 6 |
| TFT CS | 4 |
| TFT DC | 2 |
| TFT RST | 3 |
| TFT Backlight | 1 |
| RGB LED (WS2812B) | 11 |
| BOOT button | 9 |
# WiFi-only (no BLE)
pio run -e lilygo-t-dongle-c5 -t upload
# WiFi + BLE (NimBLE 2.x required for ESP32-C5 BLE support)
pio run -e lilygo-t-dongle-c5-ble -t uploadNote: The T-Dongle C5 environments are marked experimental (
continue-on-errorin CI) because ESP32-C5 toolchain support is still maturing in espressif32@6.7.0.
- Channels: 1, 6, 11 (customizable)
- Dwell time: 350ms per channel
- RSSI threshold: -95 dBm (configurable)
- Range: 50-100m typical, 300m with external antenna
- Latency: <10ms from RF frame to alert
- MCU: ESP32-WROOM-32 (dual-core 240 MHz)
- RAM: 520KB (uses ~85KB)
- Flash: 4MB (uses ~1.2MB)
- Power: ~180mA @ 3.3V (WiFi active)
- Battery: 6-8 hours on 3,000mAh 18650
- SPIFFS: 1MB partition
- Capacity: 200 unique detections with full metadata
- Persistence: CRC32-validated, atomic writes
- Recovery: Survives power loss mid-save
β
85% cheaper ($6 vs $85 for OUI-SPY)
β
Same detection (identical WiFi chipset)
β
More available (ESP32 everywhere, XIAO only Seeed)
β
Easier to prototype (breadboard-friendly)
β
Larger community (ESP32 has huge support)
β
Passive detection (no transmission, legal)
β
Proven accuracy (field-tested research)
β
Open source (modify freely)
β
Portable (pocket-sized with case)
β
Expandable (add GPS, batteries, external antenna)
- Know when you're being surveilled
- Document camera locations
- Share data with DeFlock community
- Raise awareness in your area
- Test detection algorithms
- Map surveillance infrastructure
- Contribute to open research
- Develop counter-measures
- GPS-tagged detection mapping
- Export to Google Earth (KML)
- Build community databases
- Identify high-surveillance zones
- Dashboard mount (case design included)
- USB power from car
- Audio alerts while driving
- Optional battery for portability
| Part | Qty | Unit Price | Total |
|---|---|---|---|
| ESP32 DevKit | 1 | $5-6 | $5-6 |
| KY-006 Passive Buzzer | 1 | $1-2 | $1-2 |
| 400-pt Breadboard | 1 | $2 | $2 |
| Male-Male Jumpers (3) | 1 | <$1 | <$1 |
| USB Micro Cable | 1 | $1 | $1 |
| Subtotal | $9-11 |
| Part | Material | Cost |
|---|---|---|
| Case Base | 15g PLA | $0.30-0.50 |
| Case Lid | 8g PLA | $0.15-0.25 |
| LED Light Pipe | 2g Clear | $0.05 |
| Mounting Bracket | 12g PLA | $0.25 |
| Subtotal | $0.75-1.00 |
Grand Total: $10-12
- Check passive (not active) buzzer
- Verify GPIO 25 connection
- Try swapping buzzer polarity
- Disable in code:
#define USE_BUZZER 0
- No cameras nearby (drive to known locations)
- Check serial output (should show channel hopping)
- Lower RSSI threshold:
#define RSSI_MIN -100 - Verify WiFi promiscuous mode enabled
- Update PlatformIO:
pio upgrade - Check board definition:
esp32dev - Verify partition file exists
- Clean build:
pio run -t clean
- Scale STL by 101% for looser fit
- Sand snap-fit tabs if too tight
- Check component dimensions against specs
- Use OpenSCAD to customize
- πΈ Share your build photos
- π Report bugs & issues
- π‘ Suggest features
- π Improve documentation
- π¨ Design case variants
- π§ͺ Field-test and report accuracy
- πΊοΈ Submit camera locations to DeFlock
This project is licensed CC-BY-SA 4.0:
- β Use commercially
- β Modify and remix
- β Share freely
- π Credit original authors
- π Share-alike license
- colonelpanichacks - Original Flock-You creator
- ΓΡΔΓΆΓΡΡΓΆΠͺΓΆΡΡΰΈ (@NitekryDPaul) - WiFi research, 30 OUIs, addr1 technique
- Michael / DeFlockJoplin - Wildcard-probe signature, 31st OUI
- Will Greenberg - BLE manufacturer ID detection
- DeFlock / FoggedLens - Crowdsourced ALPR data
- GainSec - Raven BLE service UUIDs
- Modified for standard ESP32 (4MB flash, UART)
- Solderless assembly guide
- 3D printable case design
- Business analysis & documentation
- Community testing & feedback
- Passively receives publicly-broadcast WiFi frames
- Does not transmit any signals
- Does not authenticate to networks
- Does not decrypt any data
- Educational/research purposes
- Passive WiFi reception is legal in most jurisdictions
- Equivalent to listening to public radio broadcasts
- No different from WiFi analyzers or network sniffers
- Always comply with local laws
- Respect privacy and property rights
- Use for legitimate security research
- Contribute findings to public good (DeFlock)
- Don't use to enable illegal activity
The authors assume no liability for misuse.
- Original Repo: colonelpanichacks/flock-you
- De-Flock: deflock.me - Crowdsourced camera maps
- Research:
firmware/datasets/- Full methodology
- ESP32: espressif.com
- PlatformIO: platformio.org
- OpenSCAD: openscad.org
- WiFi Sniffing: ESP32 Promiscuous Mode
- 3D Printing: All3DP Guides
- Privacy Tech: EFF Surveillance Self-Defense
- Hardware Cost: $5-12 (vs $85 OUI-SPY)
- Build Time: 5-15 minutes
- Detection Accuracy: Same as premium hardware
- Supported Boards: Any ESP32 with 4MB+ flash
- Community: Growing!
You're 3 steps away from detecting surveillance:
- Buy hardware β $5-11
- Flash firmware β 10 minutes
- Build case β Optional
Questions? Check the docs or open an issue!
Ready? Start Building β
Built with love for privacy, security, and open knowledge.
Detect. Document. DeFlock.