Skip to main content
Graduate
January 3, 2025
Question

Inquiry on mbedTLS Handshake Time and Optimization for AWS MQTT on STM32

  • January 3, 2025
  • 1 reply
  • 951 views

Dear Community,

I am working with an STM32F407 development board, using an ESP32 as a Wi-Fi modem controlled through AT commands. I am attempting to perform an MQTT test with AWS IoT using mbedTLS for the TLS handshake.

I found the following mbedTLS implementation for STM32:
https://github.com/eziya/STM32F4_HAL_ETH_MBEDTLS.

Currently, I am observing that the mbedTLS handshake takes nearly 25 seconds. Can anyone share how much time the mbedTLS handshake typically takes with a server using this implementation or similar setups?

Additionally, I am currently stuck on configuring mbedTLS. Could anyone guide me on the minimal and fastest way to establish a TLS handshake with an AWS server? Any suggestions to optimize the process for MQTT communication would be highly appreciated.

Thank you in advance for your assistance.

    This topic has been closed for replies.

    1 reply

    ST Employee
    February 12, 2025

    Hi,

    on an average STM32 MCU, the TLS handshake with AWS IoT Core can take a couple of seconds.

    It obviously also depends on the network link quality to the AWS broker.

     

    The X-CUBE-AWS* STM32Cube Expansion packs include application examples based on mbedTLS, which connect to AWS IoT Core. You may want to look at their MbedTLS configuration file.

    A possible reference is the 'aws_eth' example application of X-CUBE-AWS-H5.