OTA doesn't work over Ethernet but works fine over WiFi

adam_esp
Posts: 37
Joined: Mon Apr 29, 2019 12:09 pm

Re: OTA doesn't work over Ethernet but works fine over WiFi

Postby adam_esp » Fri Jul 23, 2021 8:56 pm

deeper logging (the very tip of the logo before the failure ) :

D (322629) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (322639) HTTP_CLIENT: http_on_body 289
I (322639) OTA_HTTP : Downloaded: 63% [425495/666912 Bytes]
D (322649) esp_https_ota: Written image length 425495
D (322649) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (322659) TRANS_SSL: remain data in cache, need to read again
I (322659) mbedtls: ssl_tls.c:8389 => read

I (322669) mbedtls: ssl_tls.c:8681 <= read

D (322669) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=289, ridx=0
D (322679) HTTP_CLIENT: http_on_body 289
I (322679) OTA_HTTP : Downloaded: 63% [425784/666912 Bytes]
D (322689) esp_https_ota: Written image length 425784
D (322689) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (322699) TRANS_SSL: remain data in cache, need to read again
I (322699) mbedtls: ssl_tls.c:8389 => read

I (322709) mbedtls: ssl_tls.c:8681 <= read

D (322709) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=200, ridx=0
D (322719) HTTP_CLIENT: http_on_body 200
I (322719) OTA_HTTP : Downloaded: 63% [425984/666912 Bytes]
D (322729) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
I (322739) mbedtls: ssl_tls.c:8389 => read

I (322739) mbedtls: ssl_tls.c:4419 => read record

I (322739) mbedtls: ssl_tls.c:2628 => fetch input

I (322749) mbedtls: ssl_tls.c:2789 in_left: 0, nb_want: 5

I (322749) mbedtls: ssl_tls.c:2813 in_left: 0, nb_want: 5

I (322759) mbedtls: ssl_tls.c:2814 ssl->f_recv(_timeout)() returned 5 (-0xfffffffb)

I (322769) mbedtls: ssl_tls.c:2834 <= fetch input

V (322769) mbedtls: ssl_tls.c:4155 dumping 'input record header' (5 bytes)

V (322779) mbedtls: ssl_tls.c:4155 0000: 17 03 03 40 18 ...@.

D (322789) mbedtls: ssl_tls.c:4164 input record: msgtype = 23, version = [3:3], msglen = 16408

I (322789) mbedtls: ssl_tls.c:2628 => fetch input

I (322799) mbedtls: ssl_tls.c:2789 in_left: 5, nb_want: 16413

I (322809) mbedtls: ssl_tls.c:2813 in_left: 5, nb_want: 16413

I (322809) mbedtls: ssl_tls.c:2814 ssl->f_recv(_timeout)() returned 1650 (-0xfffff98e)

D (327719) emac_esp32: receive len= 60
I (327819) mbedtls: ssl_tls.c:2813 in_left: 1655, nb_want: 16413

E (327819) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
D (327819) HTTP_CLIENT: need_read=89, byte_to_read=89, rlen=-26880, ridx=200
W (327819) HTTP_CLIENT: esp_transport_read returned:-26880 and errno:11
D (327879) esp_https_ota: Written image length 425984
D (327879) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (331259) emac_esp32: receive len= 167
D (331549) emac_esp32: receive len= 167
D (331859) emac_esp32: receive len= 167
D (332879) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (332879) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (332879) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (333069) emac_esp32: receive len= 103
D (333209) emac_esp32: receive len= 60
D (333219) emac_esp32: receive len= 60
D (337889) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (337889) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (337889) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (338719) emac_esp32: receive len= 60
D (341249) emac_esp32: receive len= 167
D (341849) emac_esp32: receive len= 167
D (342899) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (342899) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (342899) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (344219) emac_esp32: receive len= 60
D (346149) emac_esp32: receive len= 82
D (347909) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (347909) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (347909) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (351549) emac_esp32: receive len= 167
D (351849) emac_esp32: receive len= 167
D (352919) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (352919) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (352919) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (353069) emac_esp32: receive len= 103
D (357929) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (357929) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (357929) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (361269) emac_esp32: receive len= 167
D (361569) emac_esp32: receive len= 167
D (361869) emac_esp32: receive len= 167
D (362939) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (362939) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (362939) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (367949) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (367949) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (367949) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (371279) emac_esp32: receive len= 167
D (371569) emac_esp32: receive len= 167
D (371869) emac_esp32: receive len= 167
D (372959) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (372959) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (372959) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (377969) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=0, ridx=0
D (377969) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
D (377969) HTTP_CLIENT: is_data_remain=1, is_chunked=0, content_length=666912
D (380529) emac_esp32: receive len= 1466
I (380539) mbedtls: ssl_tls.c:8389 => read

