This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
howto:fc_patcher_tool [2019/03/29 00:34] digdat0 [Toolset] |
howto:fc_patcher_tool [2020/01/25 23:09] (current) digdat0 path |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FC Patcher | + | ====== FC Patcher |
- | doc version .01, starting a framework. Intent is a easy guide for Windows, simplifying from github | + | |
orig content here: https:// | orig content here: https:// | ||
- | credit to the og's and all | + | credit to the og's and all contributors |
- | This guide explains how to use the FC patcher tool for Windows. The tool / process allows you to modify flight controller parameters on the the LATEST DJI firmware for the DJI Mavic Pro and Platinum, Phantom 4/Pro/Adv, Inspire 2 and Spark. | + | This guide explains how to use the FC patcher tool for Windows. The tool / process allows you to modify flight controller parameters on the the LATEST DJI firmware for the DJI Mavic Pro and Platinum, Phantom 4/Pro/Adv, Inspire 2 and Spark. |
- | + | ||
- | NOTE: THIS IS FOR PRO USERS, YOU HAVE TO KNOW WHAT YOU ARE DOING! | + | |
+ | Insert disclaimer here .. | ||
====== Toolset ====== | ====== Toolset ====== | ||
Make sure to review this GitHub with more info: https:// | Make sure to review this GitHub with more info: https:// | ||
Line 21: | Line 19: | ||
- Download [[https:// | - Download [[https:// | ||
- Download [[https:// | - Download [[https:// | ||
- | - Download an app to allow running .SH files on Windows; i used github as my app | + | - Download an app to allow running .SH files on Windows; i used [[https:// |
- | - Download pcrypto by running this from a command line | + | - Download CYGWIN to allow running .sh on Windows [[https:// |
- | + | - Download and install a file extraction app like [[https:// | |
- | + | - Download pcrypto by running this from a command line python -m pip install pycryptodome | |
- | python -m pip install pycryptodome | + | |
- | | + | |
- | | + | |
- | Put the files and the firmware bin file in same folder, such as C: | + | Put ALL of the files and the firmware bin file in same folder, such as C: |
- | Install | + | Install |
====== Detailed Steps ====== | ====== Detailed Steps ====== | ||
Line 43: | Line 40: | ||
- Extract the .CFG.SIG, the 305 and 306 files to the c: | - Extract the .CFG.SIG, the 305 and 306 files to the c: | ||
+ | {{: | ||
==== 3. Extract / unsig the .cfg file ==== | ==== 3. Extract / unsig the .cfg file ==== | ||
* Open a command prompt and type | * Open a command prompt and type | ||
Line 53: | Line 51: | ||
* The file is now extracted. | * The file is now extracted. | ||
==== 4. Unsig the 0306 file ===== | ==== 4. Unsig the 0306 file ===== | ||
+ | There are two ways to unsig the 306 file: | ||
+ | |||
+ | * Use the dji_imah_fwsig.py tool | ||
+ | * Copy the 306 file to the aircraft and use djiverify | ||
+ | |||
+ | == Use the dji_imah_fwsig.py tool == | ||
+ | Download the tool from here https:// | ||
+ | Open a command line and run the tool | ||
+ | Example: python dji_imah_fwsig.py -vv -u -i wm335_0306_v03.03.04.10_20180429.pro.fw.sig | ||
+ | |||
+ | You are done, goto step #5 | ||
+ | |||
+ | == Copy the 306 file to the AC == | ||
+ | |||
Now we will unsig the 306 file, which contains the flight controller parameters. You will need to power on your aircraft and connect to PC via USB. Once you have .. | Now we will unsig the 306 file, which contains the flight controller parameters. You will need to power on your aircraft and connect to PC via USB. Once you have .. | ||
Line 67: | Line 79: | ||
- | adb push wm220_0306_v03.02.44.07_20171116.pro.fw.sig / | + | adb push wm220_0306_v03.02.44.07_20171116.pro.fw.sig / |
+ | | ||
Line 75: | Line 88: | ||
adb shell | adb shell | ||
cd / | cd / | ||
- | / | + | / |
+ | | ||
exit | exit | ||
Line 86: | Line 100: | ||
* Now, some housecleaning | * Now, some housecleaning | ||
- | | + | |
- | + | ||
adb shell | adb shell | ||
cd / | cd / | ||
Line 96: | Line 110: | ||
mount -o remount,ro /vendor | mount -o remount,ro /vendor | ||
exit | exit | ||
- | + | ||
- | So now we have the unsig file we wanted, thats awesome. | + | You can now power off your aircraft. |
==== 5. decrypt the FC ===== | ==== 5. decrypt the FC ===== | ||
* Goto a command prompt and type | * Goto a command prompt and type | ||
Line 118: | Line 132: | ||
==== 7. Modify flight controller parameters ==== | ==== 7. Modify flight controller parameters ==== | ||
- | first draft of parameter list | ||
- | ^ Parameter Name ^ Value ^ | + | * Open the flyc_param_infos file in notepad++ or similar editor. Values will look like this: |
- | ^ g_config.airport_limit_cfg.cfg_disable_airport_fly_limit|1| | + | |
- | ^ g_config.airport_limit_cfg.cfg_limit_data|20250910| | + | { |
- | ^ g_config.flying_limit.driver_license_limit_enable |0| | + | " |
- | ^ g_config.flying_limit.viechle_license_limit_enable|0| | + | " |
- | ^ g_config.flying_limit.height_limit_enabled|2| | + | " |
- | ^ g_config.airport_limit_cfg.cfg_search_radius|1| | + | " |
- | ^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_AIRPORT]|0| | + | " |
- | ^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_SPECIAL]|0| | + | " |
- | ^ g_config.flying_limit.limit_height_rel|10000| | + | " |
- | ^ g_config.flying_limit.limit_height_abs|10000| | + | " |
- | ^ g_config.flying_limit.limit_height_abs_without_gps|10000| | + | " |
- | ^ g_config.mode_normal_cfg.tilt_atti_range|33| | + | }, |
- | ^ g_config.mode_normal_cfg.vert_vel_up|7| | + | |
- | ^ g_config.mode_normal_cfg.vert_vel_down|-6| | + | |
- | ^ g_config.mode_normal_cfg.vert_acc_up|7| | + | You will be modifying the " |
- | ^ g_config.mode_normal_cfg.vert_acc_down|-6| | + | |
- | ^ g_config.mode_sport_cfg.tilt_atti_range|50| | + | ^ Parameter Name ^ Value ^ Description |
- | ^ g_config.mode_sport_cfg.vert_vel_up|8| | + | ^ g_config.airport_limit_cfg.cfg_disable_airport_fly_limit|1|| |
- | ^ g_config.mode_sport_cfg.vert_vel_down|-8| | + | ^ g_config.airport_limit_cfg.cfg_limit_data|20250910|| |
- | ^ g_config.mode_sport_cfg.vert_acc_up|8| | + | ^ g_config.flying_limit.driver_license_limit_enable |2|| |
- | ^ g_config.mode_sport_cfg.vert_acc_down|-8| | + | ^ g_config.flying_limit.viechle_license_limit_enable|2|| |
- | ^ g_config.fw_cfg.max_speed|20| | + | ^ g_config.flying_limit.height_limit_enabled|2|| |
- | ^ g_config.avoid_cfg.avoid_atti_range|23| | + | ^ g_config.airport_limit_cfg.cfg_search_radius|1|| |
- | ^ g_config.control.avoid_atti_range|50| | + | ^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_AIRPORT]|1|| |
- | ^ bat_level_2_action|0| | + | ^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_SPECIAL]|1|| |
- | ^ bat_cap_v2_prot_type|0| | + | ^ fly_limit_height|10000|| |
- | ^ g_config.bat_config.level2_smart_battert_land|0| | + | ^ g_config.mode_normal_cfg.tilt_atti_range|33|| |
+ | ^ g_config.mode_normal_cfg.vert_vel_up|7|| | ||
+ | ^ g_config.mode_normal_cfg.vert_vel_down|-6|| | ||
+ | ^ g_config.mode_normal_cfg.vert_acc_up|7|| | ||
+ | ^ g_config.mode_normal_cfg.vert_acc_down|-6|| | ||
+ | ^ g_config.mode_sport_cfg.tilt_atti_range|50|| | ||
+ | ^ g_config.mode_sport_cfg.vert_vel_up|8|| | ||
+ | ^ g_config.mode_sport_cfg.vert_vel_down|-8|| | ||
+ | ^ g_config.mode_sport_cfg.vert_acc_up|8|| | ||
+ | ^ g_config.mode_sport_cfg.vert_acc_down|-8|| | ||
+ | ^ g_config.fw_cfg.max_speed|20|| | ||
+ | ^ g_config.avoid_cfg.avoid_atti_range|23|| | ||
+ | ^ g_config.control.avoid_atti_range|50|| | ||
+ | ^ bat_level_2_action|0|| | ||
+ | ^ bat_cap_v2_prot_type|0|| | ||
+ | ^ g_config.bat_config.level2_smart_battert_land|0|| | ||
+ | |||
+ | Note: This is a draft list as of 9-Aug-19 | ||
+ | |||
+ | |||
+ | - I dont believe " | ||
+ | |||
+ | |||
+ | - This needs to be broken out NFZ, height, speed, battery #TODO | ||
+ | |||
+ | |||
+ | - need to include Bret883' | ||
+ | |||
+ | |||
+ | - lets create a seperate wiki page for FC Patcher params #TODO | ||
+ | |||
==== 8. Set path ==== | ==== 8. Set path ==== | ||
- | * Goto a command prompt and type | ||
+ | We need to tell the script what folder contains the firmware tools and other files. | ||
- | set PATH_TO_TOOLS=C: | + | You need to edit FC_patch_sequence_for_dummy_verify.sh and you will see the following |
+ | //if [[ -z " | ||
+ | echo " | ||
+ | echo " | ||
+ | exit 1 | ||
+ | // | ||
+ | |||
+ | Change the PATH_TO_TOOLS to be wherever you have all the files, such as C: | ||
Line 160: | Line 211: | ||
- | sh FC_patch_sequence_for_dummy_verify.sh Mavic 03.02.44.08 | + | |
+ | You can change Mavic to your Aircraft, such as P4P, Spark, etc. The version number is the NEW version you are setting. | ||
Note: This step requires some tool to enable running sh scripts on windows. I installed Github with bash and it had the SH included to allow running the script. | Note: This step requires some tool to enable running sh scripts on windows. I installed Github with bash and it had the SH included to allow running the script. | ||
- | The aa.bb.cc.dd string after Spark or Mavic arg is the version of the FC module you are building. It should be different from the one that is currently installed on the bird, so basically increase the number each time you build a new version... | + | This should produce a few (uncleaned) tmp files, and a *dummy_verify.bin file which is the one you will be able to flash the aircraft using dumldore |
- | + | ||
- | This should produce a few (uncleaned) tmp files, and a .bin file which is the one you will be able to flash the aircraft using dumldore | + | |
==== 9. Install the dummy_verify.sh script on your bird ==== | ==== 9. Install the dummy_verify.sh script on your bird ==== | ||
- | | + | Open dumldore |
+ | Press ENABLE ADB, wait a second. Close dumldore | ||
+ | |||
+ | IF, during this step, adb shell fails, you do not have adb access. GO back to dumldore and press ENABLE ADB. | ||
+ | |||
+ | * Goto a command prompt and type | ||
+ | | ||
adb shell | adb shell | ||
mount -o remount,rw /vendor | mount -o remount,rw /vendor | ||
Line 181: | Line 237: | ||
chown root:root dummy_verify.sh | chown root:root dummy_verify.sh | ||
chmod 755 dummy_verify.sh | chmod 755 dummy_verify.sh | ||
- | cp /system/bin/dji_verify / | + | cp /sbin/dji_verify / |
sync | sync | ||
cd / | cd / | ||
mount -o remount,ro /vendor | mount -o remount,ro /vendor | ||
+ | |||
+ | Turn off the aircraft. | ||
+ | |||
==== 10. Flash the .bin file you made earlier ==== | ==== 10. Flash the .bin file you made earlier ==== | ||
+ | * Power the aircraft back on | ||
* Open a command prompt and type | * Open a command prompt and type | ||
adb shell | adb shell | ||
- | mount -o bind / | + | mount -o bind / |
- | Open dumldore v3, load firmware and flash | + | Open dumldore v3, load firmware and flash it. You may need to hold down either ctrl or shift when clicking 'load firmware' |
- | The displayed percentage are fucked and it will go over 100% at some point, this is not an issue. You can monitor it from adb at the same time with : busybox tail -f / | + | Few notes: |
- | Thats it your done. | + | * The displayed percentage will be wacky, |
+ | * If you want to view the update you can type | ||
+ | |||
+ | |||
+ | adb shell | ||
+ | | ||
+ | |||
+ | |||
+ | |||
+ | * You can also view in assistant, use 1.1.2 | ||
+ | * After 10-20 seconds you should see the update go as regular; on Spark the ESC may beep while being updated. | ||
+ | * The aircraft will reboot in about a minute or so. If you were monitoring via adb, it will lose connection. | ||
- | For steps to get Galileo working see github | + | Thats it you are done. The mods you modified in the flight parameters file will be in the aircraft. To reset, you will want to reinstall the firwmare using assistant or dumldore. |
+ | Note: This mod also allows enabling Galileo GPS but I have not included steps on doing so. Please see Github original for additional help on setting this up. | ||
+ | Remember, with great power comes great responsibility. Please don't use this tool set, guide or info to fly in restricted, dangerous or sensitive areas. Aka, don't be a dumbass when flying. | ||