arduino-mqtt icon indicating copy to clipboard operation
arduino-mqtt copied to clipboard

MQTT SSL connection issue with QoS1 and QoS2 messages

Open haisul opened this issue 2 years ago • 1 comments

Hi I use SSL to connect to a broker. When I publish a QoS1 or QoS2 message, there is a high probability that the MQTT connection will be disconnected. When I print the lastError, it shows LWMQTT_NETWORK_FAILED_READ. However, I have confirmed that my Wi-Fi is connected and functioning properly; only the MQTT connection is disconnected

haisul avatar May 08 '23 08:05 haisul

Are you sure that you do not have a publish / subscribe / unsubscribe in onMessage callback? I had very strange behavior by that (LWMQTT_NETWORK_FAILED_READ = -5 and LWMQTT_MISSING_OR_WRONG_PACKET = -9) ... After eliminating that it works good using TLS / BearSSL and QOS1 and QOS2 messages.

hmueller01 avatar Mar 01 '24 15:03 hmueller01