Skip to content

Commit

Permalink
Add restart post-AP to prevent issues with launching HTTP server
Browse files Browse the repository at this point in the history
  • Loading branch information
thorrak committed Feb 12, 2021
1 parent 9208067 commit 9956410
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Binary file modified bin/d32_pro_tft_firmware.bin
Binary file not shown.
Binary file modified bin/lcd_ssd1306_firmware.bin
Binary file not shown.
Binary file modified bin/tft_espi_firmware.bin
Binary file not shown.
9 changes: 5 additions & 4 deletions src/wifi_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ void initWiFi() {
if (url.isValidHostName(custom_mdns_name.getValue())) {
strlcpy(config.mdnsID, custom_mdns_name.getValue(), 31);
saveConfig();
// Doing this to reset the DHCP name, the portal should never pop
ESP.restart();
} else {
// If the mDNS name is invalid, reset the WiFi configuration and restart
// the ESP8266
// If the mDNS name is invalid, reset the WiFi configuration and restart the ESP8266
disconnectWiFi();
}
}
// Doing this to reset the DHCP name, the portal should never pop
// Additionally, there is a bug where the HTTP server doesn't spin up after the AP shuts down. Not sure where
// that issue is, but this solves it.
ESP.restart();
}

if (!MDNS.begin(config.mdnsID)) {
Expand Down

0 comments on commit 9956410

Please sign in to comment.