public UARTTransport(String commPortName) throws HCIException {
try {
CommPortIdentifier commPort = CommPortIdentifier.getPortIdentifier(commPortName);
if (commPort.getPortType() != CommPortIdentifier.PORT_SERIAL)
throw new HCIException(commPortName + " is not a serial port. ");
SerialPort serial = (SerialPort)commPort.open("Bluetooth", 10000);
serial.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
inStream = serial.getInputStream();
outStream = serial.getOutputStream();
readBuffer = new byte[32];
serial.addEventListener(this);