Page 3 of 3

Re: Micropython crashing and rebooting every 9seconds

Posted: Tue Aug 06, 2019 6:31 pm
by Cevc
It finally works!

I disabled the AP network, but left STA on. Now it works, even in my flat, and for most of my planned projects, I'll be connected to the local WiFi anyway, so AP is not needed.

Thanks very much Roberthh, and everyone else for all your help!

Seeing as I now have 7 extra boards lying around, is there any way to alter the boot file before flashing the device? It would be useful to be able to flash them so that AP is off by default.

Re: Micropython crashing and rebooting every 9seconds

Posted: Tue Aug 06, 2019 7:25 pm
by Roberthh
You can do so, but it requires to build your own firmware image. Using Linux, this requires some steps, but is quite straightforward. In the ports/esp8266/modules directory there is a file called _boot.py (take care of the _), which is executed first at boot time.
Being able to make your own image is any advantageous, because it allows to "freeze" python scripts into the firmware. Then they start faster and consume no RAM for the code. And TAM is a precious resource on the ESP8266. The micropython repository is at https://github.com/micropython/micropython, instructions to build the ESP8266 firmware are at https://github.com/micropython/micropyt ... ts/esp8266. Please follow them carefully.
There are also some threads about copying and flashing the file system of an existing device. But making your own image is a more robust approach.
It still would be interesting to know the reason for the crash. Are you able to catch some communication data? Is by chance your router set in the range of 192,168.4.x? Can you run a protocol sniffer in the subnet the esp8266 uses?

Re: Micropython crashing and rebooting every 9seconds

Posted: Tue Aug 06, 2019 7:33 pm
by Christian Walther
There is, if you want to rebuild the firmware (it’s done in ports/esp8266/modules/inisetup.py called from _boot.py), but I’m not sure you need to – you can just disable it on the REPL after flashing, and it will stay off.

Re: Micropython crashing and rebooting every 9seconds

Posted: Mon Mar 29, 2021 11:00 am
by alanbell
I am seeing the same issue, I am wondering if the problem is mesh networking, where there are multiple SSIDs with the same name visible. Doesn't require any attempt to connect, just visibility of the mesh seems sufficient to put it in a reboot loop.

Re: Micropython crashing and rebooting every 9seconds

Posted: Thu Apr 29, 2021 4:01 pm
by megaRXB
I am having the same problem as Allan. Using a different board, it had the same problem. I haven't yet tried to turn off the "AP", cause I don't know what that is. I will report back if it works for me as well.

Re: Micropython crashing and rebooting every 9seconds

Posted: Thu May 20, 2021 12:20 pm
by megaRXB
megaRXB wrote:
Thu Apr 29, 2021 4:01 pm
I am having the same problem as Allan. Using a different board, it had the same problem. I haven't yet tried to turn off the "AP", cause I don't know what that is. I will report back if it works for me as well.
Alright yeah that worked for me as well. Super weird.

Re: Micropython crashing and rebooting every 9seconds

Posted: Tue May 25, 2021 2:15 am
by Jackli
Please update the post if this problem is solved, I think there are many people with the same problem as me waiting for a solution.