需要先装好 ESP-IDF 工具链,否则 idf.py 无法运行;不同角色要换用对应的 sdkconfig.detector、sdkconfig.gateway 或 sdkconfig.wired_detector;烧录时需把 -p PORT 换成实际串口;无线方案还需另配一个网关板才能把告警送到 MQTT。
batear
batear-ioMIT活跃维护用麦克风做声学无人机探测的低成本离网方案,基于 ESP32 等边缘设备本地识别,可接入 Home Assistant 守护空域。
● batear — Ultra-low-cost, off-grid acoustic drone detector. Edge computing. Protect your airspace with a microphone.
git clone https://github.com/batear-io/batear.git && cd batear
idf.py -B build_detector -DSDKCONFIG=build_detector/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.detector" set-target esp32s3
idf.py -B build_detector -DSDKCONFIG=build_detector/sdkconfig build运行在 ESP32-S3 开发板上:无线方案用 Heltec WiFi LoRa 32 V3/V4,有线方案用 LILYGO T-ETH-Lite S3;麦克风为 ICS-43434,无线版另需 SX1262 LoRa 模块。README 未提及显存或 GPU 要求。
用 ESP32-S3 加麦克风做声学无人机探测,边缘运行、无需联网和订阅
用麦克风做声学无人机探测的低成本离网方案,基于 ESP32 等边缘设备本地识别,可接入 Home Assistant 守护空域。
核心能力
- 用 FFT 谐波检测识别无人机旋翼声
- 同一套代码可编译为探测器、网关或有线探测器
- LoRa 链路用 AES-128-GCM 加密传 36 字节告警包
- 网关经 MQTT 自动发现接入 Home Assistant
- 有线版走 Ethernet/PoE 直连 MQTT,无需网关
容易踩的坑
- v2.2.0最新正式版2026-05-01 · 2026-05-01 15:47 UTC
Merge pull request #47 from batear-io/feature/wired-tf-recording
TF card audio recording on Wired Detector (closes #46)
What's Changed
- TF card audio recording on Wired Detector (closes #46) by @TN666 in https://github.com/batear-io/batear/pull/47
Full Changelog: https://github.com/batear-io/batear/compare/v2.1.0...v2.2.0
- v2.1.02026-04-30 · 2026-04-30 15:04 UTC
查看更新说明
Merge pull request #45 from batear-io/feature/wired-no-net-key
Drop AES network key from Wired Detector role
What's Changed
- Add wired Ethernet detector (LILYGO T-ETH-Lite S3) with PoE/MQTT support by @TN666 in https://github.com/batear-io/batear/pull/39
- Drop AES network key from Wired Detector role by @TN666 in https://github.com/batear-io/batear/pull/45
Full Changelog: https://github.com/batear-io/batear/compare/v2.0.0...v2.1.0
- v2.0.02026-04-18 · 2026-04-18 14:49 UTC
查看更新说明
Merge pull request #44 from batear-io/feat/lora-telemetry
Add LoRa battery telemetry and per-detector MQTT Discovery
What's Changed
- Fix task stalls: I2S tight loop + LoRa radio auto-recovery by @TN666 in https://github.com/batear-io/batear/pull/43
- Add LoRa battery telemetry and per-detector MQTT Discovery by @TN666 in https://github.com/batear-io/batear/pull/44
Full Changelog: https://github.com/batear-io/batear/compare/v1.3.2...v2.0.0
- v1.3.22026-04-16 · 2026-04-16 14:13 UTC
查看更新说明
Fix swapped core assignments in architecture doc
Detector task table had AudioTask on Core 0 and LoRaTask on Core 1; actual pinning in main.cpp is the reverse.
Made-with: Cursor
What's Changed
- Feature/serial config console by @TN666 in https://github.com/batear-io/batear/pull/34
- Integrate size report into build CI with release comparison by @TN666 in https://github.com/batear-io/batear/pull/36
- Fix badge links in README.md by @TN666 in https://github.com/batear-io/batear/pull/37
- Remove firmware size badge from index.md by @TN666 in https://github.com/batear-io/batear/pull/38
- Add support and sponsorship information by @TN666 in https://github.com/batear-io/batear/pull/40
- Enhance README with Quick Start and documentation by @TN666 in https://github.com/batear-io/batear/pull/41
- Revise README with updated details and support info by @TN666 in https://github.com/batear-io/batear/pull/42
Full Changelog: https://github.com/batear-io/batear/compare/v1.3.1...v1.3.2
- v1.3.12026-04-06 · 2026-04-06 15:40 UTC
查看更新说明
What's New
- Serial config console — interactive
show/set/rebootcommands over UART for runtime NVS provisioning (device ID, network key, LoRa freq, sync word, WiFi, MQTT)
Full Changelog: https://github.com/batear-io/batear/compare/v1.3.0...v1.3.1
- Serial config console — interactive
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🛡️ Support the Mission (501(c)(3) Tax Deductible)
Batear is officially fiscally hosted by the Open Source Collective (OSC). Your contribution directly supports the deployment of civil defense technology where it is needed most.
- 🇺🇦 Field Testing in Ukraine: We are partnering with local experts to verify Batear in active EW (Electronic Warfare) environments.
- 🔬 Hardware R&D: Funding allows us to procure high-precision sensors (ICS-43434) and PoE-capable hardware for professional-grade reliability.
- 🏢 Corporate Matching: Since we are a 501(c)(3) non-profit project, check if your employer matches your donation!
- 💎 100% Transparent: View every single receipt and transaction on our Public Ledger.
💖 Become a Sponsor on Open Collective
Drones are an increasing threat to homes, farms, and communities — and effective detection has traditionally required expensive radar or camera systems. Batear changes that.
For ultra-low-cost hardware, Batear turns a tiny ESP32-S3 microcontroller and a MEMS microphone into an always-on acoustic drone detector. It runs entirely at the edge — no cloud subscription, no internet connection, no ongoing cost. Deploy one at a window, a fence line, or a rooftop and it will alert you the moment drone rotor harmonics are detected nearby.
The same codebase builds as a Detector (mic + LoRa TX), a Gateway (LoRa RX + OLED + LED + MQTT), or a Wired Detector (mic + Ethernet/PoE + MQTT), selectable at build time. The gateway forwards alerts to Home Assistant via MQTT with automatic device discovery; the wired detector publishes directly over Ethernet — no LoRa or gateway required, ideal for permanent installations.
🌐 Web Flasher — Zero Install
Flash firmware directly from your browser — no toolchain needed:
Requires Chrome or Edge on desktop. Connect a Heltec V3/V4 (Detector or Gateway) or a LILYGO T-ETH-Lite S3 (Wired Detector) via USB-C and click Install.
🏠 Smart Home Integration (Home Assistant)
Stop checking serial monitors. Batear brings drone detection directly to your dashboard.
Features:
- Plug & Play: Auto-Discovery via MQTT.
- Rich Diagnostics: Monitor signal strength (RSSI/SNR) in real-time.
- Automations Ready: Trigger your smart lights, alarms, or notifications when a drone is detected.
- Historical Logs: Analyze drone activity patterns in your area.
"Batear bridges the gap between complex signal processing and simple home automation."
📖 Documentation
Full documentation is available at batear.io.
| Getting Started | Prerequisites and supported boards |
| Hardware | Parts list, wiring diagrams, pin map |
| Build & Flash | Compile and flash the firmware |
| Configuration | Encryption keys, frequencies, MQTT, device IDs |
| How It Works | FFT harmonic detection algorithm |
| Calibration | Tuning detection thresholds |
| Adding a Board | Porting to new hardware |
🏗️ System Architecture
Batear supports two deployment models — pick whichever fits the site:
Wireless (LoRa Detector → Gateway → MQTT)
┌──────────────────────┐ LoRa 915 MHz ┌──────────────────────┐
│ DETECTOR (×N) │ ───────────────────────────► │ GATEWAY (×1) │
│ │ AES-128-GCM encrypted │ │
│ ICS-43434 mic │ 36-byte packets │ SSD1306 OLED display│
│ FFT harmonic detect │ │ LED alarm indicator │
│ SX1262 LoRa TX │ │ SX1262 LoRa RX │
└──────────────────────┘ │ WiFi + MQTT TX │
Heltec WiFi LoRa 32 V3/V4 └──────────┬───────────┘
Heltec WiFi LoRa 32 V3/V4
│ MQTT
▼
┌──────────────────────┐
│ HOME ASSISTANT │
│ (auto-discovery) │
└──────────────────────┘
Wired (Ethernet/PoE Detector → MQTT, no gateway)
┌──────────────────────┐
│ WIRED DETECTOR (×N) │ Ethernet (PoE)
│ │ ───────────────────────────► ┌──────────────────────┐
│ ICS-43434 mic │ MQTT / JSON │ HOME ASSISTANT │
│ FFT harmonic detect │ + REST API / OTA │ (auto-discovery) │
│ W5500 Ethernet │ └──────────────────────┘
└──────────────────────┘
LILYGO T-ETH-Lite S3
⚡ Quick Start (Build from Source)
# Clone
git clone https://github.com/batear-io/batear.git && cd batear
# Build detector (swap sdkconfig.detector → sdkconfig.gateway or
# sdkconfig.wired_detector for the other roles)
idf.py -B build_detector \
-DSDKCONFIG=build_detector/sdkconfig \
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.detector" \
set-target esp32s3
idf.py -B build_detector -DSDKCONFIG=build_detector/sdkconfig build
# Flash (replace PORT)
idf.py -B build_detector -DSDKCONFIG=build_detector/sdkconfig -p PORT flash monitor
See the full build guide for gateway and wired-detector setup and detailed instructions.