Psdk和 Mobile SDK的数据传输和交互

已完成

评论

9 条评论

  • DJI Developer Support
    您提到的基于网口的高速数据传输,可以使用以下数据传输功能中的PsdkDataTransmission_SendDataStream接口,以及SDK互联互通功能(也叫MOP功能),以下文档供您参考。 需要注意的是,这2个功能都需要负载系统为Linux系统,且MOP功能暂时仅支持M300。 https://developer.dji.com/cn/document/a822024a-3876-4fb7-9082-ec60465c4cc4 https://developer.dji.com/cn/document/41049fd6-55c7-45f0-af7a-bcd4c9aeb0c5 ![](https://djisdksupport.zendesk.com/attachments/token/5ixziWlu8gDkCNLoyny9MTSb9/?name=inline-1683795989.png) ​
    0
    评论操作 固定链接
  • caluova

    非常感谢,目前启用了PSDK->Mobile SDK的数据流传输接口 PsdkDataTransmission_SendDataStream

    按照PSDK例程调用完毕后,程序返回的状态正常(如下日志),通过网络工具也能看到PSDK和服务器端(192.168.110.1)有数据交互,但是在Mobile的demo界面上只看到有UART串口通道有显示接收数据,在UDP Channel显示为空白,请问该如何进一步诊断是Mobile未收到数据,还是未显示数据,还是UDP数据链路未通。谢谢

     

     

    send to mobile state: realtimeBandwidthBeforeFlowController: 121, realtimeBandwidthAfterFlowController: 121, busyState: 0.send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.data stream state: realtimeBandwidthLimit: 102400, realtimeBandwidthBeforeFlowController: 71, busyState: 0

    0
    评论操作 固定链接
  • DJI Developer Support
    麻烦提供截图看看,您查看的是移动端app哪个界面。
    0
    评论操作 固定链接
  • caluova

    左侧代码的断点未进入,右侧界面只接受到串口数据,无UDP数据

    0
    评论操作 固定链接
  • caluova

    PSDK 端的串口信息,以及对PSDK的网络监控信息截图

    0
    评论操作 固定链接
  • caluova

    PSDK 端完整串口日志

    [BEGIN] 2021-11-02 14:57:23
    root@zynq:~# ./psdk_demo 
     
     ---------- Enter psdk ,Build on ARM -------- 
    Get current log index: 74
    [3748672.766][module_core]-[Info]-[PsdkCore_Init:76]Payload SDK Version : V2.2.1-beta.0-build.315
    [3748672.777][module_core]-[Info]-[PsdkCore_WaitAdapterConnection:234]Connect to Skyport V2 or X-Port success
    [3748672.787][module_core]-[Info]-[PsdkCore_PrintAdapterSerialNumber:278]Get serial number of Skyport V2 or X-Port is 39CDH690010135
    [3748672.788][module_core]-[Info]-[PsdkCore_Init:130]Updating PSDK policy file.
    [3748672.808][module_aircraftinfo]-[Info]-[PsdkAircraftInfo_GetAircraftTypeAsyncCallback:402]aircraft type is Matrice 300 RTK.
    [3748672.808][module_aircraftinfo]-[Info]-[PsdkAircraftInfo_GetDevelopmentKitTypeAsyncCallback:483]PSDK adapter type is Skyport V2.
    [3748673.788][module_core]-[Info]-[PsdkCore_Init:133]PSDK policy file update success.
    [3748674.288][module_core]-[Info]-[PsdkCore_Init:146]PSDK is connecting aircraft.
    [3748674.788][module_core]-[Info]-[PsdkCore_Init:146]PSDK is connecting aircraft.
    [3748674.836][module_aircraftinfo]-[Info]-[PsdkAircraftInfo_GetPayloadMountPositionAsyncCallback:582]This payload is mounted on NO.1 gimbal connector.
    [3748675.289][module_core]-[Info]-[PsdkCore_Init:146]PSDK is connecting aircraft.
    nector.
    [3748675.289][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748676.289][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748677.289][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748678.290][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748679.290][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748680.290][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748681.290][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748682.291][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748683.291][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748684.291][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748685.291][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748686.292][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:138]Waiting payload negotiate finish.
    [3748687.365][module_nego]-[Info]-[PsdkPayloadNegotiate_RemoveDeviceSync:252]waiting payload negotiate finish.
    [3748688.365][module_nego]-[Info]-[PsdkPayloadNegotiate_RemoveDeviceSync:252]waiting payload negotiate finish.
    [3748688.501][module_nego]-[Info]-[PsdkPayloadNegotiate_VersionHandle:293]Payload negotiate use dynamic ip config
    [3748688.775][module_nego]-[Info]-[PsdkPayloadNegotiate_NotifyHandle:564]uav ip addr:192.168.110.1
    [3748689.365][module_nego]-[Info]-[PsdkPayloadNegotiate_Init:155]Payload negotiate has finished.
    eth0      Link encap:Ethernet  HWaddr 00:0a:35:00:01:22  
    [5024.017][module_nego]-[Info]-[PsdkPayloadNegotiate_RemoveDeviceSync:252]waiting payload negotiate finish.
    [5025.019][module_nego]-[Info]-[PsdkPayloadNegotiate_RemoveDeviceSync:252]waiting payload negotiate finish.
    [5025.137][module_nego]-[Info]-[PsdkPayloadNegotiate_VersionHandle:293]Payload negotiate use dynamic ip config
    [5025.433][module_nego]-[Info]-[PsdkPayloadNegotiate_NotifyHandle:564]uav ip addr:192.168.110.1
    [5026.020][module_user]-[Info]- get video stream remote address:192.168.110.1_23003
     
     ~~~~ Enter UserDataTransmission_Task  ~~~~
    set publisher success.
    [5028.292][module_subscription]-[Info]-[PsdkDataSubscription_RegTopicSync:603]Subscribe topic success.
    [5028.832][module_subscription]-[Info]-[PsdkDataSubscription_RegTopicSync:603]Subscribe topic success.
     
     aircraftType=[60] 
     
     ~~~~ Run  DataTransmission_Task Tick=[0] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 0, realtimeBandwidthAfterFlowController: 0, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 0, realtimeBandwidthAfterFlowController: 0, busyState: 0.
    ataSubscription_RegTopicSync:603]Subscribe topic success.
    [5029.384][module_upgrade]-[Info]-[PsdkUpgrade_Init:109]Upgrade transfer type is ftp, ftp port = 0
    [5029.384][module_upgrade]-[Info]-[PsdkUpgrade_EnableLocalUpgrade:118]Enable local upgrade
    [5029.384][module_core]-[Info]-[PsdkCore_ApplicationStart:199]Start application now.
    [5029.833][module_user]-[Info]- timestamp: millisecond 5029819 microsecond 734851993.
    [5029.833][module_user]-[Info]- quaternion: 0.636977 -0.011576 0.011861 0.770705.
    [5029.833][module_user]-[Info]- velocity: x 0.000000 y 0.000000 z 0.000000, healthFlag 0.
    [5029.833][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[1] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    ircraftInfo_NotifyMobileAppInfoHandle:621]Set mobile app info, language is Chinese, screen type is Big Screen
    [5030.839][module_user]-[Info]- timestamp: millisecond 5030819 microsecond 735851993.
    [5030.839][module_user]-[Info]- quaternion: 0.637014 -0.012138 0.012282 0.770659.
    [5030.839][module_user]-[Info]- velocity: x -0.000075 y 0.003566 z 0.000563, healthFlag 1.
    [5030.839][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[2] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5031819 microsecond 736851991.
    [5031.835][module_user]-[Info]- quaternion: 0.637007 -0.011974 0.012081 0.770670.
    [5031.835][module_user]-[Info]- velocity: x 0.001569 y -0.001552 z 0.000596, healthFlag 1.
    [5031.835][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[3] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    eSync_PushAppTimeHandle:90]current time: 2021.11.2 14:57 54.
    [5032.766][module_downloader]-[Warn]-[PsdkDataDownloader_SendDataUpdate:569]Psdk Camera Get App File Send Ack TimeOut
    [5032.836][module_user]-[Info]- timestamp: millisecond 5032839 microsecond 737872048.
    [5032.836][module_user]-[Info]- quaternion: 0.636893 -0.012083 0.012273 0.770760.
    [5032.836][module_user]-[Info]- velocity: x 0.000793 y -0.002248 z 0.001306, healthFlag 1.
    [5032.836][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[4] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5033819 microsecond 738851992.
    [5033.831][module_user]-[Info]- quaternion: 0.637119 -0.011580 0.011991 0.770585.
    [5033.831][module_user]-[Info]- velocity: x 0.000793 y -0.002248 z 0.001306, healthFlag 1.
    [5033.832][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[5] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5034819 microsecond 739851992.
    [5034.837][module_user]-[Info]- quaternion: 0.637108 -0.011633 0.012184 0.770590.
    [5034.839][module_user]-[Info]- velocity: x -0.000959 y 0.000583 z 0.000305, healthFlag 1.
    [5034.840][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[6] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5035819 microsecond 740851997.
    [5035.846][module_user]-[Info]- quaternion: 0.637041 -0.011778 0.012298 0.770641.
    [5035.846][module_user]-[Info]- velocity: x -0.001501 y 0.000286 z 0.000143, healthFlag 1.
    [5035.847][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[7] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5036839 microsecond 741872056.
    [5036.841][module_user]-[Info]- quaternion: 0.636883 -0.011896 0.012532 0.770767.
    [5036.842][module_user]-[Info]- velocity: x -0.001585 y -0.002681 z -0.000521, healthFlag 1.
    [5036.842][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[8] ~~~~Send Data  [120] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5037839 microsecond 742872036.
    [5037.837][module_user]-[Info]- quaternion: 0.636894 -0.011761 0.012230 0.770764.
    [5037.837][module_user]-[Info]- velocity: x -0.000808 y 0.000143 z -0.000327, healthFlag 1.
    [5037.837][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[9] ~~~~Send Data  [121] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    millisecond 5038839 microsecond 743872047.
    [5038.843][module_user]-[Info]- quaternion: 0.636863 -0.011755 0.012218 0.770791.
    [5038.843][module_user]-[Info]- velocity: x -0.000255 y -0.000367 z -0.001129, healthFlag 1.
    [5038.843][module_user]-[Info]- gps position: x 0 y 0 z 0.
    gps=0.000000
     ~~~~ Run  DataTransmission_Task Tick=[10] ~~~~Send Data  [121] bytes 
     send to mobile state: realtimeBandwidthBeforeFlowController: 120, realtimeBandwidthAfterFlowController: 120, busyState: 0.
     send to onboard computer state: realtimeBandwidthBeforeFlowController: 255, realtimeBandwidthAfterFlowController: 255, busyState: 0.
    ^C
    root@zynq:~# ping 192.168.110.1
    PING 192.168.110.1 (192.168.110.1) 56(84) bytes of data.
    64 bytes from 192.168.110.1: icmp_seq=1 ttl=64 time=0.643 ms
    64 bytes from 192.168.110.1: icmp_seq=2 ttl=64 time=0.473 ms
    64 bytes from 192.168.110.1: icmp_seq=3 ttl=64 time=0.552 ms
    ^C
    --- 192.168.110.1 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2060ms
    rtt min/avg/max/mdev = 0.473/0.556/0.643/0.069 ms
     
     

     

     

    0
    评论操作 固定链接
  • caluova

    PSDK配置:

    0
    评论操作 固定链接
  • DJI Developer Support
    根据您的图片,没有调用相关接口显示数据,这边提交工程师确认,如有进展将会及时告知您。
    0
    评论操作 固定链接
  • DJI Developer Support
    根据工程师确认,您可以在test_payload_cam_emu.c文件中将StreamType设成Custom格式,这边测试可以正常显示。 ![](https://djisdksupport.zendesk.com/attachments/token/NSy3Dn1vBhsj8tE91SCKqEfPS/?name=inline935104749.png)​
    0
    评论操作 固定链接

请先登录再写评论。