PSDK 示例程序 运行出错

Completed

Comments

18 comments

  • qiubinate

    不好意思,问题描述和信息给反了

    0
    Comment actions Permalink
  • DJI Developer Support
    失败时的log是给飞机端发送串口数据失败了,如果是偶现,可以先在dji_sdk_config.h中关闭几个功能,调整修改一下使用的波特率试试串口通信的稳定性。(skyport 需要在DJI Assistant2 Payload SDK界面修改波特率)。
    0
    Comment actions Permalink
  • qiubinate

    不算偶现,昨天就成功跑了一次,我先修改波特率试一下

    0
    Comment actions Permalink
  • qiubinate

    在 DJI Assistant2 Payload SDK 界面没有修改波特率的界面

    0
    Comment actions Permalink
  • DJI Developer Support
    先确认一下DJI Assistant2登录的账号与这个转接环绑定的账号是不是一致的,要一致才能对转接环进行操作。
    0
    Comment actions Permalink
  • qiubinate

    已经确定了账号是一致的,还是不能修改

    0
    Comment actions Permalink
  • DJI Developer Support
    绑定时PSDK中APPINFO信息中的账号邮箱是不是完整的(包含@后面部分)?Payload SDK界面不显示是登录DJI Assistant2的账号与绑定时的账号信息不匹配,不允许对已经绑定的转接环进行操作。
    0
    Comment actions Permalink
  • qiubinate

    绑定时是带了有@后面部分的,现在还是无法在DJI Assistant2 修改波特率,请问一下这种情况该怎么排查Demo运行出错的原因

    0
    Comment actions Permalink
  • DJI Developer Support
    报错中显示是获取转接环的信息超时,且有成功运行过,可能在于串口通信不稳定导致。DJI Assistant2上无法刷新转接环绑定和修改波特率界面,这个是与账号不匹配相关,可能没有什么好办法。可以使用DJI Assistant2(2.1.9)版本将转接环固件刷新到最新版本,然后再看看,如果依旧无法显示绑定和波特率设置界面,可以考虑将转接环寄修上申请解绑。
    0
    Comment actions Permalink
  • qiubinate

    好的,我们可以在尝试一下,请问PSDK绑定的时候为什么和账号会不匹配呢,在APPINFO中是否需要填写完整的邮箱地址,也就是之前你回复的@后面的部分,我们还有一个环,实在不行先寄修,用另一个环先调,有没有什么注意事项,到时候另一个环也出现这种情况怎么办

    0
    Comment actions Permalink
  • DJI Developer Support
    PSDK代码中APPINFO的账号要与DJI Assistant2登录账号完全一致,也就是需要携带@后部分,不然会导致绑定后无法显示PSDK操作界面的情况。
    0
    Comment actions Permalink
  • qiubinate

    你好,所有波特率都试过了,例程还是在同一个地方出错了,也就是没有获取到转接环的信息

    0
    Comment actions Permalink
  • DJI Developer Support
    1、在DJI Assistant2 固件升级界面查看一下飞机固件版本,和skyport 固件版本,并升级到最新版本。 2、如果有skyport v2开发套件,可以用开发套件中的拓展板搭建开发环境,运行原始demo程序,提供硬件实物连接图,已经PSDK demo完整的运行日志。
    0
    Comment actions Permalink
  • qiubinate

    飞机固件和skyport 固件均已是最新版本,分别是V07.00.0100和V01.03.0500,硬件连接是直接从环上的接口处引出来的线,这样子连接我们之前在另一块板子上跑过。现在的情况就是,硬件连接部分没动过,飞机这边也没动过,将负载换了一块嵌入式linux系统板就跑不起来了,日志内容很少,我就直接贴在连接图下方了

    日志内容

    [32m[0.001][core]-[Info]-[DjiCore_Init:101) Payload SDK Version : V3.5.0-beta.0-build.1765 [0m
    [37m[0.002][utils]-[Debug]-[DjiCore_RootTask:131) work execution time: [0m
    [37m[0.002][utils]-[Debug]-[DjiCore_RootTask:132) name                    execution time (ms)      max execution time (ms) [0m
    [37m[0.002][utils]-[Debug]-[DjiCore_RootTask:134) recorderWork                        0           0        [0m
    [37m[0.002][utils]-[Debug]-[DjiCore_RootTask:134) flowControllerTask                  0           0        [0m
    [37m[0.021][linker]-[Debug]-[DjiLinker_Init:124) init linker success, protocol:2, channelId:0 [0m
    [37m[0.021][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0A06->0x0300 0x03FD [0m
    [37m[0.041][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0A06->0x0300 0x03FD [0m
    [37m[0.061][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0A06->0x0300 0x03FD [0m
    [37m[0.081][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0A06->0x0300 0x03FD [0m
    [37m[0.101][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0A06->0x0300 0x03FD [0m
    [37m[0.124][linker]-[Debug]-[DjiLinker_DeInit:164) deinit linker success, protocol:2, channelId:0 [0m
    [37m[0.133][linker]-[Debug]-[DjiLinker_Init:124) init linker success, protocol:2, channelId:0 [0m
    [37m[0.133][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.153][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.173][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.193][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.213][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.236][linker]-[Debug]-[DjiLinker_DeInit:164) deinit linker success, protocol:2, channelId:0 [0m
    [37m[0.245][linker]-[Debug]-[DjiLinker_Init:124) init linker success, protocol:2, channelId:0 [0m
    [37m[0.245][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.265][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.285][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.305][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.326][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.348][linker]-[Debug]-[DjiLinker_DeInit:164) deinit linker success, protocol:2, channelId:0 [0m
    [37m[0.357][linker]-[Debug]-[DjiLinker_Init:124) init linker success, protocol:2, channelId:0 [0m
    [37m[0.357][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.364][linker]-[Debug]-[DjiProtocol_v1Unpack:213) V1-Recv: 0x0503->0x0507 0x03FD [0m
    [37m[0.377][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x03FD [0m
    [37m[0.380][linker]-[Debug]-[DjiLinker_DeInit:164) deinit linker success, protocol:2, channelId:0 [0m
    [32m[0.380][adapter]-[Info]-[DjiAccessAdapter_Init:186) Identify aircraft series is Matrice 300 Series [0m
    [32m[0.380][adapter]-[Info]-[DjiAccessAdapter_Init:206) Identify mount position type is Payload Port Type [0m
    [37m[0.380][linker]-[Debug]-[DjiCommand_Init:157) config list channel id:2 [0m
    [37m[0.386][linker]-[Debug]-[DjiLinker_Init:124) init linker success, protocol:2, channelId:0 [0m
    [37m[0.386][linker]-[Debug]-[DjiCommand_Init:166) add linker node count:1 [0m
    [32m[0.386][adapter]-[Info]-[DjiAccessAdapter_Init:301) Identity uart0 baudrate is 460800 bps [0m
    [37m[0.386][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x3C3D [0m
    [37m[0.386][linker]-[Debug]-[DjiCommand_SendAsync:435) Max wait ack item count is 32. [0m
    [33m[0.887][linker]-[Warn]-[DjiCommand_SendAsyncHandle:875) Command async send retry: index = 0, retryTimes = 3, cmdSet = 60, cmdId = 61 [0m
    [37m[0.887][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x3C3D [0m
    [37m[1.068][utils]-[Debug]-[DjiCore_RootTask:131) work execution time: [0m
    [37m[1.068][utils]-[Debug]-[DjiCore_RootTask:132) name                    execution time (ms)      max execution time (ms) [0m
    [37m[1.068][utils]-[Debug]-[DjiCore_RootTask:134) recorderWork                        1           1        [0m
    [37m[1.068][utils]-[Debug]-[DjiCore_RootTask:134) flowControllerTask                  1           1        [0m
    [37m[1.068][utils]-[Debug]-[DjiCore_RootTask:134) commandTask                         0           0        [0m
    [33m[1.389][linker]-[Warn]-[DjiCommand_SendAsyncHandle:875) Command async send retry: index = 0, retryTimes = 2, cmdSet = 60, cmdId = 61 [0m
    [37m[1.389][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x3C3D [0m
    [33m[1.890][linker]-[Warn]-[DjiCommand_SendAsyncHandle:875) Command async send retry: index = 0, retryTimes = 1, cmdSet = 60, cmdId = 61 [0m
    [37m[1.890][linker]-[Debug]-[DjiProtocol_v1Pack:122) V1-Send: 0x0507->0x0503 0x3C3D [0m
    [37m[2.135][utils]-[Debug]-[DjiCore_RootTask:131) work execution time: [0m
    [37m[2.135][utils]-[Debug]-[DjiCore_RootTask:132) name                    execution time (ms)      max execution time (ms) [0m
    [37m[2.135][utils]-[Debug]-[DjiCore_RootTask:134) recorderWork                        0           1        [0m
    [37m[2.135][utils]-[Debug]-[DjiCore_RootTask:134) flowControllerTask                  1           1        [0m
    [37m[2.135][utils]-[Debug]-[DjiCore_RootTask:134) commandTask                         1           1        [0m
    [31m[2.391][linker]-[Error]-[DjiCommand_SendAsyncHandle:887) Command async send error 0 [0m
    [37m[2.391][linker]-[Debug]-[DjiCommand_SendAsyncHandle:906) Timeout func deal about: 0 ms [0m
    [31m[2.391][linker]-[Error]-[DjiCommand_SendSync:488) sendSync callback timeout [0m
    [31m[2.391][infor]-[Error]-[DjiSdkAdapterType_GetOnPayloadPort:68) Get SDK adapter type command error [0m
    [31m[2.391][adapter]-[Error]-[DjiPayloadNegotiate_Init:151) Get sdk adapter failed, errno:0x000000E1 [0m
    [31m[2.391][adapter]-[Error]-[DjiAccessAdapter_Init:312) Payload negotiate error, returnCode = 225 [0m
    [31m[2.391][adapter]-[Error]-[DjiAccessAdapter_Init:318) Payload negotiate error, returnCode = 225 [0m
    [31m[2.391][core]-[Error]-[DjiCore_Init:121) Access adapter init error, stat:225 [0m
    [31m[2.391][user]-[Error]-[main:131) Core init error [0m
    0
    Comment actions Permalink
  • DJI Developer Support
    这边查看不到设备端的硬件连接部分,麻烦也提供一下设备端的实物图。
    0
    Comment actions Permalink
  • qiubinate

    我们就是直接把uart 和 lan 口引出来的,然后接了个340转到板子上的

    0
    Comment actions Permalink
  • DJI Developer Support
    咱们开发环境是不是有官方的拓展转接板,可以参考这个链接用开发套件中的拓展转接板试试。 Payload SDK开发环境(https://sdk-forum.dji.net/hc/zh-cn/articles/5154963094681)
    0
    Comment actions Permalink
  • qiubinate

    手里没有转接板,准备入手一个,但是现在调试的过程中,发现飞机端是有回应关于 cmdSet = 60, cmdId=61的消息的,而在PSDK中却并没有接收到此项回应。

    我们测试的过程是把uart转340的地方又接了一个340出去,专门用于接收飞机下发的数据,然后把PSDK中 uart的部分摘出去写了个测试例程,接收飞机下发的数据。在psdkdemo和测试例程中将收发数据打印出来,结果是psdk中未收到关于 3C 3D命令的反馈,而在例程中是接收到了的。

     

    0
    Comment actions Permalink

Please sign in to leave a comment.