Please select Into the mobile phone version | Continue to access the computer ver.
How to make an adapter cable/board for DJI M300 RTK OSDK interface
1901 21 7-6 02:12
Uploading and Loding Picture ...(0/1)
o(^-^)o
Xiao Long
lvl.3

South Africa
Offline

About how to connect and use the DJI M300 RTK OSDK API interface,
after groping and summing up some experience,
here is a summary to help you quickly use the M300 OSDK~


1. Interface changes

   The OSDK API interface of DJI M300 RTK has changed significantly compared to M210
   First:       the position is switched from the tail of the aircraft to the top of the aircraft
   Second:  the interface changed from the H2.54mm pin header interface to the USB TypeC interface


2. How to use the new OSDK API interface?

   The first way
   Direct purchase of DJI's official OSDK adapter board,   Product manuals  https://dl.djicdn.com/downloads/matrice-300/20200617/OSDK_Expansion_Module_Product_Information.pdf     
   as shown below
    4.png
   According to the OSDK official website document description, one end of this adapter board is a USB Type-C interface, which is used to access the OSDK interface on the M300.
   The other end to the OSDK UART interface, OSDK USB interface, XT30 power supply interface, and other expansion interfaces (there is no definition on the official website at present).
   But We can't buy this adapter yet. I have contacted DJI. This product has not been officially launched in the DJI mall, but it can be expected that it will be officially launched at the end of July or early August.

  The second way

  Make OSDK extension cable/board by yourself!
  In fact, don't worry about can not buying the official OSDK adapter, we can make and design by ourselves.
  Because the DJI official has given the M300 RTK OSDK interface definition, you can refer to the description of the official OSDK documentation   
  Documentation link: https://developer.dji.com/document/1bb1b2dc-9694-4d6b-ad43-fa69c5a10400
   5.png

3. How to DIY OSDK interface adapter cable/board?


    1. Understand TypeC interface
    The DJI M300 RTK OSDK API interface uses the USB Type C interface standard
    But it should be noted that the interface on the aircraft is a male plug!
    So you have to buy a USB Type C female plug!        The connection type is USB Type C 24 PIN female plug
    The cable can use a 24PIN copper conductor, four pairs of power lines rated current > 5A.

    2. Understand the interface definition
    As shown in the following figure, based on the direction of the drone's progress    7.png
    The A1 -> A12 is defined on the outside of the drone

    And B12 -> B1 is defined on the inside of the drone.
      8.png

    3. Circuit connection diagram
     
    1.png
      Be careful:
      1. The VCC of USB and UART cannot be connected to VCC, because the VCC is 24V and can be set to dangling status
      2. The B6 pin must be set to dangling status, it seems to be related to the USB ID
      3. The B7 pin and B8 pin must be connected to the GND, it seems to be used to detect OSDK device and USB devices
      4. It is recommended to use all eight pins of GND and VCC to ensure the power supply and stability
      5. Other pins that are not marked in the figure, can be set to dangling status if not used
      6. OSDK Type C interface is directional. Once the line sequence is defined, it cannot be connected in reverse.
          The corresponding connector can also be designed according to the anti-reverse installation structure (three spikes) of the OSDK interface.
       7. Rated current requirement of four pairs of power lines > 5A

4. How to quickly test and verify?

     I bought a USB TypeC female puls test board on the electronic mall.
     Then connect the UART and USB interface with Dupont cable, and can directly start development and use! !
      
3.png
      Hope this helps!

















7-6 02:12
Use props
avashist
lvl.3

United States
Offline

Thanks for this, it helps.
7-7 06:17
Use props
avashist
lvl.3

United States
Offline

Hey, quick question, do I need both USB and UART osdk connected with the onboard combuter or just using the OSDK UART should work ?
Also you show that usb-c A5(UART-RX) is connected to the RX of the UART and A8 (UART-TX) to TX od osdk UART, shouldn't it be the other way like Tx-RX and Rx - Tx ? like they mentioned in the document.

Also I have attached my image of the cable that I made, connections:

A5 - RX of usb-ttl
A8 - TX of usb-ttl
A12- ground
B7, B8 - ground


enabled api on dji assistant, only using the UART osdk connection, no usb osdk for now
dialout and djidevive rule.d are set

But when I connect with the drone and the jestson I am see the error: Drone version not obtained

IMG_2454.jpeg
7-8 05:50
Use props
Responder Air
lvl.4
United States
Offline

avashist Posted at 7-8 05:50
Hey, quick question, do I need both USB and UART osdk connected with the onboard combuter or just using the OSDK UART should work ?
Also you show that usb-c A5(UART-RX) is connected to the RX of the UART and A8 (UART-TX) to TX od osdk UART, shouldn't it be the other way like Tx-RX and Rx - Tx ? like they mentioned in the document.

Thanks for the diagram, I seem to recall something about USB needing diodes or something to make usb sensing work? You using raspbian on the pi or jetson @xiao
7-8 12:16
Use props
avashist
lvl.3

United States
Offline

