Mqtt-tls app_flash overflow problem

Hi, I am trying to compile a project with hirotakaster/mqtt-tls library, OS 5.2.0 for Boron. It gives me the following error. I tried the A1-example and got the same problem. I got one project created by my friend a year ago (probably using old particle workbench) and tried using that project adding the same library and was succeeded. However, that old project my mqtt client (Boron node) fails to connect to the broker due to TLS problem. That's why I am trying a new project and getting this problem.
Thanks for finding a solution for me.
Gazi
image

Your compiled code is 18K too large.

You can use the code size tips to try to reduce your flash usage.

You could also try targeting an older version of Device OS than 5.2.0, but don't go below 3.2.0 since you need the 256K user binary support.

@rickkas7 Thank you for a prompt response.
I've created a new project again today and paste my required code in it with the mqtt-tls library, now it is compiling with both OS 5.1 and 6.1. I don't know what was wrong before. However, my client still fails to connect to the broker, with "ssl3_get_record:wrong version number".

Hi, you might need to configure your broker AND the client to use the same tls version.

I was looking for the way of tls configuration for mbed_tls library, and found mbestls_config.h could be a way to do that. However, VScode is always showing "cannot open source file "<mbedtls_config.h>" (dependency of "MQTT-TLS.h")". I am not sure if it is working properly or not, and the proper configuration is loaded during compilation. Is there any other way to define the SSL configuratio?

You'll notice a copy of the libraries you've added in the lib directory in the top level of your project. This is handy for viewing the source and examples, and you can navigate into the library to find its header file.

If the library is not there, which can happen if you opened a project folder instead of importing it, just install the library again using Particle: Install Library.

If you want to make modifications to the library, be sure to remove the library from the project.properties file in the top level of your project. If you leave the library in project.properties the official release will be used to build. If you remove it, then the local version you modified in your lib directory will be used instead.

1 Like

I've created a new project adding the mqtt-tls using particle Install Library. For the same FW code I used yesterday and got compiled (with mqtt-tls in the src folder not in lib folder) is not compiling today and is giving the overflowed error for which I initiated this topic. And "cannot open source file "<mbedtls_config.h>" (dependency of "MQTT-TLS.h")" is still there.

Still facing the same overflowed issue randomly for the same project did not show this last time. This is mostly happening while using the mbed-tls library. Sometime uninstalling and reinstalling the toolchain solves it but not always.

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