1

Topic: Esp8266 connection lost with arduino

My configuration :
Sketch compiled with Arduino IDE on Arduino Nano -----Software Serial----Esp8266 with 0.60 SDK ---- Cloud server ----- RemoteXY pro V4.1.2.. everything powered with a 5V 2A power line with a separate 3,3V 1 A for ESP. Voltage divider on the RX line of the ESP.
My problem:
Everything works fiine ( buttons to send commands to the Nano , status leds, edit field to send set values to the Nano, values to retrieve from Nano...) and when RemoteXY is running the blue Led on the ESP blinks quickly. When RemoteXY is not running the blue Led blinks every 8 sec. as the Nano attempts to communicate with the RemoteXY app . But after a period which is variable (between 45 to 180 minutes...), when I run the app I receive the following message: "the device did not connected to the cloud server". When this occurs. When this occurs, the blue Led on the ESP doesn't blink anymore ( the attempts of the Nano to communicate each 8 sec seem to be freezed )
What I've verified and tested:
- in this case the sketch on the Nano keeps running ( traced with the serial monitor connected on the hardware serial)
- in this case the ESP keeps connected to the router ( I see it in the list of the devices connected on the router )
- other SDK ( 0.50 version) loaded in the ESP....same result
- use of the hardware Serial for the communication with the ESP ( tracing for terminal is then off) ...same result
- when it works, it's possible to simulate some similar problem and result by disconnecting the TX line of the ESP: I see the Nano attempting to communicate with ESP/cloud a few times and then stops. If I reconnect the TX line the communication doesn't restart and the result seems to be the same as the problem explained above.
Conclusion
It seems that the problem is situated between the Nano (and the RemoteXY library) and the ESP. But I can't trace it further.

Help please :-)
JP

2

Re: Esp8266 connection lost with arduino

Set the developer mode by adding line before #include <RemoteXY.h>

#define REMOTEXY__DEBUGLOGS Serial

After that you can see the debug output on Serial 115200
May be it help you.
But you must not use the Serial in RemoteXY while debugging, use SoftwareSerial for ESP.

3

Re: Esp8266 connection lost with arduino

Thanks for your fast reply. I've activted the log function and my system is now working perfectly since yesterday without any problem. I've changed nothing but activated the debug log function. And it works with or without the serial terminal connected..it's like this periodical function (a serial.print 1 X each 8 sec when the app RemotebXY is not active) should prevent the connection between the Nano and the ESP to freeze. Though a similar operation tested before without the debug log function (a serial print of some values in the loop part of the sketch) didn't had the same result and in this case, the communication freezed.
Conclusion....I don't have found the origin of the problem but your proposition has solved it and  I will let the debug log function operational. But if you had another conclusion or proposition  I will be happy to ear it and eventually to test it.