We noticed that after recent updates (both in the VS Code Extension and in the Thinger-Arduino library), the OTA update fails frequently.
We have a device with Thinger-Arduino version 2.25.2 (ESP8266) connected to a router with rssi -77 (on average).
We are trying to perform an OTA update, but the process fails frequently in the middle of the update. On some devices we managed to update on the fourth or fifth attempt. As for the current one, we have been trying several times without success.
The previous version of the VS Code Extension was more stable.
UPDATE: The attempts below were using the Notebook with cable/ethernet/fiber optic internet.
Processing nodemcuv2 (platform: espressif8266@4.2.1; board: nodemcuv2; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (4.2.1) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 52 compatible libraries
Scanning dependencies...
Dependency Graph
.....
|-- thinger.io @ 2.31.0
.......
Building in release mode
Retrieving maximum program size .pio\build\nodemcuv2\firmware.elf
Checking size .pio\build\nodemcuv2\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 44.8% (used 36740 bytes from 81920 bytes)
Flash: [===== ] 51.8% (used 540847 bytes from 1044464 bytes)
=============================================================================== [SUCCESS] Took 4.50 seconds ===============================================================================
2024-09-10T00:32:12.826Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:32:34.302Z [info] ████░░░░░░░░░░░░░░░░░░░░░░ 15.78% - Device: XXXXXXXXXXXXXX, Time spent: 21 s 476 ms, ETA: 1 m 54 s 594 ms
2024-09-10T00:33:04.422Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 51 s 584 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:33:04.422Z [info] OTA update process completed. Total duration: 51 s 596 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:33:51.910Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:34:06.017Z [info] ███░░░░░░░░░░░░░░░░░░░░░░░ 10.15% - Device: XXXXXXXXXXXXXX, Time spent: 14 s 107 ms, ETA: 2 m 4 s 930 ms
2024-09-10T00:34:36.135Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 44 s 196 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:34:36.135Z [info] OTA update process completed. Total duration: 44 s 225 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:35:30.910Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:35:38.079Z [info] █░░░░░░░░░░░░░░░░░░░░░░░░░ 5.26% - Device: XXXXXXXXXXXXXX, Time spent: 7 s 169 ms, ETA: 2 m 9 s 98 ms
2024-09-10T00:36:08.199Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 37 s 285 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:36:08.199Z [info] OTA update process completed. Total duration: 37 s 289 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:36:36.328Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:37:10.094Z [info] ███████░░░░░░░░░░░░░░░░░░░ 25.55% - Device: XXXXXXXXXXXXXX, Time spent: 33 s 766 ms, ETA: 1 m 38 s 372 ms
2024-09-10T00:37:40.214Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 1 m 3 s 881 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:37:40.214Z [info] OTA update process completed. Total duration: 1 m 3 s 886 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:38:26.657Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:38:41.786Z [info] ███░░░░░░░░░░░░░░░░░░░░░░░ 11.27% - Device: XXXXXXXXXXXXXX, Time spent: 15 s 129 ms, ETA: 1 m 59 s 69 ms
2024-09-10T00:39:11.905Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 45 s 244 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:39:11.905Z [info] OTA update process completed. Total duration: 45 s 248 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:39:35.110Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:40:13.718Z [info] ████████░░░░░░░░░░░░░░░░░░ 31.19% - Device: XXXXXXXXXXXXXX, Time spent: 38 s 608 ms, ETA: 1 m 25 s 174 ms
2024-09-10T00:40:43.834Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 1 m 8 s 718 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:40:43.834Z [info] OTA update process completed. Total duration: 1 m 8 s 724 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:41:06.777Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:41:46.004Z [info] ████████░░░░░░░░░░░░░░░░░░ 31.57% - Device: XXXXXXXXXXXXXX, Time spent: 39 s 227 ms, ETA: 1 m 25 s 42 ms
2024-09-10T00:42:16.125Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 1 m 9 s 334 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:42:16.125Z [info] OTA update process completed. Total duration: 1 m 9 s 348 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:43:21.936Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:44:17.754Z [info] ████████████░░░░░░░░░░░░░░ 44.34% - Device: XXXXXXXXXXXXXX, Time spent: 55 s 818 ms, ETA: 1 m 10 s 60 ms
2024-09-10T00:44:47.877Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 1 m 25 s 936 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:44:47.877Z [info] OTA update process completed. Total duration: 1 m 25 s 941 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:45:08.057Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:45:49.479Z [info] █████████░░░░░░░░░░░░░░░░░ 32.69% - Device: XXXXXXXXXXXXXX, Time spent: 41 s 422 ms, ETA: 1 m 25 s 276 ms
2024-09-10T00:46:19.597Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 1 m 11 s 538 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:46:19.597Z [info] OTA update process completed. Total duration: 1 m 11 s 540 ms. Success: 0, Failures: 1, Already Updated: 0
2024-09-10T00:46:46.375Z [info] OTA update process started. Device: XXXXXXXXXXXXXX, Firmware Version: , Environment: nodemcuv2
2024-09-10T00:47:21.642Z [info] ███████░░░░░░░░░░░░░░░░░░░ 28.56% - Device: XXXXXXXXXXXXXX, Time spent: 35 s 267 ms, ETA: 1 m 28 s 218 ms
2024-09-10T00:47:51.760Z [error] Device: XXXXXXXXXXXXXX. Status: FAILURE. Duration: 1 m 5 s 381 ms. Description: Error while writing to device: Error: socket hang up
2024-09-10T00:47:51.760Z [info] OTA update process completed. Total duration: 1 m 5 s 385 ms. Success: 0, Failures: 1, Already Updated: 0