From 5c7b40740aedfdceddc9faf8324076707e8c2164 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 13 Nov 2015 23:41:29 +0300 Subject: [PATCH] Disable sleep mode before doing OTA (#1005) --- cores/esp8266/Updater.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cores/esp8266/Updater.cpp b/cores/esp8266/Updater.cpp index 7e6b2e4e1..28830fba5 100644 --- a/cores/esp8266/Updater.cpp +++ b/cores/esp8266/Updater.cpp @@ -8,6 +8,7 @@ extern "C" { #include "c_types.h" #include "spi_flash.h" + #include "user_interface.h" } extern "C" uint32_t _SPIFFS_start; @@ -59,6 +60,8 @@ bool UpdaterClass::begin(size_t size, int command) { _reset(); _error = 0; + wifi_set_sleep_type(NONE_SLEEP_T); + uint32_t updateStartAddress = 0; if (command == U_FLASH) { //size of current sketch rounded to a sector