1

Topic: RemoteXY + ESP32 + W5100

Hi,
I do some try with REmoteXY with the W5100.
And I want to make two connection streams: WI -FI_CLOUD and ETHERNET_CLOUD.
However, I am having problems connecting the W5100 module to the ESP32 that I have not encountered before.
In the project, I choose the following configuration: Cloud server / Arduino UNO / Ethernet shield W5100 / Arduino IDE

In library 2.4.6 (REMOTEXY_MODE__ETHERNET_LIB_CLOUD)  Previously I did this:

remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, REMOTEXY_ACCESS_PASSWORD ,
                  REMOTEXY_ETHERNET_MAC, REMOTEXY_CLOUD_SERVER,
                  REMOTEXY_CLOUD_PORT, REMOTEXY_CLOUD_TOKEN);

And there were no problems.
I am currently using library 3.1.6 and instantiate the class like this:

remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, REMOTEXY_ACCESS_PASSWORD,
                  new CRemoteXYConnectionCloud (new CRemoteXYComm_Ethernet (REMOTEXY_ETHERNET_MAC),
                  REMOTEXY_CLOUD_SERVER, REMOTEXY_CLOUD_PORT, REMOTEXY_CLOUD_TOKEN))

Writes: compilation error for ESP32 board

Give an example of two streaming connections over WI-FI and ETHERNET for ESP32.

2

Re: RemoteXY + ESP32 + W5100

Try to replace the file RemoteXYComm_Ethernet.h in the library with the file from the link https://github.com/RemoteXY/RemoteXY-Ar … Ethernet.h

3

Re: RemoteXY + ESP32 + W5100

Many thanks for the help!
Today I will check and write about the results.

4

Re: RemoteXY + ESP32 + W5100

Thanks again remoteXY!
Everything works without conflicts!

Below is an example of a code for connecting to a cloud server via Ethernet, and if not connected Ethernet, via WI-FI.

#define REMOTEXY_MODE__ESP32CORE_WIFI_CLOUD
#include <WiFi.h> 

#define REMOTEXY_MODE__ETHERNET_LIB_CLOUD
#include <Ethernet.h>
#include <SPI.h>

#define REMOTEXY__DEBUGLOG
#include <RemoteXY.h>

// настройки соединения
#define REMOTEXY_WIFI_SSID "*****"
#define REMOTEXY_WIFI_PASSWORD "*****"
#define REMOTEXY_ETHERNET_MAC "DE:AD:BE:EF:EF:ED"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "*****"

// interface configuration 
...................................
// the structure defines all the variables and events of your control interface
..................................

void setup()
{
  Ethernet.init(5);   // (5)- ESP32, allows you to pre-configure the CS pin for different controllers 
  
  if (Ethernet.hardwareStatus() == EthernetNoHardware) {    // Checking for the presence of the Shield
    if (Ethernet.linkStatus() == LinkON) {                              // Checking for the presence of a cable Ethernet
      // ETHERNET
      remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, REMOTEXY_ACCESS_PASSWORD,
                        new CRemoteXYConnectionCloud (new CRemoteXYComm_Ethernet (REMOTEXY_ETHERNET_MAC),
                        REMOTEXY_CLOUD_SERVER, REMOTEXY_CLOUD_PORT, REMOTEXY_CLOUD_TOKEN));
    } else {
      Serial.println("Ethernet cable is not connected.");
      // WI-FI
      remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, REMOTEXY_ACCESS_PASSWORD,
                        new CRemoteXYConnectionCloud (new CRemoteXYComm_WiFi (REMOTEXY_WIFI_SSID,
                        REMOTEXY_WIFI_PASSWORD), REMOTEXY_CLOUD_SERVER, REMOTEXY_CLOUD_PORT, 
                        REMOTEXY_CLOUD_TOKEN));
    }
  } else {
    // WI-FI
    remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, REMOTEXY_ACCESS_PASSWORD,
                      new CRemoteXYConnectionCloud (new CRemoteXYComm_WiFi (REMOTEXY_WIFI_SSID,
                      REMOTEXY_WIFI_PASSWORD), REMOTEXY_CLOUD_SERVER, REMOTEXY_CLOUD_PORT, 
                      REMOTEXY_CLOUD_TOKEN));
  }
}

void loop()
{
  RemoteXY_Handler ();

  // TODO you loop code
}