public int setBaudRate(int baudrate) {
		int bd = getBaudRate();
		try {
			String parityStr = "";
			if (parity == SerialPort.PARITY_EVEN) {
				parityStr = "even";
			}
			else if (parity == SerialPort.PARITY_ODD) {
				parityStr = "odd";
			}
			else if (parity == SerialPort.PARITY_NONE) {
				parityStr = "none";
			}
			
			System.out.println("Parameters for javax.comm.SerialPort: Baudrate=" + baudrate + 
				", Databits=" + databits + 
				", Stopbits=" + stopbits + 
				", Parity=" + parityStr);
			serialPort.setSerialPortParams(baudrate, databits, stopbits, parity);
		}
		catch (Exception ex) {
			ex.printStackTrace();
		}
		return bd;
	}