MQTT-TLS icon indicating copy to clipboard operation
MQTT-TLS copied to clipboard

OTA Firmware updates blocked

Open CameronTurner opened this issue 6 years ago • 3 comments

When using the default 15 second keep alive, the firmware updates appear to be blocked from completing an over the air (OTA) update.

Can we avoid this from occurring, regardless of the keep alive duration?

It appears it can be fixed by running client.disconnect() before running an OTA, however- it would be ideal to fix this rather than use a work around that is unreliable.

CameronTurner avatar Mar 19 '18 11:03 CameronTurner

this issue is related with #13 ? if you have a something about the OTA, you should be better research about the OTA firmware source code.

hirotakaster avatar Mar 20 '18 01:03 hirotakaster

I realize this issue is old but in case you are still looking for a solution, you might want to consider dismissing the mqtt-tls component when an OTA update comes in. To get an OTA update callback, set the callback function somewhere in your setup() code:

System.on(firmware_update, onFirmwareUpdate);

Then in the callback: void onFirmwareUpdate() { mqttClient().~MQTT() // created with MQTT mqttClient(SeRVER, PORT, KEEPALIVE, dispatch); }

hope this helps.

gitjoost avatar Aug 25 '18 18:08 gitjoost

hi @gitjoost that's nice idea.

hirotakaster avatar Aug 26 '18 11:08 hirotakaster