Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This does NOT work properly. #3

Open
Untitled86 opened this issue Nov 14, 2016 · 2 comments
Open

This does NOT work properly. #3

Untitled86 opened this issue Nov 14, 2016 · 2 comments

Comments

@Untitled86
Copy link

Untitled86 commented Nov 14, 2016

I'm beyond frustrated with this ESP8266WebServer. It works, sometimes. Even just using the plain example code. It's randomly not responding, etc. What a piece of junk.

For example, just load the default page and refresh your browser 10x. It will fail. If it doesn't, try 20x.

@Untitled86
Copy link
Author

:P Wow... I am surprised the 8266 Arduino library is so buggy. I eventually sorted this out. I don't want to say how much time I spent on this issue.

In SOFT_AP mode the device fails to respond consistently. Replicate this simply by running a SoftAP example web server and executing "ping youripaddress -t" from the command line. You might see a few requests go through before it starts failing to respond. Sometimes it does respond, just not constantly.

Solve this by adding MDSN to your sketch!?! ...I have no idea, but I swear, this fixes the problem and the 8266 responds EVERY single time.

Just add...

#include <ESP8266mDNS.h>

To the top of your Sketch.

Then add...

WiFi.hostname("ESP8266");

Before your "softAP(ssid, pwd)" line.

And last...

  MDNS.begin("ESP8266");
  MDNS.addService("http", "tcp", 80);

After your "softAP(ssid, pwd)" line.

@nkhlktn
Copy link

nkhlktn commented May 16, 2018

Interesting Thanks!, you are right it works! Black magic!.
This has been solved in Arduino core 2.4.1 (probably earlier too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants