Skip to content
Advertisement

Failed activation of DJI Matrice 100 Drone

I am trying to run a sample application for the Matrice 100 by using ROS on a raspberry Pi 2.I have the Pi connected to the drone via USB-TTL cable to the UART port on the drone. I have my laptop connected to the drone running DJI Assistant 2, and the controller and my iPhone connected wirelessly to the drone as well through the DJI Go App(v3.1.54). All are connected to the internet and logged into my respective developer account for DJI. However, when I run “roslaunch dji_sdk sdk.launch” I am returned an error saying the drone is not activated.

I have enable API access from DJI Assistant 2, I’ve made sure the the TX and RX pins are connected correctly, and I have changed my sdk.launch file to have the correct App ID and Key. Ive noticed in other posts that they say to edit the UserConfig.txt file for App ID, Key, and BaudRate; however, I could not locate this file on my Pi(it doesn’t exist). Just the sdk.launch file which I correctly changed these settings to fit my application and drone.

STATUS/1 @ init, L55: attempting to open device /dev/ttyUSB0 with     baudrate 230400...
STATUS/1 @ init, L65: ...serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L727: device Serial No. = 041DF31901
STATUS/1 @ parseDroneVersionInfo, L729: Hardware = M100
STATUS/1 @ parseDroneVersionInfo, L730: Firmware = 3.1.10.0
STATUS/1 @ parseDroneVersionInfo, L733: Version CRC = 0xA6453AAC
STATUS/1 @ initSubscriber, L778: Telemetry subscription mechanism is not   supported on this platform!
STATUS/1 @ initMFIO, L981: MFIO is not supported on this platform!
STATUS/1 @ initHardSync, L1077: Hardware sync is not supported on this platform!
STATUS/1 @ activate, L1313: version 0x3010A00
STATUS/1 @ getErrorCodeMessage, L656: activate
STATUS/1 @ getCMDSetActivationMSG, L705: NEW_DEVICE_ERROR

ERRORLOG/1 @ activate, L1339: Failed to activate please retry SET 0x0 ID 0x1 code 0x3

ERRORLOG/1 @ activate, L1346: Solutions for NEW_DEVICE_ERROR
   *Double check your app_id and app_key in UserConfig.txt. Does is match with your DJI developer account?
   *If this is a new device, you need to activate it through the App or DJI assistant 2 with internet
   For different aircraft, the App and the version of DJI Assistant 2 might be different, 
   For A3, N3, M600/Pro and M100, please use DJI Go App
   For DJI Assistant 2, it's available on the download tab of the product page
   *If this device is previously activated with another app_id and app_key, you will need to reactivate it again
   *A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.

[ERROR] [1560967071.851508645]: drone activation error
[ERROR] [1560967071.851845364]: Vehicle initialization failed

I checked the app_id and app_key in the sdk.launch file and they are the same as on my app on DJI website. Still unable to find file “UserConfig.txt”. I don’t see where to activate a device on the DJI Go App after it is already connected to the vehicle via the controller. For DJI Assistant 2, I cannot find the download tab or where/how to activate the drone for OSDK via my laptop as well. I don’t believe it was activated with another app_id and key considering it is very new. So this is where Im stuck, and would like to run a sample app on the drone. Any ideas on how to fix this issue?

Advertisement

Answer

Welcome to the hell of DJI SDK world. The world of shitty API documentation and bug land.

Based on your error, the link is ok -> as you can see firmware version.

The error is new device error which means you either did not open remote. Or the remote is not connected to Go App or Go App not authorize the API .

Connect everything and power on everything accordinly.

  1. turn on the drone and remote. connect the phone and on Go App.

Make sure that you can see drone position in map.

  1. Once you saw the drone in map in Go App, run sdk.launch.

Once you do that, the Go App will pop up a MESSAGE saying api sth sth xxxxxxxxx , you have to press OK or Confirm. This is to solve the new device error

Then ctrl-C for the terminal and run sdk.laucnch again.

Also make sure that the sdk.lunch app id is the same account that are login in to the Go App

If first time not working, power cycle again and repeat this 2 step.

The sdk.launch needs to be run at least twice. I know its stupid but it is DJI and it is common.

Also do remember to set up udev rules for your /dev/serial/by-id/usbXXXX , then set the low latency mode for the serial. Those are all common error you are going to expect as well.

Advertisement