MQTT-TLS
MQTT-TLS copied to clipboard
Subscriptions - delayed
I find when using the below config, the particle device is:
- More stable (less restarts/lockups resulting in the watchdog kicking in)
- Can flash OTA (would previously not be able to complete an OTA flash)
However, the downside appears to be very delayed (or lost messages) from subscriptions.
- Some subscription messages are lost
- Some subscription messages arrive 3-4 minutes later.
Is there a way to separate out receiving any publish events from the other activities that might be 'blocking' OTA capabilities in the below?
Code
MQTT client("xxxxxxxx.iot.ap-southeast-2.amazonaws.com", 8883, 360, callback);
//The below code is run every 120 seconds
if (client.isConnected())
{
client.loop();
}
else
{
if(awsDisconnect == 0)
{
connectToAwsMqtt("connect");
}
}
check your firmware source code about the OTA(0.6.x/0.7.x/0.8.x) and network packet with WireShark.