yaota8266 icon indicating copy to clipboard operation
yaota8266 copied to clipboard

WDT Reset Issue While Flashing

Open dj095 opened this issue 7 years ago • 3 comments

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?

dj095 avatar Apr 05 '17 17:04 dj095

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.).

pfalcon avatar Apr 05 '17 19:04 pfalcon

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 avatar Apr 05 '17 19:04 dj095

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

dj095 avatar Apr 06 '17 17:04 dj095