serial.notifyOnCarrierDetect(true);
serial.notifyOnCTS(true);
serial.notifyOnFramingError(true);
//serial.notifyOnOutputEmpty(true);
//serial.notifyOnOverrunError(true);
serial.notifyOnParityError(true);
//reset();
}
catch (NoSuchPortException e) { throw new HCIException("Port " + commPortName + " not found. " + e); }
catch (PortInUseException e) {
throw new HCIException("Port " + commPortName + " is in use by another application. " + e);