Any working code samples for PSDK using E-port on M350?

Completed

Comments

8 comments

  • DJI Developer Support
    The M350 E-PORT port uses UART and USB to communicate with the onboard computer, and the UART only uses LINUX_UART_DEV1, which corresponds to the E-PORT TTL pin (TX/RX/GND). The USB drone as the host ( E-PORT board switch to host), and connects to the onboard computer(USB device), There are three ways,choose one of them: 1. Connect to the USB device port (or USB OTG) of the onboard computer, and use the USB BULK channel. 2. Connect to the USB device port (or USB OTG) of the onboard computer, and use the USB RNDIS channel. 3. The E-PORT is connected to the USB network card module, and then USB network card is connected to the network port of the on-board computer through a network cable.
    0
    Comment actions Permalink
  • Josh

    Do you have any code sample for this? I am trying to configure the code at https://github.com/dji-sdk/Payload-SDK to work in any of these 3 ways and it allows me to specify LINUX_UART_DEV1 and the network but that's all I am able to do.

    Is there a way to configure the code at https://github.com/dji-sdk/Payload-SDK to work in the ways you have suggested? I am changing the macros in dji_sdk_config.h CONFIG_HARDWARE_CONNECTION but none of the options have changed anything (DJI_USE_ONLY_UART, DJI_USE_UART_AND_USB_BULK_DEVICE, DJI_USE_UART_AND_NETWORK_DEVICE). Do I need to have the e-port dev board connected to the computer with something else in addition to a USB cable?

    0
    Comment actions Permalink
  • Josh

    I have now attached a UART device and can start the connection process, but it fails with a payload negotiate error 255.

    0
    Comment actions Permalink
  • Josh

    DJI Developer Support Do you have some advice for the given error when running dji_sdk_demo_linux_cxx:

    [0.000][core]-[Info]-[DjiCore_Init:101) Payload SDK Version : V3.5.0-beta.0-build.1765
    [1.044][adapter]-[Info]-[DjiAccessAdapter_Init:186) Identify aircraft series is Matrice 350 Series
    [1.044][adapter]-[Info]-[DjiAccessAdapter_Init:206) Identify mount position type is Extension Port Type
    [1.050][adapter]-[Info]-[DjiAccessAdapter_Init:301) Identity uart0 baudrate is 921600 bps
    [3.081][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
    [4.081][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
    [5.081][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
    [6.081][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
    [7.082][adapter]-[Info]-[DjiPayloadNegotiate_Init:197) Waiting payload negotiate finish.
    [8.082][adapter]-[Error]-[DjiAccessAdapter_Init:312) Payload negotiate error, returnCode = 225
    terminate called after throwing an instance of '[8.082][adapter]-[Error]-[DjiAccessAdapter_Init:318) Payload negotiate error, returnCode = 225
    std::runtime_error[8.082][core]-[Error]-[DjiCore_Init:121) Access adapter init error, stat:225
    '
      what():  Core init error.
    Aborted

    0
    Comment actions Permalink
  • DJI Developer Support
    dji_sdk_config.h #define CONFIG_HARDWARE___CONNECTION DJI_USE_ONLY_UART Setting to only UART will only use the UART channel,and will not negotiate. If it is set to USB BULK or USB NETWORK, you need to connect USB cable, and configure USB BULK or USB RNDIS, or USB network card channel.
    0
    Comment actions Permalink
  • Josh

    This thread can be closed.

    0
    Comment actions Permalink
  • andrefilipe.moura

    Hello Josh,
    I'm facing the same problems as you did for a similar application. Can you resume what you had to do to get the UART communication to work?
    I'm still stuck at "Try identify UART0 connection failed. "

    Thanks

    0
    Comment actions Permalink
  • Flavio Perucchi

    I am stuck at the exact same position. Any help is highly appreciated. I get UART only connection to work, but not USB Bulk or USB RNDIS. I need one of both to get MOP Channel working.

    0
    Comment actions Permalink

Please sign in to leave a comment.