8000 Update CaptivePortal.ino (#3628) · MartinUbl/arduino-esp32@dd78794 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd78794

Browse files
DanielLester83me-no-dev
authored andcommitted
Update CaptivePortal.ino (espressif#3628)
Small change to insure wifi starts off and avoid crashing
1 parent 0607d36 commit dd78794

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ String responseHTML = ""
1111
"<h1>Hello World!</h1><p>This is a captive portal example. All requests will "
1212
"be redirected here.</p></body></html>";
1313

14-
void setup() {
14+
void setup() {
15+
WiFi.disconnect(); //added to start with the wifi off, avoid crashing
16+
WiFi.mode(WIFI_OFF); //added to start with the wifi off, avoid crashing
1517
WiFi.mode(WIFI_AP);
1618
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
1719
WiFi.softAP("DNSServer CaptivePortal example");

0 commit comments

Comments
 (0)
0