ESP8266 Telnet stopped working

I have been using telnet for a while. Now suddenly it does not work. I never had to include any telnet.h files - just declare a server and client then begin(). It complies OK but tellnetclient.connected() is never true.

It’s the same code it’s always been. Has something changed?

Please upload a minimal project which showcases the problem.

Sorry for the delay in replying. Had a major system outage. Reinstalled everything, including all pio stuff…telnet now works. Usual limitations apply including only one session which does not close if putty session goes away so reconnection not possible. maybe I am missing something.

Okay, great.

If you keep having problems, the library’s original author may help you. Not sure which one you’re using though.

I am not sure a specific library is used, at least I don’t #include one.

Just add these near the top -

WiFiServer telnetServer(23);
WiFiClient telnetClient;

where WiFiServer and WiFiClient are found at …\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src\WiFiServer.h

Maybe there is a more flexible implementation library - I shall look.

Actually now I look I see things like hasclient() so maybe…

In my defence I first/last looked at this about 5 years ago.