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 filesBrowse files
DanielLester83me-no-dev
authored andcommitted
Update CaptivePortal.ino (#3628)
Small change to insure wifi starts off and avoid crashing
1 parent 0607d36 commit dd78794
Copy full SHA for dd78794

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino

Copy file name to clipboardExpand all lines: libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino
+3-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.