Phantom 4, stuck in "recovery" mode
4951 12 2017-7-24
Uploading and Loding Picture ...(0/1)
o(^-^)o
martin_bogo
lvl.1
United States
Offline



I need some advice, from one of the engineers who created the software in the Phantom 4:


In my Phantom, one of the env variables has been set, and it's stuck in "recovery" mode


# env boot.mode recovery

Because it's in this mode, the FTP daemon is not running, and rndis is not running correctly.  The drone does not have an IP address, and the CPLD/FPGA is not routing the connections to the USB port that are needed.

This means that neither the DJI Assistant app, nor Go 4 App can connect to perform an up or downgrade.

I can connect to the drone, and some DUML commands are working as expected.   For example, I can use Assistant to mount the flight logs, and Assistant does correctly see that the drone is a Phantom 4.

Assistant sends:

55 0E 04 66 2A 1F 10 27 40 00 01 00 08 70          U..f*..'@....p

The Drone then replies that it has reconfigured the route, and exposes the internal SDcard to the USB port

55 0E 04 66 C3 2A 99 3C 80 03 39 00 A3 9D 55 2A    U..fÃ*™<€.9.£U*
04 9C 03 0A FF FF 00 00 0E 7F 20 20 35 39 33 34   .œ..ÿÿ...  5934
30 20 75 73 62 5F 73 74 6F 72 61 67 65 5F 73 65   0 usb_storage_se
74 75 70 0D 0A 00 3F FE                           tup...?þ

( Yes, I have an understanding of the inner workings of the DJI Phantom 4, Mavic, I2, etc... the markup language, and the embedded Linux OS.  I have tried all the basic steps to recover from this situation, including allowing the battery to drain completely, attempting up and downgrades of the software, and using different platforms to attempt to make a change. )

What I need, is some kind of utility or DUML command that will clear the boot.mode, and/or enable ADBd so that I can run "env -d boot.mode", or some method that would allow for a complete factory reset of the drone which resets it out of the recovery mode.

As the developers know by now, root access to the Phantom, Mavic, Spark, I2 is possible, and in a normally working drone we know how to get things like adbd and even dropbear working.   To say that this "requires the replacement of the main board" would be dishonest and a misdirection.   I know this to be a software issue, and one that should be relatively easy to clear.

I direct this comment to the developer that said this : "你破解,我加固,求别互相伤害"

My reply is, "诚实的人静静地说出真相。 他们的话像台风一样弯曲世界。"

I humbly ask for your assistance, and await your answers.


Sincerely
Martin B.
DJI Reverse Engineering Team


2017-7-24
Use props
Cetacean
Captain
Flight distance : 2528264 ft
  • >>>
United States
Offline

Aloha martin,

     Your only real options under the circumstances is either fix the problem yourself since you seem to know so much about the problem or send it in to DJI for repairs.  You cannot possibly expect DJI to engage you on this Forum in the capacity in which you present yourself.  Your problem as you have presented it is simply beyond the purview of this Forum.  

     You have the option of dealing directly with Tech Support and they can put you in touch with engineering if DJI finds it warranted.  But, I strongly recommend that you speak with or chat with a human before you resort to email.

     Currently, DJI is having regular issues with software intrusions like so many other companies.  Your request puts them in a very awkward position.  DJI wants to help you solve your problem, but you have chosen the wrong path to resolution.

     Hope this helps!

Aloha and Drone On!
2017-7-24
Use props
martin_bogo
lvl.1
United States
Offline

Cetacean Posted at 2017-7-24 20:21
Aloha martin,

     Your only real options under the circumstances is either fix the problem yourself since you seem to know so much about the problem or send it in to DJI for repairs.  You cannot possibly expect DJI to engage you on this Forum in the capacity in which you present yourself.  Your problem as you have presented it is simply beyond the purview of this Forum.  


Cetacean,

Well, certainly I'm looking at all possible paths to solve this issue including finding a way to resolve it by furthering my understanding of how the recovery process works, and the commands sent between the Assistant and the UAV.  

That said, this particular issue crops up regularly for everyday customers.  It happens when an firmware update fails, and the UAV remains in the "recovery" state rather than continuing through into the next stage.

I have taken the time to understand the underlying issue, and present it here fully.  That's the only difference.  Yes, it's because I'm an experienced hardware engineer, but just because I'm a knowledgeable does not mean that I am not equally a customer of DJI.

I have taken the time to open a ticket with DJI on the issue, and if there is _no_ other choice I will send the Phantom 4 for repair.  

~~~

As an analogy -- A person buys a car, and a light appears on the dashboard that says "Check Engine."

*) A person who has no mechanical experience would take it to the dealer for repair, they pay an expert $300 to analyze the issue, $90 for the minimum one-hour service fee, and $20 for the part.

*) A person who has some mechanical experience might be able to read the error code, and make a better informed decision ( The light indicates that a sensor is not responding ) and then take it to a mechanic with a better understanding of the issue.   They pay the $90 service fee, and $20 for the part.

*) A person who has been a mechanic, may be able to read the precise error code will find out that the issue is with a $20 part, that is fairly simple to install.  They read a technical manual to know how the part needs to be replaced, purchase the part, and install it.    This is analogous to my situation.

*) A person who designs cars and mechanical systems for a living notices that there is a $20 part that is failing on a lot of cars.  They design a better part, and inform the manufacturer that they may have a solution to an industry-wide problem plaguing a series of cars.  They get hired by the company to make better cars, or they sell an independent compatible part that fits where the original part was.  

Someday, I hope to be in that fourth category.  Right now, I need the part from DJI.  



2017-7-24
Use props
Cetacean
Captain
Flight distance : 2528264 ft
  • >>>
United States
Offline

martin_bogo Posted at 2017-7-24 20:42
Cetacean,

Well, certainly I'm looking at all possible paths to solve this issue including finding a way to resolve it by furthering my understanding of how the recovery process works, and the commands sent between the Assistant and the UAV.  

Aloha martin,

     You forgot the scenario that happened to me last month;

*) A person has a problem with his engine.  The "Check Engine" light is on.  He goes on YouTube and finds out how to read the engine code without a reader.  Gets the problem fixed but IT STILL COSTS HIM $700!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

     Mahalo for understanding what I was trying to say in my previous post.  I can see what you are trying to point out and maybe there is a solution in there somewhere.  I have actually helped with some edits of one of their manuals so I know they are open to direct, well intentioned assistance.

     As for your scenario, DJI has a policy that they do the repairs.  That sucks for people who are handy and especially with birds that are out of warranty like our P4s.  

     There is not an area of use or problem solving that I do not enjoy with my DJI products.  That is why you will find me here on the Forum regularly.  Join us and see if you can help with some of the other user's problems.  It takes a lot of patience but there is a lot that you can learn by helping others.

     Mahalo again!

Aloha and Drone On!
2017-7-24
Use props
martin_bogo
lvl.1
United States
Offline

Cetacean,

Well, you certainly did Inspire me.  

Sage:protocol martinb$ ./cDUML -u -p /dev/tty.usbmodem25 -c "; env -d boot.mode recovery; reboot"
using port: /dev/tty.usbmodem25
P4UAV DUML sent, with command "; env -d boot.mode recovery; reboot; \n"
[REDACTED]

Sage:protocol martinb$ ./cDUML -u -p /dev/tty.usbmodem25
using port: /dev/tty.usbmodem25
P4UAV DUML sent, check 'adb devices'

Sage:protocol martinb$ adb devices
List of devices attached
07ELDXXXXXXXXX        device

Sage:protocol martinb$ adb shell
root@wm330_dz_vp0001_v5:/ # cat /data/upgrade/wm330_0000.cfg.sig | busybox grep formal
        <firmware formal="01.02.0602">

Looks like I'm going to be just fine.  P4 fully recovered, downgraded, and happy.   I'll wait for DJI to put out a more stable firmware before attempting another upgrade.  This one took a LOT of under-the-hood understanding to fix the "near brick" that was caused.   

It's good to be a mechanic.  It's better when the answer doesn't involve "Send it back to DJI, wait 10 days, and get charged $65/hr for an evaluation"

