PaulS:
While there is no client connect, bury your head in the sand for 1/2 a second. It would make more sense, to me, to spend that time seeing if the telnet server had anything to say.Serial.println("connectedddddd");Doessssss thissssss reallyyyyyyy conveyyyyyy moreeeeee informationnnnnn?
if (txt == 1) {Why would anyone expect a variable named txt to contain numeric data?
thats just debug info for me so i can tell what servers it connected to. and a couple commands i threw in there to delete some files.