Coder Social home page Coder Social logo

Comments (5)

khoih-prog avatar khoih-prog commented on August 22, 2024

Hi @HWEDK

Thanks for your interest in the library. I used to be Controls Engineer at some time, and understand how you'd love the jobs for your whole life.

From your error message, it seems that you forgot to copy the Server.h to the correct location, in your case

C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Server.h

That'll fix the issue you mentioned


#ifndef server_h
#define server_h

#include "Print.h"

class Server: public Print
{
public:
    // KH, change to fix compiler error for EthernetWebServer
    // error: cannot declare field 'EthernetWebServer::_server' to be of abstract type 'EthernetServer'
    // virtual void begin(uint16_t port=0) =0;
    //virtual void begin() = 0;
    void begin() {};
};

#endif

from ethernetwebserver.

HWEDK avatar HWEDK commented on August 22, 2024

Thanks a lot, very fast response too. At least I understand the code better after digging around so much...
If I may, another dumb item I must have overlooked, I get the following on serial terminal with 0.0.0.0 IP?
Is this something with my own local network. I set the defines.h IP to the range of my computer.
Something else in the config I'm missing?

Starting WebServer on ESP32 with W5x00 using Ethernet Library
EthernetWebServer v1.2.1
[ETHERNET_WEBSERVER] =========== USE_ETHERNET ===========
[ETHERNET_WEBSERVER] Default SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 23
[ETHERNET_WEBSERVER] MISO: 19
[ETHERNET_WEBSERVER] SCK: 18
[ETHERNET_WEBSERVER] SS: 5
[ETHERNET_WEBSERVER] =========================
[ETHERNET_WEBSERVER] ESP32 setCsPin: 22
=========================
Currently Used SPI pinout:
MOSI:23
MISO:19
SCK:18
SS:5
=========================
Using mac index = 0
EthernetWebServer started @ IP address: 0.0.0.0

from ethernetwebserver.

khoih-prog avatar khoih-prog commented on August 22, 2024

It's possible that you connect the W5500 CS/SS pin to the wrong pin from what specified in the sketch..

According to your current (default) settings

[ETHERNET_WEBSERVER] ESP32 setCsPin: 22

the W5500 CS/SS pin must be connected to GPIO22 of ESP32.

It's possible that you're connect it to GPIO5 (many cases, such as in ESP32_W5500_NTP_CLIENT

If so, you can just modify WebServer.ino#L109-L111 to change the pin used for CS/SS

From pin GPIO22

#ifndef USE_THIS_SS_PIN
  #define USE_THIS_SS_PIN   22    // For ESP32
#endif

to pin GPIO5 (or whatever pin you're using)

#ifndef USE_THIS_SS_PIN
  #define USE_THIS_SS_PIN   5    // For ESP32, or whatever GPIO pin you're using
#endif

You can also try to use DHCP IP by keeping WebServer.ino#L185-L187 as is

// Use Static IP
//Ethernet.begin(mac[index], ip);
Ethernet.begin(mac[index]);

Good Luck,

from ethernetwebserver.

HWEDK avatar HWEDK commented on August 22, 2024

YES! I got it...Your line about DHCP made me realize I crossed code that was trying to expect both DHCP and Static. Also, yes, needed the line with reset being 22, and ensuring CS are set to correct pin in code also needed doing. I have the HTML displaying now.

Now I just have to merge WiFi, Ethernet, Filesystem, and SPI handling

from ethernetwebserver.

khoih-prog avatar khoih-prog commented on August 22, 2024

Good to know you're making good progress by yourself. The acquired experience will definitely follow you forever.

from ethernetwebserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.