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
1195 14 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.1

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
Advanced
You need to log in before you can reply Login | Register now

Credit Rules