Giter Site home page Giter Site logo

dji-wifi-tools's Introduction

dji-wifi-tools

This repo contains a set of tools to facilitate the analysis of the Dji wifi communication protocol. Meant for drone enthusiasts, scientific or educational purposes only.

Features

  • Automatic Drone and Operator detection
  • Sniffing relevant UDP network traffic
  • UDP packet enumeration; including filter predicates
  • UDP packet inspection (HEX/Binary) and comparison
  • Export as *.pcap
  • Import *.pcap
  • Export as DUML for further in-depth analysis
  • Camera output rendering

Screenshots

Screenshot

Screenshot

Supported Drones

  • Mavic Pro 1
  • Phantom 3
  • Phantom 4 Pro

Theoretical support

Those drones are theoretically supported. However, they do require a delimiter extension which won't be implemented anytime soon.

  • Naza M
  • Naza M V2
  • Phantom 1
  • Phantom 2

Supported Platforms

The application runs on all relevant platforms. It has been tested against Windows and Linux. System requirements x86/ARM:

  • Windows (7 (Sp 1), 8.1, 10.1607+)
  • Linux (Debian 9+, Mint, 18+, Ubuntu 18.04, RH 7+)
  • Mac (10.13+)

Prerequisites

  1. Install the .NET 5.0 SDK
  2. Download FFmpeg 4.2 binaries according to your OS/CPU and place it into the root folder.
  3. Optional for Linux (copy function): apt install -y xsel
  4. Optional for Linux (video playback): apt install libvlc-dev
  5. Optional for Linux (video playback): apt install vlc
  6. Optional** for Linux (video playback): apt install gtk-sharp2
  7. Optional** for Linux (video playback): apt install libx11-dev

** install when step 4-5 don't enable dji-camera output rendering

Compile + Run Instructions

Switch to the root folder and execute

  1. dotnet restore
  2. dotnet build
  3. dotnet run --project Dji.Ui

Project configurations for Visual Studio 2019 and Visual Studio Code are included.

Release Instructions

For the most easy setup download the latest release and execute dotnet Dji.UI.dll.

Usage Instructions

If you do require any usage instructions, maybe this tool isn't meant for you.

Credits

Based on OG's firmware-tools

Libraries

Avalonia
FFMpegCore
libvlcsharp
Pcap.Net
SharpPcap

Support

Buy me a coffee โ˜•

dji-wifi-tools's People

Contributors

toemsel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dji-wifi-tools's Issues

Navigation commands

Great effort! Impressive. Feature improvement idea: I see you already get gimbal commands. How difficult would it be to send navigation commands to the drone?

Phantom 4 udp packet sniffing

Hello, I want to use this program to Phantom 4 standard,
but I don't know how to use it.

I had complete install this program, but I can't connect to the Phantom 4 wifi...
How can I connect to DJI Phantom 4 wifi? Or, this program do not need wifi connect?????

Thank you!!

Question regarding compatability with Mavic Mini

Hey,

I'm sorry to ask a question here as it isn't an issue with your code, but I couldn't find any other way to reach you.
In the readme you list compatability with Mavic Pro 1, Phantom 3 and Phantom 4.
I'm curious if you think this would be compatible with the Mavic Mini too.
You cannot connect directly to the drone using a phone, but need to connect the drone through a controller.
However unlike the mavic mini 2 the mavic mini 1 does not use occusync.
I've included some of the details below regarding the wifi config on the controller and the drone.
I'm curious with how this compares with the wifi config you discovered on your drone as described on your blog.
https://www.indie-dev.at/2021/03/15/day-1-getting-started/
Do you think a similar approach to connecting to the AC from a PC, then exposing an AP for the controller to connect to might work here too?
I am a little uncertain as it looks like there is some kind of paired password stored, and it's unclear to me if I would need to do something additional to facilitate the drone/controller pairing process or not.

(extracted from controller via serial over ethernet)
=====================
RC wifi.conf
=====================
mac1=XX:XX:XX:XX:XX:X3
mac2=XX:XX:XX:XX:XX:X4
rc_ssid=Spark-RC-XXXXXX
rc_passwd=12341234
phone_5gcap=1
country=ZZ
has_set_mac=XX:XX:XX:XX:XX:X3
update_ok=0
update_src=10
11p_freq=2432
11p_mac=YY:YY:YY:YY:YY:Y2
sky_passwd=ZZZZZZZZ
11p_flag=1
11p_mode=1
sky_ssid=WM160-#####
disable_country=1

(dumped from firmware)

=====================
$CONTROL_DIR/hostapd.conf
=====================
driver=nl80211
interface=wlan0
ctrl_interface=/tmp/hostapd
ssid=WM160-5g_test
country_code=US
ieee80211n=1
hw_mode=a
channel=157
max_num_sta=1
ap_max_inactivity=10
beacon_int=200
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=12341234
=====================
athsoftap.sh
=====================
CHIP_SN=$RANDOM
AP_SSID="WM160-"${CHIP_SN}
# WIFI hostapd.conf
if [ ! -f "$AP_CONF" ]; then
echo "driver=nl80211"                         >> $AP_CONF
echo "interface=wlan0"                        >> $AP_CONF
echo "ctrl_interface=/tmp/hostapd"            >> $AP_CONF
echo "ssid="${AP_SSID}                        >> $AP_CONF
echo "country_code=CN"                        >> $AP_CONF
echo "ieee80211n=1"                           >> $AP_CONF
echo "ap_max_inactivity=10"                   >> $AP_CONF
echo "hw_mode=a"                              >> $AP_CONF
echo "channel=153"                            >> $AP_CONF
echo "ignore_broadcast_ssid=0"                >> $AP_CONF
echo "wpa=2"                                  >> $AP_CONF
echo "wpa_key_mgmt=WPA-PSK"                   >> $AP_CONF
echo "wpa_pairwise=CCMP"                      >> $AP_CONF
echo "wpa_passphrase=12341234"                >> $AP_CONF
f

You did some really great work, I'de love to try and leverage it, to perhaps even control the drone via a laptop :)

PH4 pro 2.0

Hello, I have a Phantom 4 pro v2.0, use OcuSync2.0 instead of Lightbridge.

I want to use this dji-wifi-tools to my PH4 pro 2.0, but I don't know how.
I think PH4 pro 2.0 doesn't use wifi.
(But PH4 pro doesn't use wifi during flying, I think..?)

If you use this tool to the PH4 pro 2.0 , could you explaing me how to use it?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.