LennartHennigs / ESPTelnet

ESP library that allows you to setup a telnet server for debugging.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot compile example TelenetServerwithWifiManager on IDE v2.2.0

KhurramFHassan opened this issue · comments

When I try to compile the above example on arduino IDE v2.2.1, I get the following error:

....\Arduino\libraries\ESP_Telnet\src\ESPTelnetBase.cpp: In member function 'void ESPTelnetBase::processClientConnection()':
....\Arduino\libraries\ESP_Telnet\src\ESPTelnetBase.cpp:39:32:` error: 'using TCPServer = class WiFiServer' {aka 'class WiFiServer'} has no member named 'accept'; did you mean '_accept'?

39 | TCPClient newClient = server.accept();
| ^~~~~~
| _accept
exit status 1
Compilation error: exit status 1

The target board is ESP8266 based.

Khurram

Had same issue here with WEMOS D1 mini.
Solution is to update your board definition. I found a quite old version of WiFiServer.h which indeed didn't had the accept member (and more).
How to verify the root cause: set your IDE compile log options to verbose, compile and check for path to WIFI.h file in the output. Open WiFiServer.h and search for accept. If it's not there your version is too old.
My steps to resolve were to uninstall all versions of IDE (had multiple in parallel, so needed some maintenance anyway) to have a real cleanup. Don't forget to manually delete C:\Users<name>\AppData\Local\Arduino15\ directory, then reinstall IDE and re-add your board definition.
After that the error was gone (and my system was uptodate again as a side effect).
There may be easier procedures, but always with the risk to keep other outdated stuff.

Hope this helps.

Uwe