🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    LAN Module W5500 with POE Compilation error

    Scheduled Pinned Locked Moved Modules
    7 Posts 3 Posters 12.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      HappyUser
      last edited by

      I have seen this issue already in this forum. Also checked the internet and many people seem to face the same problem. Compilation of the example file offered by M5Stack : Webserver gives a compilation error : cannot declare variable 'Aserver' to be of abstract type 'EthernetServer'. I have tried using Ethernet.h as well as Ethernet2.h. Both give the same compilation error in Arduino IDE. If I compile the code for an Arduino MKR1010 (so without included M5Stack.h). Could anyone share a solution for this urgent problem? Many thanks. This is the code that give the problem. #include <M5Stack.h>
      #include <SPI.h>
      #include <Ethernet.h>

      EthernetServer server(80);

      1 Reply Last reply Reply Quote 0
      • felmueF Online
        felmue
        last edited by

        Hello @HappyUser

        With the following two changes I can get the WebServer example to compile and run:
        In Ethernet.h

        //	virtual void begin();
        	virtual void begin(uint16_t port=0);
        

        In EthernetServer.cpp

        //void EthernetServer::begin()
        void EthernetServer::begin(uint16_t port)
        

        Good luck!
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • H Offline
          HappyUser
          last edited by

          Thank you, that would be great. Can I use a standard TextEdit program to make these modifications?

          1 Reply Last reply Reply Quote 0
          • H Offline
            HappyUser
            last edited by

            Let me shout in big CAPITALS : this is solved. I am really grateful. What is wrong with me that it took me so long to find the correct source to solve this problem. Many thanks.

            1 Reply Last reply Reply Quote 0
            • felmueF Online
              felmue
              last edited by

              Hello @HappyUser

              I am happy to hear that you are a happy user again.

              Cheers
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              1 Reply Last reply Reply Quote 0
              • J Offline
                jvm
                last edited by

                How did you do it ? On which line did you add these lines of code ?

                I am trying to run this example on a Core2 with the regular Lan module (non POE). I also tried the EasyLoader, but it doesn´t work on Core2.

                1 Reply Last reply Reply Quote 0
                • felmueF Online
                  felmue
                  last edited by felmue

                  Hello @jvm

                  open the files Ethernet.h and EthernetServer.cpp, then search for the commented out lines and replace those.

                  Since you are using an M5Core2 you'll also want to adapt the SPI pins as they are slightly different between M5Stack and M5Core2.

                  M5Stack uses:

                  #define SCK  18
                  #define MISO 19
                  #define MOSI 23
                  #define CS   26
                  

                  M5Core2 uses:

                  #define SCK  18
                  #define MISO 38
                  #define MOSI 23
                  #define CS   26
                  

                  Please also refer to this GPIO comparison sheet I've compiled a while ago.

                  Thanks
                  Felix

                  GPIO translation table M5Stack / M5Core2
                  Information about various M5Stack products.
                  Code examples

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post