code: protected void readEcho(int len) throws IOException {
          byte echoBuf[] = new byte[len];
          int echoLen = commPort.readBytes(echoBuf, len);
          if (logger.isDebugEnabled()) {
              logger.debug("Echo: {}", ModbusUtil.toHex(echoBuf, 0, echoLen));
          }
          if (echoLen != len) {
              logger.debug("Error: Transmit echo not received");
              throw new IOException("Echo not received");
          }
      }
docs: Reads the own message echo produced in RS485 Echo Mode
  within the given time frame.
  
  @param len is the length of the echo to read.  Timeout will occur if the
  echo is not received in the time specified in the SerialConnection.
  @throws IOException if a I/O error occurred.