M5Stack FIRE variant with built-in speaker and SD card audio. Passively detects surveillance devices using WiFi promiscuous mode and Bluetooth Low Energy scanning.
- WiFi Scanning: Promiscuous mode detection of probe requests and beacons
- Bluetooth Low Energy: Active scanning for device names, MAC addresses, and service UUIDs
- Pattern Matching: Identifies devices based on SSID patterns, MAC prefixes, device names, and service UUIDs
- Audio Alerts: Built-in M5Stack FIRE speaker playback with volume control
- JSON Telemetry: Structured event reporting via serial output
- Event-Driven Architecture: Modular design for easy extension
- M5Stack FIRE IoT Development Kit (PSRAM) V2.7
- USB Cable for programming and power
For Arduino IDE installation and ESP32 board support, see Getting Started.
Install via Arduino IDE Library Manager:
- M5Unified by M5Stack
The project requires three WAV audio files on the SD card (root directory):
/startup.wav-- Plays on boot/ready.wav-- Plays when system is ready/alert.wav-- Plays on threat detection
Audio File Requirements:
- Format: 16-bit PCM WAV
- Sample Rate: 16000 Hz
- Channels: Mono (1 channel)
- Header: Standard 44-byte WAV header
Setup:
- Format the SD card as FAT32
- Copy the WAV files to the root of the SD card
- Insert the SD card into the M5Stack FIRE before powering on
- Select board: Tools > Board > M5Stack Fire
- PSRAM: Enabled
- Upload speed: 115200
- CPU frequency: 240MHz (WiFi/BT)
- Partition scheme: Default 4MB with spiffs or Huge APP (3MB No OTA/1MB SPIFFS)
- Connect via USB
- Select port: Tools > Port
- Click Upload
Open at 115200 baud. See Telemetry Format for the JSON schema.
- Power on the M5Stack FIRE
- The system will:
- Initialize filesystem and audio
- Play startup sound
- Initialize WiFi sniffer and BLE scanner
- Play ready sound
- Begin scanning for targets
- Startup: Plays when system boots (display shows "Startup")
- Ready: Plays when scanning begins (display shows "ready", then "scanning...")
- Alert: Plays when a threat is detected
Default volume is 40% (0.4). To adjust, edit src/SoundEngine.h:
static constexpr float DEFAULT_VOLUME = 0.4f; // 0.0 to 1.0- Check SD card: Ensure audio files are on the SD card root and the card is inserted
- Check volume: Try increasing
DEFAULT_VOLUMEinSoundEngine.h - Check serial output: Look for audio file open errors
- Check format: Use FAT32
- Check insertion: Power off, insert card, then power on
- Try a smaller card: 32GB or less is usually more reliable
flocksquawk_m5fire/
├── flocksquawk_m5fire.ino # Main orchestrator
├── README.md
├── src/
│ ├── RadioScanner.h # Variant-specific RF scanning
│ └── SoundEngine.h # M5Stack speaker audio
└── data/
├── startup.wav
├── ready.wav
└── alert.wav
Shared headers (EventBus.h, ThreatAnalyzer.h, Detectors.h, etc.) are in common/.
- Configuration -- WiFi/BLE tuning, detection patterns, volume
- Architecture -- pipeline, detectors, thread safety
- Extending -- adding detectors, patterns, new variants
- Build System -- Makefile and Docker builds
- Troubleshooting -- common issues
- Inspired by flock-you
- ESP32 community for excellent hardware support
- NimBLE-Arduino for efficient BLE scanning
- ArduinoJson for flexible JSON handling