PayloadManager.sendDataToPayload error

Completed

Comments

11 comments

  • DJI Developer Support
    The error refers to the inability to find the correct object to process this instruction. In what situations do you encounter this error?
    0
    Comment actions Permalink
  • Ernesto David Oliva Pérez

    What do you mean when you say “correct object to process this instruction”?

    This error does not appear with any specific situation. We have an M350 with an E-port connected. We have a Raspberry Pi 4 connected to the E-port and the PSDK on the Raspberry Pi.


    The Raspberry Pi is sending messages and listening for incoming messages from the MSDK and the MSDK part is doing the same.


    Sending messages from the MSDK to the PSDK sometimes works and sometimes doesn't, when it doesn't, the error that appears from the MSDK is the one I posted above.

    0
    Comment actions Permalink
  • DJI Developer Support
    For example, if the MSDK has not yet recognized the PSDK device, the MSDK will assume that there is no valid object to execute this command. This interface typically does not indicate a failure after a successful send. If you are indeed encountering this situation, such as successfully sending data last time but receiving a failure message the next time, you should check whether your data transmission rate exceeds the limits of the transmission link.
    0
    Comment actions Permalink
  • Ernesto David Oliva Pérez

    Is there any way to know if the MSDK has recognized a PSDK device?

    If when you say “data transmission rate exceeds the limits of the transmission link” you are referring to the baud rate, my colleague confirms that both the Raspberry Pi and the drone have 230400 as baud rate, which is the value recommended by you. If you do not mean this, please explain to me what this means.

    This error usually occurs after a successful send.

     

     

    0
    Comment actions Permalink
  • DJI Developer Support
    You can use PayloadKey.KeyConnection to determine if the SDK has recognized the PSDK device. If you often encounter this error after a successful send, could you let us know the frequency at which you are sending data? Also, what is the maximum length of data you send in a single transmission?
    0
    Comment actions Permalink
  • Ernesto David Oliva Pérez

    PSDK to MSDK -> Information is sent without controlling how frequently it is sent, i.e., it is sent as fast as possible. In the MSDK there are approximately 5 messages per second.

    MSDK to PSDK -> The information is sent very occasionally.

    PSDK to MSDK -> The maximum length of the data to be sent is 100 characters.

    MSDK to PSKD -> The maximum length of the data to be sent is 50 characters.

    0
    Comment actions Permalink
  • DJI Developer Support
    If the data is not sent at a fixed frequency, could you provide us with the logic for continuously sending data from your app? We recommend starting the next transmission only after the previous one has been successfully sent. Could you consider trying this method if your app does not take the results of the sending into account?
    0
    Comment actions Permalink
  • Ernesto David Oliva Pérez

    Ok, I will take this recommendation into account and will let you know with the results. I would just like to know if when you talk about "app" do you mean MSDK side, PSKD side or both?

    0
    Comment actions Permalink
  • DJI Developer Support
    The term "app" here refers to the MSDK side.
    0
    Comment actions Permalink
  • Ernesto David Oliva Pérez

    I think there has been a misunderstanding. PSDK to MSDK communication, i.e. the PSDK sends messages and the MSDK receives them, is the communication with which the frequency with which data is sent is not controlled. They are simply sent as fast as possible. This speed is reflected in the MSDK, the receiver, at approximately 5 messages per second. That is, the PSDK sends a message as fast as it can and the MSDK receives these messages approximately 5 times per second.

    -> If the data is not sent at a fixed frequency, could you provide us with the logic for continuously sending data from your app?

    The MSKD sends messages to the PSDK via a button. Each time that button is clicked a message is sent to the PSDK.

    -> We recommend starting the next transmission only after the previous one has been successfully sent.

    Is this recommendation valid also for the PSDK part or only for the MSDK part?

    0
    Comment actions Permalink
  • DJI Developer Support
    The MSDK does not consider whether the PSDK transmission has failed when receiving information, as only successfully transmitted data will be received by the MSDK. Therefore, the MSDK only needs to report the information it has received. I think that the PSDK may also encounter issues with transmission failures due to sending data too quickly. However, it seems that this has not occurred in your case. If the current frequency of PSDK data transmission is exactly what you need, I think we should prioritize resolving the errors that exist in the MSDK when sending data.
    0
    Comment actions Permalink

Please sign in to leave a comment.