Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ArduinoOTA fails with "Error[4]: End failed"#7955

Unanswered
Miq1 asked this question inQ&A
Discussion options

After having used ArduinoOTA for years, literally, to upload firmwares to a couple of ESP8285 and NodeMCU devices, out of a sudden OTA has stopped working for me.

espota.py is returning

CURRENT: upload_protocol = espotaUploading .pio\build\esp8285\firmware.bin15:51:30 [DEBUG]: Options: {'esp_ip': 'NTPtest', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 24359, 'auth': 'XXXX', 'image': '.pio\\build\\esp8285\\firmware.bin', 'spiffs': False, 'debug': True, 'progress': True}15:51:30 [INFO]: Starting on 0.0.0.0:2435915:51:30 [INFO]: Upload size: 32555215:51:30 [INFO]: Sending invitation to: NTPtestAuthenticating...FAIL15:51:40 [ERROR]: No Answer to our Authentication*** [upload] Error 1

At the same time, the device will report (in the onError() callback) "Error[1]: Begin failed" on ESP8285 and "Error[4]: End failed" on NodeMCU devices.
I snapped a sample session with Wireshark. Initial packet fromespota.py:

0000   48 3f da 7e 48 34 30 85 a9 40 0b 23 08 00 45 00   H?.~H40..@.#..E.0010   00 4c e8 16 00 00 80 11 00 00 c0 a8 b2 2a c0 a8   .L...........*..0020   b2 46 de da 20 4a 00 38 e6 0b 30 20 33 34 31 34   .F.. J.8..0 34140030   33 20 33 32 33 31 35 32 20 34 61 34 66 34 66 36   3 323152 4a4f4f60040   39 36 31 32 66 63 38 32 64 38 62 39 61 39 32 30   9612fc82d8b9a9200050   36 32 65 36 37 64 33 65 61 0a                     62e67d3ea.

Next comes the AUTH request from the device:

0000   30 85 a9 40 0b 23 48 3f da 7e 48 34 08 00 45 00   0..@.#H?.~H4..E.0010   00 41 00 26 00 00 ff 11 d5 c3 c0 a8 b2 46 c0 a8   .A.&.........F..0020   b2 2a 20 4a de da 00 2d 66 e7 41 55 54 48 20 62   .* J...-f.AUTH b0030   30 32 61 61 33 39 63 33 36 33 37 30 35 39 38 64   02aa39c36370598d0040   31 66 31 35 31 30 31 30 63 66 38 31 66 31 34      1f151010cf81f14

Finally one last packet fromespota.py, before the error will occur:

0000   48 3f da 7e 48 34 30 85 a9 40 0b 23 08 00 45 00   H?.~H40..@.#..E.0010   00 62 e8 17 00 00 80 11 00 00 c0 a8 b2 2a c0 a8   .b...........*..0020   b2 46 de da 20 4a 00 4e e6 21 32 30 30 20 38 36   .F.. J.N.!200 860030   64 62 61 64 36 64 38 34 66 34 36 31 35 35 38 33   dbad6d84f46155830040   33 31 38 30 31 34 32 35 37 61 62 39 64 33 20 32   318014257ab9d3 20050   63 34 38 31 38 36 66 32 30 35 31 66 36 30 66 32   c48186f2051f60f20060   63 31 30 31 65 63 34 37 38 38 61 62 38 64 31 0a   c101ec4788ab8d1.

This looks OK for all I know, but why does ArduinoOTA stop here?

  • OTA updates without a password are running smoothly.
  • Other TCP services are working without a flaw.

What may cause this issue?

You must be logged in to vote

Replies: 3 comments 1 reply

Comment options

Found it and will open an issue for it. Problem is the unreliable UDP transmission of the short "OK" packet as soon as the authentication was successful.

You must be logged in to vote
0 replies
Comment options

d-a-v
Apr 1, 2021
Collaborator

What version of the core was making the update ?
#6351 included in release 2.6.0 brought a temporary fix/workaround.
ThisOK is TCP not UDP, so it is reliable. An issue is still opened in#6369.
Well there are indeed two 'OK' in this historical protocol, and one of them is UDP.
Your findings / thoughts will be welcome there.

UDP should really be replaced by TCP as a non-breaking extension in this OTA process...

You must be logged in to vote
1 reply
@Miq1
Comment options

The core version is 2.6.3 AFAIK.

I will add my observations to 6369.

Comment options

Hi, I get a similar error with the latest versions.
I have version 3.1.2
And this esp:https://www.amazon.de/Pack-ESP-01S-ESP8266-Wireless-module/dp/B09J4K6KX4

I currently cant even get the BasicOTA to update via OTA. It fails at 0% uploaded and the above mentioned "Error[4]: End failed".

Any tipps on how to get this working?

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@Miq1@agowa@d-a-v

[8]ページ先頭

©2009-2025 Movatter.jp