public void connect() {
		setConnectionState(ConnectionState.BUSY);
		new Thread( new Runnable() {
			public void run() {
				String comPort = window.getSelectedCOMPort();
				try {
					Controller.log("Connecting to serial port " + comPort + " (please wait) ...", "message");
					int baudRate = usingOldOABaudRate ? 115200 : 57600;
					Controller.log(altimeter.connect(comPort, baudRate), "altimeter");
					Controller.log("Connected.", "message");
					setConnectionState(ConnectionState.CONNECTED);
					// this is where we test for the firmware versions that are compatible with this
					// release of the downloader. If they aren't compatible then we try and start the
					// upgrade process.
					if (!altimeter.firmwareVersion.equals("V8")) 
					{
						if (!adviseFirmwareUpgrade()) return;
					}
				} catch (NotAnOpenaltimeterException e) {
					setConnectionState(ConnectionState.DISCONNECTED);
					if (!usingOldOABaudRate) {
						Controller.log("Unable to connect, checking for older OA connection (please wait) ...", "error");
						usingOldOABaudRate = true;
						connect();
						return;
					} else {
						Controller.log("Incorrect reply from device. Check that you've selected the correct serial port, and that " +
								"the openaltimeter is connected and powered.", "error");
						usingOldOABaudRate = false;
						return;
					}
				} catch (Exception e) {
					Controller.log("Exception opening serial port. Check your serial port settings.", "error");
					setConnectionState(ConnectionState.DISCONNECTED);
					return;
				}
				try {
					Controller.log("Getting log information ...", "message");
					Controller.log(altimeter.getFileInfo(), "altimeter");
					Controller.log("Done.", "message");
				} catch (IOException e) {
					Controller.log("Unable to get file information from altimeter.", "error");
				}
			}
		}).start();
	}