What is the correct way to get M300 firmware version?

已完成

评论

9 条评论

  • DJI Developer Support
    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)
    0
    评论操作 固定链接
  • Kenneth Argo

    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.

    0
    评论操作 固定链接
  • DJI Developer Support
    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
    0
    评论操作 固定链接
  • Kenneth Argo

    Yes, they all work except the aircraft firmware.  They appear to report the last read value, since they are reporting even with the aircraft off and only the RC powered on.

    0
    评论操作 固定链接
  • DJI Developer Support
    Perhaps you could upload a video to show how to reproduce this one? In my test environment, there was no problem with the flight control components and the aircraft getting different firmware versions. I have uploaded the test logs and test code to the previous link.
    0
    评论操作 固定链接
  • Kenneth Argo

    Try running the code without the aircraft turned on, only turn on the remote. In my case, aircraft firmware is null, all others report last known value.

    0
    评论操作 固定链接
  • DJI Developer Support
    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
    0
    评论操作 固定链接
  • Kenneth Argo
    aircraft is coming from the correct location.

    val djiProduct: BaseProduct?
    @Synchronized
    get() {
    return djiSdkInstance.product
    }


    val djiAircraft: Aircraft?
    get() {
    return if (djiProduct == null) {
    null
    } else {
    djiProduct as Aircraft
    }
    }
    0
    评论操作 固定链接
  • DJI Developer Support
    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
    0
    评论操作 固定链接

请先登录再写评论。