Tracker One and MQTT-TLS

I’m trying to use the MQTT-TLS library with the Tracker One (V17 firmware and OS 3.2).
I’ve been able to compile and flash the firmware.
I’m calling enableTls() through an instance of MQTT with rootCaPem, clientCertPem and clientKeyPem and that seems to succeed.
However, the MQTT:handShakeTls() method is returning MBEDTLS_ERR_X509_ALLOC_FAILED.
I’m thinking that the Particle is running out of RAM?
Are there any suggestions?

Hi @rickl121
Yes, that your got a error may be the out of memory.
Default mbedtls_config.h setting(0.2.25 version) use a lot of memory, so please comment out mbedTLS options.

I recommend a comment out options are here(for AWS IoT with TLS 1.2). I can work well with AWS IoT Core and Argon and my TrackerOne.

MBEDTLS_SSL_PROTO_TLS1_3
MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
MBEDTLS_SSL_ALPN
MBEDTLS_CHACHAPOLY_C
MBEDTLS_POLY1305_C
MBEDTLS_CHACHA20_C
MBEDTLS_ECJPAKE_C
MBEDTLS_NIST_KW_C
MBEDTLS_HKDF_C
MBEDTLS_SSL_COOKIE_C
MBEDTLS_SSL_CACHE_C
MBEDTLS_SSL_TICKET_C
MBEDTLS_CIPHER_MODE_XTS
MBEDTLS_CIPHER_MODE_OFB
MBEDTLS_ECP_NIST_OPTIM
MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
MBEDTLS_SSL_RENEGOTIATION
MBEDTLS_SSL_CONTEXT_SERIALIZATION
MBEDTLS_SSL_EXTENDED_MASTER_SECRET
MBEDTLS_ECDSA_C
MBEDTLS_ECDSA_DETERMINISTIC
MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
MBEDTLS_DHM_C
MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED

Thank you very much for the suggestions. I will try these.

1 Like

Hi @hirotakaster ,
I did finally get back to this, commented out the indicated options and it is now working.
Thank you very much for your guidance.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.