Skip to content

Commit

Permalink
Update CaptivePortal.ino (#3628)
Browse files Browse the repository at this point in the history
Small change to insure wifi starts off and avoid crashing
  • Loading branch information
DanielLester83 authored and me-no-dev committed Jan 20, 2020
1 parent 0607d36 commit dd78794
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ String responseHTML = ""
"<h1>Hello World!</h1><p>This is a captive portal example. All requests will "
"be redirected here.</p></body></html>";

void setup() {
void setup() {
WiFi.disconnect(); //added to start with the wifi off, avoid crashing
WiFi.mode(WIFI_OFF); //added to start with the wifi off, avoid crashing
WiFi.mode(WIFI_AP);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
WiFi.softAP("DNSServer CaptivePortal example");
Expand Down

0 comments on commit dd78794

Please sign in to comment.