telnet myrouter from arduino (i need a help)

I just got my Ethernet Shield and started off with the Ethernet Telnet example,
I need help ;D :wink:
I want to obtain information from my modem/router through telnet (login: admin, password: admin)

I want to launch a command from arduino uno which allows me to obtain the status of my router with the command telnet ($show status) and display later the result on a lcd display.

after several nights of testing, I manage to connect to my router through telnet and introduce the login and password using the "finder.find" function but the problem that I cannot display the result at " serial monitor "and execute a"$show status" command.
thank you so much :wink:

--------------result serial monitor ----------
Connection en cours...
Connection au modem...

#include <SPI.h>    
#include <Ethernet.h>
#include <TextFinder.h>

byte mac[] = {
 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,11);
IPAddress server(192,168,1,1);

EthernetClient client;
TextFinder finder( client);

const unsigned long requestInterval = 15000;  // delay between requests
unsigned long lastAttemptTime = 0;   // last time you connected to the server, in milliseconds

void setup()
 Ethernet.begin(mac, ip);
 Serial.println("Connection en cours...");  

void loop()
 if (client.connected()) {
  // checke_page();
   if(finder.find("Username: ")){    
   if(finder.find("Password: ")){    
 else if (millis() - lastAttemptTime > requestInterval) {
   // if you're not connected, and two minutes have passed since
   // your last connection, then attempt to connect again:
void checke_page(){
  // from the server, read them and print them:
  if (client.available()) {
     client.println("show status");      
    char c =;

  // as long as there are bytes in the serial queue,
  // read them and send them out the socket if it's open:
  while (Serial.available() > 0) {
    char inChar =;
    if (client.connected()) {
void connectToServer() {
 // attempt to connect, and wait a millisecond:
 Serial.println("Connection au modem...");
 if (client.connect(server, 23)) {
    char c =;
 else {
     Serial.println("erreur de connexion");
 // remettre le compteur a zero pour la prochaine connexion:
 lastAttemptTime = millis();

Good evening world of arduino,
who can help me, I'm stuck :slightly_frowning_face: