mbedtls_ssl_handshake returned -0x7200

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

mbedtls_ssl_handshake returned -0x7200

Postby filipESP » Mon Sep 09, 2019 6:32 am

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

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: mbedtls_ssl_handshake returned -0x7200

Postby filipESP » Mon Sep 09, 2019 11:50 am

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.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: mbedtls_ssl_handshake returned -0x7200

Postby filipESP » Mon Sep 09, 2019 2:52 pm

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

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: mbedtls_ssl_handshake returned -0x7200

Postby filipESP » Tue Sep 10, 2019 6:36 am

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.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: mbedtls_ssl_handshake returned -0x7200

Postby filipESP » Tue Sep 10, 2019 2:34 pm

I resolved my problem.
Change version openssl from 1.1.1 to 1.0.2 helped me.

Simon Leung
Posts: 10
Joined: Tue Jun 25, 2019 1:28 am

Re: mbedtls_ssl_handshake returned -0x7200

Postby Simon Leung » Wed Sep 25, 2019 2:54 am

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.

Simon Leung
Posts: 10
Joined: Tue Jun 25, 2019 1:28 am

Re: mbedtls_ssl_handshake returned -0x7200

Postby Simon Leung » Thu Sep 26, 2019 4:53 am

Hi filipESP,

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

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: mbedtls_ssl_handshake returned -0x7200

Postby filipESP » Mon Sep 30, 2019 10:37 am

You should to download the older version from openssl website. I don't know how to do it in CMD.

amarelo
Posts: 2
Joined: Fri May 06, 2022 11:44 am

Re: mbedtls_ssl_handshake returned -0x7200

Postby amarelo » Fri May 06, 2022 11:51 am

你好,我想请问一下你在这个esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7200; esp-tls: Failed to open new connection;TRANSPORT_BASE: Failed to open a new connection这些问题中你是如何解决的,可以告诉我吗,因为我也遇到了跟你一样的错误,非常感谢!!!

amarelo
Posts: 2
Joined: Fri May 06, 2022 11:44 am

Re: mbedtls_ssl_handshake returned -0x7200

Postby amarelo » Fri May 06, 2022 12:24 pm

Hello, may I ask you this ESP TLS mbedtls: mbedtls_ ssl_ Handshake returned - 0x7200 how did you solve the problem,thank you

Who is online

Users browsing this forum: No registered users and 113 guests