Command readserialport

The command readserialport is used to write a message, hexadecimal on the serial port.


  1. buffer [string]
    Buffer, hexadecimal, which will be written on the serial port.
  2. variablehandle [integer]
    Handle of the open door.
  3. variablebuffer [string]
    Variable that will store the buffer captured from the serial port.
  4. variablehandle [integer]
    Open serial port identifier.
  5. variablereturn [integer]
    Variable that will store the return code, where:
    • -1: Timeout was reached and nothing was captured from the serial port
    • >0: Number of bytes that was read from the serial port.


In the example above the command openserialport will open a connection on port COM1 with the rate 115200 and configuration A8N1.

The command readserialport will read the return of the serial port and store in the variable sBufferReturned.

The content of the variable will be converted to stringvariable and displayed on the display.

The command closeserialport closes the serial port.