Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

OTA update reliability

Open m-u-xyz opened this issue 6 years ago • 3 comments

Basic Infos

  • [X] This issue complies with the issue POLICY doc.
  • [X] I have read the documentation at readthedocs and the issue is not addressed there.
  • [ ] I have tested that the issue is present in current master branch (aka latest git).
  • [X] I have searched the issue tracker for a similar issue.
  • [X] If there is a stack dump, I have decoded it.
  • [X] I have filled out all fields below.

Platform

  • Hardware: ESP-01
  • Core Version: as installed by platformio
  • Development Env: Platformio
  • Operating System: Debian

Settings in IDE

  • Flash Mode: qio
  • Flash Size: 1MB
  • Reset Method: n/a
  • Upload Using: OTA

Problem Description

I'm running into strange OTA reliability issues.

  • Flashing w/ serial: success
  • Flashing via HTTP using Mozilla: success
  • Flashing via TCP port 8266 using espota.py: fails
  • Flashing via HTTP using curl -F [email protected] IP/update: fails

fails means that the ESP-01 flashes something and reboots, but then either doesn't boot or crashes when it tries to set up Wifi.

The above is 100% reproducible.

m-u-xyz avatar Oct 17 '20 18:10 m-u-xyz

For what it’s worth, I’m having this problem too. ESP-01, visual studio code (not sure of Arduino extension version), Arduino IDE 1.8.10 (I think), ESP library (not sure if that’s what it’s called) version 2.7.4

Flash via serial always works. OTA while in serial programmer works more reliably than OTA in application’s location (my attic) but neither case is it anywhere near 100%.

Lights blink. ESP-01 resets (sometimes) update didn’t take. Source code is available if needed. Maybe I’m doing something wrong?

kickshawprogrammer avatar Jan 10 '21 21:01 kickshawprogrammer

Don't know if this will help (new to OTA) but I just read this:

The only disadvantage to OTA is that you have to explicitly add the code for it to every sketch you upload. You also need a flash chip that is twice the size of your sketch, so it won't work for 512kB boards. (It has to download the new sketch while still running the old code.)

juggledad avatar Jan 28 '21 11:01 juggledad

Thanks for the info. I had already come across that bit of information tho. Anyway, it appears that my issue was power related. After adding a 100uF capacitor across vcc and ground, my reliability rate shut up dramatically. For the ones that do fail, it was always an error code 6 (steam read error), where I just restart the update process again.

kickshawprogrammer avatar Feb 02 '21 13:02 kickshawprogrammer