Responder Air Posted at 7-8 12:16
Thanks for the diagram, I seem to recall something about USB needing diodes or something to make usb sensing work? You using raspbian on the pi or jetson @xiao

Hey I am using Jetson TX2 for the onboard device, and having issues with establishing the connection: shown below. Let me know if you can point to a possible solution.

7-8 14:20
Use props
Xiao Long
lvl.3

South Africa
Offline

avashist Posted at 7-8 05:50
Hey, quick question, do I need both USB and UART osdk connected with the onboard combuter or just using the OSDK UART should work ?
Also you show that usb-c A5(UART-RX) is connected to the RX of the UART and A8 (UART-TX) to TX od osdk UART, shouldn't it be the other way like Tx-RX and Rx - Tx ? like they mentioned in the document.

For the first question, the RX and TX pin on my diagram do not exchange because it is not directly connected to the OSDK device, but as an extension interface, TX-RX exchange is needed when accessing the OSDK device.
7-8 20:28
Use props
Xiao Long
lvl.3

South Africa
Offline

avashist Posted at 7-8 05:50
Hey, quick question, do I need both USB and UART osdk connected with the onboard combuter or just using the OSDK UART should work ?
Also you show that usb-c A5(UART-RX) is connected to the RX of the UART and A8 (UART-TX) to TX od osdk UART, shouldn't it be the other way like Tx-RX and Rx - Tx ? like they mentioned in the document.

In addition, THE DJI M300 needs to connect USB and UART pins at the same time, only connect one that cannot work normally.
7-8 20:31
Use props
Xiao Long
lvl.3

South Africa
Offline

avashist Posted at 7-8 14:20
Hey I am using Jetson TX2 for the onboard device, and having issues with establishing the connection: shown below. Let me know if you can point to a possible solution.

[view_image]

See your log doesn't seem to have filled in the TTY device name correctly in UserConfig.txt, such as ttyUSB0, ttyACM0
7-8 20:35
Use props
avashist
lvl.3

United States
Offline

Xiao Long Posted at 7-8 20:35
See your log doesn't seem to have filled in the TTY device name correctly in UserConfig.txt, such as ttyUSB0, ttyACM0

Thanks again, but I think this will clear the question I had in mind.

In the image below is the USB-ttl FTDI cable, here the usb part is connected to my onboard device and the UART( Tx, Rx) part is connected to the usb-c female plug.

So that I don't misunderstand you, the TX, RX part of the TTL wire should be connected to the corresponding TX, RX of the usb-c plug ? (like Txto Tx and Rx to Rx)



Second: in my config file I used the correct name ttyUSB0 and I think the terminal log this as an example as I am not using the ttyACM port to connect the drone with the onboard device. Now I will try to connect the usb osdk connection  along with the UART connection and will update my post if that works. :-)

Best,
7-9 06:34
Use props
Xiao Long
lvl.3

South Africa
Offline

avashist Posted at 7-9 06:34
Thanks again, but I think this will clear the question I had in mind.

In the image below is the USB-ttl FTDI cable, here the usb part is connected to my onboard device and the UART( Tx, Rx) part is connected to the usb-c female plug.


As for the connection method between TX and RX, I have updated the diagram.
7-9 23:14
Use props
avashist
lvl.3

United States
Offline

Thanks it was a great help. I got it working successfully now. I will post my solution for others to find it useful.
7-10 06:06
Use props
djiuser_DQ6yKqSBPDyz
New

Denmark
Offline

Hi, the board is not available in my region. So i would like to know how did you get the USB to be detected as an ACMx? I am currently successfully connecting and obtain telemetry over the UART, but can't get the USB to work. I tried connecting the D+ D- over a second TTL, but without any success. Where by trying to connect the D+/D-/GND cables directly to a USB cable doesn't seems to work, since i can't detect a new USB device.

I get this error:
ERRORLOG/1 @ initVehicle, L222: Failed to initialize ACM Linker channel!
8-4 06:06
Use props
eat fish
lvl.2

South Africa
Offline

djiuser_DQ6yKqSBPDyz Posted at 8-4 06:06
Hi, the board is not available in my region. So i would like to know how did you get the USB to be detected as an ACMx? I am currently successfully connecting and obtain telemetry over the UART, but can't get the USB to work. I tried connecting the D+ D- over a second TTL, but without any success. Where by trying to connect the D+/D-/GND cables directly to a USB cable doesn't seems to work, since i can't detect a new USB device.

I get this error:

the ACM device detected the connections of USB connections as :
suggest you check with "ls -l | grep ttyACM*" after the hardware connections and comfirm the UserConfig.txt acm_port name should be the same as the detected name.
adapter.png
8-9 18:04
Use props
carlosbh8
lvl.2

Colombia
Offline

Hi, I recently used the this plug to have the 24V power but it only shows 0.84V, I don't need to use USB and UART communication, only the power from the drone. What could I be doing wrong? Thanks a lot.
8-31 15:46
Use props
Brad - 8
lvl.3
Flight distance : 759327 ft
Canada
Offline

