Skip to content

Instantly share code, notes, and snippets.

@sergiks
Last active April 6, 2023 19:46
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sergiks/687415247eca5a2f2e1ed8677c3b4749 to your computer and use it in GitHub Desktop.
Save sergiks/687415247eca5a2f2e1ed8677c3b4749 to your computer and use it in GitHub Desktop.
DJI Mavic Mini CE fake GPS lock

DJI Mavic Mini boost

Upd. Hack implemented in web browser, no Python required. YouTube instructions.

Подробная инструкция на Русском языке.

Step 1: fly your drone to US

  1. On Android phone install:
    1. Fake GPS
    2. DJI Fly 1.1.2 - the old version. Uninstall your current DJI Fly, find v.1.1.2 on apr mirror. After applying the hack remove the v.1.1.2 and install the fresh DJI Fly app again from Google Play.
  2. Do this in-house, under a roof, where GPS signal is lost. Set your location to USA or Bolivia. Launch DJI Fly, connect remote controller (RC), start RC. Turn on your aircraft (AC). Message "Updating you current settings to match local regulations" will appear.
  3. Shut down AC, RC and quit DJI Fly app.

Step 2: send some bytes to the remote controller

You will need a computer with Windows, Mac OS or Linux and Python installed.

Install python module pySerial: pip install pyserial or python -m pip install pyserial

Connect RC to the computer with USB cable. Turn on the RC. It will appear as a serial port. List available serial ports:

python -m serial.tools.list_ports -v

On Mac OS X connected RC was displayed as

/dev/cu.usbmodemFA131
    desc: Gadget Serial v2_4
    hwid: USB VID:PID=2CA3:0008 LOCATION=250-1.3

Edit MiniBoost.py file: replace "COM5" with "/dev/cu.usbmodemFA131" or whatever the port name is in your case.

Apply the hack:

python MiniBoost.py

All done

Now the quad will continue to "think" it is in the selected country, and both 2.4 GHz and 5.8 GHz ranges will be available.

Rollback

To unroll the hack, use the second file MiniStock.py the same way. It will restore the RC to factory state. After connecting the drone it will update itself to the local regional radio settings.

import serial
comport = "COM5"
ser = serial.Serial(comport, 9600)
command1 = b'\x55\x0e\x04\x66\x2a\x1b\x07\x27\x40\x06\xfb\x02\xac\x35'
ser.write(command1)
print ('You have hacked Your Mini')
import serial
comport = "COM5"
ser = serial.Serial(comport, 9600)
command1 = b'\x55\x0e\x04\x66\x2a\x1b\x25\xf9\x40\x06\xfb\x03\x9c\x37'
ser.write(command1)
print ('Your Mini is in initial stock state')
@kittinan
Copy link

Is this method possible work on DJI Mini SE?

@sergiks
Copy link
Author

sergiks commented Aug 31, 2021

@kittinan yes, as long as your Remote Controller model is "MR1SD25" — the one sold with 1st Mavic Mini, Central European (CE) version – capable of both 2.4 and 5.8 GHz range hardware.

@tripoflgb
Copy link

Hello! Please help, your solution work with controller MR1SS5???

@3v1n0
Copy link

3v1n0 commented Jan 9, 2022

@kittinan I got it working in my DJI Mini SE, however while the old android app connected to the drone initially, no "Updating you current settings to match local regulations" message shown, lots of infos were missing including the transmissions panel that was not filled, finally the old app couldn't connect to it anymore afterwards.

I modified the controller from the JS version of this script, and I had the 5.8 channels available in the new app once re-installed.
All the times I run the new app it says that it must update the drone to match the current regulations, so it seems that it worked.

It's not clear to me whether this is only leading to supporting 5Ghz only or even to increase the transmission power (as it'd happen in FCC mode), though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment