Please select Into the mobile phone version | Continue to access the computer ver.
OSDK and OSDK-ros activation failure with solution and checklist
365 25 5-26 00:18
Uploading and Loding Picture ...(0/1)
o(^-^)o
Snakehaihai
lvl.2

Singapore
Offline

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
5-26 00:18
Use props
xiao long
lvl.3

South Africa
Offline


Great, Dr Yuan, this is very useful.
5-26 00:55
Use props
djiuser_isvekIzmXVvh
lvl.1

United States
Offline

Thanks for sharing! Will work further on it!
6-5 08:13
Use props
avashist
lvl.2

United States
Offline

Thanks for the post. I am facing an error when launching dji_vehicle node (using M300 RTK). The erros says "drone version not obtained" (attached the image). I checked my usb-ttl connection and it is connected and wiring is correct. if you have seen this issue before can you share your thoughts on this. Best,
7-2 18:09
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-2 18:09
Thanks for the post. I am facing an error when launching dji_vehicle node (using M300 RTK). The erros says "drone version not obtained" (attached the image). I checked my usb-ttl connection and it is connected and wiring is correct. if you have seen this issue before can you share your thoughts on this. Best,
[view_image]

I got M300 RTK up with both sdk node and vehicle node before.

First you have to rule out hardware issues by seeing if there is the correct voltage at  OSDK adapter output port.

Second, in the assistant 2 turns on the osdk checkbox

Third, once you turn m300 on. keep assistant 2 and RC+app  turned on

Fourth. sudo chmod  a+rw to both  ttyUSB and ttyACM .  also check if at this stage ACM is stable linked, means you already get the IP, if not settled, set static

Fifth, if still got an issue, try switch to another USB cable. I initially have a problem with FTDI cable, then i switch to dji manifold2G uart cable. and change from ttyUSB to tryTHS2.  Then i can run

Six. if still got issue. try to photo down what you have done ( what you tried, drone firmware etc), and come back here
7-2 21:13
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-2 21:13
I got M300 RTK up with both sdk node and vehicle node before.

First you have to rule out hardware issues by seeing if there is the correct voltage at  OSDK adapter output port.

Thanks, I will try and will get back.
But one quick thing, I was initially only using the usb-ttl connection between the M300 and the onboard computer. Is it mandatory to also have the ttyACM connection between the drone and onboard pc connected using the usb at the same time ? or even without the acm port connection it should work (only using the serial usb-ttl connection ?)
7-6 09:47
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-6 09:47
Thanks, I will try and will get back.
But one quick thing, I was initially only using the usb-ttl connection between the M300 and the onboard computer. Is it mandatory to also have the ttyACM connection between the drone and onboard pc connected using the usb at the same time ? or even without the acm port connection it should work (only using the serial usb-ttl connection ?)

for the beginning, i did not chmod to ttyACM0 which is same as not connecting it. so I get this error  failed to start linker for ACM . but even with this error i can still get telemetry.  That was for the beta osdk 4.0.  for newer osdk 4.0 it might be fixed or leave it like this. totally depends on how osdk group wants to implemented it.
7-6 10:44
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-6 10:44
for the beginning, i did not chmod to ttyACM0 which is same as not connecting it. so I get this error  failed to start linker for ACM . but even with this error i can still get telemetry.  That was for the beta osdk 4.0.  for newer osdk 4.0 it might be fixed or leave it like this. totally depends on how osdk group wants to implemented it.

Hey I am adding the steps I performed along with the images, I am still facing the same error. If you can take a look at it and see if I missed anything critical that would be of great help.

1) osdk cable: osdk pin A5 (uart-RX) to usb-ttl TX wire, osdk pin A8 (uart-TX) to usb-ttl RX wire and ground to ground. Voltage check of 3.3v at Rx and TX



2) connected with the drone and the jetson Tx2, terminal output shows it is being recognized by ttyUSB0



3) added device ruled.d and dialout permission as per the osdk website
https://developer.dji.com/onboar ... ironment-setup.html

4) set the UserConfig file with correct id, key and baud rate= 921600
5) dji Assistant : enabled API and set baud rate

6) powered on drone , smart controller and dji assistant and launched the dji_flight-control-sample :

