lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Simulatng an Arduino interface


From: Alain Mouette
Subject: [lwip-users] Simulatng an Arduino interface
Date: Mon, 18 Aug 2014 19:33:21 -0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hi, I have do do something a little odd, and I would like to have your advice about it and to know if anyone has ever seen anything like it

I need to simulate the interface available on the Arduino (with the WizChip), I believe that wiht such an interface I could use some software develloped for the Arduino platform. Please help me pointing to a better direction.

The API interface is like this:
=====
EthernetServer TelnetServer1(ETH_PORT_TELNET); // Static object, defines the listening port
EthernetClient TelnetClient=NULL;              // used when connected
void setup() {
   TelnetServer1.begin();
}
void loop(){
if (!TelnetClient){ // verify if a connection is already open
    if ((TelnetClient=TelnetServer1.available())==NULL){
     return;
    }else{// Newconnection
      TelnetClient.println(F("Conectado - BonsEletrons"));
    }
  }
  if (TelnetClient.connected()){
    while (TelnetClient.available())
    {
      uint8_t c = TelnetClient.read();            // Get one char at a time
      // ... do something
      TelnetClient.println("Erro!");              // send results
    }
  }else{                           // nao est mais conectado
    TelnetClient.stop(); // close the connection:
  }
}
=====
Thanks for any suggestion
Alain



reply via email to

[Prev in Thread] Current Thread [Next in Thread]