Robotics

How to Build Custom Software for DJI Drones

Which DJI SDK to use, how a project runs and when an open drone stack fits better.

4 min read

Drone in flight against a cloudy sky
Photo: Ian Usher on Unsplash

In short

  • DJI offers several SDKs. Pick by where your code runs: on a phone or remote controller (Mobile SDK), on a payload mounted on the drone (Payload SDK), or in your own cloud (Cloud API, Edge SDK for docks).
  • Every project starts with a DJI developer account and an app key, then the official sample code on GitHub.
  • Check aircraft support first. Each SDK supports a different list of drones, and that list decides what you can build.
  • If you need full control of the flight stack or your own airframe, an open stack such as PX4 may fit better.

DJI SDK development lets companies build their own apps, payloads and cloud platforms on top of DJI drones, instead of using only DJI’s own software. It is how inspection firms automate flights, how sensor makers bring their devices into the air and how operators plug drone fleets into their own systems. This guide explains which DJI SDK to use, how a project runs and where the limits are.

Which DJI SDK do you need?

SDKWhere your code runsUse it for
Mobile SDK (MSDK)Android app on a phone or smart controllerCustom flight apps: inspection routines, mapping missions, live data
UX SDKOn top of the Mobile SDKReady-made interface widgets to build the app faster
Payload SDK (PSDK)On a device mounted on the droneCustom sensors and payloads, onboard processing
Cloud APIYour serversConnecting drones and docks to your own cloud platform
Edge SDKEdge computer next to a DJI DockProcessing data from docked drones locally

DJI’s developer site lists all of these, with recent releases of the Mobile SDK, Payload SDK and Edge SDK; the Windows SDK has not had a release since 2019 (DJI Developer). The current Mobile SDK v5 downloads are for Android, while the older v4 also covered iOS (DJI).

How a DJI SDK project runs

  1. Define the mission. What should the drone do, where, how often, and what data must come back?
  2. Check aircraft and firmware support. Confirm the exact drone, controller and payload models your customer will use are supported by the SDK version you choose.
  3. Register and get an app key. DJI’s process is to sign up as a developer, buy a supported drone, generate an app key and run the sample app (DJI SDK guide).
  4. Start from the official samples. DJI publishes sample code for the Mobile SDK, Payload SDK and Cloud API on GitHub (GitHub).
  5. Build in small field-tested steps. Simulators help, but GPS, wind, interference and battery behaviour only show up outdoors.
  6. Plan the data path. Where photos, video and telemetry go, who can see them, and how long they are kept.

What teams build with DJI SDKs

  • Inspection apps that fly repeatable routes around towers, roofs or wind turbines and tag every photo.
  • Custom payloads such as gas sensors or special cameras. DJI says more than 110 payloads built on the Payload SDK have reached mass production (DJI).
  • Fleet and dock platforms. Since the Cloud API launched in March 2022, DJI reports that over 750 developers have built cloud platforms on it (DJI).
  • AI at the edge: detecting defects, counting objects or reading labels during the flight.

Limits to plan for

  • Platform dependency. You build on a closed platform. New aircraft support, API changes and deprecations follow DJI’s schedule.
  • Uneven feature support. The same function may be available on one model and missing on another.
  • Customer rules. Some organisations, especially public bodies and critical infrastructure operators, set rules on which drone makers and data flows they accept. Ask early.
  • Aviation and privacy rules. Flights follow EU drone rules (EASA), and images of people or property can be personal data under GDPR.

When an open stack fits better

If you build your own airframe, need to change flight behaviour itself or want no single-vendor dependency, look at the open Dronecode stack: the PX4 autopilot, MAVLink, QGroundControl and MAVSDK, used by over a million drones (Linux Foundation). The trade-off is more engineering on your side.

Checklist before you start

  • Exact aircraft, controller and payload models agreed with the customer.
  • SDK chosen and its support list checked for every model.
  • Where data is processed and stored, and who owns it.
  • A field test plan, with a pilot and a safe test site.
  • A plan for SDK and firmware updates after launch.

From our work

For D-ARIA we engineered the software of an autonomous indoor drone that takes warehouse inventory with more than 99% accuracy (case study). As a robotics software development partner, we build ROS 2 autonomy, SLAM, sensor fusion and computer vision for robots and drones.

Technologies you will meet

AreaTypical tools
Mobile appsDJI Mobile SDK, Kotlin, Java, Android, iOS with Swift
Onboard computingDJI Payload SDK, Edge SDK, C and C++ on Linux or an RTOS
Open alternativesPX4, ArduPilot, MAVLink, MAVSDK
CloudDJI Cloud API, MQTT, WebRTC video, PostgreSQL with PostGIS

For drones that fly indoors, read indoor drones for warehouse inventory.

Looking for a team? See our list of drone software development companies in Europe, read our warehouse drone case study, or explore our robotics software development work.

Frequently asked questions

Which DJI SDK should I use for a custom app?

For an app on a phone or smart controller that controls the drone, use the Mobile SDK, optionally with the UX SDK. For a device mounted on the drone use the Payload SDK, and for connecting drones and docks to your own servers use the Cloud API.

Does the DJI Mobile SDK support iOS?

The current Mobile SDK v5 is published for Android. The older v4 also supported iOS but covers older aircraft, so check the support list for the drones you need.

How do I start developing with a DJI SDK?

Register as a DJI developer, get a supported drone, create an app key, then run DJI official sample code from GitHub before building your own features.

When should I use PX4 instead of DJI?

When you build your own aircraft, need to change flight behaviour itself or want to avoid depending on one vendor. PX4 is open source, but you take on more engineering and certification work.

Working on something like this?

Tell us where the product is stuck. We answer with a concrete next step.

Send a few lines about the product, the deadline and the team you have today. A senior engineer replies within two working days.