Hello guys. I need to communicate with PLC via Ethernet TCP protocol. My hardware is Arduino NANO ESP32 with Wiznet module Wiz610io. I have successfully established UDP communication, but when I tried to change it to TCP, the program couldn't be compiled on Arduino side. I kept getting an error pointing to the library such as "cannot declare variable 'server' to be of abstract type 'EthernetServer'..." and so on. I tried different libraries like "Ethernet_Generic" or "WIZ_Ethernet_Library-master" but it is still not working for me maybe because all those libraries are not supported for TCP on ESP32? I am not profi programmer and I will be very thankful for helping.
in your copy of the Ethernet library, in Ethernet.h change
class EthernetServer : public Server {
to
class EthernetServer : public Print {
Hi, thanks for reply. One question: Is this a solution or some kind of "hack" to bypass the compiler? I'm asking just to be sure that in the future the communication will work reliably.
you use older version of esp32 platform (the Arduino copy I guess) and that requires this patch in Ethernet library
1 Like