Minimal WiFi-based Drone Remote ID Scanner This project is a minimal scanner for WiFi-based Drone Remote ID, supporting both OpenDroneID and French Remote ID formats. It runs on ESP32 (tested with Mesh-Detect boards like the Xiao ESP32-C3) and sends parsed messages over a custom UART to a serial mesh network.
- WiFi Monitoring: Listens to WiFi management frames in promiscuous mode.
- Protocol Support: Decodes both OpenDroneID and French Remote ID packets.
- Mesh Integration: Sends compact, formatted messages via custom UART (TX: GPIO6, RX: GPIO7) to a mesh network.
- Efficient & Lightweight: Minimal scanning and parsing for real-time UAV data.
- Heartbeat Logging: Prints periodic heartbeat messages to USB serail to ensure the device is active.
-
Initialization:
- Configures USB Serial (115200 baud) and a custom UART for mesh communication.
- Initializes the ESP32's WiFi in promiscuous mode to capture management frames.
- Sets up system events and optimizes the CPU frequency (set to 160 MHz).
-
Packet Capture & Parsing:
- Packet Handling: The callback intercepts WiFi management frames.
- Identification: Checks for specific MAC addresses or payload signatures to determine if a packet is for OpenDroneID or French Remote ID.
- Data Extraction:
- OpenDroneID: Uses functions (e.g.,
odid_wifi_receive_message_pack_nan_action_frame
) to decode UAV details such as MAC address, RSSI, location, altitude, speed, and heading. - French ID: Custom parsing logic extracts operator ID, UAV ID, GPS coordinates, altitude, and other flight parameters.
- OpenDroneID: Uses functions (e.g.,
-
Message Formatting & Transmission:
- Constructs a compact message that includes:
- UAV MAC Address & RSSI
- Location Data: Latitude and longitude (if available)
- Flight Data: Speed, altitude, and heading (if applicable)
- Transmits the message over the custom UART to integrate with your Meshtastic network.
- Debug information is printed over USB serial for local monitoring.
- Constructs a compact message that includes:
-
Heartbeat Mechanism:
- Every 60 seconds, a heartbeat message ("Heartbeat: Device is active and running.") is printed via USB Serial to confirm that the scanner is operational.
- ESP32 Development Board: Xiao ESP32-C3
- Custom UART Wiring:
- TX: GPIO6
- RX: GPIO7
- WiFi Module: Utilizes the built-in WiFi capabilities of the ESP32 to scan for drone Remote ID signals.
- Arduino Framework: The project is built using the Arduino IDE with ESP32 support.
- Libraries:
Arduino.h
HardwareSerial.h
- ESP32-specific WiFi libraries (
esp_wifi.h
, etc.) - Custom drone ID libraries:
opendroneid.h
andodid_wifi.h
-
Clone the Repository:
git clone https://github.com/yourusername/drone-remote-id-scanner.git cd drone-remote-id-scanner Build and Flash in Platform.io via VSCode or run or use esptool https://github.com/espressif/esptool to flash binary.
Thanks to Cemaxacutor and Luke Switzer for the underlying code!