1

Topic: Board connection behaviour of the cloud?

Hi,
on top of the app connection topic of the last days, i would like to add an item about the board connection behaviour.
My arduino+ESP8266 is connected via WLAN and router to the cloud.
i am observing the board connection flag  with
is_connected = (remotexy -> isCloudConnected());

When the App is disconnecting for some reason (e.g short WLAN interruption), the board connection flag is going to 0 after about 2 minutes. It stays unconnected for about 30 sec, then the cloud server accepts the connection for about 1 minute, then it is disconnected again for about 30sec, ... and so on.
During the 30sec of disconnection, it is not possible to reconnect the app, it claims "board not connected."
So i have often to try to reconnect the app many times until i get by chance  inside the time window of the connected board.

Is this the normal intended behaviour of the cloud server?
Or i am doing something wrong in my SW?

It would be  better, if the board disconnection timeout would be much longer than 2 minutes.
I think in case of the implementation of the automatic app reconnection, the specific behaviour of the board connection cycling have to be taken into account. Maybe  it would make sense to accept the board connection immediately, when the app is trying to connect.

Best regards, Peter

2

Re: Board connection behaviour of the cloud?

There are three defines in RemoteXY_API.h file from library

#define REMOTEXY_CLOUD_CONNECT_TIMEOUT 10000
#define REMOTEXY_CLOUD_RECONNECT_TIMEOUT 30000
#define REMOTEXY_CLOUD_ECHO_TIMEOUT 60000

The cloud server sends an echo request every 30 seconds when there is no connection to the application. Board is waiting echo REMOTEXY_CLOUD_ECHO_TIMEOUT = 60 sec. If no echo is received, the board is disconnected from the cloud server. If the cloud server itself breaks the connection, the board will disconnect immediately. But this never happens, the server does not drop the connection.
Then the board waits for REMOTEXY_CLOUD_RECONNECT_TIMEOUT = 30 seconds to reconnect.
If the connection is not established in 10 seconds, then we are waiting for reconnection.
If your board is connected to the server and the connection is good and echo requests are coming from the server, then the board should not go offline.
Additionally, try library 3.1.3 https://remotexy.com/en/library/

3

Re: Board connection behaviour of the cloud?

Hi,
thanks for clarifications.
I played a bit with the timeouts, the timing was changing, but the  cycling remains in principle.
I will wait now for the auto reconnection feature of the app. Maybe then this strange cycling is no more important.

I tried also the new library.
Unfortunately i get compiling errors about "RemoteXY_Init was not declared in this scope", and RemoteXY_Handler claims.
If you are interested to go in details, i can post the log.

Best regards Peter