PSDK UART Connection to Raspberry PI
3206 2 2022-4-4
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_4ahHkQKy9lFx
lvl.2

United States
Offline

Hello
I have a raspberry pi zero 2 connected to Payload SDK Development board via UART serial via the Skyport2 interface.
When I run my c++ app which is using the hal_uart.c, I can see in the Assistant that Skyport connects and my app receives information about the M210 rtk aircraft.
But then is fails with Command Async error 0 here is the logging


pi@Erelas:~/searchlight/project/build $ sudo ./gpio-test 0 - 115200
[0.001][core]-[Info]-[DjiCore_Init:92) Payload SDK Version : V3.1.0-beta.0-build.1491
0 - 115200
0 - 230400
0 - 460800
[0.273][adapter]-[Info]-[DjiAccessAdapter_Init:154) Identify aircraft series is Matrice 200 V2 Series [0.273]
[adapter]-[Info]-[DjiAccessAdapter_Init:171) Identify mount position type is Payload Port Type
0 - 460800
0 - 460800
[0.293][core]-[Info]-[DjiIdentityVerify_UpdatePolicy:413) Updating dji sdk policy file... [1.294]
[core]-[Info]-[DjiIdentityVerify_UpdatePolicy:413) Updating dji sdk policy file... [2.294]
[core]-[Info]-[DjiIdentityVerify_UpdatePolicy:413) Updating dji sdk policy file... [3.294]
[core]-[Info]-[DjiIdentityVerify_UpdatePolicy:416) Update dji sdk policy file successfully [5.303]
[linker]-[Warn]-[DjiCommand_SendAsyncHandle:860) Command async send retry: index = 0, retryTimes = 3, cmdSet = 25, cmdId = 50 [6.304]
[linker]-[Warn]-[DjiCommand_SendAsyncHandle:860) Command async send retry: index = 0, retryTimes = 2, cmdSet = 25, cmdId = 50 [7.305]
[linker]-[Warn]-[DjiCommand_SendAsyncHandle:860) Command async send retry: index = 0, retryTimes = 1, cmdSet = 25, cmdId = 50 [8.306]
[linker]-[Error]-[DjiCommand_SendAsyncHandle:872) Command async send error 0 [8.307]
[linker]-[Error]-[DjiCommand_SendSync:475) sendSync callback timeout [8.307]
[infor]-[Error]-[DjiMountPosition_GetOnPayloadPort:89) get payload mount position error: 0x000000E1. [8.307]
[infor]-[Error]-[DjiAircraftInfo_Init:232) Get sdk mount position error. Probably the DJI SDK Adpater has not binded. Please check the bind state of the DJI SDK Adpater and bind it.  [10.308]
[linker]-[Warn]-[DjiCommand_SendAsyncHandle:860) Command async send retry: index = 0, retryTimes = 3, cmdSet = 25, cmdId = 50 [11.309]
[linker]-[Warn]-[DjiCommand_SendAsyncHandle:860) Command async send retry: index = 0, retryTimes = 2, cmdSet = 25, cmdId = 50 [12.310]
[linker]-[Warn]-[DjiCommand_SendAsyncHandle:860) Command async send retry: index = 0, retryTimes = 1, cmdSet = 25, cmdId = 50

When I click bind in the enterprise explorer I get an error message:
"Can not get Authentification info"
I have included all the fields in the dji_sdk_app_info.h file

and if you notice in the logs it correctly ids the aircraft type, so I assume that the uart serial has a connection on some level

Thanks for any help, this post is my only available hope at the moment.


terminalOut.png
2022-4-4
Use props
djiuser_4ahHkQKy9lFx
lvl.2

United States
Offline

UPDATE: I switched to using an M300 and I was able to bind the protype!
Perhaps I was supposed to use an older version of the sample code for the M210? I am not sure, I will just now rejoice that it is working!
2022-4-5
Use props
djiuser_vEO4NyhKka28
lvl.1

Taiwan
Offline

djiuser_4ahHkQKy9lFx Posted at 2022-4-5 10:30
UPDATE: I switched to using an M300 and I was able to bind the protype!
Perhaps I was supposed to use an older version of the sample code for the M210? I am not sure, I will just now rejoice that it is working!

I'm working on a similar problem. I have the a rasp 3B and  a M300 connected via the skyport 2.
I haven't been able to run the sample code. I have to the best of my knowledge done everything as instructed in the PSDK tutorial but it doesn't work.

Did you modify the cmake files or did you change the raspberry pi baud rate?
2023-5-19
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules