pfalcon / yaota8266

Yet another OTA solution for ESP8266, this time supporting large (>512KB) firmwares even on 1MB devices (repo is rebased)
120 stars 33 forks source link

WDT Reset Issue While Flashing #16

Open dj095 opened 7 years ago

dj095 commented 7 years ago

There is one thing i would like to ask you @pfalcon :

I took a working copy of micropython ota build 1.8.7 from the downloads page of micropython. And flashed it onto my esp12F Module. It works fine by the way. Then i used the .ota file that was digitally signed with with same key as the micropython .bin file. Then i used your ota_client.py script and ran it with the .ota file when the ota-server was listening(OTA Mode). The .ota file was signed with same digital signature as included in the config file for the ota_server. So the server started picking up the digitally signed packages and after a while a reset happened due to the WatchDogTimer(WDT Reset). Then the rest of the packages didn't go through. It says "Unexpected offset". Of course the offset that the ota_server expects now is 0 because it restarted. So I studied your code for ota_server and found a line wdt_timer_feed() to keep the WDT fed. I want to incorporate this line in your Server loop when its receiving UDP Diagram packets. So i how can i incorporate this change such that its supported in the micropython esp8266 1.8.7 code ? And will this change actually stop the WDT_Timer while receving packets?

pfalcon commented 7 years ago

Thanks for submitting a separate issue to the right project, but:

And will this change actually stop the WDT_Timer while receving packets?

Sorry, I have no idea. You will need to try and see yourself if it helps. Generally, the fact that you get a WDt reset isn't good. It shouldn't happen, and neither myself not @dpgeorge who tested it too saw it. There can still be a bug in ota_server of course. Or there may be some issue with your hardware (check power, etc.).

dj095 commented 7 years ago

Actually i did a bit of research and i found that this is actually the "smart-config" in esp12 type boards. They keep the WDT enabled by default so if some corrupt firmware flashing happens and the board resets after a while due to WDT and prevents the board from getting unusable. Anyways i am ready to test this on my own but i don't know how to include any change in your project and get this change in the micropython firmware i build from the official site. How do they include your ota-server implementation in micropython which is visible in example- micropython 1.8.7 ota build. All the echo messages are the same as in your ota-server. But i could not find your files in the micropython repository. Could you help me on this?

dj095 commented 7 years ago

Please tell me how to include some change in your repo in the micropython build image. I can't find your files there.