arduino-mqtt
arduino-mqtt copied to clipboard
MQTT SSL connection issue with QoS1 and QoS2 messages
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
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.