I am running an Arduino Mega + YUN shield.
Sometime for some reasons the Bridge connection is lost (probably because the YUN shield resets): my Blynk connection is not recovering and I cannot access to Arduino via "telnet localhost 6571" anymore.
I get the message "telnet: can't connect to remote host (127.0.0.1): Connection refused".
If I "reset-mcu" the Arduino from the SSH the Bridge connection and the Blynk one are restored immediately.
However, I would like to detected the lost of connection from the sketch and being able to restore the Bridge connection by software in my loop() function, without having to restart the Mega, so that I do not have to re-initialize all variables and loose the current data.
Any suggestion how to check within the sketch if the Bridge connection is active and how to restore it?
Thank you in advance for your help.