private void setBaud(int baud) {
		this.baud = baud;
		try {
			if (baud == 9600)
				p.writeBytes(BAUD9600);
			else if (baud == 57600)
				p.writeBytes(BAUD57600);
			else if (baud == 1200)
				p.writeBytes(BAUD1200);
			else if (baud == 19200)
				p.writeBytes(BAUD19200);
			else if (baud == 115200)
				p.writeBytes(BAUD115200);
			else if (baud == 38400)
				p.writeBytes(BAUD38400);
			else {
				System.err.println("Unrecognized baud "+baud);
			}
		} catch (SerialPortException e) {
		}
	}