6.3.0.7 Use ESP.reset

6.3.0.7 20181111
 * Fix wifi connection errors using ESP.reset instead of ESP.restart
This commit is contained in:
Theo Arends 2018-11-11 14:28:46 +01:00
parent e76f862b8f
commit a55ec91a10
3 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,7 @@
/* 6.3.0.6 20181110 /* 6.3.0.7 20181111
* Fix wifi connection errors using ESP.reset instead of ESP.restart
*
* 6.3.0.6 20181110
* Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40% * Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%
* In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R) * In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R)
* *

View File

@ -20,7 +20,7 @@
#ifndef _SONOFF_VERSION_H_ #ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_
#define VERSION 0x06030006 #define VERSION 0x06030007
#define D_PROGRAMNAME "Sonoff-Tasmota" #define D_PROGRAMNAME "Sonoff-Tasmota"
#define D_AUTHOR "Theo Arends" #define D_AUTHOR "Theo Arends"

View File

@ -1577,15 +1577,15 @@ int WifiState()
void WifiConnect() void WifiConnect()
{ {
WifiSetState(0); WifiSetState(0);
WiFi.persistent(false); // Solve possible wifi init errors WiFi.persistent(false); // Solve possible wifi init errors
wifi_status = 0; wifi_status = 0;
wifi_retry_init = WIFI_RETRY_OFFSET_SEC + ((ESP.getChipId() & 0xF) * 2); wifi_retry_init = WIFI_RETRY_OFFSET_SEC + ((ESP.getChipId() & 0xF) * 2);
wifi_retry = wifi_retry_init; wifi_retry = wifi_retry_init;
wifi_counter = 1; wifi_counter = 1;
} }
/*
// Enable from 6.0.0a until 6.1.0a - disabled due to possible cause of bad wifi connect on core 2.3.0 // Enable from 6.0.0a until 6.1.0a - disabled due to possible cause of bad wifi connect on core 2.3.0
// Re-enabled from 6.3.0.7 with ESP.restart replaced by ESP.reset
void WifiDisconnect() void WifiDisconnect()
{ {
// Courtesy of EspEasy // Courtesy of EspEasy
@ -1598,17 +1598,18 @@ void WifiDisconnect()
void EspRestart() void EspRestart()
{ {
// This results in exception 3 on restarts
delay(100); // Allow time for message xfer - disabled v6.1.0b delay(100); // Allow time for message xfer - disabled v6.1.0b
WifiDisconnect(); WifiDisconnect();
ESP.restart(); // ESP.restart(); // This results in exception 3 on restarts on core 2.3.0
ESP.reset();
} }
*/
/*
void EspRestart() void EspRestart()
{ {
ESP.restart(); ESP.restart();
} }
*/
/*********************************************************************************************\ /*********************************************************************************************\
* Basic I2C routines * Basic I2C routines