PlatformIO Community

Esp8266 / esp32 with Arduinos ethernet.h library problem


#1

Hello! I’m trying to begin to use PlatformIO, but for my needs it’s essential to get an ethernet library working. with the Arduino IDE i was able to use the ethernet library of Arduinos Compilation (stoffregens ethernet lib) but when i try to use a simple example-project like LinkStatus (code below) it won’t compile and i get a lot of errors… what could i do? thanks in advance for your time <3
the code:

#include <Arduino.h>
/*
  Link Status
  This sketch prints the ethernet link status. When the
  ethernet cable is connected the link status should go to "ON".
  NOTE: Only WizNet W5200 and W5500 are capable of reporting
  the link status. W5100 will report "Unknown".
  Hardware:
   - Ethernet shield or equivalent board/shield with WizNet 5200/5500
  Written by Cristian Maglie
  This example is public domain.
*/

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

void setup() {
  // You can use Ethernet.init(pin) to configure the CS pin
  Ethernet.init(15);  // ESP8266 with Adafruit Featherwing Ethernet

  Serial.begin(9600);
}

void loop() {
  auto link = Ethernet.linkStatus();
  Serial.print("Link status: ");
  switch (link) {
    case Unknown:
      Serial.println("Unknown");
      break;
    case LinkON:
      Serial.println("ON");
      break;
    case LinkOFF:
      Serial.println("OFF");
      break;
  }
  delay(1000);
}

part of the output (Some got cut because output was too big):


#2
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dhcp.cpp:7:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:464:0: warning: "ntohl" redefined [enabled by default]
#define ntohl(x) htonl(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dhcp.cpp:5:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:122:0: note: this is the location of the previous definition
#define ntohl(x) lwip_ntohl(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:8:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:457:0: warning: "htons" redefined [enabled by default]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:6:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:119:0: note: this is the location of the previous definition
#define htons(x) lwip_htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:24:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:457:0: warning: "htons" redefined [enabled by default]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:8:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:458:0: warning: "ntohs" redefined [enabled by default]
#define ntohs(x) htons(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:119:0: note: this is the location of the previous definition
#define htons(x) lwip_htons(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:6:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:120:0: note: this is the location of the previous definition
#define ntohs(x) lwip_ntohs(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:24:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:458:0: warning: "ntohs" redefined [enabled by default]
#define ntohs(x) htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:457:0: warning: "htons" redefined [enabled by default]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetServer.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:457:0: warning: "htons" redefined [enabled by default]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\socket.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:457:0: warning: "htons" redefined [enabled by default]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:8:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:460:0: warning: "htonl" redefined [enabled by default]
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:120:0: note: this is the location of the previous definition
#define ntohs(x) lwip_ntohs(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:119:0: note: this is the location of the previous definition
#define htons(x) lwip_htons(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\socket.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:119:0: note: this is the location of the previous definition
#define htons(x) lwip_htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetUdp.cpp:32:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:457:0: warning: "htons" redefined [enabled by default]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:6:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:121:0: note: this is the location of the previous definition
#define htonl(x) lwip_htonl(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetServer.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:119:0: note: this is the location of the previous definition
#define htons(x) lwip_htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:24:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:460:0: warning: "htonl" redefined [enabled by default]
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetUdp.cpp:30:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:119:0: note: this is the location of the previous definition
#define htons(x) lwip_htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:458:0: warning: "ntohs" redefined [enabled by default]
#define ntohs(x) htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\socket.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:458:0: warning: "ntohs" redefined [enabled by default]
#define ntohs(x) htons(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:121:0: note: this is the location of the previous definition
#define htonl(x) lwip_htonl(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetServer.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:458:0: warning: "ntohs" redefined [enabled by default]
#define ntohs(x) htons(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:8:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:464:0: warning: "ntohl" redefined [enabled by default]
#define ntohl(x) htonl(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:120:0: note: this is the location of the previous definition
#define ntohs(x) lwip_ntohs(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetServer.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:120:0: note: this is the location of the previous definition
#define ntohs(x) lwip_ntohs(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetUdp.cpp:32:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:458:0: warning: "ntohs" redefined [enabled by default]
#define ntohs(x) htons(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Dns.cpp:6:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:122:0: note: this is the location of the previous definition
#define ntohl(x) lwip_ntohl(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:24:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:464:0: warning: "ntohl" redefined [enabled by default]
#define ntohl(x) htonl(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\socket.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:120:0: note: this is the location of the previous definition
#define ntohs(x) lwip_ntohs(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetUdp.cpp:30:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:120:0: note: this is the location of the previous definition
#define ntohs(x) lwip_ntohs(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetServer.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:460:0: warning: "htonl" redefined [enabled by default]
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:460:0: warning: "htonl" redefined [enabled by default]
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetClient.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:122:0: note: this is the location of the previous definition
#define ntohl(x) lwip_ntohl(x)
^
In file included from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/ip_addr.h:41:0,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include/ipv4_addr.h:38,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/arch/cc.h:93,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/arch.h:48,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/debug.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwipopts.h:3575,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/opt.h:51,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/init.h:40,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:27,
from C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:24,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\Ethernet.h:52,
from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetServer.cpp:22:
C:\Users\Sir_A\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include/lwip/def.h:121:0: note: this is the location of the previous definition
#define htonl(x) lwip_htonl(x)
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\EthernetUdp.cpp:32:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:460:0: warning: "htonl" redefined [enabled by default]
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
^
In file included from C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\socket.cpp:23:0:
C:\Users\Sir_A\.platformio\lib\Ethernet_ID872\src\utility/w5100.h:460:0: warning: "htonl" redefined [enabled by default]
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
^

#3

Try setting platform = espressif8266@1.8.0 in your platformio.ini, which will switch you back to the v2.4.2 Arduino ESP8266 core. There appear to be known issues with v2.5.0 and the Ethernet library, which should be fixed in v2.5.1



#4

awesome, thanks for the fast reply, works like a charm! do you maybe know how to fix it for the esp32 platform?


#5

Fantastic.

For the esp32, I’d just start rolling back the versions from the current 1.8.0 … i.e. for the second last version…

platform = espressif32@1.7.0

You can see the list of releases here…


#6

works too, really great, thanks for the insight! best wishes =)