public boolean Connect() {
		/* Get all available ports */
		Enumeration<?> portIdentifiers = CommPortIdentifier.getPortIdentifiers();

		/* Find requested port */
		CommPortIdentifier portId = null;
		while (portIdentifiers.hasMoreElements()) {
			CommPortIdentifier p = (CommPortIdentifier)portIdentifiers.nextElement();
			if (p.getPortType() == CommPortIdentifier.PORT_SERIAL && p.getName().equals(wantedPortName)) {
				portId = p;
				break;
			}
		}

		/* Found port? */
		if (portId == null) {
			System.err.println("# Failed to find serial port.");
			return false;
		}

		/* Open port */
		try {
			p = (SerialPort)portId.open("name", 100);
		} catch (PortInUseException e) {
			System.err.println("# Serial port already in use." + e);
			return false;
		}

		/* Setup port */
		try {
			p.setSerialPortParams(serialSpeed, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
			p.enableReceiveTimeout(65000); /* as long of timeout as possible, fight win32 rxtx bug */
		} catch ( Exception e ) {
			System.err.println("# Error configuring serial port.");
			return false;
		}

		/* Create streams for port */
		try {
			i = new BufferedReader(new InputStreamReader(p.getInputStream()));
			is = p.getInputStream();
			o = new PrintWriter(p.getOutputStream(), true);
			os = p.getOutputStream();
		} catch (IOException e) {
			System.err.println("# Failed to create stream.");
			return false;
		}

		p.disableReceiveThreshold();

		return true;
	}