public void initialize() {
    	ipcon = new IPConnection();
        while(true) {
            try {
                // try to connect
            	ipcon.connect(host, port);
                break;
            } catch(Exception e) {
            	e.printStackTrace();
            }
            try {
                Thread.sleep(2000);
            } catch(InterruptedException ei) {
            }
        }
        
        ipcon.addEnumerateListener(this);
        ipcon.addConnectedListener(this);
        
        while(true) {
            try {
            	// try to configure hardware
                ipcon.enumerate();
                break;
            } catch(NotConnectedException e) {
            	e.printStackTrace();
            }
            try {
                Thread.sleep(2000);
            } catch(InterruptedException ei) {
            }
        }
	}