我用正点原子的阿波罗开发板移植OSDK样例程序,可以看到消息已经通过UART3发给了M300,但M300一直不回复,造成获取版本失败,握手不成功。我只连接了M300的OSDK接口的UART, 同时按照文档说明typeC接口的B7,B8接地,B6悬空。M300也升级到了最新版FW。 DJI Assistant 2 上的串口带宽和开发板usart3设置的是一致的,设置完还重启了,但就是不能建立通讯连接。不知道下一步该怎么查了。
DJI Assistant 2 For Matrice 版本:2.0.13
M300 FW版本:v01.00.0211
UART3的抓包部分消息结果(这些命令消息已经被DJI 的linker 打包了,我也无法理解具体含义,有高手可以解释一下吗?这些命令是正确的吗?):
FF
AA13000200000000010001EE000000671ACC54
AA13000200000000010001EE000000671ACC54
AA13000200000000010001EE000000671ACC54
AA13000200000000010001EE000000671ACC54
AA13000300000000020011DE000000B6234A6E
AA13000300000000020011DE000000B6234A6E
UART2的电脑端的部分消息:
1.501]ERRORLOG/1 [url=home.php?mod=space&uid=287976]@[/url] STM32Setup::initVehicle, L69: Failed to initialize ACM Linker channel!
[1.510]STATUS/1 @ mainLoopTask, L149: Sample App for STM3241G- Board
[1.517]STATUS/1 @ DJI::OSDK::LegacyLinker::legacyX5SEnableTask, L56: Legacy X5S Enable task created.
[1.547]STATUS/1 @ mainLoopTask, L152: Prerequisites:
1. Set flight simulation is ON by DJI Assistant or config tool
2. Battery fully chanrged
3. App connected (for the first time run)
4. Gimbal mounted if needed
[4.285]ERRORLOG/1 @ DJI::OSDK::Vehicle::getDroneVersion, L1706: Drone version not obtained! Please do not proceed.
Possible reasons:
Serial port connection:
* SDK is not enabled, please check DJI Assistant2 -> SDK -> [v] Enable API Control.
* Baudrate is not correct, please double-check from DJI Assistant2 -> SDK -> baudrate.
* TX and RX pins are invert
[4.319]STATUS/1 @ DJI::OSDK::Vehicle::functionalSetUp, L282: Shake hand with drone Fail ! Cannot get drone version. (1/20)
[4.331]STATUS/1 @ DJI::OSDK::Vehicle::functionalSetUp, L284: Try again after 1 second ......
[8.028]ERRORLOG/1 @ DJI::OSDK::Vehicle::getDroneVersion, L1706: Drone version not obtained! Please do not proceed.
Possible reasons:
Serial port connection:
* SDK is not enabled, please check DJI Assistant2 -> SDK -> [v] Enable API Control.
* Baudrate is not correct, please double-check from DJI Assistant2 -> SDK -> baudrate.
* TX and RX pins are invert
一些截图: