|    
			
				25/10/2009, 14:24
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: diciembre-2008 Ubicación: Vigo, Spain 
						Mensajes: 141
					 Antigüedad: 16 años, 10 meses Puntos: 12 |  | 
  |  Respuesta: Telnet + Fonera + Arduino  
  Solucionado, porsia alguno le sirve: 
Código:
  import com.jscape.inet.telnet.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class TelnetConsola {
    //variables telnet
    TelnetSession telnet;
    String host;
    String user;
    String passwd;
    //Constructor
    public TelnetConsola(String user,String passwd,String host){
        this.user = user;
        this.passwd = passwd;
        this.host = host;
    }
    //Metodos
    //Conectarse al robot via telnet
    public void login(){
        telnet = new TelnetSession(host);
        try {
            telnet.setHostname(host);
            telnet.setLoginPrompt("login:");
            telnet.setPasswordPrompt("Password:");
            telnet.setShellPrompt("#");
            telnet.connect(user,passwd);
        } catch (TelnetException ex) {
            Logger.getLogger(TelnetConsola.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    //controlar la direccion del robot
    public void direccion(String dir) throws TelnetException{
        if(dir.equalsIgnoreCase("adelante")){
            telnet.send("echo 1 > /dev/tts/0");
        }
        if(dir.equalsIgnoreCase("derecha")){
            telnet.send("echo 2 > /dev/tts/0");
        }
        if(dir.equalsIgnoreCase("izquierda")){
            telnet.send("echo 3 > /dev/tts/0");
        }
        if(dir.equalsIgnoreCase("atras")){
            telnet.send("echo 4 > /dev/tts/0");
        }
    }
}
    |