mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-30 03:13:51 +00:00
#407 - Fix for wifi does not come back up after power down
This commit is contained in:
parent
2253ea1b41
commit
877dc824a9
@ -103,7 +103,7 @@ lib_deps =
|
|||||||
# board_build.ldscript = linker/esp32.extram.bss.ld
|
# board_build.ldscript = linker/esp32.extram.bss.ld
|
||||||
lib_ignore = segger_rtt
|
lib_ignore = segger_rtt
|
||||||
platform_packages =
|
platform_packages =
|
||||||
framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#2814f110aa618429bdd9a0a2d6a93c55f29f87a6
|
framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#c29e0bcde1b1b4a939dd7339dea0302d2d589ae7
|
||||||
|
|
||||||
; customize the partition table
|
; customize the partition table
|
||||||
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
|
||||||
|
@ -40,12 +40,14 @@ bool isWifiAvailable()
|
|||||||
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
const char *wifiName = radioConfig.preferences.wifi_ssid;
|
||||||
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
const char *wifiPsw = radioConfig.preferences.wifi_password;
|
||||||
|
|
||||||
// strcpy(radioConfig.preferences.wifi_ssid, "");
|
// strcpy(radioConfig.preferences.wifi_ssid, "meshtastic");
|
||||||
// strcpy(radioConfig.preferences.wifi_password, "");
|
// strcpy(radioConfig.preferences.wifi_password, "meshtastic!");
|
||||||
|
|
||||||
// strcpy(radioConfig.preferences.wifi_ssid, "meshtasticAdmin");
|
// strcpy(radioConfig.preferences.wifi_ssid, "meshtasticAdmin");
|
||||||
// strcpy(radioConfig.preferences.wifi_password, "12345678");
|
// strcpy(radioConfig.preferences.wifi_password, "12345678");
|
||||||
|
|
||||||
// radioConfig.preferences.wifi_ap_mode = true;
|
// radioConfig.preferences.wifi_ap_mode = true;
|
||||||
|
// radioConfig.preferences.wifi_ap_mode = false;
|
||||||
|
|
||||||
if (*wifiName && *wifiPsw) {
|
if (*wifiName && *wifiPsw) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -221,9 +223,16 @@ static void WiFiEvent(WiFiEvent_t event)
|
|||||||
DEBUG_MSG("Obtained IP address: \n");
|
DEBUG_MSG("Obtained IP address: \n");
|
||||||
Serial.println(WiFi.localIP());
|
Serial.println(WiFi.localIP());
|
||||||
|
|
||||||
// Start web server
|
if (!APStartupComplete) {
|
||||||
initWebServer();
|
// Start web server
|
||||||
initApiServer();
|
DEBUG_MSG("... Starting network services\n");
|
||||||
|
initWebServer();
|
||||||
|
initApiServer();
|
||||||
|
|
||||||
|
APStartupComplete = true;
|
||||||
|
} else {
|
||||||
|
DEBUG_MSG("... Not starting network services (They're already running)\n");
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SYSTEM_EVENT_STA_LOST_IP:
|
case SYSTEM_EVENT_STA_LOST_IP:
|
||||||
@ -253,7 +262,7 @@ static void WiFiEvent(WiFiEvent_t event)
|
|||||||
|
|
||||||
APStartupComplete = true;
|
APStartupComplete = true;
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("... Not starting network services\n");
|
DEBUG_MSG("... Not starting network services (They're already running)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user