What is the correct way to get M300 firmware version?
CompletedDocumentation suggests using the following (which returns null most of the time):
// Log at the lowest logging level so I always get this information
logError("Aircraft firmware version: ${djiAircraft?.firmwarePackageVersion}"
Other firmware versions work, but use callbacks, like this:
djiAircraft?.flightController?.getFirmwareVersion(object :
CommonCallbacks.CompletionCallbackWith<String> {
override fun onSuccess(p0: String?) {
// Log at the lowest logging level so I always get this information
logError("Flight controller version: $p0")
}
override fun onFailure(p0: DJIError?) {
// Log at the lowest logging level so I always get this information
logError("Flight controller version error: $p0")
}
})
-
Our sample code gets the drone firmware version by using getFirmwarePackageVersion, and it does so without any problems.You can test that our sample code gets the correct drone firmware version after successful registration and connection to the drone. sample:Mobile-SDK-Android/MainContent.java at master · dji-sdk/Mobile-SDK-Android (github.com) -
The same call I am using above. There appears to be a strange issue with the way this call works on the M300.
If I call this, and the other calls to get gimbal, camera, etc's firmware and SN, the call returns without a connection to the aircraft. It appears that the other calls have their values cached, maybe based on the bound aircraft. I think having the other calls work, without a connection should be considered a bug, but if it is intentional for those calls to work before connecting to the aircraft, then the aircraft firmware call should work the same.FYI: I was making these calls during onProductConnected(), which is being called without the aircraft being connected, but only on the M300. On an Android device this callback isn't executed until there is a connection to the aircraft. Odd behavior, I think.
-
Are you trying to get the firmware versions of devices like drones, gimbals and cameras all at once in the onProductConnect callback? Can you upload this part of the code to our link? link:https://pan-sec.djicorp.com/s/55KR2CCZtpdp7es password:dji123 -
Try running the code without the aircraft turned on, only turn on the remote. -->In fact, I tested both of these states. In the remote control-only state, the firmware versions of both the drone and other components are not available. Also, I notice that your code does not get the aircraft instance via DJISDKManager.getInstance().getProduct(), the variable used directly. Can you reproduce this issue using the sample from MSDK 4.16.1? If so, could you record a video and upload it to this link below? We will follow your video to reproduce the problem. The use of sample excludes some software interference. link:https://pan-sec.djicorp.com/s/55KR2CCZtpdp7es password:dji123 -
You can check out my test video in the link below. In the video the remote control is not connected to the drone, it just activates the remote control. Getting the firmware version results in neither the aircraft firmware nor the flight control firmware being available. Perhaps you have something else that could help us reproduce the question? I need to master the problem recurrence method so that I can leave it to the developers to analyze the cause of the problem and at the same time clarify the existence of the problem. LINK:https://pan-sec.djicorp.com/s/dgjgfy4nk6mtG8W password:dji123
Please sign in to leave a comment.
Comments
9 comments