carlosbh8 Posted at 8-31 15:46
Hi, I recently used the this plug to have the 24V power but it only shows 0.84V, I don't need to use USB and UART communication, only the power from the drone. What could I be doing wrong? Thanks a lot.

I am having the same issue, 0.84V. Did you work this out? If I solve this problem I'll comment back here with my solution.
9-21 08:08
Use props
Nick Anderson
lvl.1

South Africa
Offline

avashist Posted at 7-10 06:06
Thanks it was a great help. I got it working successfully now. I will post my solution for others to find it useful.

Hi avashist and DJI community,

I'm struggling to get this board to work, and I'm hoping you can help! Did you ever post your solution?

I have wired up the breakout board as described in this forum, but currently:
- No data is being transmitted on the Tx UART pin (checked in bash with the "cat" command)
- The USB-A connection isn't coming up as a device on my compute device (ttyACM0)
- The breakout board has 24V on the VCC pins, and is ground on the GND pins, which suggests it's connected to the OSDK USB-C port correctly.  
- We've tested our cables and they work.

Please see the images below of our hardware setup.
I've shown the USB and UART interface connections seperately below for ease of looking. In reality, we are connecting them at the same time.

Do you have any suggestions to help debug the problem? Should I see UART data being transmitted even if the USB-A interface is not connected?
Is it possible that the USB-C polarity is incorrect? USB-C polarity is something I really don't understand.


We are using a USB-C female to USB-C male cable to access the OSDK port.

We are using a USB-C female to USB-C male cable to access the OSDK port.

The UART connection (USB-ttl FTDI cable)

The UART connection (USB-ttl FTDI cable)

The USB-A connection

The USB-A connection
10-12 22:30
Use props
avashist
lvl.3

United States
Offline

Nick Anderson Posted at 10-12 22:30
Hi avashist and DJI community,

I'm struggling to get this board to work, and I'm hoping you can help! Did you ever post your solution?

Hey Nick,

In my setup, I am not using the power output from the drone osdk interface for the onboard device (Jetson TX2) for now. But I've the data communication working between the drone and the onboard-device.

Before I write a long post, I would like to get some more information from your side. Can you post the terminal screenshot of the error that you are getting when you launch the osdk ?
10-14 09:33
Use props
Nick Anderson
lvl.1

South Africa
Offline

avashist Posted at 10-14 09:33
Hey Nick,

In my setup, I am not using the power output from the drone osdk interface for the onboard device (Jetson TX2) for now. But I've the data communication working between the drone and the onboard-device.

Hi avashist,

Thanks for the prompt response! I really hope you can help us get the data communication working.
We are also using an external power supply for the onboard device (Jeston Xavier NX) for now.

The terminal output is the same as yours above:


10-18 01:28
Use props
avashist
lvl.3

United States
Offline

Nick Anderson Posted at 10-18 01:28
Hi avashist,

Thanks for the prompt response! I really hope you can help us get the data communication working.

some suggestions that can help you:

1) Connect the other osdk port on the drone with the usb-c to usb-a connection with another computer (linux or windows) and launch the DJI Assistant-2 for matrice app. At, this point when you switch on the drone and the RC controller, in the app make sure to check the enable API access and set the baud rate.

2)  Now switch the drone and RC controller off. Connect your interfacing cable, for now just use the usb-ttl connection (once this get working then use the ACM linker usb-a cable).  connect with the jetson and the drone and start the Drone, RC controller and the assistant app on the separate computer.

Make sure the user config file has the same Baud rate that you set  in the app in step 1. the app id and the enc key are also what you would have created on the dji website.

Then, run the osdk on jetson, IF you see the same error on the terminal. CAN you WRITE down (I know you posted pictures of the connection, but if you tell me the exact name of pins/wire connected it will help me better) the pin name and the connection with the usb-c female plug for me to quickly review it. Like what pin number on usb-c feamle connected to what pin (wire) on the usb-ttl wire. It will help me to check if the you are missing any connection or not (ignore th other usb-a connection for the ACM linker for now)

Best,
10-20 18:24
Use props
HV_Sparks
lvl.2
Flight distance : 732267 ft
United States
Offline

Hi,

I am looking to get 11V-16V to power an external Ping 1090i ADS-B transceiver - would anyone be able to advise how to do this please from the USB-C?

Many thanks.
10-21 00:10
Use props
carlosbh8
lvl.2

Colombia
Offline

carlosbh8 Posted at 8-31 15:46
Hi, I recently used the this plug to have the 24V power but it only shows 0.84V, I don't need to use USB and UART communication, only the power from the drone. What could I be doing wrong? Thanks a lot.

Hi, I was able to have the 24V configuration by selecting the upper camera in the remote controller. But now I have another M300, and it is not working. Only have 0.8V.
10-22 12:35
Use props
djiuser_Iw3TEaRnETtE
lvl.1
Canada
Offline

carlosbh8 Posted at 10-22 12:35
Hi, I was able to have the 24V configuration by selecting the upper camera in the remote controller. But now I have another M300, and it is not working. Only have 0.8V.

Have you found out what the issue was? I'm experiencing the same thing
11-2 12:41
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules