o-gs / dji-firmware-tools

Tools for handling firmwares of DJI products, with focus on quadcopters.
GNU General Public License v3.0
1.53k stars 422 forks source link

How to change the flight behavior #15

Open notsolowki opened 7 years ago

notsolowki commented 7 years ago

i figured it out, and crashed too :+1: i set some values low and it took off on if own so i hit the csc and broke most of its fall ,i was only 15 ft in the air whe i realized it wouldnt go down without the csc only need a new top shell but its still flyable. anyways i found out hot to get the app to push the commands. the only app i could get it to work with was 2.4.2. all you have to do is edit the flight controller parameters and mobile flc accordingly. factory reset and there they are.

notsolowki commented 7 years ago

@mefistotelis

notsolowki commented 7 years ago

@ferraript you should make a GUI to edit flyc_param. once all the parameters are defined. would be cool. i imagine it would be able to laod both flc_params. one from the app and one from the firmware. then make changes to both accordingly

ferraript commented 7 years ago

I'm lost in your thoughts once again :smile: So is it possible to push params from app to AC or not?

you should make a GUI to edit flyc_param

unfortunately, I'm neither Android nor Java developer

notsolowki commented 7 years ago

you just have to install the fw with the p3x debug. example. WITH 1.7.6 INSTALLED modify the 1.7.6 flight controller binary to your liking. then use the p3x_debug to OVERWRITE 1.7.6 with 1.7.6

notsolowki commented 7 years ago

i might add that it take 23 minutes to flash the fw with this method. it dont give very many indicators but it will make the update complete sound when its done. maybe even you could edit airport mode this way idk

notsolowki commented 7 years ago

im still testing the parameters. but i can tell you that basic.craft.thrust makes it go from idle to max motor speed right away. if you set it too high it dances in the air lol. make sure you limit the height in case it tries to go straight up no matter what like it did to me

notsolowki commented 7 years ago

and @ferraript, didnt you wirte that program to convert the logs? if you could make a windows gui like that. one that can read the parameters in the flyc_param file and list them in the gui. they would have boxes for the max,min,default value. each would have its own description. then it could save the changes to the json file.. right now im trying to figure out how the parameters behave so we can get some descriptions. unless someone else has the descriptions.. that would be cool

notsolowki commented 7 years ago

okay another update: the parameters do have to be restored in the app. so the apps flyc and the firmwares flc have to be updated

notsolowki commented 7 years ago

i can confirm my takeoff speed is 27 mph which is 12 meters per second

mefistotelis commented 7 years ago

i might add that it take 23 minutes to flash the fw with this method

If you're updating the whole firmware - note that you could update only the flyc module, would be faster and safer (as long as the rest is already at that version, and the firmware is not encrypted).

notsolowki commented 7 years ago

i was wondering that. could i just delete all the un-needed modules when repacking. and dont it upgrade the mi01 binary the normal way? i wonder why it only works when i use the debug file. maybe ill try it the normal way again just to confirm.

mefistotelis commented 7 years ago

No, that's not how it works.

You do not need the packing operation at all, you just need to rename the module you want to update. Correct file names are listed in the downgrade discussuion #4 .

notsolowki commented 7 years ago

so modules=0 mi01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ??

im confused or do you mean, you can just take mi01 and put in on the sdcard.

mefistotelis commented 7 years ago

No. File name.

notsolowki commented 7 years ago

so i should rename mi01 to m0305.bin?

mefistotelis commented 7 years ago

No. correct file name for m0306

Why do you mention m03s05? it is encrypted, so see my comment above for encrypted modules.

notsolowki commented 7 years ago

would be great to save some time because at this rate ill be testing parameters for a month lol

mefistotelis commented 7 years ago

Please read the post which I linked to.

notsolowki commented 7 years ago

so i cant take mi01 and rename it to PMCLDRFw3.bin and place it on the sdcard?

mefistotelis commented 7 years ago

Yes. Placing this file on SD card should initiate the update. I don't think the *_debug file is needed, but you have to check that.

Just don't screw up file names!

notsolowki commented 7 years ago

okay we got PMCLDRFw3 and PMCLDRAPP, Whats the APP for?