received the same drone version not obtained error

7) checked with the ros launch dji-vehicle launch and still receives the same error.

firmware is up to date and using the 4,0 osdk version
7-8 09:41
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-8 09:41
Hey I am adding the steps I performed along with the images, I am still facing the same error. If you can take a look at it and see if I missed anything critical that would be of great help.

1) osdk cable: osdk pin A5 (uart-RX) to usb-ttl TX wire, osdk pin A8 (uart-TX) to usb-ttl RX wire and ground to ground. Voltage check of 3.3v at Rx and TX

try with 10000000. If i recall correctly, i was using this for both m210 and m300 all the time
7-8 13:29
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-8 13:29
try with 10000000. If i recall correctly, i was using this for both m210 and m300 all the time

Hey, setting it to 100000 also didn't work. But I noticed one thing:

for baud rate of 100000, the terminal will terminate after saying failed to initialize linker channel. like image shown below


but with 921600 baud rate: it will show the terminal output like this:


Do you think the serial connection has some issues ?
7-8 14:17
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-8 14:17
Hey, setting it to 100000 also didn't work. But I noticed one thing:

for baud rate of 100000, the terminal will terminate after saying failed to initialize linker channel. like image shown below

i also get telemery working without ACM linker before.

From the method wise, i didn't notice any error.  

When this thing happens, try to   unplug everything and plug back  + power off everything and power back. for like 10 times. to see if there is a chance of connecting through. I did had problem with old 210 stream before and it only have a small chance of running


Also help to post your userconfig files  and other necessary information for me to take a look at.

For TX and RX did you swap and tried multiple times? have you tried this ftdi chip on an arduino before?



7-9 10:32
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-9 10:32
i also get telemery working without ACM linker before.

From the method wise, i didn't notice any error.  

Thanks a lot for these suggestions. I finally got it working. I switched on-off the RC couple of times along with the drone and then it worked.. (previously I was only resetting the drone 0n/off but keeping the RC On, maybe it takes some time for drone and RC along with the assistant to sync... )
7-10 06:09
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-10 06:09
Thanks a lot for these suggestions. I finally got it working. I switched on-off the RC couple of times along with the drone and then it worked.. (previously I was only resetting the drone 0n/off but keeping the RC On, maybe it takes some time for drone and RC along with the assistant to sync... )

congraz. finally. DJI system always needs on-off for many times.
7-10 07:51
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-10 07:51
congraz. finally. DJI system always needs on-off for many times.

Hey I have an issue with the assistant 2 simulator to fly the drone. can you see if you have used the simulator and faced this issue...

I am using the DJI Assistant 2 Simulator to fly the drone but it does not respond to any RC control and sit still in the simulator.

Steps: Connect the drone (Matrice 300 RTK) with the laptop, launch the application, start the Smart Controller, click on simulation, a new window appears with the drone. Then when I use the controller it won't fly or do anything. I tried the CSC controls and still no response.
Is there any step that I am missing ?

One thing I notice on controller, it shows my location is flight restricted, but for the simulation flight I assume that shouldn't be a concern ?

- account is registered
- firmware is to to date
7-10 09:00
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-10 09:00
Hey I have an issue with the assistant 2 simulator to fly the drone. can you see if you have used the simulator and faced this issue...

I am using the DJI Assistant 2 Simulator to fly the drone but it does not respond to any RC control and sit still in the simulator.

ok for the simulation, set the fake GPS location to somewhere in legal flight zone.

Also if you upload mission, make sure drone real GPS and compass has no interference. It is not 100% simulation. still taking in a lot of real data. If real data does not fit the program check, you cant fly it. I learn it from DJI internal group.

For 107 and 108 firmware, i have no problem fly it in ATTI. but i couldn't upload the mission because of GPS and compass interference.

7-11 04:39
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-11 04:39
ok for the simulation, set the fake GPS location to somewhere in legal flight zone.

Also if you upload mission, make sure drone real GPS and compass has no interference. It is not 100% simulation. still taking in a lot of real data. If real data does not fit the program check, you cant fly it. I learn it from DJI internal group.

