o-gs / DJI_FC_Patcher

toolset for patching DJI birds 0306 modules
73 stars 32 forks source link

Galileo for Mavic FW 01.03.0700 ? #29

Closed ferraript closed 5 years ago

ferraript commented 5 years ago

@Matioupi , would it be possible to make wm220 patch for Mavic FW 01.03.0700 too? I'm interested in enabling Galileo only, but I have no idea what addresses need to be changed.

Matioupi commented 5 years ago

Hi, it's certainly possible, but I really don't have and will take time for that.

vxcactus commented 5 years ago

Hi, it's certainly possible, but I really don't have and will take time for that.

maybe you can adapt the firmware for I2 V01.02.0300? we are ready to donate, for your time thx

brett8883 commented 5 years ago

I guess the obvious question is why you’d want to be on 01.03.0700 if you can patch 01.04.0300? The whole idea is make 01.04.0300 modifiable like 01.03.0700. I can’t think of anything you can do with 01.03.0700 you can’t do with a patched 01.04.0300

ferraript commented 5 years ago

I've got at least two "problems" with 1.4.300:

  1. It's not possible to remove NFZ database from AC. Otherwise there is "Cannot take off. Version unmatched." error.
  2. DAT logs are not stored into the internal SD card anymore. Instead they are saved in encrypted form into onboard memory chip, it's more complicated to retrieve them.
brett8883 commented 5 years ago

Good points. Do you know the practical difference between removing the NFZ database and turning the parameters off?

Since we know where the NFZ database lives on the drone I wonder if we could modify it so that it either contains no entries or move them all to the middle of Antarctica or something effectively removing it?

brett8883 commented 5 years ago

ferraript what you could do if you wanted Galileo on 01.03.0700 is upgrade to 01.04.0300 patch the firmware and then downgrade back to 01.03.0700 since Galileo will persist between upgrades and downgrades if I read the readme correctly.

Cantrepeat commented 5 years ago

You CAN remove the NFZ data from 01.04.0300.

ferraript commented 5 years ago

@brett8883 : I did exactly that. It ended up in a strange way. Immediately after the downgrade I tested it on my balcony and according to the logs Galileo still worked. But when I went out and I actually flied, Galileo was gone. Two things were made between these tests: I calibrated the compass and IMU too. So my only explanation so far is that one of these calibrations removed Galileo.

@Cantrepeat : Can you say how? Or point me to the direction, where I can read about that?

brett8883 commented 5 years ago

@ferraript that’s weird.

brett8883 commented 5 years ago

@ferraript I’ve got one more idea. What if you removed the NFZ database from your 01.03.0700 and then upgraded to 01.04.0300 BUT you remove the 905 module from the stock 01.04.0300.

I know this might work because I have an issue with my drone where it will not flash the 905 module from 01.04.0300. It will flash everything fine but when it gets to the 905 it hangs. So what I did was downgrade to 01.03.0400 which doesn’t have a 905 module and then upgraded to a 01.04.0300 that I removed the 905 module but is otherwise stock. Bing bam boom it flies doesn’t complain and patch was still successful.

Now I created a directory called “NFZ” in my amt folder just to cover my tracks but I kinda doubt that has anything to do with it. The folder is empty

Just thinking out loud

ferraript commented 5 years ago

nope 1.4.300 FC needs good pair nfz.db + nfz.sig, otherwise it won't start the motors today I started on 1.4.300 + 1.3.700 FC + NFZ files removed I flashed 1.4.300 FC made by this patcher -> motors didn't start I flashed 1.4.300 NFZ -> motors started I pulled nfz files from AC to my computer to have local backup removing nfz.db or nfz.sig or both from AC -> motors didn't start I edited nfz.db, pushed it back to AC and set correct rights -> motors didn't start - which means that nfz.sig has to be valid

so far that's my dead end - I haven't find a way how to generate valid nfz.sig file for edited nfz.db so I downgraded my FC back to 1.3.700 and once again, Galileo still works this time I'll try not to calibrate IMU/Compass to see if Galileo stays