notsolowki commented 7 years ago

and another question. how come it would update the height but nothing else before when doing the upgrade the normal way. but now if i use the debug file they all work? i might be working ahead of myself here

mefistotelis commented 7 years ago

Do not update with both. read everything again.

notsolowki commented 7 years ago

i just want you to confirm this. can i rename mi01 to PMCLDRFw3.bin and it will only write the flight controller firmware which is mi01.bin. and will it have and update finished indicator

mefistotelis commented 7 years ago

can i rename mi01 to PMCLDRFw3.bin

No. This is not correct and will brick your drone.

and it will only write mi01.bin

If you will not provide any other file on the card, then no other modules will be updated

will it have and update finished indicator

I don't know.

notsolowki commented 7 years ago

i asked you this in an above post and you said it was the correct way. thats why im confused

mefistotelis commented 7 years ago

i asked you this in an above post and you said it was the correct way

Your post looked different when I commented ;)

You seem to be confusing modules. Be sure everything is right before you try to do the update.

notsolowki commented 7 years ago

okay so PMCLDRFw3.bin is what i need to rename my modified mi0.bin1 to? thank you

mefistotelis commented 7 years ago

No. You're still confusing modules.

notsolowki commented 7 years ago

wow im sorry lol, i mean PMCAPPFw3.bin is this correct. change mi01 to PMCAPPFw3.bin

mefistotelis commented 7 years ago

Yes, P3X_FW_V01.07.0060_mi01.bin -> PMCAPPFw3.bin.

notsolowki commented 7 years ago

yes without the P thank you for reminding me that. thank you!!!!!

mefistotelis commented 7 years ago

No, sorry, that's my mistake. With P.

notsolowki commented 7 years ago

lol thankyou

ferraript commented 7 years ago

why don't you just create yourself firmware pack containing m0306 module only and flash it?

notsolowki commented 7 years ago

yea thats what we were discussing

notsolowki commented 7 years ago

i wonder how fast this drone can descend without vrs

ferraript commented 7 years ago

no, you are renaming P3X_FW_V01.07.0060_mi01.bin to MCAPPFw3.bin and I'm suggesting:

  1. extract all modules from firmware using dji_fwcon.py (if you haven't done it already)
  2. delete all files except head.ini, mi01.ini and mi01.bin
  3. update flight parameters using dji_flyc_param_ed.py
  4. rename mi01. to mi00.
  5. create firmware file using dji_fwcon.py and flash it
ferraript commented 7 years ago

didnt you wirte that program to convert the logs?

I did, but it's written in Delphi / Pascal

i wonder how fast this drone can descend without vrs

exactly, changing descending speed may be dangerous I was also thinking of changing those 3 m/s to something higher, but I just like my P3A too much to lose it

ferraript commented 7 years ago

i can confirm my takeoff speed is 27 mph which is 12 meters per second

  1. as vertical ascending speed?
  2. you achieved that by changing vert_up_vel_0 or something else?
  3. I'd like to see DAT log containing this flight, any chance of uploading it somewhere?
notsolowki commented 7 years ago

@mefistotelis PMCAPPFw3.bin PERFECT :)

chazzzzz commented 7 years ago

People following this thread will brick their drone...

notsolowki commented 7 years ago

hows that

notsolowki commented 7 years ago

@mefistotelis have you tried changing your ascend speed?

notsolowki commented 7 years ago

i can descend at 12-13 mph with no issues so far

chazzzzz commented 7 years ago

Because it boggled my mind and I somewhat understand what is going on... I just hope they read all the way through before attempting this..

We are modifying target m0306 through mi01.bin and renaming it to PMCAPPFw3.bin...Is this Correct?

notsolowki commented 7 years ago

if you read everything im sure you will figure it out

notsolowki commented 7 years ago

i wouldnt do this unless u got a p3 pro...

notsolowki commented 7 years ago

okay

  1. get dji go 2.4.2?
  2. modify flyc params in mi01 3.repack mi01 with flyc_param_ed.py 4.flash mi01.bin
  3. edit the apk and make same said changes to flyc_param
  4. with everything powered on goto setting and restore defualt values.... there are you happy
notsolowki commented 7 years ago

because i know i am