FengChendian / serial_port_win32

A flutter SerialPort library using win32 API.
BSD 3-Clause "New" or "Revised" License
31 stars 9 forks source link

Cannot write on port #17

Closed AhmedMannai10 closed 2 years ago

AhmedMannai10 commented 2 years ago

I can get the ports, connect to them and read data. but I cannot write writeBytesFromString and writeBytesFromUint8List always returns false

dart .

FengChendian commented 2 years ago

Actually, write successed. It's due to overlapped mode. Write Operation will always return 0 and GetLastError will retrun 997 error code which means ERROR_IO_PENDING.

Fixed it.

AhmedMannai10 commented 2 years ago

Well Done. Thank you so much👍