Wiznet makers

jakelee

Published August 13, 2025 ©

5 UCC

0 VAR

0 Contests

0 Followers

0 Following

Original Link

ESP32 weather station - migrating from WiFi to W5500 ethernet

The user built a weather station with ESP32 Wrover Dev Kit connected over Wi-Fi.
Due to remote-site constraints, they tried to switch to Ethernet using W5500.

COMPONENTS
PROJECT DESCRIPTION

Forum Discussion Summary

Context & Challenge (bobw1 – May 30, 2025):

The user built a weather station using an ESP32 Wrover Dev Kit connected over Wi-Fi.

Due to remote-site constraints, they attempted to switch to wired Ethernet using a W5500 module.

Though the setup allowed pinging the device, the weather station did not fully function over Ethernet.
mischianti.org+13Arduino Forum+13Arduino Forum+13ESP32


Technical Setup

The user shared their initial code snippet:

cpp
#include <Ethernet.h> #include <WiFi.h> #define ETH_SPI_SCS 5   // Chip Select pin uint8_t baseMac[6]; void setup() {  Serial.begin(115200);  delay(1000);  Serial.println("Starting Ethernet connection...");  Ethernet.init(ETH_SPI_SCS);  esp_read_mac(baseMac, ESP_MAC_ETH);  Serial.printf("Ethernet MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",                 baseMac[0], baseMac[1], baseMac[2],                 baseMac[3], baseMac[4], baseMac[5]);  Ethernet.begin(baseMac);  Serial.println("Checking Ethernet hardware...");  if (Ethernet.hardwareStatus() == EthernetNoHardware) {    Serial.println("ERROR: No Ethernet hardware detected!");    return;  } else {    Serial.println("Ethernet hardware detected!");  } }

Despite seeing “Ethernet hardware detected!” and being able to ping the module (confirmed by the user), the station did not complete the switch fully or serve data as expected.
Arduino Forum+6Arduino Forum+6Arduino Forum+6


Insights & Troubleshooting

The code confirms that pin mapping to the W5500 worked correctly and that Ethernet hardware was recognized—but doesn't verify network configuration (e.g., DHCP/static IP setup) or application-level support (e.g., HTTP server).

The user may still be missing key parts for a full connection such as gateway, subnet mask, or DNS setup, or may lack the code handling the actual data exchange needed for the weather station functionality.


Summary Table

ElementObservation
Module DetectionESP32 recognized the W5500 module
Network ConnectivityDevice responded to ping but lacked full functionality
Code ConfirmationEthernet initialized over SPI with ESP32-generated MAC
Missing ComponentsPossibly missing IP configuration, application server code

Suggested Next Steps

To move toward full functionality:

Check Network Configuration

Use Ethernet.begin(mac) with optional parameters like IP, DNS, gateway, and subnet (particularly if DHCP isn’t available).

Test Basic Connectivity

Add serial output to confirm assigned IP (Ethernet.localIP()).

Embed Application Logic

For a weather station, create a web page or API endpoint to report data (e.g., use EthernetServer and EthernetClient).

Consider Libraries

EthernetESP32 or AsyncWebServer_ESP32_W5500 (depending on preference) can simplify server setup.

Use examples that take care of both Ethernet initialization and web serving.

Documents
Comments Write