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

ProtocolExamplesData Available
O2/O3 (unencrypted)Mini 2, Mini 3 Pro, Air 2S, Mavic 3Serial, model, drone/pilot/home GPS, altitude, speed, RSSI
O4 (encrypted)Mini 5, future modelsHash ID, frequency, RSSI
O4 + DragonScopeMini 5, future modelsSerial, 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.

DeviceIP Address
DragonSDR172.31.100.2
WarDragon (host)172.31.100.1
VariableValuePurpose
ipaddr_eth172.31.100.2DragonSDR IP
udp_dest_ip172.31.100.1WarDragon IP for telemetry
udp_dest_port52002UDP port (matches dji_receiver.py)
gain_modefast_attackAD9361 AGC mode
heart_beate_time30Heartbeat interval
api_host172.31.100.1DragonScope proxy host (WarDragon)
request_time1O4 telemetry refresh (seconds)
device_modeautoFrequency 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.

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 mode
  • DRAGONSDR_PORT — SDR port for legacy mode
  • DRAGONSDR_LISTEN_PORT — TCP listen port for new firmware
  • DRAGONSDR_UDP_LISTEN_PORT — UDP listen port

Ports used

PortProtocolDirectionPurpose
41030TCPinbound (legacy)Connect to legacy firmware
52002TCPinbound (new)Accept new-firmware connections
52002UDPinboundReceive forwarded frames (DragonScope firmware)
4221ZMQ TCPoutbound (XPUB)Publish parsed drone data to subscribers
4225ZMQ TCPinbound (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
  1. dji_receiver.py — Receives raw data from the DragonSDR, publishes JSON on ZMQ port 4221
  2. droneid-go — Subscribes on port 4221, publishes decoded results on port 4224:
    ./droneid -dji 127.0.0.1:4221 -z -v
    
  3. 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

FileDescription
dragonscope.pyO4 telemetry proxy (runs on WarDragon, listens on port 80)
dragonscope.cfgConfiguration (endpoint URL + license key, provided separately)
dragonscope.servicesystemd 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

  1. Power off the DragonSDR.
  2. Flip the boot switch to QSPI mode.
  3. Power on and SSH into the current IP.
  4. Set a new IP:
    fw_setenv ipaddr_eth NEW_IP_ADDRESS
    
  5. 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.