Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

TLS Handshake occurring for every MQTT Publish?


jhurmence Aug 4, 2023 02:17 PM

We have just started using MQTT on our cr350 dataloggers to publish a data table to AWS every 5 minutes. In addition, the station state is published every 1 minute.  The data is being published OK, and we can retreive it OK.  We noticed a huge increase in cell data use.  I monitored the MQTT state field on the datalogger and discovered that the TLS handshake is occurring on EVERY publish, and the MQTT session gets re-established each time.  Has anyone solved a similar problem?  Is there a setting somewhere to avoid this unnecessary TLS overhead?


johnhsmith May 14, 2025 12:07 PM

It seems you’re facing repeated TLS handshakes, causing high data usage. A few suggestions:

  1. Stable MQTT Connection: Check the Clean Session setting (set to False if using AWS IoT Core) and adjust the Keepalive Interval appropriately.
  2. TLS Optimization: Try TLS 1.2/1.3 and verify certificates (avoid self-signed if possible).
  3. AWS IoT Core Logs: Review logs for unexpected disconnection errors.

Could you share more details like logs or current configurations? The community can help troubleshoot further!


jtrauntvein Jan 7, 2026 07:28 PM

I consulted with one of the OS engineers here at Campbell's about your question and got the following reply.  Basically, the CR350 should maintain the MQTT session unless the datalogger program has configured it not to.  The TLS stack in the datalogger does not support TLS session resumption so a new TLLS negotiation must take place each time that a new connection is made.

The logger should keep the TLS connection open unless programmed to close it. Aspen does not work this way but the loggers should.

Log in or register to post/reply in the forum.