OSDK launch failure or simple activation error represent 10% of questions in DJI GitHub and stack overflow #dji-sdk.
There are many possibilities. DJI launch file provided a few guidelines which tells you to swap Tx RX or give access right to the port. It is 100% right, but it does not represent all cases
I`ve been using DJI based system for 3 years. Whatever stupid mistake i made will definitely going to happen to other people.
There is a checklist that you can go through to get rid of the issue.
The list is meant for error such as Drone version not obtained or new device error or first success connection(get firmware) then failed activation for Both DJI OSDK and DJI OSDK-ROS. This part is meant for below OSDK 4.0 and drone before M300. 1. Assuming you already enabled the API control, then check 2. Does UART on PC/ Raspberry PI is enabled? if not, enable it. 3. Does Baud rate in DJI assisatnt2 is same as the one in the USERCONFIG file of OSDK? if not, make it same. 4. For m210 v2, only 1000000 bardrate will work well. Others may have issue. Try it 5. Are you using the correct serial ID as well? If not, set it right. Recommend using /dev/serial/by-id/usb-XXX method 6. Did u give permission to the serial device e.g sudo chmod a+rw or sudo usermod -a -G dialout $USER or set the udev rule . If not choose a way to get it right. 7. FTDI series problems 7.1 Did you use this FTDI cable successfully on other platform before?(to make sure tx rx is correct 7.2 Is this FTDI 3.3V? If not, high chance your FCU board is already burned. Send it back for repair. 7.3 Measure the voltage on Tx and RX pin while everything is connected, is it being pulled up at 3.3V? if less than 3 then there is a serious communication issue. 7.4 Is there EMI generator around?( this one happen to me once, took me 2 weeks to isolate the issue, EMI cause unreliable connection 7.5 As an additional test, prob the tx and tx by Y cable using real-term to see if you can see any proper communication happening. 8 Did u forget to turn on the RC and app? If so turn it on while calling the sdk.launch 9. APP side issue(Go app or pilot app or dji assistant) 9.1 Did u connect the Go app while running sdk.launch? If not connect by GO app, connect it 9.2 Did you login to your account which creates the app id?If not, login to it. 9.3 Did u activate from GO app? click ok or confirm on the GO App once you run sdk.launch. Once you launch the sdk, the Go app will pop up activation or cancel. Activate it. But for those M210 who can not activate by pilot app. You can try to launch the code while dji assitant2 is turned on. It will do the same for activation 10. Did u try the hardware with the 3.8 with a Normal X86/X64 Intel PC/notebook with Ubuntu 16/18 before? is it working? ( rule out hardware/connection issue ) If it can work, then its special PC like some Raspberry PI or arm board issue. If you can not, high chance drone/RC side. I do have a couple of PC burn down experience b4 11. Did u have valid/correct app id and enc key? double check it. If not, enter is correct. 12. Is the voltage supplied to A3 stable and clean? 13. Have you tried this way of calling? /the_sample_u_wish_to_run UserConfig.txt /dev/ttyACM0. For some drone/firmware it has to be called this way 14. If you are using some special PC, make sure it is supported. E.g not all raspberry pi can compile and run osdk. 15. Are you calling the sdk.launch from somewhere else? make sure you only call it once and prevent it from being calling again. Make sure the serial port is not occupied. 16. Make sure API is enabled in DJI assistants. It means once you connect back, it should still show API enabled. Close everything power on and connect to DJI Assistant 2 again to verify this. If by any chance the board has an issue, the API enable you set in the previous run will get auto deselected. This is to rule out burned A3 board issue. 17. For many cases that A3 or FTDI cable can be burned, swap new ones and test independently with the help of arduino. This is to do individual hardware failure elimination test.
For M300 and new osdk 4.0.
There are plenty of issues now.
1. activation for new device error is almost automatic. As long as you connect the dji assistant 2. It did not pop up any activation pop up window for me. I run second time and it is running. I didn't even know how I pass it. But if you follow what i say, should pass this error easily.
2. Missing userconfig while using dji_sdk_node. launch for sdk_node? put a copy userconfig.txt in ./home/urname/.ros .Then all settle.
3. USB type C cable lose connection. This happen to me once for DJI m300 osdk adapter board. You need to open the board and make sure the type C are connected.
4. Check if both ACM and USB is present when plug in.
5. Seam / crack for the osdk board connector has to facing outside.
6. activate, L1248: osdk policy file updating(1) ....... This is not an error. You just need to wait for 5 to 10 min for it to finish.Not sure why.
7. If dji_sdk_node launch not working. then use dji_vehicle node launch. The first one didn't work for me as well.
8. If dji vehicle node not working, try to upgrade from firmware version ending with 07 to firmware version ending with 08.
Thats all I can think about. I hope this thread can give hint to some of the lost sheep.
Dr Yuan Shenghai
|