X-Port is not recognized by OSDK

Completed

Comments

9 comments

  • DJI Developer Support
    Please "bind" the X-PORT on DJI Assisatant2 Payload SDK interface, and run the PSDK demo with the X-PORT first, then control the X-PORT via OSDK.
    1
    Comment actions Permalink
  • megumu.tsukamoto

    thank you for your comments.

    So you mean 

    1. Physically attach Xport to M300

    2.press bind button on DJI Assistant2 Payload SDK interface

    3.Run PSDK app

    4.Run OSDK app

    However, When I press bind button on DJI Assistant at step2. , Assystant says "cannot get loading info." regardless of whether I run PSDK or OSDK.

    I tried swapping the order of these steps, but the result was the same.

    I use only Laptop(LinuxOS), M300RTK, X-Port, and OSDK Expansion Interface.

    0
    Comment actions Permalink
  • DJI Developer Support
    For M300, OSDK function and PSDK function are independent, X-PORT is only related to PSDK development, no need to run OSDK app. Ensure that the payload status was connected when the PSDK app running. ![](https://djisdksupport.zendesk.com/attachments/token/tOot3yWZNKgqPw8zM29AOGWKY/?name=image.png)
    1
    Comment actions Permalink
  • megumu.tsukamoto

    Thank you. I checked the payload status when psdk app running. If I first attach xport like this order↓, then payload status is disconnected after running app.

    payload status : DisconnectedBinding status  : Unbound

    1. Physically attach Xport to M300

    2.Run PSDK app

    3.press bind button on DJI Assistant2 Payload SDK interface

    On the other hand, if I first run psdk app in this below order↓, then payload status was "Connected" between step 1&2, and it was chenged into "Disconnected"  after I attach the X-port.So I cannot bind the payload.

    1.Run PSDK app

    2. Physically attach Xport to M300

    3.press bind button on DJI Assistant2 Payload SDK interface

    ~~~ Work Flow ~~~

    Run PSDK app via OSDK Expansion Interface.

    attach X-Port while running PSDK app.

     

    One more unnatural point to report: When X-Port is attached, the x-port oscillates at high speed for a certain period of time and then goes into a free uncontrolled state.

    Do you know whats wrong with binding x-port with running PSDK app?

    0
    Comment actions Permalink
  • DJI Developer Support
    1、Just connects the PSDK app to the X-PORT for binding, it is no need to run PSDK APP to the OSDK port for this binding operation.This is a hardware connections with skyport,just replace skyport to X-PORT. ![](https://djisdksupport.zendesk.com/attachments/token/Hzj9CFlc1S5R4eCgjXCPjDejp/?name=image.png) 2、There is no SN and "bind" button, please check your APPINFO on code file(dji_sdk_app_info.h), and account logged on DJI Assistant2 should be same as APPINFO of code settings. ![](https://djisdksupport.zendesk.com/attachments/token/crplXJ5LFwbp2DfEbgdQT2KKU/?name=image.png) 3、This picture shows that PSDK APP runs on the OSDK port, please refer to the point 1. just run PSDK APP on PSDK port(X-PORT) ![](https://djisdksupport.zendesk.com/attachments/token/qR7YPTZPr0fT8cWmBAa952VvW/?name=image.png)
    1
    Comment actions Permalink
  • megumu.tsukamoto

    Thank you for your very kind help! 

    Then I have a question about device connection.
    1. Where to connect RJ45 in your picture of device connection.

    This picture shows my understanding of device connection now↓.

            USB TTL        J10(UART serial) 
    PC(linux) ------------  PSDK Development Kit 2.0(adapter) ----------------- X-Port ------------ M300RTX
            ????              J40(Ethernet Port = RJ45)

     

    2. In addition, when I use OSDK expansion board I defined LINUX_UART_DEV2 as /dev/ttyACM0 which connected to OSDK board in psdk/samples/sample_c/platform/linux/manifold2/hal/hal_uart.h ,so what should be defined as LINUX_UART_DEV2 ?
    This article says LINUX_UART_DEV2 is for dual A USB Port, but there is no usb port in development kit 2.0.
    (https://sdk-forum.dji.net/hc/zh-cn/articles/4408437830041

    Actually when I run psdk app with above connection, the result is like this.

    ubuntu@ubuntu:~/PSDK/build/bin$ sudo ./dji_sdk_demo_linux

    [0.000][core]-[Info]-[DjiCore_Init:89) Payload SDK Version : V3.0.0-beta.0-build.1433

    [1.736][adapter]-[Info]-[DjiAccessAdapter_Init:140) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.

    [3.511][adapter]-[Info]-[DjiAccessAdapter_Init:140) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.

     

    Thank you very much for taking the time to teach me again and again!!

     

    0
    Comment actions Permalink
  • DJI Developer Support
    1、This port was RJ45 port, connects this port to your device network port(e.g,pc Ethernet port). ![](https://djisdksupport.zendesk.com/attachments/token/cZkuOh9YWSj3LoDZAflWjvVir/?name=image.png) 2、When the PSDK app runs on the PSDK port, LINUX_UART_DEV2 will not be used. just used for OSDK expansion port. 3、This error shows that the UART0 communication failed. ![](https://djisdksupport.zendesk.com/attachments/token/ts0AZ1UF0Idl3jzzwgCrD6IxA/?name=image.png) ![](https://djisdksupport.zendesk.com/attachments/token/ZpHCfx3wYXT7Yznr8oOzgFbSu/?name=image.png)
    1
    Comment actions Permalink
  • megumu.tsukamoto

    Thank you so much, I stopped using OSDK board and I'm succeed in identification of aircraft and mount position and error message has changed. 

    However, still I cannot bind PSDK.

    Now my device connection between Raspberry Pi4 & PSDK toolkit & X-Port seems perfect and serial communication works well.
    I checked the whole work flow in tutorial, especially dji_sdk_app_info.h, and create new app and make sure that the account is the same as the one I use for DJI  Assistant2(enterprise series).
    So I think there is no problem in dji_sdk_app_info.h, hal_uart.h, hal_network.h. (hal_uart.c can be problem because I modified it.)
    Does anyone have the solution?

    Thank you for your help.

    #What I have done:

    ### Modify hal_uart.c in order to  LINUX_UART_DEV2 is not referenced.
    1.line64 in hal_uart.c, I changed LINUX_UART_DEV2 -> LINUX_UART_DEV1
    2.line250 in hal_uart.c, I changed isConnect = true; -> isConnect = false;
    (https://sdk-forum.dji.net/hc/zh-cn/articles/4408437830041)

    ###Firm ware Update on DJI assistant2(enterprise series)
    x-port : v01.03.0200
    m300rtk : v03.01.0014

    ###test serial communication
    cu -s 460800 -l /dev/ttyUSB0
    →succeed in communication

    ### dji_sdk_app_info.h
    #define USER_APP_NAME               "xport"
    #define USER_APP_ID                 "11~"
    #define USER_APP_KEY                "97~"
    #define USER_APP_LICENSE            "lY~"
    #define USER_DEVELOPER_ACCOUNT      "mail address"(or username?)
    #define USER_BAUD_RATE              "460800"

    I don't know whether  USER_DEVELOPER_ACCOUNT means email or username, but anyway I tried both and failed in both.

    ###Device connection

     

    0
    Comment actions Permalink
  • megumu.tsukamoto

    Finally I can bind!!
    I shouldn't have changed this line
    "line250 in hal_uart.c, I changed isConnect = true; -> isConnect = false;"
    and I use email for USER_DEVELOPER_ACCOUNT.

    That works!

    Thank you So much!!!!!!!!!

    0
    Comment actions Permalink

Please sign in to leave a comment.