Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 With W5500 Ethernet module not working for https webserver #168

Open
Harishferose opened this issue Dec 20, 2022 · 3 comments
Open

Comments

@Harishferose
Copy link

Harishferose commented Dec 20, 2022

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
@sdrshnptl
Copy link

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

@Harishferose
Copy link
Author

Harishferose commented Dec 21, 2022

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

wifi.txt

@cekanayake74
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants