Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By h4rm0n1c
#23610 Edit: The words "WDT reset" imply that there is something that is taking too long, therefore triggering the watchdog timer, I wish I'd noticed this before typing up this post, but it's still valuable advice, so I'll leave it here.

You COULD disable the watchdog for a limited period (5 seconds max, the hardware WDT kicks in and resets after this period), but you'd be better off tracking down the loop or other slow or blocking code and adding a yield() to feed the WDT and give the Module's OS a chance to do some housekeeping, process a packet, etc...

This should resolve the issue and allow for your HTML and CSS to be downloaded as separate files/requests.

Original Post:

Hi guys, RST cause 4 can be triggered by power supply issues, try putting a 10 uF (microfarad) capacitor across the power rails near the esp8266 module, this will act as a reservoir of power for sudden surges in current draw, this chip has been known to be quite thirsty and its power draw varies with CPU activity, which may be what has happened with your rapid subsequent connections from the browser to the ESP8266.

This is possibly the reason why the ESP doesn't "like" rapid subsequent requests, because the sudden demand could be seeing a surge in current draw for the CPU to service the requests.

I might be wrong, but this will help rule out power supply issues as a cause if you do this.

I'm actually prototyping with an ATX power supply at the moment because I got sick of power issues, since they have reservoir caps on all the voltage rails and it outputs an extremely stable 3.3v, which is ideal for the ESP8266.
User avatar
By Mike Bedford
#23613 Just downloaded and compiled to my ESP8266. So far, agree with everybody else, this is very nice! Thank you so much! Just a comment and a question:
1. I was having a hard time connecting my phone to the AP. Seemed to get stuck on "obtaining IP address" alot. Took several attempts to get it to connect. One point it also stated that my password was incorrect but it wasn't. Just tried again and it would connect. Any thoughts on these items?
2. Question is I noticed the admin timeout. At first I thought (given the issues connecting in number 1 above) that it was dropping my connection too until I saw this setting and did confirm the timeout was happening in the serial monitor log. I am set to the default of 180. The question is, is there any reason there is a timeout? Would there be any harm in disabling the timeout and allowing the web config at any time? If I can do this, do I just set this to 0 to disable it? I know the ESP8266 can handle AP and client at the same time and this is what I desire.

Thanks!

Mike
User avatar
By martinayotte
#23674
proteus74 wrote:Sometimes I have this issue too when the network-connetion between the ESP and the router isn't well. The problem I think is, when you load the admin.html then is loads the style.css.h, even when the browser sees the row with the style-attribute and send this request to the esp, but the esp is still working on the admin.html and gets a second reqeust...then it might crashes.

But I'm also looking for a solution...may I load the stylesheet via javascript, when the page has done loading or something like this.


Hi proteus74,

I've gave a try with you project but, unfortunately, I got the WDT issue right at the beginning, without even having the AP mode been available for Wifi clients.
I started debugging, and I found several flaws... :(
One of them is that if no configs exists, STA should not try to connect, and also, since there no STA yet, the NTPRefresh() calls in loop() should not be done.
I will dig a bit further in the following days ...
User avatar
By ridge
#23687 In the Arduino IDE environment, I frequently do a 'Save As...' with my projects to create backups with revision numbers.
After copying the ESP_WebConfig project to ESP_WebConfig_3, I added a few variables to global.h.
The compiler complained that no such variable existed after I had added them in the global.h file in the new project.

The fix this error, change #include <global.h> to #include "global.h" near the top of the ESP_WebConfig file.