[MSDK 5.9.1] pushKMZFileToAircraft hangs
We use pushKMZFileToAircraft to push flight instructions to the aircraft (in this cases M3E). Sometimes call to this method hangs without any obvious reason. We provide CompletionCallbackWithProgress to this method and expect either onProgress or onFailure callback methods to be called. But nothing is called and it hangs like this indefinitely. I implemented time out functionality, but every subsequent attempt hangs as well. I tried to call
KeyManager.getInstance().performAction(KeyTools.createKey(FlightControllerKey.KeyRebootDevice), ...
after several attempts but to no avail. It still hangs. The only solution is to reboot the remote controller. Is there known issues with pushKMZFileToAircraft? Or is there a way to debug a problem like that?
-
It seems that you are likely able to trigger this issue on your own app? Do you encounter the same situation with the sample code we provided? https://github.com/dji-sdk/Mobile-SDK-Android-V5 -
We have not encountered a similar situation at this time. If you experience any issues again, please monitor the memory status of the remote control and try to see if the sample code works. Additionally, you may want to take a look at this article. The SDK does generate some logs during operation, but it is currently uncertain whether the cause of the anomaly you described can be found in these logs:https://sdk-forum.dji.net/hc/en-us/articles/7296380174105-How-to-export-the-logs-for-MSDK-V5 -
We have not encountered a similar situation at this time. If you experience any issues again, please monitor the memory status of the remote control and try to see if the sample code works. Additionally, you may want to take a look at this article. The SDK does generate some logs during operation, but it is currently uncertain whether the cause of the anomaly you described can be found in these logs:https://sdk-forum.dji.net/hc/en-us/articles/7296380174105-How-to-export-the-logs-for-MSDK-V5 -
We have not encountered a similar situation at this time. If you experience any issues again, please monitor the memory status of the remote control and try to see if the sample code works. Additionally, you may want to take a look at this article. The SDK does generate some logs during operation, but it is currently uncertain whether the cause of the anomaly you described can be found in these logs:https://sdk-forum.dji.net/hc/en-us/articles/7296380174105-How-to-export-the-logs-for-MSDK-V5 -
Thank you for the information! I managed to download log files from:
- location which is provided by flyClogPath (FlightRecord/MCDatFlightRecords/*.DAT) which look like they are in encrypted binary format.
- location which is provided by msdkLogPath from V5_* directories (LOG/V5_COMMON/log-*.log, LOG/V5_WAYPOINT/log-*.log etc). Looks like they are encoded with something similar to base64.
- location which is provided by msdkLogPath from CSDK/Logs. They look like I'm using wrong encoding to view them.
Is this library is a correct way to decode and decrypt all those logs or there is another tool for that?
-
The logs stored in msdkLogPath cannot be interpreted by developers. If you encounter an issue that is difficult to reproduce, you may submit it to us for analysis. Currently, the parsing library can only interpret txt files stored in FlightRecord. DAT files are encrypted files used for accident analysis and similar situations. -
I managed to reproduce it once again, downloaded logs which were captured during that attempt. But I cannot reproduce it anymore to test it with a sample app. I don't think that there is necessity in FlightRecord files because there was no flight, the process was stuck on pushKMZFileToAircraft. Could you look at the MSDK log file I captured? Where I can submit it?
-
You may submit it at this address:https://pan-sec.djicorp.com/s/SNpHdzfLSF6L7wm password:Dji123 In addition to the MSDK logs, please let us know the time when you called pushKMZFileToAircraft. -
I'm sorry for the late response. But I think I managed to understand the reason for that behavior on my own. I called SDKManager.init method from our main activity's onCreate (stupid of me). Because of that sometimes it was called twice (for example when user exited and entered the app again). After that WaypointMissionManager.pushKMZFileToAircraft becomes unresponsive. I attached MSDK log file for that case: 2024_11_17_15_42_03_sand1.log. You can see that I tried to start mission at 15:43:32.565, 15:43:42.596, 15:43:52.628. After that I restarted the aircraft at 15:44:12.758 and tried to start mission again at 15:44:34.940.
But there is another case. It happened only once. The waylines file is waylines_7255.txt and MSDK log file is 2024_11_17_12_29_15_sand1.log. I tried to start mission at 12:29:42.586 and received Error(errorType='WAYPOINT', errorCode='UNKNOWN', inner Code='null', description='Unknown error', hint=''). After that I tried to start mission at 12:29:43.677, at 12:29:53.716 and at 12:30:03.750. After that I restart the aircraft at 12:30:13.914 and was able to push KMZ file to aircraft successfully.
I fixed the first case, and for the second one made a workaround with restarting the aircraft after several attempts. But I can suggest to make errorCode='UNKNOWN' more descriptive and ensure that the onFailure callback method is consistently called whenever pushKMZFileToAircraft encounters an issue, so it can be handled appropriately.
Thank you for reviewing this feedback. Please let me know if you need any additional details.
-
We have analyzed the file _2024_11_17_12_29_15_sand1.txt. The SDK received an unidentifiable error code, which indicates that the waypoint mission exceeds the aircraft's maximum flight range. Could you provide the drone logs corresponding to this error? You can export the logs using DJI ASSISTANT 2. Please upload them to the previous cloud storage.
Please sign in to leave a comment.
Comments
12 comments