DragonSDR DJI DroneID Receiver
May 25, 2026 · View on GitHub
Detects DJI drones using the DragonSDR SDR (shipped with the WarDragon kit) and publishes DroneID data over ZMQ for integration with droneid-go, DragonSync, and TAK/CoT systems.
Supports both legacy and new firmware modes, including O4 encrypted drone detection (DJI Mini 5, etc.) when paired with DragonScope.
Supported Drones
| Protocol | Examples | Data Available |
|---|---|---|
| O2/O3 (unencrypted) | Mini 2, Mini 3 Pro, Air 2S, Mavic 3 | Serial, model, drone/pilot/home GPS, altitude, speed, RSSI |
| O4 (encrypted) | Mini 5, future models | Hash ID, frequency, RSSI |
| O4 + DragonScope | Mini 5, future models | Serial, drone/pilot/home GPS, altitude, speed, RSSI (requires DragonScope) |
WarDragon Kit Defaults
The DragonSDR ships pre-configured for the WarDragon kit. No serial-console setup is required — first boot writes the environment, and detections stream to the WarDragon over UDP.
| Device | IP Address |
|---|---|
| DragonSDR | 172.31.100.2 |
| WarDragon (host) | 172.31.100.1 |
| Variable | Value | Purpose |
|---|---|---|
ipaddr_eth | 172.31.100.2 | DragonSDR IP |
udp_dest_ip | 172.31.100.1 | WarDragon IP for telemetry |
udp_dest_port | 52002 | UDP port (matches dji_receiver.py) |
gain_mode | fast_attack | AD9361 AGC mode |
heart_beate_time | 30 | Heartbeat interval |
api_host | 172.31.100.1 | DragonScope proxy host (WarDragon) |
request_time | 1 | O4 telemetry refresh (seconds) |
device_mode | auto | Frequency mode (5.8 GHz hop) |
SSH access (after first boot): ssh root@172.31.100.2, password 1.
To verify or override defaults, see Changing DragonSDR Settings below.
Quick Start
1. Clone and run on the WarDragon
cd /home/dragon/WarDragon
git clone https://github.com/alphafox02/dragonsdr_dji_droneid.git
cd dragonsdr_dji_droneid
python3 dji_receiver.py -d
This listens on TCP and UDP port 52002 and publishes drone data on ZMQ port 4221.
2. Install as a systemd service (recommended)
sudo cp dji-receiver.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable dji-receiver
sudo systemctl start dji-receiver
Check status and logs:
sudo systemctl status dji-receiver
journalctl -u dji-receiver -f
Command-Line Options
-d, --debug Enable debug output
--mode MODE legacy, new, or dual (default: new)
--dragonsdr-ip IP SDR IP for legacy mode (default: 172.31.100.2)
--dragonsdr-port PORT SDR port for legacy mode (default: 41030)
--listen-port PORT TCP listen port for new firmware (default: 52002)
--udp-port PORT UDP listen port (default: 52002, set 0 to disable)
Environment variables (override defaults):
DRAGONSDR_IP— SDR IP for legacy modeDRAGONSDR_PORT— SDR port for legacy modeDRAGONSDR_LISTEN_PORT— TCP listen port for new firmwareDRAGONSDR_UDP_LISTEN_PORT— UDP listen port
Ports used
| Port | Protocol | Direction | Purpose |
|---|---|---|---|
| 41030 | TCP | inbound (legacy) | Connect to legacy firmware |
| 52002 | TCP | inbound (new) | Accept new-firmware connections |
| 52002 | UDP | inbound | Receive forwarded frames (DragonScope firmware) |
| 4221 | ZMQ TCP | outbound (XPUB) | Publish parsed drone data to subscribers |
| 4225 | ZMQ TCP | inbound (SUB) | Subscribe to WarDragon monitor for sensor GPS |
TCP and UDP can share port 52002 — the kernel keeps protocols separate.
Integration
Pipeline
DragonSDR → dji_receiver.py (:4221 ZMQ) → droneid-go (:4224 ZMQ) → DragonSync → CoT/TAK/MQTT
- dji_receiver.py — Receives raw data from the DragonSDR, publishes JSON on ZMQ port 4221
- droneid-go — Subscribes on port 4221, publishes decoded results on port 4224:
./droneid -dji 127.0.0.1:4221 -z -v - DragonSync — Converts to CoT for TAK servers, MQTT, etc.
O4 Encrypted Drones
O4 drones (Mini 5, etc.) broadcast encrypted DroneID. The receiver alone can detect them and provide:
- Hash ID — unique per session (e.g.,
drone-alert-9dc89f97) - Frequency — detection frequency with hopping pattern
- RSSI — signal strength for proximity estimation
Position data is not available from the receiver alone for O4 drones — you need DragonScope for that.
Important: DJI drones only broadcast DroneID when motors are spinning. Power-on alone only activates the OcuSync control link.
DragonScope (O4 Position Data)
DragonScope provides full O4 telemetry — serial number, drone GPS, pilot position, home point, altitude, and speed. When configured, O4 drones appear in dji_receiver with the same data as O2/O3.
Requirements:
- A DragonSDR with O4-capable firmware (shipped with the kit)
- A DragonScope license key and config file (provided separately)
- An internet connection on the WarDragon
O2/O3 drones are unaffected and continue to work fully offline. DragonScope runs as a service on your WarDragon and starts automatically. Without a license key configured, it runs in detection-only mode — O4 drones still appear as drone-alert-{hash} but without position data. Once a key is added, full telemetry activates within 30 seconds with no restart needed.
To obtain a DragonScope license key, contact us.
Setup
If you already have this repo cloned on your WarDragon:
cd /home/dragon/WarDragon/dragonsdr_dji_droneid
git pull
Place your dragonscope.cfg (provided separately with your license key) in the same directory:
cp /path/to/dragonscope.cfg /home/dragon/WarDragon/dragonsdr_dji_droneid/
Install both services:
sudo cp dji-receiver.service dragonscope.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl restart dji-receiver
sudo systemctl enable dragonscope
sudo systemctl start dragonscope
Verify DragonScope is running:
curl http://localhost/health
# {"status": "ok", "licensed": true}
Ensure api_host on the DragonSDR points to the WarDragon IP (see WarDragon Kit Defaults). No --proxy flag is needed in dji_receiver.
Files
| File | Description |
|---|---|
dragonscope.py | O4 telemetry proxy (runs on WarDragon, listens on port 80) |
dragonscope.cfg | Configuration (endpoint URL + license key, provided separately) |
dragonscope.service | systemd unit file |
Changing DragonSDR Settings
To verify the current environment, SSH in and run:
fw_printenv ipaddr_eth tcp_serverip tcp_serverport udp_dest_ip udp_dest_port \
gain_mode heart_beate_time api_host request_time \
auth_secret token_secret device_serial device_mode
To override any of these:
fw_setenv udp_dest_ip 192.168.1.50
fw_setenv ipaddr_eth 192.168.1.10
reboot
First-boot init only runs once per device (marked by /mnt/jffs2/.dragonscope_initialized_v2), so manual customization persists across reboots.
Changing the DragonSDR IP Address
- Power off the DragonSDR.
- Flip the boot switch to QSPI mode.
- Power on and SSH into the current IP.
- Set a new IP:
fw_setenv ipaddr_eth NEW_IP_ADDRESS - Power off, flip back to SD mode, and power on.
When changing the DragonSDR IP, also update your host interface static IP, and the --dragonsdr-ip flag or DRAGONSDR_IP env var.
Requirements
- Python 3.7+
pyzmq
Disclaimer
The use of this firmware and software may be subject to regulations in your region. Ensure compliance with local laws regarding wireless communication and drone detection.