Unexpected "MBEDTLS_ERR_MPI_ALLOC_FAILED" error while connecting via MQTTs with frozen firmware #9947
Replies: 2 comments 4 replies
-
|
I may find the cause of my problem. I have downloaded the latest official firmware |
Beta Was this translation helpful? Give feedback.
-
|
I meet a another weird problem right now. The My question is, isn't the available memory space relatively constant after every restart? How can this problem just come up with a certain probability? As extra information, I also do a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am developing a project for ESP32, which needs to connect to MQTT Broker via TLS/SSL. As usual, I first develop the project with the file system, e.g. I upload my codes to the board and let them run on RAM. Now I want to build a custom firmware, i.e. to freeze my project to a
.binfile. I have followed the official tutorials and managed to do this. But I got some weird errors.Problem
I got the error
OSError: (-17040, 'MBEDTLS_ERR_RSA_PUBLIC_FAILED+MBEDTLS_ERR_MPI_ALLOC_FAILED')when my ESP32 trying to establish a MQTTs connection. However, this error only shows up when I use my custom firmware. If I use the official firmware and upload all my code to the board, it can successfully connect to the Broker.Debug
For debugging, I have checked the free memory (with
gc.mem_free()) in both cases before establishing a MQTTs connection.free_memory = 6352free_memory = 71072This result makes me even more confusing, because it shows that there are more free memory when I use custom firmware. However the error I got indicates that the memory is not enough ...
Beta Was this translation helpful? Give feedback.
All reactions