Introduzione

Use this guide to calibrate your DJI Mini 2 camera gimbal. This will help you fix the gimbal calibration error after replacing the gimbal on your drone.

Download links

Python: https://www.python.org/

PySerial: https://pypi.org/project/pyserial/#files

GitHub: https://github.com/o-gs/dji-firmware-too...

7-zip: https://7-zip.org/

DJI Assistant: https://www.dji.com/es/downloads/softwar...

Script

Step 1: py comm_og_service_tool.py --port com pcode GimbalCalib JointCoarse

Step 2: py comm_og_service_tool.py --port com pcode GimbalCalib LinearHall

Additional Information

If your PC does not detect your drone and the drone is listed as a "bulk interface" or unknown device in the device manager, most likely your PC did not find drivers for your drone, in this case, download and install DJI Assistant 2.

*For DJI Mini 2 and Mini SE drone use product code from Mavic Mini.

Conclusione

To reassemble your device, follow these instructions in reverse order.

Arty

Membro da: 27/10/19

23883 Reputazione

16 commenti

Hi I tried this on my mini 1, after flex cable replacement (motherboard and gimbal are stock and fine) all went well I managed to calibrate the gimbal trought this phyton scrypt. But in the dji fly app it is still the same issue gimbal does not work but I dont understand why. Initial startup calibration works on all axes of the gimbal but then pops up the errors 40012, 30066 and gimbal is stuck in the position and does not want to work due to this error. Help...

Dominik Bukovčák -

Update I desoldered the old chip from broken flex cable and replaced it with the chip on the new cable and it works :) so that is another way how to do it. It may not be easy task for everyone but maybe this information will help somebody.

Dominik Bukovčák -

unfortunately i saw this to late. i threw the old cable into the waste yesterday. anyone has an other solution?

Shity Brown -

Hey. Hope you all doing well.

Could you perhaps share a pic of the cable with the specific chip that was removed possibly?

Thanks

Ashraf Rogers -

This is NOT for the DJI Mini 2 the https://github.com/o-gs/dji-firmware-too... has not the mini 2 listed in the comm_og_service_tool .
Tried with mini 1, didn't work.

Sebastian -

I’m curious does this process HAVE to be done for all gimbal replacements? My mini 2 calibrates at startup and is free to move on all three axis. The gimbal calibration on the app says 10% and stays there. I have no movement of the gimbal and the error 40021 and 40011 . Would this process work?

Chris P -

Hey Guys,

is there a working way for the DJI MINI 2?! Because the Model is still not listed in the common_og_service file....

sauteralex -

Mini 1 model definitely works. Have used WM160 as the code in the python script without issue for Mini 2.

Ashraf Rogers -

uhm.. Did all this but get message: python not found, run without arguments... (translated from norewegian)??

steinar rolseth ness -

Just to add to the above for anybody possibly still struggling. Models supported:

WM610  =  2014-11-13 Inspire 1

MG1    = 2015-11-27 Agras MG-1

WM330  = 2016-03-02 Phantom 4

WM220  = 2016-09-28 Mavic Pro

WM620  = 2016-11-16 Inspire 2

WM331  = 2016-11-16 Phantom 4 Pro

WM332  = 2017-04-13 Phantom 4 Advanced

WM100  = 2017-05-24 Spark

WM230  = 2018-01-23 Mavic Air

WM335  = 2018-05-08 Phantom 4 Pro V2

WM245  = 2018-10-29 Mavic 2 Enterprise

WM246  = 25 #  2018-12-20 Mavic 2 Enterprise Dual

WM160  = 2019-10-30 Mavic Mini

WM240  = 2018-08-23 Mavic 2 Pro/Zoom

WM245  = 2018-10-29 Mavic 2 Enterprise

WM246  = 25 #  2018-12-20 Mavic 2 Enterprise Dual

WM160  = 2019-10-30 Mavic Mini

WM231  = 2020-04-28 Mavic Air 2

WM232  = 2021-04-15 (MAVIC) AIR 2S

