batear

batear-ioMIT活跃维护

用麦克风做声学无人机探测的低成本离网方案,基于 ESP32 等边缘设备本地识别,可接入 Home Assistant 守护空域。

● batear — Ultra-low-cost, off-grid acoustic drone detector. Edge computing. Protect your airspace with a microphone.

v2.2.0发布于 2026-05-01 15:47 UTC435star63fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
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
硬件要求按 README 说明

运行在 ESP32-S3 开发板上:无线方案用 Heltec WiFi LoRa 32 V3/V4,有线方案用 LILYGO T-ETH-Lite S3;麦克风为 ICS-43434,无线版另需 SX1262 LoRa 模块。README 未提及显存或 GPU 要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 ESP32-S3 加麦克风做声学无人机探测,边缘运行、无需联网和订阅

用麦克风做声学无人机探测的低成本离网方案,基于 ESP32 等边缘设备本地识别,可接入 Home Assistant 守护空域。

核心能力

  • 用 FFT 谐波检测识别无人机旋翼声
  • 同一套代码可编译为探测器、网关或有线探测器
  • LoRa 链路用 AES-128-GCM 加密传 36 字节告警包
  • 网关经 MQTT 自动发现接入 Home Assistant
  • 有线版走 Ethernet/PoE 直连 MQTT,无需网关

容易踩的坑

需要先装好 ESP-IDF 工具链,否则 idf.py 无法运行;不同角色要换用对应的 sdkconfig.detector、sdkconfig.gateway 或 sdkconfig.wired_detector;烧录时需把 -p PORT 换成实际串口;无线方案还需另配一个网关板才能把告警送到 MQTT。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.2.0
  1. 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

    Full Changelog: https://github.com/batear-io/batear/compare/v2.1.0...v2.2.0

  2. 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

    Full Changelog: https://github.com/batear-io/batear/compare/v2.0.0...v2.1.0

  3. 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

    Full Changelog: https://github.com/batear-io/batear/compare/v1.3.2...v2.0.0

  4. 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

    Full Changelog: https://github.com/batear-io/batear/compare/v1.3.1...v1.3.2

  5. v1.3.12026-04-06 · 2026-04-06 15:40 UTC
    查看更新说明

    What's New

    • Serial config console — interactive show / set / reboot commands 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

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    🛡️ 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:

    Open Web Flasher

    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 StartedPrerequisites and supported boards
    HardwareParts list, wiring diagrams, pin map
    Build & FlashCompile and flash the firmware
    ConfigurationEncryption keys, frequencies, MQTT, device IDs
    How It WorksFFT harmonic detection algorithm
    CalibrationTuning detection thresholds
    Adding a BoardPorting 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.


    👤 Maintainers