LosantPingPong: End-to-end Losant Connectivity Test

The LosantPingPong class is an interesting approach, but I’m not sure if it’s needed. The MQTT protocol does have an underlying ping packet that is implemented in the Losant SDK as a heartbeat. The SDK, but default, will send a ping packet every 15 seconds. It will disconnect with a -4 (timeout) if no message is received. This disconnect is picked up by the higher level code, which then attempts to reconnect.

What you said about never coming back online without a hard reset was an issue with how the kit’s higher level code (non-SDK code) was handling a reconnect - a fix has since been pushed to the repo. There was a possibility that WiFi was re-established, but it could still not connect to Losant. This timed out at a lower level and left the higher level code forever in a loop trying to connect. The fix brings a timeout into the higher level code as well and will cause the board to reset and attempt to reconnect again.