MQTT-TLS
MQTT-TLS copied to clipboard
OTA Firmware updates blocked
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.
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.
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.
hi @gitjoost that's nice idea.