Thread Tools
This thread is privately moderated by Sambas1983, who may elect to delete unwanted replies.
Mar 01, 2017, 04:47 PM
Registered User
I'm not Sambas, but I want to share some information I collected:
- Even though older gimbals used the DM368, it is apparently not used with the current firmware (apparently since about a year ago: http://www.g0l.ru/blog/n4109).
- Video is sent through the Ambarella USB port. The Ambarella chip inside the camera is USB host and connects to a RNDIS device. Through this virtual Ethernet connection, you can access the h.264 stream as UDT on port 9000 of 192.168.1.3.
- The gimbal control signals are sent through the CAN bus (as anyone reading this thread probably knows).
- You can use SCP or FTP to access the SD card and download videos or photos.
Sign up now
to remove ads between posts
Mar 03, 2017, 09:03 AM
Registered User
Thread OP
This sounds like Osmo use case which has wifi chipset in the handle. I'm working with bare camera and gimbal unit. Light bridge is device for DM368 which transmits converted h.264 stream.
Mar 03, 2017, 09:14 AM
Registered User
Thread OP
X5 should be compatible on most cases, I don't have resources to get one for testing.
Mar 03, 2017, 01:57 PM
Durability Tester
Has anyone tried to connect an inspire gimble to a naza using can bus?
Mar 03, 2017, 04:07 PM
Registered User
Quote:
Originally Posted by Sambas1983
This sounds like Osmo use case which has wifi chipset in the handle. I'm working with bare camera and gimbal unit. Light bridge is device for DM368 which transmits converted h.264 stream.
As far as I understand it, the preview stream (h.264) is now generated by the Ambarella chip, which makes the DM368 redundant. When they changed this, they moved the Ambarella chip to 192.168.1.3 which used to be the IP of the DM368. This should be the same for both the OSMO and Inspire version. Which version of the firmware is installed on your camera? (It can be displayed in DJI GO in the settings)
Mar 05, 2017, 02:58 AM
Registered User
Quote:
Originally Posted by mbyte
I'm not Sambas, but I want to share some information I collected:
- Even though older gimbals used the DM368, it is apparently not used with the current firmware (apparently since about a year ago: http://www.g0l.ru/blog/n4109).
- Video is sent through the Ambarella USB port. The Ambarella chip inside the camera is USB host and connects to a RNDIS device. Through this virtual Ethernet connection, you can access the h.264 stream as UDT on port 9000 of 192.168.1.3.
- The gimbal control signals are sent through the CAN bus (as anyone reading this thread probably knows).
- You can use SCP or FTP to access the SD card and download videos or photos.
Hi all,

Special thanks to Gollandec (the owner of http://www.g0l.ru) for his help.

1- the DM368 is not used only in X3 (latest update) while connected to OSMO stick, and the video stream quality reduced.
but if the X3 connected to Inspire 1 the DM368 is used.

2- the X5 DM368 is used in both OSMO and Inspire.

3- the IP 192.168.1.3 is the IP of the X5 DM368 (latest update)

in X5/X3 DM368 cameras there are two applications (encode_wifi and encode_usb)
the encode_wifi is used for OSMO
the encode_usb is used for Inspire 1 / LB2
Last edited by nezar; Mar 07, 2017 at 01:22 AM.
Mar 06, 2017, 05:56 AM
Registered User
Quote:
Originally Posted by nezar
Hi all,

Special thanks to Gollan (the owner of http://www.g0l.ru) for his help.

1- the DM368 is not used only in X3 (latest update) while connected to OSMO stick, and the video stream quality reduced.
but if the X3 connected to Inspire 1 the DM368 is used.

2- the X5 DM368 is used in both OSMO and Inspire.

3- the IP 192.168.1.3 is the IP of the X5 DM368 (latest update)

in X5/X3 DM368 cameras there are two applications (encode_wifi and encode_usb)
the encode_wifi is used for OSMO
the encode_usb is used for Inspire 1 / LB2
How does the camera chose the right application to run? Is the CAN initialization different? Also - in Inspire/LB2 mode - is the DM368 usually in USB host or device mode?

Regarding 3: Using the OSMO handle, I covered the DM368 USB port and can still connect to 192.186.1.3. When I SSH into it, the host name is a9 and dmesg is filled with ambarella references. Therefore I am very certain this is not the DM368.
Mar 06, 2017, 03:36 PM
Registered User
Quote:
Originally Posted by mbyte
How does the camera chose the right application to run? Is the CAN initialization different? Also - in Inspire/LB2 mode - is the DM368 usually in USB host or device mode?

Regarding 3: Using the OSMO handle, I covered the DM368 USB port and can still connect to 192.186.1.3. When I SSH into it, the host name is a9 and dmesg is filled with ambarella references. Therefore I am very certain this is not the DM368.
I don't know about the CAN as i just received the USB-CAN II and didn't try it yet.

I don't know what do you mean by USB host or device, but from the boot.sh file it uses two different applications (encode_usb and encode_wifi)

regarding SSH on 192.168.1.3 me too i was able to access the a9, it was enabled in the old firmware, but in the latest update the ssh is disabled and the FTP connection on 192.168.1.3 leads you to DM368

Note: i'm using X5 not X3


#boot.sh
#!/bin/sh
/opt/dji/bin/loadmodule-rc start

DEVICE0=`lsusb | grep "05e3:0608"`
DEVICE1=`lsusb | grep "0cf3:1022"`

if ["$DEVICE0" = ""]&&["$DEVICE1" = ""];then

insmod /opt/dji/modules/usb_68013.ko

/opt/dji/bin/monitor &
/opt/dji/bin/encode_usb -a -s&
/opt/dji/bin/usbupdate &
else
/opt/dji/bin/startb
telnetd -p 20
tcpsvd 0 21 ftpd -w /opt &
fi
Mar 07, 2017, 03:02 AM
Registered User
Thread OP
Operation mode is detected in the camera by devices attached to it. Also CAN init message on Osmo should be different as gimbal orientation is different. Have not seen any Osmo can logs to verify this.
Handle can switch between A9 and DM368 usb bus with USB SW pin, if pin is low DM368 is connected and if pin is high A9 is connected.
I created gadgetFS device for camera on embedded linux device. Camera(DM368) detected it and started to push data in it but need to figure out how to get video out of it
Mar 07, 2017, 03:38 AM
Registered User
Thread OP
While I was typing previous, I had an idea and this happened.

DJI X3 Hack, encode_usb (1 min 4 sec)
Mar 16, 2017, 12:41 PM
Registered User
MondoIT's Avatar

USB video signal extraction


Hi everyone,

I'm trying to obtain the video signal from the USB (D+,D-,GND pins among the 8-pin connector) keeping connected all the other wires.
I've unplugged those three wires and I noticed that even without them the drone holds its control on the gimbal trough the CAN bus. Which is a nice thing for everyone who wants to keep the gimbal control via Onboard_SDK APIs.
My question now is how to see properly the USB on my OES?
With a standard connection of D+,D- and GND pins from the drone with three of the 4 USB pins (every pin except Vcc) nothing works. I measured the signal with the oscilloscope and I found out a very low voltage with respect to the standard usb protocol expectation. Moreover, comparing the impedance between the original cable and the one I've made I found out in this last an higher one. So I also tried to connect resistances to lower the impedance, but even in this case nothing works.
Any suggestions?
Thanks in advance!
Apr 03, 2017, 02:40 AM
Registered User
Sambas,

It seem that you have done a great job with the X3 Hacking.
Can you post the format of some of the message that you detected?
How is the CRC calculated?

Thanks in advance!
May 09, 2017, 09:05 PM
Registered User
Awesome work - keep on going
May 09, 2017, 09:52 PM
Fly Hard or Fly Home!!!
VF-Alpha's Avatar
super interested in this because I want to swap the guts for a pixhawk but retain the camera... my programming skills and hacking are seriously not what they used to be :/
May 19, 2017, 04:10 PM
Registered User
My version :-)

Fully stand-alone X3 (1 min 0 sec)


Quick Reply
Message:
Thread Tools