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

aWOT is no more compatible with ESP32 board version 3.1.0 #158

Closed
raffaeler opened this issue Jan 1, 2025 · 3 comments
Closed

aWOT is no more compatible with ESP32 board version 3.1.0 #158

raffaeler opened this issue Jan 1, 2025 · 3 comments

Comments

@raffaeler
Copy link

I am using version 3.5.0 of aWOT.
After upgrading the ESP32 board (from the board manager) from version 3.0.0 to 3.1.0, the project does not compile anymore:

/home/raf/Arduino/libraries/aWOT/src/aWOT.cpp: In member function 'void awot::Application::process(Stream*, void*)':
/home/raf/Arduino/libraries/aWOT/src/aWOT.cpp:1621:16: error: cannot declare variable 'client' to be of abstract type 'awot::StreamClient'
 1621 |   StreamClient client(stream);
      |                ^~~~~~
In file included from /home/raf/Arduino/libraries/aWOT/src/aWOT.cpp:23:
/home/raf/Arduino/libraries/aWOT/src/aWOT.h:86:7: note:   because the following virtual functions are pure within 'awot::StreamClient':
   86 | class StreamClient : public Client {
      |       ^~~~~~~~~~~~
In file included from /home/raf/.arduino15/packages/esp32/hardware/esp32/3.1.0/cores/esp32/Arduino.h:197,
                 from /home/raf/Arduino/libraries/aWOT/src/aWOT.h:28:
/home/raf/.arduino15/packages/esp32/hardware/esp32/3.1.0/cores/esp32/Client.h:29:15: note:     'virtual int Client::connect(IPAddress, uint16_t, int32_t)'
   29 |   virtual int connect(IPAddress ip, uint16_t port, int32_t timeout) = 0;
      |               ^~~~~~~
/home/raf/.arduino15/packages/esp32/hardware/esp32/3.1.0/cores/esp32/Client.h:31:15: note:     'virtual int Client::connect(const char*, uint16_t, int32_t)'
   31 |   virtual int connect(const char *host, uint16_t port, int32_t timeout) = 0;
      |               ^~~~~~~
/home/raf/Arduino/libraries/aWOT/src/aWOT.cpp: In member function 'void awot::Application::process(Stream*, char*, int, void*)':
/home/raf/Arduino/libraries/aWOT/src/aWOT.cpp:1630:16: error: cannot declare variable 'client' to be of abstract type 'awot::StreamClient'
 1630 |   StreamClient client(stream);
      |                ^~~~~~
/home/raf/Arduino/libraries/aWOT/src/aWOT.cpp: In member function 'void awot::Application::process(Stream*, char*, int, uint8_t*, int, void*)':
/home/raf/Arduino/libraries/aWOT/src/aWOT.cpp:1639:16: error: cannot declare variable 'client' to be of abstract type 'awot::StreamClient'
 1639 |   StreamClient client(stream);
      |                ^~~~~~

@raffaeler
Copy link
Author

The StreamClient class is expected to be concrete but it derives from Stream which is abstract and does not implement all the abstract functions, therefore StreamClient is abstract as well.
In fact StreamClient does not implement two of the four connect functions that are marked as abstract in the base class.

The solution is to implement the two missing functions in the StreamClient class:

  int connect(IPAddress ip, uint16_t port, int32_t timeout) {return 1;}    // raf
  int connect(const char *host, uint16_t port, int32_t timeout) {return 1;}  // raf

@lasselukkari
Copy link
Owner

This has been fixed in the ESP32 board version 3.1.1 espressif/arduino-esp32#10776

@raffaeler
Copy link
Author

Great thanks!

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

2 participants