Page 1 of 1

mbedtls_ssl_handshake returned -0x7200

Posted: Mon Sep 09, 2019 6:32 am
by filipESP
Hi, I have a problem as below.

I (5141) simple_ota_example: Starting OTA example
I (5141) simple_ota_example: Connected to WiFi network! Attempting to connect to
server...
E (5171) esp-tls: mbedtls_ssl_handshake returned -0x7200
I (5171) esp-tls: Certificate verified.
E (5171) esp-tls: Failed to open new connection
E (5171) TRANS_SSL: Failed to open a new connection
E (5181) HTTP_CLIENT: Connection failed, sock < 0
E (5191) esp_https_ota: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
E (5191) simple_ota_example: Firmware upgrade failed

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Mon Sep 09, 2019 11:50 am
by filipESP
OK, I resolve my issue but apears next:

E (6981) esp_ota_ops: OTA image has invalid magic byte (expected 0xE9, saw 0x45
E (7001) esp_https_ota: Error: esp_ota_write failed! err=0x0
E (7001) simple_ota_example: Firmware upgrade failed

I can't find any info about this error.

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Mon Sep 09, 2019 2:52 pm
by filipESP
It is getting better but next error is:

I (6786) esp_https_ota: Starting OTA...
I (6786) esp_https_ota: Writing to partition subtype 16 at offset 0x110000
I (6936) esp_https_ota: esp_ota_begin succeeded
I (6936) esp_https_ota: Please Wait. This may take time
I (6966) esp_https_ota: Connection closed, all data received

E (6986) esp_image: invalid segment length 0xffffffff
E (6986) esp_https_ota: Error: esp_ota_end failed! err=0x5379. Image is invalid
E (6986) simple_ota_example: Firmware upgrade failed

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Tue Sep 10, 2019 6:36 am
by filipESP
This expression is true: segment->data_len >= SIXTEEN_MB.
Is inside the verify_segment_header() function (esp_image_format.c file), which return return ESP_ERR_IMAGE_INVALID.

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Tue Sep 10, 2019 2:34 pm
by filipESP
I resolved my problem.
Change version openssl from 1.1.1 to 1.0.2 helped me.

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Wed Sep 25, 2019 2:54 am
by Simon Leung
Hi filipESP,

I think I have the same problem as the one you have before. I tried the OpenSSL version 1.0.2j and 1.1.01 And run it under CMD, it doesn't work in my case. Do you mind to provide more information of how you solve your problem please?

Thanks.

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Thu Sep 26, 2019 4:53 am
by Simon Leung
Hi filipESP,

How to change version openssl from 1.1.1 to 1.0.2 under msys2?

Re: mbedtls_ssl_handshake returned -0x7200

Posted: Mon Sep 30, 2019 10:37 am
by filipESP
You should to download the older version from openssl website. I don't know how to do it in CMD.