Source Code Deployment Steps

No Rating

Register as a DJI Developer

Register for a DJI Developer account hereopen in new window.

During the registration process, email information and a credit card or phone number will need to be supplied to verify the registration. Any credit card information given will only be used for verification and will not be charged.

Generate a License

When calling a Cloud API interface, you first need to verify the interface through license to ensure the availability of subsequent interfaces. The program only needs to call it once at the beginning, and then all the interfaces can be used.

To create a license for an application:

Go to the DJI developer Developer Centeropen in new window

  • Select the "Apps" tab on the left.
  • Select the "Create App" button on the right.
  • Select App Type as Cloud API, enter APP Name, Catagory and Description.
  • An application activation email will be sent to complete license generation.
  • The App ID, App Key and App License will appear in the developer center and can be copied and pasted into the frontend configuration file.

Build Front-end Service Environment

Install Node.js and Npm

Installation tutorial: in new window

Launch Front-end Source Code

  1. Sample code: in new window

  2. Open the source code using the IDE.


  3. Modify the parameters in the configuration file and enter the appId, appKey and appLicense applied for on the developer website.


  1. If the live stream function is not used, only baseURL and websocketURL need to be set first.
  2. If the map is in need, you should apply for amapKey on the official website of Gaode Map.
  3. rtmp parameter is the stream server address.


  1. Open the console at the root of the project and run the command to install the dependencies.

    npm install
  2. If the installation is complete you will see a node_modules directory in the root directory.

  3. Run the command to start the service.

    npm run serve


Build Back-end Service Environment

Install Java

Installation tutorial: in new window

Install EMQX

Installation tutorial: in new window

Install MySQL

Installation tutorial: in new window

Install Redis

Installation tutorial: in new window

Initialize the Database

  • Login MySQL.

    mysql -u username -p
  • Import the initialization file "cloud_sample.sql" from the sql directory in the source code.

    source "path to cloud_sample.sql file"

Launch Back-end Source Code

  1. Sample code: in new window

  2. Open the source code using the IDE.


  3. As Lombok is used in the project, the Lombok plugin needs to be installed in IDEA's Plugin Marketplace.

    • ​ Open Preferences


    • Then select Plugins -> Marketplace, search for Lombok to install, and restart the project after installation.


  4. Open the configuration file and modify the MySQL configuration, the MQTT configuration, and the Redis configuration in the configuration file. If you don't use the media library and wayline library, you can do so without configuring an object storage server.


If MQTT does not use anonymous login, you will also need to change the MQTT account name and password in the database, in the manage_user table.


  1. Configuring startup.



  2. Launch project.


Login in Pilot 2

  1. Open pilot 2, go to the main page and click on Cloud Services to access it.


  2. Click Open Platforms in the bottom right-hand corner.GTScreenshot_20220321_233150.png

  3. Enter the front-end access address (default: http://ip:8080/pilot-login), and click on the Connect button in the top right-hand corner to access it.


  4. Click the Login button to log in.

    username: pilot

    password: pilot123


  5. If the main page shows Connected, you are successfully logged in, and the remote control is connected to the emqx server and is pushing data. Now that the demo is up and running, you can click the back button on the remote control to return to the main page, as long as you don't click the exit button in the upper right corner, you will still be logged in.


  6. You can already see the information on the workspace on the main page. As long as the font is dark black, it means that you are still logged in, and the data of the remote control and the drone will be continuously pushed. If you want to exit the workspace, you only need to click enter again, and then click the exit button in the upper right corner to exit, and the remote control and the drone will no longer push data.


Login Web Page

Default login page: http://ip:8080/project , ip should be changed to the real IP address that users are actually using.

username: adminPC

password: adminPC