}
}
_port.flush();
if (_port.isOpen) {
_port.write(Uint8List
.fromList("1\r\n"
.codeUnits));
}
Serial port is opened without any error but data was not transfering.
workarounds: closed the port in flutter and once opened and closed the port in arduino serial monitior and then again opened the port with above same code in flutter its working.. everytime i need to open and close the arduino serial monitor to make it work in flutter.. any idea about this issue.
sloved:
used this library https://pub.dev/packages/serial_port_win32 to open and close the port once before opening the port with libserialport library.. now its working fine.
} } _port.flush(); if (_port.isOpen) { _port.write(Uint8List .fromList("1\r\n" .codeUnits)); }
Serial port is opened without any error but data was not transfering.
workarounds: closed the port in flutter and once opened and closed the port in arduino serial monitior and then again opened the port with above same code in flutter its working.. everytime i need to open and close the arduino serial monitor to make it work in flutter.. any idea about this issue.