brett8883 commented 5 years ago

@ferraript I think the reason it didn’t work with the mixed firmware is because the FC Patcher can’t upgrade the modules, only replace the same firmware that’s already on the bird. He makes it pretty clear that that you have to be on STOCK 01.04.0300. I did the exact same thing at one point but I still had the NFZ files and it still didn’t work, motors wouldn’t start. I think it didn’t work this time for you was the same outcome but different reasons in your case.

So with what I am talking about is to downgrade all the way to 01.03.0400, remove the NFZ.db+.sig if you haven’t already, then upgrade to 01.04.0300 but remove the 905 module from 01.04.0300 first before you flash it.

I think the reason that it gets tripped and doesn’t allow you to take off is because you are modifying the files after they are on your bird. Since putting them back from your local copy didn’t work we know it’s not just that it doesn’t just need the pair or else that would have worked.

I could be wrong but what you tried there wouldn’t have satisfied the requirements of my theory.

ferraript commented 5 years ago

"Since putting them back from your local copy didn’t work" no, you got it wrong I wrote that pushing edited nfz.db leads to impossibility to start the motors As soon as I pushed the original nfz.db, motors could start

ferraript commented 5 years ago

so, 4 days ago Galileo worked I haven't done any calibration, neither IMU nor compass today I went out to do actual flying and... Galileo is gone again :(

brett8883 commented 5 years ago

@ferraript so I’m just curious, how do you know Galileo is gone and that you just aren’t getting as many sats in whatever location you are flying? Did you check your logs? Maybe there just weren’t any Galileo sats that met the quality standard for use in your area?

ferraript commented 5 years ago

yes, from the DAT logs there are 22 operational Galileo satellites, so it would have to be some kind of mega-malfunction, that Mavic couldn't connect to a single one so I'm pretty sure

brett8883 commented 5 years ago

@ferraript don’t know what’s going on with your Galileo maybe you just need to flash back to 01.04.0300(you can use a version that has only the .config, 305, and 306 modules to make it faster) and do the patch process over again. I figured out how to remove the nfz.db from a patched 01.04.0300 firmware and I’ll release a walk through on how to do it shortly.

ferraript commented 5 years ago

I'm looking forward to that walkthrough

brett8883 commented 5 years ago

@ferraript https://github.com/brett8883/DJI_Super-NFZ_Eraser

ferraript commented 5 years ago

Not that I'm ungrateful, but for us with rooted Mavic, couldn't you just publish patched pair nfz.db + nfz.sig so we can push them to the AC by ourselves? (I'd like to avoid all those reflashings as much as possible.)

brett8883 commented 5 years ago

@ferraript its more complicated than that remember you told me "I edited nfz.db, pushed it back to AC and set correct rights -> motors didn't start - which means that nfz.sig has to be valid." To sig the edited database to the firmware you cant just push it. It has to signed to the firmware too. If you want to skip the 'Enable ADB" steps thats fine besides this mod doesnt require a rooted bird unless you want to verify the eraser worked. You could even pull the nfz.db yourself. Super-NFZ Eraser doesn't "flash" any firmware to your bird, DUMLdore_for_nfz_eraser is incapable of flashing firmware.

Also I reread your posts above and you say that you did FC_Patcher on top of your bird which had 01.03.0700 flight controller? "today I started on 1.4.300 + 1.3.700 FC + NFZ files removed I flashed 1.4.300 FC made by this patcher -> motors didn't start I flashed 1.4.300 NFZ -> motors started."

Thats why your galileo isnt working. You have to have stock 01.04.0300 flight controller for the FC_Patcher flight controller to take. You probably never had FC_Patched flight controller on your bird to begin with.

ferraript commented 5 years ago

Since there is more and more confusion and we got off the original problem, I'm closing this with result:

  1. It's possible to create Galileo mod for 1.3.700, but so far there is nobody able (or willing) to do it.
  2. If bird has patched 1.4.300 with Galileo working, downgrading Flight Controller to 1.3.700 will result to loss of Galileo.