1

Topic: how to test if wifi connect successfully with RemoteXY library

hello,
I'm using RemoteXY library to share an IoT with ESP8266 in the Arduino IDE. The sketch configure an Access Point at the first boot, in order to set the WiFi credentials and cloud token, these are saved in the EEPROM flash emulated, and then recalled from EEPROM to establish the local wifi connection and remotexy cloud. All of this works fine...
But if the local WiFi SSID and password are to be changed one day, how to get automatically the Access Point again ?

The sketch to configure wifi and cloud connection is :

remotexy = new CRemoteXY (
    RemoteXY_CONF_PROGMEM,
    &RemoteXY,
    "",
      new CRemoteXYConnectionCloud (
      new CRemoteXYComm_WiFi (
        STA_SSID.c_str() ,          // REMOTEXY_WIFI_SSID, c_str() convert String type to char array
        STA_PWD.c_str() ),          // REMOTEXY_WIFI_PASSWORD         
        REMOTEXY_CLOUD_SERVER,
        REMOTEXY_CLOUD_PORT,                      // REMOTEXY_SERVER_PORT
        Cloud_Token.c_str()                           // REMOTEXY_token
        )
        );

Is it possible to test if the wifi connection is successfull, or not, inside the sketch ? Is there a function or a flag from the  RemoteXY library that we could use to get the wifi status or something like that ?  If so, we could reboot in mode access point.
Thank you for your help.

2

Re: how to test if wifi connect successfully with RemoteXY library

Implement this using a physical button. Check the state of the button when starting the controller. If the button is not pressed, start the main mode. If pressed, launch access point mode to enter settings.

3

Re: how to test if wifi connect successfully with RemoteXY library

Thank you very much for your answer.
Using a physical button is normally a good solution for my problem.
But if the thing (my IoT) is in a place which is not easy to access, this is a problem.
That is the reason for why i asked if it is possible to get the information of wifi connection successfull or time out from the remoteXY library.
I think it should be possible, but i'not competent enough to understand how to do with the library source.