WM260  = 2021-11-05 (MAVIC) 3

WM247  = 2020-12-15 Mavic 2 Enterprise Advanced 
Removed older models from the list ( P3, Matrice etc )

My process used to be python for air 2, air 2 S, mini etc. But this has now changed.

Use Dank Downloader to get the calibration firmware which allows you to get rid o




Ashraf Rogers -

Continued...

Use Dank Downloader to get the calibration firmware which allows you to get rid of above mentioned errors ( 40021 and 40011 )

My process is:

Use Drone Hacks v1.7 to do the "downgrade". Use Dank Downloader to download the actual firmware.

Launch Drone hacks, plug in the drone and wait for it to detect. Once detected, it will show the current firmware version as well as the ARB, which is the antirollback.

In DankDroneDownloader, find the closest version of the firmware thats on the drone, and that also has the ARB of same number or HIGHER.

Check the release notes of the firmware that you want. It should specifically state calibration firmware, not meant for consumer use etc.

You might have to pay for the calibration firmware via the Dankdronedownloader app, which will open a webpage to paypal. I have bought 3 firmwares so far without hassle. But i also had 2 other calibration firmwares already. All of which worked for the specific models of drone. I think its $1 for a calibration firmware file.

Ashraf Rogers -

Continued........

After getting the firmware, use Dronehacks V1.7 to flash the calibration firmware to the unit. PS, You MUST NOT fly with this firmware, you WILL experience issues.

After the flashing process, reboot drone and unplug. Via the go4 app or the fly app, calibrate gimbal as you normally would. The above errors should still be present before the calibration.

Once calibrated, at least 1 of the above errors should go away, if not both.

Thereafter, reflash the original firmware back. I have only ever used the same version that was on the drone before flashing the calibration firmware. After the normal firmware is flashed, no errors should appear and you can go ahead and re-calibrate the gimbal error free.

If needed, i can upload pics of process and possibly links if allowed.

Also, i still occasionally use Python, without any issues, so if you have an issue, will be happy to help.

PS. I have repaired 6 Air 2 S, 4 Air 2 and a few mini 2's with above process.

Ashraf Rogers -

I have the correct dji assistant installed and can see my drone when I connect it to the app. I have gotten all the way to where you run the first script and everytime I get the ... Error: could not open port 'com4': PermissionError(13, 'Access is denied.', None, 5)

Can someone help me get past this?

Dennis Bright -

I received:

C:\DJI>py comm_og_service_tool.py -- port com7 WM160 GimbalCalib JointCoarse

usage: comm_og_service_tool.py [-h] (--port PORT | --bulk) [-b BAUDRATE] [-w TIMEOUT] [--dry-test] [-v] [--version]

product command ...

comm_og_service_tool.py: error: argument product: invalid choice: 'PORT' (choose from 'A2', 'P330', 'P330V', 'P330Z', 'P330VP', 'WM610', 'P3X', 'P3S', 'MAT100', 'P3C', 'MG1', 'WM325', 'WM330', 'MAT600', 'WM220', 'WM620', 'WM331', 'MAT200', 'MG1S', 'WM332', 'WM100', 'WM230', 'WM335', 'WM240', 'WM245', 'WM246', 'WM160', 'WM231', 'WM232', 'WM260', 'WM247')

What could I be doing wrong?

iFixOmaha -

This process will not clear the error 40011 40021 etc it is only for calibration at a standard level,

if you are struggling to get this to work you can use this tool I created which detects the correct USB port and has buttons for each quad

https://drive.google.com/file/d/1sRTDqny...

Any issues please email me at flymyphantom@outlook.com

I am currently working on a repair method video for the above error codes

Flymyphantom -

I tried running the commands on my Air 2S. JointCourse runs and completes. But the gimbal on my Air 2S is unresponsive to the LinearHall command. The cables connecting the gimbal and motherboard look ok. So I suppose I will need to do a complete teardown to find where the problem is. Any suggestions?

Brett Wallace -