Why does SerialPort.DiscardInBuffer, SerialPort.DiscardOutBuffer VB.net hang up?


by calling the SerialPort.DiscardInBuffer or SerialPort.DiscardOutBuffer (after Port open and not nothing) the Programm freezes and I’m at least unable to check if the module still works.

There is a pending issue on this function already in our roadmap. Currently there is no way to use the DiscardOutBuffer on the Colibri / Apalis T30.

@Stefan.P: What is the reason you need to use this function? Let me know what what is the goal, may be there is an other way to reach it.

Hello @samuel.bissig,

it is mostly for compatibility reasons. Other migrated code uses these functions.
Discard Input Buffer is now done with readByte until no bytes are left to read.
I think the DiscardInputBuffer function also hangs the application.
Discard OutputBuffer is now ignored.

Best regards,