startMission() fails to execute due to connection timed out
CompletedOk so I was trying to use the sample app 'android-sdk-v5-as' by importing it into Android Studio from: https://github.com/dji-sdk/Mobile-SDK-Android-V5/tree/dev-sdk-main/SampleCode-V5, the latest MSDK releases 5.9.1 and 5.9.2 but I failed to start a mission using it. The sample app loads properly and I can push a kmz file to the drone. So, when I open Testing Tools > Waypoints in the sample app running on my remote controller, I import a .kmz file and specify the waylineID to 0 (only option). Then, I press startMission and I get the following error: Command timed out. The kmz file is definitely NOT the problem as I am using the same kmz file that I am using in the DJI Pilot 2 app, where the kmz file works. I wonder if you have any suggestions to solve this issue, including general ideas that might cause timeout. I was very close to the vehicle (1 m) so distance should not be the problem. I didn't find any documentation on how this error message is produced by missionStart and what are the general causes. The App key and other basic configurations work fine because I am able to run the sample app without error messages.
This is the part of the sample code that fails: btn_mission_start.setOnClickListener {
wayPointV3VM.startMission(
FileUtils.getFileName(curMissionPath, WAYPOINT_FILE_TAG),
selectWaylines,
object : CommonCallbacks.CompletionCallback {
override fun onSuccess() {
ToastUtils.showToast("startMission Success")
}
override fun onFailure(error: IDJIError) {
ToastUtils.showToast("startMission Failed " + getErroMsg(error))
}
})
}
in this file: https://github.com/dji-sdk/Mobile-SDK-Android-V5/blob/dev-sdk-main/SampleCode-V5/android-sdk-v5-sample/src/main/java/dji/sampleV5/aircraft/pages/WayPointV3Fragment.kt (line 198)
where getErroMsg is 'Command timed out'. I would appreciate any help in this matter. Thank you and have a wonderful day.
-
Is the error "Command timed out" always appearing on Mavic3E/3T? Could you provide us with the files you are using and a video of the operations you tested with the sample code? You can upload here:https://pan-sec.djicorp.com/s/PKGoDngETA8pHQ4 password:dji123 -
Yes it always appears on the Mavic3E/3T but never on the M300. The files that we are using are the sample code files from MSDK version 5.9.1, from this link: https://github.com/dji-sdk/Mobile-SDK-Android-V5/releases and the source code under 5.9.1. I don't want to upload all the hundreds of files. We tried it with MSDK version 5.9.2 and it didn't work either. So when I download the source files from https://github.com/dji-sdk/Mobile-SDK-Android-V5/releases V5.9.1, I don't do any modifications to the code. I open Android Studio and do: File > New > Import project and I choose the folder named: Mobile-SDK-Android-V5/SampleCode-V5/android-sdk-v5-as.
Then, once the project loaded into Android Studio, I connect the DJI remote controller and run the code and the sample app appears on the DJI remote controller without issue. You can replicate these steps so far.
Then, Navigate to Testing Tools > Waypoint.
Then, I import a .kmz file, press the uploadkmz button and press the startMission button. These are the actions I take and I get the error 'Command timed out'. Only on Mavic 3E / 3T. I will also send you a video right below. Regarding the files, they are all here in this location: https://github.com/dji-sdk/Mobile-SDK-Android-V5/releases , choose V5.9.1 source code.
-
The video is our test result. The operation is the same as you described. There will be no issues with opening the mission in both versions 5.9.1 and 5.10.0. https://pan-sec.djicorp.com/s/7Pri2MAQKeJAHK4 -
I managed to replicate what you just did. The issue turned out to be that the kmz file that I was passing to the drone could not be parsed (for some unknown reason) by the Mavic. It was strange because the same kmz file worked just fine when I was using the DJI Pilot 2 app but it did not work with the MSDK sample app. After changing some things in my kmz generation, it seems that the issue is fixed. Thanks for your time and timely responses!
Please sign in to leave a comment.
Comments
6 comments