Exploring DJI Mobile SDK Framework: A Beginner’s Guide (Part 2)

silakironji
5 min readMar 17, 2024

--

Welcome back to the beginner’s guide on How to Program a drone(DJI) Part 2

In Part 1, we got to appreciate the benefits and concepts of programming DJI drones and highlighted the importance of DJI’s Developer SDKs. Now, let’s take a closer look at the DJI Mobile SDK structure.

Understanding the DJI Mobile SDK

DJI Mobile SDK is a powerful tool for developing mobile applications that interact with DJI drones.

The SDK (Software Development Kit) simplifies the application development process by taking care of lower-level functionality such as flight stabilization, battery management, signal transmission, and communication. This way, you do not require a background in robotics or embedded systems and can instead focus on the application the DJI product is being integrated into.

The following diagram illustrates how the DJI Mobile SDK fits into a mobile application

Think of the DJI Mobile SDK as a toolbox filled with everything you need to build your own unique experience of a DJI drone.

Supported Platforms and Products

The DJI Mobile SDK works with iOS (9.0+) and Android (Android 5.0 +) devices. Developers use Android Studio for Android apps and Xcode for iOS apps.

Android Studio and Xcode

Versions

We have two main supported versions of DJI MSDK; Version 4 and Version 5.

The V4 supports Android 5.0 + and iOS 9.0+ platforms and the following DJI products;
Spark Series, Mavic series, Phantom Series, Inspire and Matrice series

DJI MSDK V4 supported platforms
DJI MSDK V4 Supported products

The V5 only DJI Smart controller Android 5.0 and external android device connected with the DJI smart controllers Android 5.0 +. The supported products areI products;
Matrice 300RTK,Matrice 350 RTK,Matrice 30 series, DJI Mavic 3 enterprise series, DJI Mavic 3M, DJI Mini 3 and mini 3 pro.

DJI MSDK V5 supported platforms

MSDK V5 Supported products

DJI MSDK V5 Supported products

Key components of DJIMSK framework

Understanding the framework’s components and how they interact is crucial.

The main components of the DJI Mobile SDK framework include:

A mobile application accesses the DJI Mobile SDK through several main classes illustrated above

SDKManager: This is like the control center of the DJI Mobile SDK toolkit. It handles the initialization and deinitialization of the SDK, as well as the registration of the SDK with DJI hardware products. Think of it as the starting point for integrating the SDK into your application.

KeyTools / KeyManager: These components are essential for configuring and accessing various parameters and functionalities of the DJI hardware products. KeyTools is used to create keys, while KeyManager is used to interact with or monitor these keys. For example, you can use keys to control the gimbal rotation or trigger the camera to take photos and videos.

MediaDataCenter: This component is responsible for handling application data, including stream data and multimedia files. It provides access to the original stream data and manages multimedia files captured by the drone’s camera. You can use MediaDataCenter to retrieve and manage media content captured during flight.

WaypointMissionManager: If you want to automate the flight of your drone based on predefined waypoints, this is the component you’ll use. The WaypointMissionManager allows you to create and execute waypoint missions, guiding the drone along a predefined path while performing specified actions at each waypoint.

VirtualStickManager: This component enables virtual stick control of the drone, allowing you to control its flight in real-time by sending action commands. It’s like piloting the drone using virtual joysticks on your mobile device, providing a hands-on approach to controlling the drone’s movements.

FlightLogManager: This allow you to keep track of your drone’s flight history and performance. The FlightLogManager allows you to access and manage flight logs stored on your mobile device. You can retrieve valuable data about past flights, including flight paths, altitude, and battery usage.

DeviceHealthManager: This component provides real-time monitoring of the health status of your drone. It helps you stay informed about the condition of the device, including battery status, temperature, and other vital parameters, ensuring a safe and smooth flying experience.

Remember we are programming a drone to capture specific types of data and automate tasks.

Smart missions can easily achieve automated flight. Among the missions, the waypoint mission (WaypointMission) defined based on waypoints and waypoint actions can make the drone fly automatically along the defined waypoints and waypoint actions, and use the WaypointMissionManager to control the execution process of the waypoint mission.

As we wrap up, you should now have a better understanding of DJI MSDK purpose, supported platforms, and key components. In the next part of this series (Part 3), we’ll dive into a hands-on process of setting up the DJI Mobile SDK with Android Studio.

You’ll learn how to configure your development environment and create a sample application registered by DJI.

--

--