If your ESP keeps resetting
Posted: Mon Apr 11, 2016 7:29 am
Some feedback to help others make sense of some strange symptoms...
In 4Mb Alpha 9 in AP mode I can cause an esp reset every time by using ip() or len(variable).
But I've noticed that some (many) syntax errors can also cause the esp to reset. I suspect this might then leave some of flash memory corrupted.
But when an esp reset happens - for whatever cause - it's quite easy to get sucked deeper into quicksand unless you realise the situation.
You may not be able to do a save when you try, due to the esp not yet rebooting back into (AP) mode again to allow reconnection to the device. So wait until it does, or reboot it yourself, then when able to reconnect, save your modified code without the problem statement still live (just comment it out).
Unless corrected code is save back to the esp, it reboots with the faulty code still 'live', which can make the esp reset again, and keep on rebooting endlessly about once every minute.
I suspect (but is only conjecture) that the corrupted esp code may be sending/expecting some sort of 'keep-alive' about every 50 seconds which perhaps causes an autorun of the faulty script, inducing resets ad-infinitum.
So to break the loop, resave a 'safe' script as soon as the esp briefly reconnects again, or else do a flash format to start from scratch (but you will lose your unsaved script).
In 4Mb Alpha 9 in AP mode I can cause an esp reset every time by using ip() or len(variable).
But I've noticed that some (many) syntax errors can also cause the esp to reset. I suspect this might then leave some of flash memory corrupted.
But when an esp reset happens - for whatever cause - it's quite easy to get sucked deeper into quicksand unless you realise the situation.
You may not be able to do a save when you try, due to the esp not yet rebooting back into (AP) mode again to allow reconnection to the device. So wait until it does, or reboot it yourself, then when able to reconnect, save your modified code without the problem statement still live (just comment it out).
Unless corrected code is save back to the esp, it reboots with the faulty code still 'live', which can make the esp reset again, and keep on rebooting endlessly about once every minute.
I suspect (but is only conjecture) that the corrupted esp code may be sending/expecting some sort of 'keep-alive' about every 50 seconds which perhaps causes an autorun of the faulty script, inducing resets ad-infinitum.
So to break the loop, resave a 'safe' script as soon as the esp briefly reconnects again, or else do a flash format to start from scratch (but you will lose your unsaved script).