MQTT and AWS

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
161616harvard
Posts: 5
Joined: Fri Feb 12, 2021 7:33 pm

MQTT and AWS

Post by 161616harvard » Tue Mar 09, 2021 11:32 pm

Hello!

I have implemented the following MicroPython Asynchronous MQTT : https://github.com/peterhinch/micropyth ... er/mqtt_as

It works perfectly with an online broker. However, when I try with AWS, during the WiFi reconnect, I run into the errors cited below and I'm unable to reconnect : MBEDTLS_ERR_RSA_PRIVATE_FAILED+MBEDTLS_ERR_MPI_ALLOC_FAILED

I put a timeout on the reconnection so that the machine resets and doesn't stay into "reconnect, error" failure loop but I would like to be able to reconnect to the WiFi. Have anyone encountered this issue? Is it related to the AWS broker?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

TLS appears still to be broken on ESP32

Post by pythoncoder » Wed Mar 10, 2021 7:23 am

As I state in the docs, SSL/TLS only works on the Pyboard D. The reason is that MicroPython firmware on other platforms doesn't support TLS on noblocking sockets. I keep hoping this will be fixed on ESP32, but if you're getting this with the latest firmware it would seem that it is still broken.

It was mentioned here as being planned for V1.14 but the release notes make no mention of it.
Peter Hinch
Index to my micropython libraries.

161616harvard
Posts: 5
Joined: Fri Feb 12, 2021 7:33 pm

Re: MQTT and AWS

Post by 161616harvard » Fri Mar 12, 2021 4:23 am

Hello sir, thank you for the response. Your MQTT library is absolutely wicked ! I certainly look forward to it being corrected with future releases. Thanks a lot :)

Post Reply