Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error
CompletedI am running the the PSDK application example on a linux computer to connect to the drone (M300 RTK). Often it hangs for an unknown period (varies between instantly and sometimes multiple minutes) before DjiCore_Init finishes to succesfully initialize. See log of such a situation attached to this post.
I am very sure I first initialize environment and drone connection and only afterwards init stuff like flight control, mop functionality etc. I'm also using bulk usb + uart.
I experience a lot of these errors when restarting the PSDK application, it looks like this:
[0.000][core]-[Info]-[DjiCore_Init:95) Payload SDK Version : V3.3.0-beta.0-build.1665
[1.680][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[1.764][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[1.774][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[1.813][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[1.833][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[3.420][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[4.824][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x135A 0xF986
[5.168][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[5.240][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[6.527][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2412 0x4DC0
[6.916][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
Note that I'm using the release/3.3 branch on psdk github, yet the version shown in the version print in the application mentiones a beta-tag..
Do you have any clue what to try? I don't experience any of these issues using OSDK 4.
-
also, if I control-C during this hang, I can produce this:
[101.213][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[102.956][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[104.349][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x8116 0x8BB5
^C[104.498][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xAA37 0xE084
[drone_application-2] killing on exit
[104.651][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.651][linker]-[Error]-[DjiLinker_RecvTask:267) send msg to queue error
[104.661][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.661][linker]-[Error]-[DjiLinker_RecvTask:267) send msg to queue error
[104.671][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.671][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.682][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.682][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.692][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.692][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.702][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.702][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.714][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.714][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.724][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.724][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.734][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.734][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.745][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.745][linker]-[Error]-[DjiLinker_RecvTask:259) send msg to queue error
[104.765][utils]-[Error]-[DjiMsgq_Send:230) semaphore wait timeout
[104.765][linker]-[Error]-[DjiLinker_RecvTask:267) send msg to queue error
[104.775][utils]-[Error]-[DjiMsgq_Destroy:100) send mutex destroy failed
[104.775][linker]-[Error]-[DjiLinker_DeInit:153) destroy recv msgq error
[104.775][adapter]-[Error]-[DjiAccessAdapter_IdentifyUart0InfoAndAircraftSeries:634) DjiLinker_DeInit, stat:255
[104.788][linker]-[Error]-[DjiProtocol_sdkUnpack:236) protocol frame crc32 error -
The error indicates that the serial port communication is abnormal. Compared with OSDK, PSDK 3.x version has added serial port baud rate auto-negotiation. The original OSDK 4.x needs to set the drone baud rate on DJI Assistant2. In PSDK 3.x, you can also set the baud rate through DJI Assistant2(please download the latest DJI Assistant2 2.1.7 version) first, and then set the same baud rate in the code to check if it works normally. -
Today I updated the assistant to 2.1.7 and it did not prevent this message:
[1.680][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
The M300 drone firmware is still on 4.x (not 5). Could that possibly be a problem?
-
I updated to the latest drone firmware using DJI assistant 2.1.7. The connecting seems to be better (takes 30 seconds max worst case).. In the OSDK tab I have set the baudrate to 921600 which is also in my app. However, I still get these kind of logs.. (sometimes it connects quicker, sometimes slower)
[0.951][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[1.184][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x89EE 0x92CC
[1.199][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xEAAB 0x71A0
[1.199][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x82AA 0x7718
[1.238][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xB98A 0xF47D
[1.564][linker]-[Error]-[DjiProtocol_sdkUnpack:236) protocol frame crc32 error
[1.663][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[6.336][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xCAA7 0xE740
[6.349][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2A06 0xA7C1
[6.797][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[8.066][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xD681 0x3879
[8.128][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2F02 0xB48D
[8.507][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[9.753][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xFE8B 0xBB31
[9.753][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xF1CD 0x9457
[1.199][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xEAAB 0x71A0 [20/1242]
[1.199][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x82AA 0x7718
[1.238][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xB98A 0xF47D
[1.564][linker]-[Error]-[DjiProtocol_sdkUnpack:236) protocol frame crc32 error
[1.663][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[2.971][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xA202 0xEA57
[3.377][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[4.595][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x87CD 0xA3C5
[5.086][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[6.321][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xAE0E 0x3304
[6.336][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xCAA7 0xE740
[6.349][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2A06 0xA7C1
[6.399][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x021F 0xBFB0
[6.479][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xAE02 0xF18E
[6.797][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[8.066][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xD681 0x3879
[8.128][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2F02 0xB48D
[8.507][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[9.753][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xFE8B 0xBB31
[9.753][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xF1CD 0x9457
[9.853][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2202 0x2041
[10.115][linker]-[Error]-[DjiProtocol_sdkUnpack:236) protocol frame crc32 error
[10.215][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[11.420][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2202 0x568B
[11.485][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x8286 0xEFD4
[11.924][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[13.169][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x89CC 0xE6D4
[13.637][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[14.949][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xEF2A 0x0367
[15.248][linker]-[Error]-[DjiProtocol_sdkUnpack:236) protocol frame crc32 error
[15.347][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[16.592][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xA20E 0x04D9
[16.604][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xA20E 0x0B6E
[16.696][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x02FA 0xB34B
[17.057][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[18.402][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2E06 0xED3A
[18.439][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x2162 0x7915
[18.767][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[19.998][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xA30F 0x6977
[20.476][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[20.558][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[20.579][linker]-[Warn]-[DjiProtocol_v1Unpack:171) protocol frame crc8 error
[21.758][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xEEC9 0x26CB
[22.087][linker]-[Error]-[DjiProtocol_sdkUnpack:236) protocol frame crc32 error
[22.188][adapter]-[Info]-[DjiAccessAdapter_Init:162) Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
[23.531][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0xAF2A 0xDB24
[23.559][linker]-[Error]-[DjiProtocol_sdkUnpack:227) protocol frame crc16 error:0x8203 0xCE92
[23.776][utils]-[Info]-[DjiSdkVersionAck_Parse:183) Identify aircraft serial number = XXXXXXXXXXX, Firmware = 3.4.18.13
[23.780][adapter]-[Info]-[DjiAccessAdapter_Init:171) Identify aircraft series is Matrice 300 Series
[23.780][adapter]-[Info]-[DjiAccessAdapter_Init:189) Identify mount position type is Extension Port Type
[24.943][core]-[Info]-[DjiIdentityVerify_UpdatePolicy:411) Updating dji sdk policy file...
[25.943][core]-[Info]-[DjiIdentityVerify_UpdatePolicy:414) Update dji sdk policy file successfully
[25.947][core]-[Info]-[DjiCore_Init:163) Identify AircraftType = Matrice 300 RTK, MountPosition = Extension Port, SdkAdapterType = None
[25.987][core]-[Info]-[DjiCore_ApplicationStart:223) Start dji sdk application
[25.987][user]-[Info]-[DjiUser_ApplicationStart:189) Application start. -
Because the PSDK 3.x version has added the baud rate adaptive negotiation, it seems that the UART communication failed at the beginning, you can first set the baud rate on DJI Assistant2, and then set the same baud rate in the PSDK code. Then when starting the PSDK program, it will use the same baud rate to communicate, try to check if it can communicate quickly. -
hello, this was our experience with this.
We was working with OSDK with no problem. we use different baudrated changing in Assistant and UserConfig file.
Now we are in a project that use PSDK. I was trying the examples and no problem too. Same baudrate in config files (i doest know thas psdk have autonegotiation baudrate)
In some moment the application we are programing stoped to comunicate with drone. I try to see why, executing the sample programs again and the messages was CRC error Try identify UART0 connection failed. Probably because SDK adapter or aircraft not finish init or UART connect error.
I was in v07.00.01 drone firmware. The OSDK still work correct.
I make a refresh firmware and dont work.
I make a downgrade to v06.01.01 and now works the connection works again
Upload again to last firmware and it OK.
Maybe "baud rate adaptive negotiation" freezes the firmware in some point.
Please sign in to leave a comment.
Comments
9 comments