ESP8266 Web Server

22 views
Skip to first unread message

jpbar...@aol.com

unread,
May 25, 2016, 9:42:25 PM5/25/16
to nycresistormi...@googlegroups.com
As some of you may know, the ESP8266 modules (~$6) and dev boards (Adafruit Hazzah for $16) seem like a cheap WiFi solution as either a client or server.

I've had a few interns implementing its use as a Web Server, wherein an HTML document is stored in the 1meg serial flash.  They are using the Arduino IDE to program it.

Things went smoothly as far as being able to connect to it from a computer or phone over wifi.  However, if the Web page size being served is over a few kbytes, the serving of the page becomes less reliable.  Ideally the web page will contain a picture and they've tried a gif both as a separate file and as a base64 data uri in the html document.  Sometimes the larger page will load, but the great majority of times it doesn't.  They have tried various browsers.  The network analysis feature in Chrome seems to indicate that the esp8266 is resetting the connection.

They have looked through much information on-line and have tried various possible solutions and now they are focusing on checking to see if the data is being sent right from flash.  A thought was that the page was first being loaded into ram and maybe using too much.

I'm curious if anyone has had luck serving larger web pages of maybe 50k to 100k.

Thank you,
Joe

Chris Stratton

unread,
May 25, 2016, 9:58:40 PM5/25/16
to nycresistormi...@googlegroups.com

Trying to get local serial debug output from the ESP8266 may be the most effective.

Failing that a cheap cy7c68013 based USB logic analyzer, sigrok, and some scripts could monitor its attempt at pulling data from flash.

You might also want to make sure there is not being an issue with concurrent requests from different clients, or even optimizations in how a browser fetches things.

Finally make sure there isn't a newer version of the code you rely on that might have bugfixes.

--
You received this message because you are subscribed to the Google Groups "NYCResistor:Microcontrollers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nycresistormicrocon...@googlegroups.com.
To post to this group, send email to nycresistormi...@googlegroups.com.
Visit this group at https://groups.google.com/group/nycresistormicrocontrollers.
For more options, visit https://groups.google.com/d/optout.

Dan Lavin

unread,
May 25, 2016, 10:11:45 PM5/25/16
to nycresistormi...@googlegroups.com

Have you considered power issues?  An ESP8266 will draw 500ma+ when sending data.  Usually the power supply includes a large capacitor which can handle power spikes, but it might not be able to handle the power needed to support a lengthy data transmission.  This is speculation, but can be easily tested.  Add a larger capacitor across the 3.3v power line, say 4x the value of the existing one, or whatever large value you have around.  If that increases the likelihood of a successful page load, you are headed in the right direction.

--
You received this message because you are subscribed to the Google Groups "NYCResistor:Microcontrollers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nycresistormicrocon...@googlegroups.com.
To post to this group, send email to nycresistormi...@googlegroups.com.
Visit this group at https://groups.google.com/group/nycresistormicrocontrollers.
For more options, visit https://groups.google.com/d/optout.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7598 / Virus Database: 4568/12296 - Release Date: 05/25/16


jpbar...@aol.com

unread,
May 25, 2016, 10:50:30 PM5/25/16
to nycresistormi...@googlegroups.com
I looked at the Adafruit Huzzah schematic and it has a SPX3819 regulator (its datasheet shows a 800mA typical current limit) with 10uF on the output.  I'll find out how they are powering the module in case that's a limiting factor.  I'll have them put a scope on the 3.3V.

Thank you both Dan and Chris for the suggestions.


Sent from AOL Mobile Mail

josh jordan

unread,
May 26, 2016, 12:07:32 AM5/26/16
to nycresistormi...@googlegroups.com
If the chip is resetting the connection, it sounds like the whole chip could be resetting due to power issues or a hardware reset due to a hard fault.  I don't know how the ESP core works but maybe the extra binary file needs to be aligned to 4 bytes or else it will do a hardware reset 75% of the time.

george....@gmail.com

unread,
May 26, 2016, 8:32:44 AM5/26/16
to jpbarbetta via NYCResistor:Microcontrollers

Try putting some delay(0)'s the transmission code. The ESP8266 watchdog is pretty aggressive and needs to be reset during long operations.

Regards,
George




Reply all
Reply to author
Forward
0 new messages