Hey, I am trying to use different gps coordinates based on the flight restriction zones, mostly in warning zone (yellow ones as there are no green zones in US that I can found) so it's still not simulating.. can you by any chance provide me with an example gps coordinates that I can use to test the simulator ?
7-14 09:21
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-14 09:21
Hey, I am trying to use different gps coordinates based on the flight restriction zones, mostly in warning zone (yellow ones as there are no green zones in US that I can found) so it's still not simulating.. can you by any chance provide me with an example gps coordinates that I can use to test the simulator ?

you can try with this coordinate   1.293054, 103.788713

We tested the drone simulation around there. The actual GPS and compass on drone is not interfered there also. I could run the simulation and upload mission there.


regards
Shanghai Yuan
7-14 09:25
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-14 09:25
you can try with this coordinate   1.293054, 103.788713

We tested the drone simulation around there. The actual GPS and compass on drone is not interfered there also. I could run the simulation and upload mission there.

So I set the coordinates as mentioned and still it won't do anything. Am I possibly missing any intermediate step. I have attached the screenshot of the simulator that shows the gps coordinates (which it is reading correctly). But when I use the RC to control it it won't do anything.
Also I checked the RC controller commands are getting read by the simulator as when I move the controller sticks i can see them getting changed on the simulator control window. also getting published in ros.
Screen Shot 2020-07-14 at 2.12.38 PM.png
7-14 10:23
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-14 10:23
So I set the coordinates as mentioned and still it won't do anything. Am I possibly missing any intermediate step. I have attached the screenshot of the simulator that shows the gps coordinates (which it is reading correctly). But when I use the RC to control it it won't do anything.
Also I checked the RC controller commands are getting read by the simulator as when I move the controller sticks i can see them getting changed on the simulator control window. also getting published in ros.


Whats the firmware version you are using?

Is there any warning or notices on your remote controller screen?

emm i never encounter this bug before. mine issue was different from your. my new commercial 300 is going to arrive later this week. i can test it then.
7-14 11:11
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-14 11:11
Whats the firmware version you are using?

Is there any warning or notices on your remote controller screen?

it's the latest firmware .0109 version of the drone.

the smart controller RC shows the flight restrictions in the avionics section of Health Management System even with this gps coordinates (that you sent me).
7-14 11:24
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-14 11:24
it's the latest firmware .0109 version of the drone.

the smart controller RC shows the flight restrictions in the avionics section of Health Management System even with this gps coordinates (that you sent me).

I only tested up to 108. 109 and 110 not tested yet.

Let me try it again and get back to you this weekend. my original DJI beta 300 drone and adapter are being taken away. Currently, I got no 300 to test it.
7-14 11:27
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-14 11:27
I only tested up to 108. 109 and 110 not tested yet.

Let me try it again and get back to you this weekend. my original DJI beta 300 drone and adapter are being taken away. Currently, I got no 300 to test it.

Hey, did you get the chance to test it ?
I tried multiple times and it still won't work in  the simulator with the  fake gps coordinates
7-21 06:47
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-21 06:47
Hey, did you get the chance to test it ?
I tried multiple times and it still won't work in  the simulator with the  fake gps coordinates

Same i can run simluatuons without issue.
Can i check which version of dji assistant you are using? There are many

Im using dji assistant for matrix. Which i download at April
7-21 07:02
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-21 07:02
Same i can run simluatuons without issue.
Can i check which version of dji assistant you are using? There are many

I am using DJI Assistant 2 for matrice, version v2.0.12.
screenshot of the application:

Screen Shot 2020-07-22 at 3.03.07 PM.png
7-22 11:05
Use props
Dr. Yuan Shenghai
lvl.2

Singapore
Offline

avashist Posted at 7-22 11:05
I am using DJI Assistant 2 for matrice, version v2.0.12.
screenshot of the application:

Im using 2.0.11.   
try to use the same version

https://drive.google.com/file/d/ ... J0/view?usp=sharing
7-22 11:10
Use props
avashist
lvl.2

United States
Offline

Dr. Yuan Shenghai Posted at 7-22 11:10
Im using 2.0.11.   
try to use the same version

seems like the version that you sent me is for windows machine, I am using a Mac based machine. So not able to install it, I will try on windows machine and will update.
Or if you happen to have the version for Mac machine can you send that.
7-22 11:23
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules