dart_serial_port 0.0.3

Dart native
Flutter Android iOS

Serial Port for Dart (FFI bindings to libserialport, a minimal C-library created by the sigrok).

Serial Port for Dart #

pub license: LGPL3+

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.

Usage #

import 'package:dart_serial_port/dart_serial_port.dart';

final name = SerialPort.availablePorts.first;
final port = SerialPort(name);
if (!port.openReadWrite()) {
  print('${SerialPort.lastErrorMessage} ${SerialPort.lastErrorCode}');
  exit(-1);
}

port.write(/* ... */);

final reader = SerialPortReader(port);
reader.stream.listen((data) {
  print('received: $data');
});

To use this package, add dart_serial_port as a dependency in your pubspec.yaml file.

3
likes
90
pub points
55%
popularity

Serial Port for Dart (FFI bindings to libserialport, a minimal C-library created by the sigrok).

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

jpnurmi@gmail.com

License

LGPL 3.0 (LICENSE)

Dependencies

ffi

More

Packages that depend on dart_serial_port