cancel
Showing results for 
Search instead for 
Did you mean: 

mbedTLS_ssl_handshake failed error while connecting STM32F429ZI NUCLEO Development board to AWS IoT Cloud USING LWIP + mbedTLS Library

SGupt.6
Associate

Hello,

I am trying to connect the STM32F429ZI Nucleo development board to the AWS IoT Cloud using MQTT Protocol, with FreeRTOS and mbedTLS middleware v2.16.2 enabled.

I am using DHCP and am able to get the IP. Without security, the code works fine with mosquitto broker. Now, I am trying to connect to the AWS IoT cloud which requires TLS authentication using certificates. I have created a thing on AWS IOT Console, auto-generated and downloaded the certificates for it, created a policy, and attached the thing and certificates to that policy. I have also copy-pasted those certificates in the code (in the format: "-----BEGIN CERTIFICATE-----\r\n"). The certificates used are- CA1, client certificate, and private key.

The certificates are getting parsed, but I am getting a handshake failed error while connecting to the broker. The SSL states are getting incremented till 8, but, after that, it does not reach state== MBEDTLS_SSL_HANDSHAKE_OVER (which is the 16th stage), it gets stuck instead.

Could anyone please help, to figure out what exactly the problem is and how to connect to the AWS IoT cloud with MQTT Protocol successfully? Thank you in advance. 

1 REPLY 1
Billy OWEN
ST Employee

Hi @Community member​ 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

Regards,

Billy