I am developing program which need to interact with COM ports.
By learning from this Q&A: .NET SerialPort DataReceived event not firing, I make my code like that
I had a quite similar problem. In a graphical application (C# win form) I had a class which encapsulate a SerialPort
component. The DataReceived
event was firing only one time, but then any following data received didn't fire any event. I solved the problem by calling the Close
method in my principal form Closed
event function.
No idea of why that changes anything, but now it's working.