Page 1 of 1

HTTPS OTA Failure

Posted: Wed Oct 14, 2020 10:27 pm
by Palonso
Hi,

I'm trying OTA to work on an ESP-WROVER-B module, at the beggining it worked, but for some reason it stopped working.
This is the message I get:

Code: Select all

E (19188) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
W (19188) HTTP_CLIENT: esp_transport_read returned:-26880 and errno:11 
And sometimes I get:

Code: Select all

W (11473) esp-tls: Failed to open new connection in specified timeout
E (11473) TRANS_SSL: Failed to open a new connection
E (11473) HTTP_CLIENT: Connection failed, sock < 0
E (11473) esp_https_ota: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
E (11483) esp_https_ota: Failed to establish HTTP connection
and some others:

Code: Select all

abort() was called at PC 0x40082d1a on core 1
0x40082d1a: _xt_medint3 at /home/pablo/esp/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1267


Backtrace:0x4008878b:0x3ffd4b70 0x40088ee9:0x3ffd4b90 0x40090226:0x3ffd4bb0 0x40082d1a:0x3ffd4c20 0x40082e3d:0x3ffd4c50 0x4016a7c9:0x3ffd4c70 0x40162cad:0x3ffd4f30 0x40162c35:0x3ffd4f80 0x400da991:0x3ffd4fb0 0x400da1b7:0x3ffd4fd0 0x400da38c:0x3ffd4ff0 0x40082ec4:0x3ffd5010 0x4000bc69:0x3ffd5030 0x40001850:0x3ffd5050 0x400daad6:0x3ffd5080 0x40088ef1:0x3ffd50d0
0x4008878b: xRingbufferReceiveUpToFromISR at /home/pablo/esp/esp-idf/components/esp_ringbuf/ringbuf.c:1242 (discriminator 1)

0x40088ee9: print_registers at /home/pablo/esp/esp-idf/components/esp_system/port/panic_handler.c:185

0x40090226: sta_input at ??:?

0x40082d1a: _xt_medint3 at /home/pablo/esp/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1267

0x40082e3d: lock_acquire_generic at /home/pablo/esp/esp-idf/components/newlib/locks.c:147

0x4016a7c9: __kernel_tan at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libm/math/k_tan.c:107

0x40162cad: x509_get_dates at /home/pablo/esp/esp-idf/components/mbedtls/mbedtls/library/x509_crt.c:457

0x40162c35: x509_get_version at /home/pablo/esp/esp-idf/components/mbedtls/mbedtls/library/x509_crt.c:410

0x400da991: spinlock_release at /home/pablo/esp/esp-idf/components/soc/include/soc/spinlock.h:145
 (inlined by) adjtime at /home/pablo/esp/esp-idf/components/newlib/time.c:134

0x400da1b7: timer_process_alarm at /home/pablo/esp/esp-idf/components/esp_timer/src/esp_timer.c:306 (discriminator 3)

0x400da38c: esp_timer_delete at /home/pablo/esp/esp-idf/components/esp_timer/src/esp_timer.c:202

0x40082ec4: _lock_init at /home/pablo/esp/esp-idf/components/newlib/locks.c:88

0x400daad6: spinlock_release at /home/pablo/esp/esp-idf/components/soc/include/soc/spinlock.h:145
 (inlined by) adjtime at /home/pablo/esp/esp-idf/components/newlib/time.c:152

0x40088ef1: print_registers at /home/pablo/esp/esp-idf/components/esp_system/port/panic_handler.c:195
I don't know why it stopped working, I actually managed to "update" via OTA with the actual code, I also make sure to have the same certificate in my server and the ESP32 so those TLS problems make no sense to me.

Any idea? someone?

Best regards,
P

UPDATE:

I managed to catch the packages with wireshark in order to understand in a deeper level whats happening. (Img attached)
When I have the next error:

Code: Select all

E (19188) TRANS_SSL: esp_tls_conn_read error, errno=No more processes
W (19188) HTTP_CLIENT: esp_transport_read returned:-26880 and errno:11 
it seems that the server is trying to retransmit chunks of data but the ESP can't get them somehow, so after a couple of trials it manage to update. I don't think it's signal problem since I'm running everything close to the router in the same network.

I found there was a problem with one of the releases before (I think it was 3.x), but I'm running v4.3-dev-907-g6c17e3a64-dirty which should have the problem of chunk data solved.

Any idea?

Best regards,
P