esp32_https_server icon indicating copy to clipboard operation
esp32_https_server copied to clipboard

ESP32 With W5500 Ethernet module not working for https webserver

Open Harishferose opened this issue 2 years ago • 3 comments

I am trying to access the HTTPS server through ethernet, to achieve this I have modified the HTTPS (Async Server Example) code to handle an ethernet connection (by adding an ethernet connection code).

WiFi.begin(WIFI_SSID, WIFI_PSK);

I have replaced the above code with Ethernet.begin(mac, ip); using the native ethernet library(https://github.com/arduino-libraries/Ethernet) to connect ethernet.

Code compiles successfully but when the code is uploaded ESP32 board keeps on rebooting.

HTTPS server works as expected in this library and HTTP server work well using the native ethernet library but when I am trying to club the code by replacing the wifi connection with the ethernet connection I am facing this issue.

Also tried having both wifi and ethernet connected the code compiles and uploaded successfully in this case with WIFI IP I can able to access the web server but can't access it with EthernetIP

I want to achieve an HTTPS web server through the ethernet connection in this board. Please let me know if I am missing anything.

ESP32 Module

  • Adafruit feather espressif esp32 s3 mini

Harishferose avatar Dec 20 '22 11:12 Harishferose

Hi @Harishferose Please share code snippets to investigate in detail.

sdrshnptl avatar Dec 21 '22 06:12 sdrshnptl

Hi @sdrshnptl, Please find the code in the below attachment. Thanks in advance

wifi.txt

Harishferose avatar Dec 21 '22 10:12 Harishferose

I was able to use with WT32-Eth01 board by using these two libraries in Arduino environment #include <ETH.h> #include <IPAddress.h> instead of the WiFi.h library

you will have to declare the IP setup you will use by the Example below // Select the IP address according to your local network IPAddress myIP(192,168,001,202); // default IP IPAddress myGW(192,168,001,001); // default gatewai IP IPAddress mySN(255, 255, 255, 000); // default Subnet Mask IPAddress myDNS(8, 8, 8, 8); //Default DNS Google DNS Server IP

Declare these in Setup to begin Ethernet // Connect to Ethernet Serial.println("Setting up Ethernet"); ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER); ETH.config(newIP, newGW, mySN, myDNS); delay(500); Serial.print("Connected. IP="); Serial.println(ETH.localIP()); hope this helps

cekanayake74 avatar Mar 07 '23 02:03 cekanayake74