dart_serial_port 0.1.0+1 copy "dart_serial_port: ^0.1.0+1" to clipboard
dart_serial_port: ^0.1.0+1 copied to clipboard

discontinuedreplaced by: libserialport

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

example/example.dart

import 'package:dart_serial_port/dart_serial_port.dart';

// ignore_for_file: avoid_print

void main() {
  print('Available ports:');
  var i = 0;
  for (final name in SerialPort.availablePorts) {
    final sp = SerialPort(name);
    print('${++i}) $name');
    print('\tDescription: ${sp.description}');
    print('\tManufacturer: ${sp.manufacturer}');
    print('\tSerial Number: ${sp.serialNumber}');
    print('\tProduct ID: 0x${sp.productId!.toRadixString(16)}');
    print('\tVendor ID: 0x${sp.vendorId!.toRadixString(16)}');
    sp.dispose();
  }
}
18
likes
120
pub points
59%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

dylib, ffi

More

Packages that depend on dart_serial_port