Au hoola iho la koʻu wawahi ai i ka eheu, au hiki lele.

He nui ka mahalo.
2017-7-25
Use props
gyrex
lvl.4
Flight distance : 7454275 ft
  • >>>
Poland
Offline

martin_bogo Posted at 2017-7-25 11:48
Cetacean,

Well, you certainly did Inspire me.  

I like this guy... Bypass the flaccid DJI support environment and DIY. I only wish I knew as much about this stuff as you but my computer science degree is too old and useless and my career took me down a different path.

Have you considered sharing your knowledge via some kind of wiki or blog so others may learn and potentially solve these issues and/or allow them to tweak their own hardware?
2017-7-25
Use props
martin_bogo
lvl.1
United States
Offline

gyrex Posted at 2017-7-25 12:07
I like this guy... Bypass the flaccid DJI support environment and DIY. I only wish I knew as much about this stuff as you but my computer science degree is too old and useless and my career took me down a different path.

Have you considered sharing your knowledge via some kind of wiki or blog so others may learn and potentially solve these issues and/or allow them to tweak their own hardware?


The DJI Reverse Engineering Team is producing and documenting tools to help people who have DJI UAV's make the most of their wonderful machines.

As we make our discoveries, they are added to our wiki and we spread the knowledge.

We are making better, safer, and easier to use applications that are available via github.  The tool I had to use in this particular case was a very low-level fix, but it's good to know that if more people have the same problem I did, it can be fixed.

Right now, we are concentrating on pyDUML, DUMLdore, and making sure people can up and downgrade firmware easily and safely.  The goal is to make sure people can keep flying, be productive, and have fun.  

Call us "The Other Unofficial DJI Support and Development Team."   
2017-7-25
Use props
gyrex
lvl.4
Flight distance : 7454275 ft
  • >>>
Poland
Offline

martin_bogo Posted at 2017-7-25 12:31
The DJI Reverse Engineering Team is producing and documenting tools to help people who have DJI UAV's make the most of their wonderful machines.

As we make our discoveries, they are added to our wiki and we spread the knowledge.

Ooooooer I like this. Can you please share the wiki URL?
2017-7-25
Use props
ALABAMA
First Officer
Flight distance : 10442687 ft
United States
Offline

Knew all this all along, but was waiting for you guys to figure it out to.   LOL
2017-7-25
Use props
iepiep74
lvl.2
Flight distance : 523573 ft
France
Offline

Aloha Martin,

I know this is a quite old post, but I hope you will read this.
I'm italian living in France (sorry for my english level) and I love Phantom 4!!! But something really sad arrives...
My P4 firmware update failed and it stay still in "recovery/update mode" (red/green light blinking 0.8s). I tryed lot of things but i have not your level of competence.
Assistant see drone correctly an I can access SD card, I can connect remote, access device, move gimbal, use camera to shot, all but fly!
I know many people is in same situation and, as me, cannot pay for new bird...
I really hope you'll found the time to give us the way to save our Phatom 4 with a description easy as possible (quite for newbies ) of all steps to resuscitate our birds.

I believe in You! Thanks, Roberto

DJI Phantom 4 firmware update fail - shared photos
2018-3-4
Use props
Wolf Bachofner
New
Russia
Offline

Hello! I finished playing with the remote control of my P4P+. experimented with installing applications and accidentally erased recovery.img file via ROM installer program. this file is responsible for reboot when flashing, for example. now I can not flash the remote, do not reset to the factory settings. could you send me the original recovery.img file? thanks in advance. Mark
2018-10-5
Use props
Jupami
lvl.2
Flight distance : 88140 ft
Spain
Offline

Good morning from Spain. I have the same problem, my ph4 has been in recovery mode. all the soft that I have tried does not see it.
You can pass me the sequence of linux codes that is referenced.
Thank you and greetings to all
2019-7-21
Use props
fansf3950e0c
New

United States
Offline

Hi Martin! My Phantom 4 is stuck in recovery mode too. I have tried everything to get it out, I’m learning but not nearly as skilled as you. Is the cDUML program referenced publicly available? Thanks for your help.

-Jon
2020-10-20
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules