From 48668bce7ba9747fd498ed7178e9cd19e8a5512d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 25 Aug 2018 11:59:21 +0200 Subject: [PATCH] 6.1.1.10 - Disable core 2.4.2 sleep Disable wifi sleep for both Esp8266/Arduino core 2.4.1 and 2.4.2 to solve device freeze caused by Espressif SDK bug (#3554) --- sonoff/_changelog.ino | 5 ++++- sonoff/sonoff_version.h | 2 +- sonoff/support.ino | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index c64f83efa..616560b8a 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,7 @@ -/* 6.1.1.9 +/* 6.1.1.10 + * Disable wifi sleep for both Esp8266/Arduino core 2.4.1 and 2.4.2 to solve device freeze caused by Espressif SDK bug (#3554) + * + * 6.1.1.9 * Allow user override of define MAX_RULE_TIMERS (#3561) * Allow user override of define MAX_RULE_VARS * Add GPIO options ButtonXn, SwitchXn and CounterXn to select INPUT mode instead of INPUT_PULLUP (#2525) diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h index 58b36d16e..6293dc46a 100644 --- a/sonoff/sonoff_version.h +++ b/sonoff/sonoff_version.h @@ -20,7 +20,7 @@ #ifndef _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_ -#define VERSION 0x06010109 +#define VERSION 0x0601010A #define D_PROGRAMNAME "Sonoff-Tasmota" #define D_AUTHOR "Theo Arends" diff --git a/sonoff/support.ino b/sonoff/support.ino index 911e75a9c..963cac331 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -1088,16 +1088,18 @@ void WiFiSetSleepMode() * tick from 250ms to 3s in WIFI_LIGHT_SLEEP mode, which leads to increased timeout for * TCP timer. Therefore, the WIFI_MODEM_SLEEP or deep-sleep mode should be used * where there is a requirement for the accurancy of the TCP timer. + * + * Sleep is disabled in core 2.4.1 and 2.4.2 as there are bugs in their SDKs + * See https://github.com/arendst/Sonoff-Tasmota/issues/2559 */ -#ifndef ARDUINO_ESP8266_RELEASE_2_4_1 // See https://github.com/arendst/Sonoff-Tasmota/issues/2559 - Sleep bug in SDK - +#if defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2) +#else // Enabled in 2.3.0, 2.4.0 and stage if (sleep) { WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times } else { WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Diable sleep (Esp8288/Arduino core and sdk default) } - #endif }