@Override
    public void serialEvent(SerialPortEvent evt) {
        if (evt.getEventType() == SerialPortEvent.DATA_AVAILABLE) {
            try {
                byte singleData = (byte) input.read();
                if (singleData != NEW_LINE_ASCII) {
                    logText = new String(new byte[]{singleData});
                    entrada += logText;
                    if (entrada.indexOf("S011000000000E") != -1 || entrada.indexOf("S010000000000E") != -1) {
                        entrada = "";
//                        finalizarLlegada(1,1);                        
                    }
                    else if (entrada.indexOf("S006") != -1 && entrada.length() >= 28) {
                        entrada = "";
//                        setearCuentas();                        
                    }
                }
            } catch (IOException e) {
                logText = "Failed to read data. (" + e.toString() + ")";
            }
        }
    }