jpnurmi / flutter_libserialport

Serial Port for Flutter
https://pub.dev/packages/flutter_libserialport
MIT License
140 stars 80 forks source link

linux error no 22 when config with baudrate #54

Closed toplinuxsir closed 3 months ago

toplinuxsir commented 1 year ago
 final portReader = SerialPortReader("/dev/ttyACM0");

  try {
    port.config.baudRate = baudrate;
    port.config.bits = dataBits;
    port.config.parity = parity;
    port.config.stopBits = stopBits;
  } catch (e, s) {
    debugPrint("error : $e");

    debugPrint("stack trace: $s");
  }

error as below

 SerialPortError: Invalid argument, errno = 22
flutter: stack trace: #0      Util.call (package:libserialport/src/util.dart:39:7)
flutter: #1      _SerialPortImpl.config (package:libserialport/src/port.dart:335:12)
toplinuxsir commented 1 year ago

close the issue ! I got it The port should open before configure .

lucafabbri commented 3 months ago

29