Can't get MQTT-TLS (sample) to Compile (3 errors)

Hi, Hoping someone can help.
I can not get the MQTT-TLS to compile. It throws the following errors:

lib/MQTT-TLS/mbedtls/md_internal.h:47:8: type ‘struct mbedtls_md_info_t’ violates one definition rule [-Werror=odr]

mbedtls/library/cipher_wrap.c:1349:35: type of ‘mbedtls_cipher_definitions’ does not match original declaration [-Werror]

mbedtls/library/cipher_wrap.c:1449:5: type of ‘mbedtls_cipher_supported’ does not match original declaration [-Werror]

Also when using the sample ino from Github.
Can anyone offer some advice/guidance?

(using Particle/Spark Core)

Seems like a particle Core issue? Is there a Library that works with the Core?

Even if you got it to compile I don’t think it would fit in a Core. It fills much of the Photon, which has much larger flash and RAM.

1 Like

Do you really need TLS? If not you will have way better results on the Core / Photon than with TLS. As mentioned, TLS is a real resource hog. In order to answer those specific compilation errors, we would need more information such as what version of the library you are using and how you are implementing it into your firmware.

It generally seems to be a definition conflict issue with the system firmware (which also uses an implementation of mbedtls), though at least with more modern firmware versions shouldn’t be an issue to my knowledge.

Thanks. I’ve tried 1.0.1 but same problem.
I see rickkas7’s point, size might be an issue…

Maybe I’ll change to a new Mesh setup with local messaging and a Bridge Node to MQTT-TLS

If you’re open to using the Mesh hardware, why not use the Argon? It has enough juice to be able to run TLS. Even the photon should work fine if you aren’t doing a lot else requiring RAM and program flash.

@justice.

Currently only have Core’s but yes the Argon makes sense. Or Xenon with Ethernet FeatherWing…