libserialport library

Introduction

Serial Port for Dart is based on libserialport, which is a minimal C-library created by the sigrok projects, and released under the LGPL3+ license.

Import

import 'serial_port/serial_port.dart'

Getting Started

  • SerialPort
    • obtaining a list of serial ports on the system
    • opening, closing and getting information about ports
    • signals, modem control lines, breaks, etc.
    • low-level reading and writing data
  • SerialPortConfig
    • baud rate, parity, etc.
  • SerialPortReader
    • high-level data stream for reading data asynchronously

Debugging

The library can output extensive tracing and debugging information. The simplest way to use this is to set an environment variable LIBSERIALPORT_DEBUG to any value; messages will then be output to the standard error stream.

No guarantees are made about the content of the debug output; it is chosen to suit the needs of the developers and may change between releases.

Classes

SerialPort
Serial port.
SerialPortBuffer
Buffer selection.
SerialPortConfig
Serial port config.
SerialPortCts
CTS pin behaviour.
SerialPortDsr
DSR pin behaviour.
SerialPortDtr
DTR pin behaviour.
SerialPortEvent
Port events.
SerialPortFlowControl
Standard flow control combinations.
SerialPortMode
Port access modes.
SerialPortParity
Parity settings.
SerialPortReader
Asynchronous serial port reader.
SerialPortRts
RTS pin behaviour.
SerialPortSignal
Input signals.
SerialPortTransport
Transport types.
SerialPortXonXoff
XON/XOFF flow control behaviour.

Exceptions / Errors

SerialPortError