khoih-prog / Ethernet_Generic

Simple Ethernet library for AVR, AVR Dx, Portenta_H7, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52 and RASPBERRY_PI_PICO boards using Ethernet shields W5100, W5200, W5500, W5100S, W6100. With this library you can use the Arduino Ethernet (shield or board) to connect to Internet to provides both Client and server functionalities.
42 stars 22 forks source link

ESP32-W5500 Webclient and Webserver not working #10

Closed Sireevenkat closed 2 years ago

Sireevenkat commented 2 years ago

Hi, I am using ESP32 Dev Module with W5500.I tried Webclient and webserver example but it's not working.

Starting WebServer on ESP32 with W5x00 using Ethernet_Generic Library with Large Buffer
Ethernet_Generic v2.3.1
[ETG] Default SPI pinout:
[ETG] MOSI: 23
[ETG] MISO: 19
[ETG] SCK: 18
[ETG] SS: 5
[ETG] =========================
[ETG] ESP32 setCsPin: 5        
[ETG] W5100 init, using SS_PIN_DEFAULT = 22 , new ss_pin =  10 , W5100Class::ss_pin =  5
[ETG] Chip is W5500
[ETG] W5100::init: W5500, SSIZE = 8192
[ETG] Currently Used SPI pinout:
[ETG] MOSI: 23
[ETG] MISO: 19
[ETG] SCK: 18
[ETG] SS: 5
[ETG] ========================= 
Using mac index = 1
Connected! IP address: 0.0.0.0 
Speed: 100 MB, Duplex: FULL DUPLEX, Link status: LINK

Sometimes It is working properly but sometimes I am getting as above. I tried with Arduino UNO with W5500.I am getting same problem. Can you help me to resolve the issue.

khoih-prog commented 2 years ago

Hi @Sireevenkat

I'm just tested and everything is OK with my ESP32_DEV, W5500, Arduino IDE v1.8.19 and ESP32 core v2.0.4

Starting WebServer on ESP32 with W5x00 using Ethernet_Generic Library with Large Buffer
Ethernet_Generic v2.3.1
[ETG] Default SPI pinout:
[ETG] MOSI: 23
[ETG] MISO: 19
[ETG] SCK: 18
[ETG] SS: 5
[ETG] =========================
[ETG] ESP32 setCsPin: 5
[ETG] W5100 init, using SS_PIN_DEFAULT = 22 , new ss_pin =  10 , W5100Class::ss_pin =  5
[ETG] Chip is W5500
[ETG] W5100::init: W5500, SSIZE = 8192
[ETG] Currently Used SPI pinout:
[ETG] MOSI: 23
[ETG] MISO: 19
[ETG] SCK: 18
[ETG] SS: 5
[ETG] =========================
Using mac index = 1
Connected! IP address: 192.168.2.89
Speed: 100 MB, Duplex: FULL DUPLEX, Link status: LINK
New client
GET / HTTP/1.1
Host: 192.168.2.89
Connection: keep-alive
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8,vi;q=0.7
Sending response
Client disconnected
New client
GET /favicon.ico HTTP/1.1
Host: 192.168.2.89
Connection: keep-alive
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
DNT: 1
Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
Referer: http://192.168.2.89/
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8,vi;q=0.7
Sending response
Client disconnected

Sometimes It is working properly but sometimes I am getting as above.

This seems there must be some problem with either your W5500, wirings, etc.

As this is not a bug of this library, I'm closing this now.

Good Luck,