From 2b7846da5a70020becdd6f4da1ce03dccdbcd3e2 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sun, 19 May 2019 10:45:25 -0700 Subject: [PATCH 1/5] Fix typo in elf2bin for QOUT binary generation (#6116) Fixes #6115 as found by @micjoc --- tools/elf2bin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/elf2bin.py b/tools/elf2bin.py index 5d63c4fdb..214cd9407 100755 --- a/tools/elf2bin.py +++ b/tools/elf2bin.py @@ -25,7 +25,7 @@ import subprocess import sys import tempfile -fmodeb = { 'dout': 3, 'dio': 2, 'quot': 1, 'qio': 0 } +fmodeb = { 'dout': 3, 'dio': 2, 'qout': 1, 'qio': 0 } ffreqb = { '40': 0, '26': 1, '20': 2, '80': 15 } fsizeb = { '512K': 0, '256K': 1, '1M': 2, '2M': 3, '4M': 4, '8M': 8, '16M': 9 } From 912c0db0910752d029d329ad20cbff8316a1db08 Mon Sep 17 00:00:00 2001 From: Dave <47106837+sislakd@users.noreply.github.com> Date: Sun, 19 May 2019 22:38:24 +0200 Subject: [PATCH 2/5] Remove deadlock when server is not acking our data (#6107) * Use bounded waiting instead of infinite one to avoid deadlock * Reduce timeout to fail much sooner if server is not acking our data * Return timeout to 15 seconds on every disconnect * Add comment to introduced delay to make it super clear --- libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp | 4 ++++ libraries/ESP8266WiFi/src/include/ClientContext.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp index 7ae53e6b9..b71a5fa7b 100644 --- a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp +++ b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp @@ -248,6 +248,7 @@ void WiFiClientSecure::_freeSSL() { _recvapp_len = 0; // This connection is toast _handshake_done = false; + _timeout = 15000; } bool WiFiClientSecure::_clientConnected() { @@ -1009,6 +1010,9 @@ bool WiFiClientSecure::_connectSSL(const char* hostName) { _x509_insecure = nullptr; _x509_knownkey = nullptr; + // reduce timeout after successful handshake to fail fast if server stop accepting our data for whathever reason + if (ret) _timeout = 5000; + return ret; } diff --git a/libraries/ESP8266WiFi/src/include/ClientContext.h b/libraries/ESP8266WiFi/src/include/ClientContext.h index 0126621a6..2f2891510 100644 --- a/libraries/ESP8266WiFi/src/include/ClientContext.h +++ b/libraries/ESP8266WiFi/src/include/ClientContext.h @@ -456,7 +456,8 @@ protected: } _send_waiting = true; - esp_yield(); + // This delay will be interrupted by esp_schedule on next received ack + delay(_timeout_ms); } while(true); _send_waiting = false; From 68ee1216454eeea49dd3452c6ff21bc748f397b6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 20 May 2019 05:32:19 +0300 Subject: [PATCH 3/5] Fix issue when build environment contains spaces (#6119) --- tools/platformio-build.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/platformio-build.py b/tools/platformio-build.py index 18b44c2c2..ce5bbb2de 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -135,16 +135,16 @@ env.Append( ElfToBin=Builder( action=env.VerboseAction(" ".join([ '"$PYTHONEXE"', - '"%s"' % env.subst(join(FRAMEWORK_DIR, "tools", "elf2bin.py")), - "--eboot", '"%s"' % env.subst(join( - FRAMEWORK_DIR, "bootloaders", "eboot", "eboot.elf")), - "--app", '"%s"' % "$SOURCE", + '"%s"' % join(FRAMEWORK_DIR, "tools", "elf2bin.py"), + "--eboot", '"%s"' % join( + FRAMEWORK_DIR, "bootloaders", "eboot", "eboot.elf"), + "--app", "$SOURCE", "--flash_mode", "$BOARD_FLASH_MODE", "--flash_freq", "${__get_board_f_flash(__env__)}", "--flash_size", "${__get_flash_size(__env__)}", - "--path", '"%s"' % env.subst(join( - platform.get_package_dir("toolchain-xtensa"), "bin")), - "--out", '"$TARGET"' + "--path", '"%s"' % join( + platform.get_package_dir("toolchain-xtensa"), "bin"), + "--out", "$TARGET" ]), "Building $TARGET"), suffix=".bin" ) From 8b899c12fb5044a6a51b92501bfcdf86a3d98dd8 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Mon, 20 May 2019 10:43:23 -0700 Subject: [PATCH 4/5] Release 2.5.2 (#6121) Changes since 2.5.1 (to 2.5.2) Core ---- * Add explicit Print::write(char) (#6101) Build system ---- * Fix typo in elf2bin for QOUT binary generation (#6116) * Support PIO Wl-T and Arduino -T linking properly (#6095) * Allow *.cc files to be linked into flash by default (#6100) * Use custom "ElfToBin" builder for PIO (#6091) * Fail if generated JSON file cannot be read (#6076) * Moved 'Dropping' print from stdout to stderr in drop_versions.py (#6071) * Fix PIO issue when build environment contains spaces (#6119) Libraries ---- * Remove deadlock when server is not acking our data (#6107) * Bugfix for stuck in write method of WiFiClient and WiFiClientSecure until the remote peer closed connection (#6104) * Re-add original SD FAT info access methods (#6092) * Make FILE_WRITE append in SD.h wrapper (#6106) * Drop X509 after connection, avoid hang on TLS broken (#6065) --- platform.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform.txt b/platform.txt index 2ba6dfefa..6c0a89100 100644 --- a/platform.txt +++ b/platform.txt @@ -5,8 +5,8 @@ # For more info: # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification -name=ESP8266 Boards (2.6.0-dev) -version=2.6.0-dev +name=ESP8266 Boards (2.5.2) +version=2.5.2 # These will be removed by the packager script when doing a JSON release runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf From 0bd36bf02b83dd8273dd2f8c5bb06358287478dd Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Mon, 20 May 2019 14:06:05 -0700 Subject: [PATCH 5/5] Back to 2.6.0-dev (#6122) 2.5.2 release completed, time for 2.6.0 work --- README.md | 4 ++-- platform.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a8014dbd1..a347be7cb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Arduino core for ESP8266 WiFi chip # Quick links -- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.5.1/) +- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.5.2/) - [Current "git version" documentation](https://arduino-esp8266.readthedocs.io/en/latest/) - [Install git version](https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version) ([sources](doc/installing.rst#using-git-version)) @@ -36,7 +36,7 @@ Starting with 1.6.4, Arduino allows installation of third-party platform package #### Latest release [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/) Boards manager link: `https://arduino.esp8266.com/stable/package_esp8266com_index.json` -Documentation: [https://arduino-esp8266.readthedocs.io/en/2.5.1/](https://arduino-esp8266.readthedocs.io/en/2.5.1/) +Documentation: [https://arduino-esp8266.readthedocs.io/en/2.5.2/](https://arduino-esp8266.readthedocs.io/en/2.5.2/) ### Using git version (basic instructions) [![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino) diff --git a/platform.txt b/platform.txt index 6c0a89100..2ba6dfefa 100644 --- a/platform.txt +++ b/platform.txt @@ -5,8 +5,8 @@ # For more info: # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification -name=ESP8266 Boards (2.5.2) -version=2.5.2 +name=ESP8266 Boards (2.6.0-dev) +version=2.6.0-dev # These will be removed by the packager script when doing a JSON release runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf