Copyright ©

Mongoose OS Forum


SSL error connecting to MQTT with AWS IoT on ESP32

Before I start, yes, I've searched the forums. I believe this is a variation.

Simple version: attempting to connect to MQTT with AWS IoT -- I kept getting SSL exceptions. An example is:

[Mar  9 08:56:53.731] mgos_fs_get_handler  Sending ca.pem
[Mar  9 08:56:54.589] mgos_mqtt_global_con MQTT connecting to
SW ECDSA verify curve 3 hash_len 32 sig_len 72
[Mar  9 08:56:55.508] SW ECDSA verify curve 3 hash_len 64 sig_len 71
[Mar  9 08:56:57.502] mg_ssl_if_mbed_err   0x3ffb9688 SSL error: -1
[Mar  9 08:56:57.507] mgos_mqtt_ev         MQTT TCP connect error (-3)
mgos_mqtt_ev         MQTT TCP connect error (-3)
[Mar  9 08:56:57.520] mgos_mqtt_ev         MQTT Disconnect
[Mar  9 08:56:57.526] mqtt_global_reconnec MQTT connecting after 29621 ms

However, it' not a certificate problem, per se. I have attached some sample code. There is a LOG call commented out on line # 36. If that line is uncommented, the MQTT connection always fails. However, if the line is commented out -- the connection succeeds. This implies a memory corruption somewhere between logging and certificate/SSL processing.

Apologies if I've done something silly. The code is just an experiment. Using mos v1.26 and everything was built/flashed over the cloud today.



Sign In or Register to comment.