Anyone combined TlsTcpClient and MQTT-TLS libs?


#1

I’ve been using the MQTT-TLS library from @hirotakaster for a while with very good results, after a couple of config.h modifications to mbedtls to reduce memory footprint. I have an application where HTTPS API calls to my cloud service would be very useful in addition to MQTT.

My question is, has anyone already combined the TlsTcpClient and MQTT-TLS libraries into a single lib? Before I do the work myself or convert to using HTTPS only (which I’d rather not do) I thought I’d check here. Since both libraries use mbedtls they can’t be combined in the same code.


#3

Hi @picsil,
I have mbedTLS built to MQTT-TLS, TlsTcpClient each library. Now it’s hard to use this two library on one-application, because of application&flash size limit.

I thought about if it develop the simple TLS library(using by mbedTLS) is good or not when made the library. I had a some issue.

  1. Particle firmware include the mbedTLS for DTLS(UDP).
  2. Developer could build the particle firmware with some mbedTLS options.
  3. Maybe developer could use Patricle firmware with mbedTLS(DTLS, TLS), but that’s firmware will be original version.
  4. Besides this, Particle maybe open the TLS library for developer in someday.

So I think simple TLS library will be competing to particle firmware lib. I’ve been on the fence but I decided to include the mbedTLS to each lib.

I think MQTT/TLS with just one mbedTLS could work fine, but that’s library name will be MQTT-TlsClient-TLS.


#4

Thank you very much for your thorough response. The above is what I was considering doing. Combining the two into one library, hence one copy of mbedTLS in user firmware.