title: need help with displaying message on pole display in java
body: <p>I'm using a PL200 pole display with the following settings
      * Char type: USA/Europe (default)
      * Command mode: EPSON (default) Baud
      * rate: 9600, n , 8, 1 (default?)
      * Passthru None (Default)</p>
  
  <p>The display just goes off each time i run my code and i get the exception message like the "device does not recognize this command."</p>
  
  <p>I guess that i'm not getting the commands right can any one please give sample code to write to the pole display?</p>
  
  <p>The code...</p>
  
  <pre><code>try
      {
      CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier("COM1");
          if (portIdentifier.isCurrentlyOwned())
          {
              System.out.println("Port in use!");
          }
          else {
          System.out.println(portIdentifier.getName());
  
          SerialPort serialPort = (SerialPort) portIdentifier.open("ListPortClass", 300);
          int b = serialPort.getBaudRate();
          System.out.println(Integer.toString(b));
          serialPort.setSerialPortParams(300, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
          OutputStream mOutputToPort = serialPort.getOutputStream();
          InputStream mInputFromPort = serialPort.getInputStream();
          String mValue = "AT\r";
          System.out.println("beginning to Write . \r\n");
          mOutputToPort.write(mValue.getBytes());
          System.out.println("AT Command Written to Port. \r\n");
          mOutputToPort.flush();
          System.out.println("Waiting for Reply \r\n");
          Thread.sleep(500);
          byte mBytesIn [] = new byte[20];
          mInputFromPort.read(mBytesIn);
          mInputFromPort.read(mBytesIn);
          String value = new String(mBytesIn);
          System.out.println("Response from Serial Device: "+value);
          mOutputToPort.close();
          mInputFromPort.close();
      }
      catch (Exception ex)
      {
          System.out.println("Exception : " + ex.getMessage());
      }
  </code></pre>