Advise on Telnet Client for Squeezebox Server

Hello,

I’m new to Arduino and I fail in trying to build a telnet client to send command to a Squeezebox Server.
I’m using a esp8266 as the Arduino Wifi CPU.

I have tried to use the Telnet exemple that I found here without success.

I get this error message :
‘client’ was not declared in this scope

If someone can help, I would appreciate.

Thank you,
Jean

sketch_Telnet_Server.ino (1.8 KB)

I get this error message :
‘client’ was not declared in this scope

That is NOT the complete message. The complete message tells you exactly where the program couldn’t find the variable in scope.

Why is the WiFiClient instance that is called client local to setup()? When it is local to setup(), why are you trying to use it in loop()?

  delay(500);  // to avoid strange characters left in buffer.

That comment is utter nonsense.