I (380539) mbedtls: ssl_tls.c:4419 => read record

I (380539) mbedtls: ssl_tls.c:2628 => fetch input

I (380539) mbedtls: ssl_tls.c:2789 in_left: 1655, nb_want: 5

I (380549) mbedtls: ssl_tls.c:2834 <= fetch input

V (380549) mbedtls: ssl_tls.c:4155 dumping 'input record header' (5 bytes)

V (380559) mbedtls: ssl_tls.c:4155 0000: 17 03 03 40 18 ...@.

D (380569) mbedtls: ssl_tls.c:4164 input record: msgtype = 23, version = [3:3], msglen = 16408

I (380569) mbedtls: ssl_tls.c:2628 => fetch input

I (380579) mbedtls: ssl_tls.c:2789 in_left: 1655, nb_want: 16413

I (380589) mbedtls: ssl_tls.c:2813 in_left: 1655, nb_want: 16413

I (380589) mbedtls: ssl_tls.c:2814 ssl->f_recv(_timeout)() returned 1412 (-0xfffffa7c)

D (380719) emac_esp32: receive len= 1466
D (380719) emac_esp32: receive len= 1466
D (380729) emac_esp32: receive len= 1466
I (380729) mbedtls: ssl_tls.c:2813 in_left: 3067, nb_want: 16413

I (380729) mbedtls: ssl_tls.c:2814 ssl->f_recv(_timeout)() returned 4236 (-0xffffef74)

D (381269) emac_esp32: receive len= 167
D (381569) emac_esp32: receive len= 167
D (381869) emac_esp32: receive len= 167
I (385739) mbedtls: ssl_tls.c:2813 in_left: 7303, nb_want: 16413

E (385739) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
D (385739) HTTP_CLIENT: need_read=289, byte_to_read=289, rlen=-26880, ridx=0
W (385739) HTTP_CLIENT: esp_transport_read returned:-26880 and errno:11
D (385749) HTTP_CLIENT: Data processed 425984 != Data specified in content length 666912
I (385759) OTA_HTTP : EVENT_DISCONNECTED
I (385759) OTA_HTTP : EVENT_DISCONNECTED
W (385769) OTA_dev: SetUpdateStatus: 255 [0xFF]
E (385769) OTA: WAN Firmware Upgrades Failed !


adam_esp
Posts: 37
Joined: Mon Apr 29, 2019 12:09 pm

Re: OTA doesn't work over Ethernet but works fine over WiFi

Postby adam_esp » Sat Jul 24, 2021 8:04 am

My library already has this patch.
Observing the logs in real time, I noticed lags. It happens that the transfer stops for a few - several seconds. Besides, it is not liquid, it stops for a few seconds every second or so.
Perhaps the reason lies in a completely different layer, the physical layer of the Ethernet driver. Were there such cases? How to track it?
How can I extend the OTA timeout? I think it could help temporarily.

Regards
Adam

Who is online

Users browsing this forum: Majestic-12 [Bot] and 137 guests